<?php
|
/**
|
* This class is autogenerated by the Spapi class generator
|
* Date of generation: 2022-05-26
|
* Specification: https://github.com/amzn/selling-partner-api-models/blob/main/models/vendor-direct-fulfillment-shipping-api-model/vendorDirectFulfillmentShipping_2021-12-28.json
|
* Source MD5 signature: e1c5c48c9f2b238160b8b62ec9d10722
|
*
|
*
|
* Selling Partner API for Direct Fulfillment Shipping
|
* The Selling Partner API for Direct Fulfillment Shipping provides programmatic access to a direct fulfillment vendor's shipping data.
|
*/
|
namespace DoubleBreak\Spapi\Api;
|
use DoubleBreak\Spapi\Client;
|
|
class VendorDirectFulfillmentShipping extends Client {
|
|
/**
|
* Operation getShippingLabels
|
*
|
* @param array $queryParams
|
* - *shipFromPartyId* string - The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
|
* - *limit* integer - The limit to the number of records returned.
|
* - *createdAfter* string - Shipping labels that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
|
* - *createdBefore* string - Shipping labels that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
|
* - *sortOrder* string - Sort ASC or DESC by order creation date.
|
* - *nextToken* string - Used for pagination when there are more ship labels than the specified result size limit. The token value is returned in the previous API call.
|
*
|
*/
|
public function getShippingLabels($queryParams = [])
|
{
|
return $this->send("/vendor/directFulfillment/shipping/2021-12-28/shippingLabels", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
public function getShippingLabelsAsync($queryParams = [])
|
{
|
return $this->sendAsync("/vendor/directFulfillment/shipping/2021-12-28/shippingLabels", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
/**
|
* Operation submitShippingLabelRequest
|
*
|
*/
|
public function submitShippingLabelRequest($body = [])
|
{
|
return $this->send("/vendor/directFulfillment/shipping/2021-12-28/shippingLabels", [
|
'method' => 'POST',
|
'json' => $body
|
]);
|
}
|
|
public function submitShippingLabelRequestAsync($body = [])
|
{
|
return $this->sendAsync("/vendor/directFulfillment/shipping/2021-12-28/shippingLabels", [
|
'method' => 'POST',
|
'json' => $body
|
]);
|
}
|
|
/**
|
* Operation getShippingLabel
|
*
|
* @param string $purchaseOrderNumber The purchase order number for which you want to return the shipping label. It should be the same purchaseOrderNumber as received in the order.
|
*
|
*/
|
public function getShippingLabel($purchaseOrderNumber)
|
{
|
return $this->send("/vendor/directFulfillment/shipping/2021-12-28/shippingLabels/{$purchaseOrderNumber}", [
|
'method' => 'GET',
|
]);
|
}
|
|
public function getShippingLabelAsync($purchaseOrderNumber)
|
{
|
return $this->sendAsync("/vendor/directFulfillment/shipping/2021-12-28/shippingLabels/{$purchaseOrderNumber}", [
|
'method' => 'GET',
|
]);
|
}
|
}
|