chengkun
2025-09-15 3c9050e82e582414dc7b208c8283fe47be37eeba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?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',
    ]);
  }
}