Skip to content

Commit

Permalink
Make "AreCasesRequired" not required
Browse files Browse the repository at this point in the history
Responses from Amazon are missing this column
  • Loading branch information
dpash committed Jun 12, 2024
1 parent d1a2e44 commit 2a74e60
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 8 additions & 0 deletions resources/metadata/modifications.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
"comment": "Responses from Amazon have been missing one or more required Address parts",
"action": "delete",
"path": "components.schemas.Address.required"
},
{
"comment": "Responses from Amazon do not have the AreCasesRequired value",
"action": "replace",
"path": "components.schemas.InboundShipmentInfo.required",
"value": [
"ShipFromAddress"
]
}
]
},
Expand Down
1 change: 0 additions & 1 deletion resources/models/seller/fba-inbound/v0.json
Original file line number Diff line number Diff line change
Expand Up @@ -5530,7 +5530,6 @@
},
"InboundShipmentInfo": {
"required": [
"AreCasesRequired",
"ShipFromAddress"
],
"type": "object",
Expand Down
6 changes: 3 additions & 3 deletions src/Seller/FBAInboundV0/Dto/InboundShipmentInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,37 @@ final class InboundShipmentInfo extends Dto
{
protected static array $attributeMap = [
'shipFromAddress' => 'ShipFromAddress',
'areCasesRequired' => 'AreCasesRequired',
'shipmentId' => 'ShipmentId',
'shipmentName' => 'ShipmentName',
'destinationFulfillmentCenterId' => 'DestinationFulfillmentCenterId',
'shipmentStatus' => 'ShipmentStatus',
'labelPrepType' => 'LabelPrepType',
'areCasesRequired' => 'AreCasesRequired',
'confirmedNeedByDate' => 'ConfirmedNeedByDate',
'boxContentsSource' => 'BoxContentsSource',
'estimatedBoxContentsFee' => 'EstimatedBoxContentsFee',
];

/**
* @param Address $shipFromAddress Specific details to identify a place.
* @param bool $areCasesRequired Indicates whether or not an inbound shipment contains case-packed boxes. When AreCasesRequired = true for an inbound shipment, all items in the inbound shipment must be case packed.
* @param ?string $shipmentId The shipment identifier submitted in the request.
* @param ?string $shipmentName The name for the inbound shipment.
* @param ?string $destinationFulfillmentCenterId An Amazon fulfillment center identifier created by Amazon.
* @param ?string $shipmentStatus Indicates the status of the inbound shipment. When used with the createInboundShipment operation, WORKING is the only valid value. When used with the updateInboundShipment operation, possible values are WORKING, SHIPPED or CANCELLED.
* @param ?string $labelPrepType The type of label preparation that is required for the inbound shipment.
* @param ?bool $areCasesRequired Indicates whether or not an inbound shipment contains case-packed boxes. When AreCasesRequired = true for an inbound shipment, all items in the inbound shipment must be case packed.
* @param ?\DateTimeInterface $confirmedNeedByDate Type containing date in string format
* @param ?string $boxContentsSource Where the seller provided box contents information for a shipment.
* @param ?BoxContentsFeeDetails $estimatedBoxContentsFee The manual processing fee per unit and total fee for a shipment.
*/
public function __construct(
public readonly Address $shipFromAddress,
public readonly bool $areCasesRequired,
public readonly ?string $shipmentId = null,
public readonly ?string $shipmentName = null,
public readonly ?string $destinationFulfillmentCenterId = null,
public readonly ?string $shipmentStatus = null,
public readonly ?string $labelPrepType = null,
public readonly ?bool $areCasesRequired = null,
public readonly ?\DateTimeInterface $confirmedNeedByDate = null,
public readonly ?string $boxContentsSource = null,
public readonly ?BoxContentsFeeDetails $estimatedBoxContentsFee = null,
Expand Down

0 comments on commit 2a74e60

Please sign in to comment.