<?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-orders-api-model/vendorDirectFulfillmentOrders_2021-12-28.json
|
* Source MD5 signature: 1ed4d32acafd031c861da6392731fac2
|
*
|
*
|
* Selling Partner API for Direct Fulfillment Orders
|
* The Selling Partner API for Direct Fulfillment Orders provides programmatic access to a direct fulfillment vendor's order data.
|
*/
|
namespace DoubleBreak\Spapi\Api;
|
use DoubleBreak\Spapi\Client;
|
|
class VendorDirectFulfillmentOrders extends Client {
|
|
/**
|
* Operation getOrders
|
*
|
* @param array $queryParams
|
* - *shipFromPartyId* string - The vendor warehouse identifier for the fulfillment warehouse. If not specified, the result will contain orders for all warehouses.
|
* - *status* string - Returns only the purchase orders that match the specified status. If not specified, the result will contain orders that match any status.
|
* - *limit* integer - The limit to the number of purchase orders returned.
|
* - *createdAfter* string - Purchase orders that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
|
* - *createdBefore* string - Purchase orders 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 the list in ascending or descending order by order creation date.
|
* - *nextToken* string - Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call.
|
* - *includeDetails* string - When true, returns the complete purchase order details. Otherwise, only purchase order numbers are returned.
|
*
|
*/
|
public function getOrders($queryParams = [])
|
{
|
return $this->send("/vendor/directFulfillment/orders/2021-12-28/purchaseOrders", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
public function getOrdersAsync($queryParams = [])
|
{
|
return $this->sendAsync("/vendor/directFulfillment/orders/2021-12-28/purchaseOrders", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
/**
|
* Operation getOrder
|
*
|
* @param string $purchaseOrderNumber The order identifier for the purchase order that you want. Formatting Notes: alpha-numeric code.
|
*
|
*/
|
public function getOrder($purchaseOrderNumber)
|
{
|
return $this->send("/vendor/directFulfillment/orders/2021-12-28/purchaseOrders/{$purchaseOrderNumber}", [
|
'method' => 'GET',
|
]);
|
}
|
|
public function getOrderAsync($purchaseOrderNumber)
|
{
|
return $this->sendAsync("/vendor/directFulfillment/orders/2021-12-28/purchaseOrders/{$purchaseOrderNumber}", [
|
'method' => 'GET',
|
]);
|
}
|
|
/**
|
* Operation submitAcknowledgement
|
*
|
*/
|
public function submitAcknowledgement($body = [])
|
{
|
return $this->send("/vendor/directFulfillment/orders/2021-12-28/acknowledgements", [
|
'method' => 'POST',
|
'json' => $body
|
]);
|
}
|
|
public function submitAcknowledgementAsync($body = [])
|
{
|
return $this->sendAsync("/vendor/directFulfillment/orders/2021-12-28/acknowledgements", [
|
'method' => 'POST',
|
'json' => $body
|
]);
|
}
|
}
|