<?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/shipment-invoicing-api-model/shipmentInvoicingV0.json
|
* Source MD5 signature: ba7916d6d0690131901ecf553f5a9914
|
*
|
*
|
* Selling Partner API for Shipment Invoicing
|
* The Selling Partner API for Shipment Invoicing helps you programmatically retrieve shipment invoice information in the Brazil marketplace for a selling partner’s Fulfillment by Amazon (FBA) orders.
|
*/
|
namespace DoubleBreak\Spapi\Api;
|
use DoubleBreak\Spapi\Client;
|
|
class ShipmentInvoicing extends Client {
|
|
/**
|
* Operation getShipmentDetails
|
*
|
* @param string $shipmentId The identifier for the shipment. Get this value from the FBAOutboundShipmentStatus notification. For information about subscribing to notifications, see the [Notifications API Use Case Guide](doc:notifications-api-v1-use-case-guide).
|
*
|
*/
|
public function getShipmentDetails($shipmentId)
|
{
|
return $this->send("/fba/outbound/brazil/v0/shipments/{$shipmentId}", [
|
'method' => 'GET',
|
]);
|
}
|
|
public function getShipmentDetailsAsync($shipmentId)
|
{
|
return $this->sendAsync("/fba/outbound/brazil/v0/shipments/{$shipmentId}", [
|
'method' => 'GET',
|
]);
|
}
|
|
/**
|
* Operation submitInvoice
|
*
|
* @param string $shipmentId The identifier for the shipment.
|
*
|
*/
|
public function submitInvoice($shipmentId, $body = [])
|
{
|
return $this->send("/fba/outbound/brazil/v0/shipments/{$shipmentId}/invoice", [
|
'method' => 'POST',
|
'json' => $body
|
]);
|
}
|
|
public function submitInvoiceAsync($shipmentId, $body = [])
|
{
|
return $this->sendAsync("/fba/outbound/brazil/v0/shipments/{$shipmentId}/invoice", [
|
'method' => 'POST',
|
'json' => $body
|
]);
|
}
|
|
/**
|
* Operation getInvoiceStatus
|
*
|
* @param string $shipmentId The shipment identifier for the shipment.
|
*
|
*/
|
public function getInvoiceStatus($shipmentId)
|
{
|
return $this->send("/fba/outbound/brazil/v0/shipments/{$shipmentId}/invoice/status", [
|
'method' => 'GET',
|
]);
|
}
|
|
public function getInvoiceStatusAsync($shipmentId)
|
{
|
return $this->sendAsync("/fba/outbound/brazil/v0/shipments/{$shipmentId}/invoice/status", [
|
'method' => 'GET',
|
]);
|
}
|
}
|