Skip to content

Commit

Permalink
Remove sellerReturnReasonCode from ReturnItem (#706)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlevers committed Jun 10, 2024
1 parent 6ae2a97 commit 04eba51
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
16 changes: 16 additions & 0 deletions resources/metadata/modifications.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
{
"seller": {
"fba-outbound": {
"2020-07-01": [
{
"comment": "Remove required 'sellerReturnReasonCode', see https://github.com/jlevers/selling-partner-api/issues/706",
"action": "replace",
"path": "components.schemas.ReturnItem.required",
"value": [
"amazonShipmentId",
"sellerFulfillmentOrderItemId",
"sellerReturnItemId",
"status",
"statusChangedDate"
]
}
]
},
"orders": {
"0": [
{
Expand Down
1 change: 0 additions & 1 deletion resources/models/seller/fba-outbound/v2020-07-01.json
Original file line number Diff line number Diff line change
Expand Up @@ -4493,7 +4493,6 @@
"amazonShipmentId",
"sellerFulfillmentOrderItemId",
"sellerReturnItemId",
"sellerReturnReasonCode",
"status",
"statusChangedDate"
],
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/FileHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function supportingFilePath(SupportingFile $type, PhpFile $file): string
return $this->baseOutputPath($file, $type->value);
}

protected function baseOutputPath(PhpFile $file, string $subPath = ''): string
protected function baseOutputPath(PhpFile $file, ?string $subPath = ''): string
{
if ($subPath && $subPath[0] !== '/') {
$subPath = "/$subPath";
Expand Down
4 changes: 2 additions & 2 deletions src/Seller/FBAOutboundV20200701/Dto/ReturnItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ final class ReturnItem extends Dto
* @param string $sellerReturnItemId An identifier assigned by the seller to the return item.
* @param string $sellerFulfillmentOrderItemId The identifier assigned to the item by the seller when the fulfillment order was created.
* @param string $amazonShipmentId The identifier for the shipment that is associated with the return item.
* @param string $sellerReturnReasonCode The return reason code assigned to the return item by the seller.
* @param string $status Indicates if the return item has been processed by a fulfillment center.
* @param DateTime $statusChangedDate
* @param ?string $sellerReturnReasonCode The return reason code assigned to the return item by the seller.
* @param ?string $returnComment An optional comment about the return item.
* @param ?string $amazonReturnReasonCode The return reason code that the Amazon fulfillment center assigned to the return item.
* @param ?string $returnAuthorizationId Identifies the return authorization used to return this item. Refer to `ReturnAuthorization`.
Expand All @@ -25,9 +25,9 @@ public function __construct(
public readonly string $sellerReturnItemId,
public readonly string $sellerFulfillmentOrderItemId,
public readonly string $amazonShipmentId,
public readonly string $sellerReturnReasonCode,
public readonly string $status,
public readonly \DateTime $statusChangedDate,
public readonly ?string $sellerReturnReasonCode = null,
public readonly ?string $returnComment = null,
public readonly ?string $amazonReturnReasonCode = null,
public readonly ?string $returnAuthorizationId = null,
Expand Down
2 changes: 1 addition & 1 deletion src/Seller/SellerConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function easyShipV20220323(): EasyShipV20220323\Api
{
return new EasyShipV20220323\Api($this);
}

public function fbaInboundV20240320(): FBAInboundV20240320\Api
{
return new FBAInboundV20240320\Api($this);
Expand Down

0 comments on commit 04eba51

Please sign in to comment.