Download the PHP package kumaneko/mws-orders-client without Composer

On this page you can find all versions of the php package kumaneko/mws-orders-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mws-orders-client

MWS注文APIを利用して、注文情報を取得するライブラリです。

ListOrdersオペレーションはOrderStatusを指定しない限り、保留中を含む全ての注文を返します。 またOrderStatusを指定する場合、UnshippedとPartiallyShippedはどちらか片方だけを指定することはできず、 両方を指定することのみが可能です。

サンプルコード1

ListOrders, ListOrderItems オペレーションを利用して、直近3時間の注文情報を取得する。

//***アカウント情報***
$sellerId = "***セラーID***";
$awsAccessKeyId = "***AWSアクセスキーID***";
$secretKey = "***シークレットキー***";
//3時間前から現在までの注文を取得する。
$date = new DateTime();
$date->sub(new DateInterval('PT3H'));
$client = new Kumaneko\MwsOrdersClient\Client();
$request = new Kumaneko\MwsOrdersClient\Request\ListOrdersRequest([
    'SellerId' => $sellerId,
    'AWSAccessKeyId' => $awsAccessKeyId,
    'CreatedAfter' => $date,
    'OrderStatus' => 'Unshipped',
    'SecretKey' => $secretKey
]);
$result = $client->listOrdersRequest($request);
$orders = $result->Orders;

//各注文ごとに注文商品情報を取得する。注文情報を表示する。(一部)
foreach ($orders as $order) {
    $request = new \Kumaneko\MwsOrdersClient\Request\ListOrderItemsRequest([
        'SellerId' => $sellerId,
        'AWSAccessKeyId' => $awsAccessKeyId,
        'AmazonOrderId' => $order->AmazonOrderId,
        'SecretKey' => $secretKey
    ]);
    $result = $client->listOrderItemsRequest($request);
    /** @var \Kumaneko\MwsOrdersClient\Response\Order $order */
    $order->OrderItems = $result->OrderItems;

    echo "AmazonOrderId: {$order->AmazonOrderId}\n";
    echo "OrderStatus: {$order->OrderStatus}\n";
    echo "PurchaseDate: {$order->PurchaseDate->format('Y-m-d H:i:s')}\n";
    echo "OrderTotal-Amount: {$order->OrderTotal['Amount']}\n";
    echo "OrderItems: \n";
    foreach ($order->OrderItems as $key => $orderItem) {
        /** @var \Kumaneko\MwsOrdersClient\Response\OrderItem $orderItem */
        echo "  OrderItem{$key}: \n";
        echo "    ASIN: {$orderItem->ASIN}\n";
        echo "    SellerSKU: {$orderItem->SellerSKU}\n";
        echo "    Title: {$orderItem->Title}\n";
        echo "    ItemPrice: {$orderItem->ItemPrice['Amount']}\n";
        echo "    ShippingPrice: {$orderItem->ShippingPrice['Amount']}\n";
    }
    sleep(1);
}

サンプルコード2

GetOrderオペレーションで注文ステータスを取得する

//***アカウント情報***
$sellerId = "***セラーID***";
$awsAccessKeyId = "***AWSアクセスキーID***";
$secretKey = "***シークレットキー***";
//***注文番号***。
$amazonOrderId = "***注文番号***";

$client = new Kumaneko\MwsOrdersClient\Client();
$request = new Kumaneko\MwsOrdersClient\Request\GetOrderRequest([
     'SellerId' => $sellerId,
     'AWSAccessKeyId' => $awsAccessKeyId,
     'AmazonOrderId' => ['Id' => ['1' => $amazonOrderId]],
     'SecretKey' => $secretKey
 ]);
 $result = $client->getOrderRequest($request);
 foreach ($result->Orders as $order) {
     echo "AmazonOrderID: {$order->AmazonOrderId}\n";
     echo "Status: {$order->OrderStatus}\n";
 }

All versions of mws-orders-client with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kumaneko/mws-orders-client contains the following files

Loading the files please wait ....