Skip to content

Commit

Permalink
Merge pull request #753 from simonsolutions/patch-4
Browse files Browse the repository at this point in the history
Update ShippingService.php
  • Loading branch information
jlevers authored Aug 5, 2024
2 parents 5f22355 + c95befe commit a4f7d6d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
18 changes: 18 additions & 0 deletions resources/metadata/modifications.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,24 @@
}
]
},
"merchant-fulfillment": {
"0": [
{
"comment": "Remove required 'RequiresAdditionalSellerInputs', its not always present in response",
"action": "replace",
"path": "components.schemas.ShippingService.required",
"value": [
"CarrierName",
"Rate",
"ShipDate",
"ShippingServiceId",
"ShippingServiceName",
"ShippingServiceOfferId",
"ShippingServiceOptions"
]
}
]
},
"orders": {
"0": [
{
Expand Down
3 changes: 1 addition & 2 deletions resources/models/seller/merchant-fulfillment/v0.json
Original file line number Diff line number Diff line change
Expand Up @@ -3080,7 +3080,6 @@
"required": [
"CarrierName",
"Rate",
"RequiresAdditionalSellerInputs",
"ShipDate",
"ShippingServiceId",
"ShippingServiceName",
Expand Down Expand Up @@ -3543,4 +3542,4 @@
}
},
"x-original-swagger-version": "2.0"
}
}
4 changes: 2 additions & 2 deletions src/Seller/MerchantFulfillmentV0/Dto/ShippingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ final class ShippingService extends Dto
* @param \DateTimeInterface $shipDate Date-time formatted timestamp.
* @param CurrencyAmount $rate Currency type and amount.
* @param ShippingServiceOptions $shippingServiceOptions Extra services provided by a carrier.
* @param bool $requiresAdditionalSellerInputs When true, additional seller inputs are required.
* @param ?bool $requiresAdditionalSellerInputs When true, additional seller inputs are required.
* @param ?\DateTimeInterface $earliestEstimatedDeliveryDate Date-time formatted timestamp.
* @param ?\DateTimeInterface $latestEstimatedDeliveryDate Date-time formatted timestamp.
* @param ?AvailableShippingServiceOptions $availableShippingServiceOptions The available shipping service options.
Expand All @@ -57,7 +57,7 @@ public function __construct(
public readonly \DateTimeInterface $shipDate,
public readonly CurrencyAmount $rate,
public readonly ShippingServiceOptions $shippingServiceOptions,
public readonly bool $requiresAdditionalSellerInputs,
public readonly ?bool $requiresAdditionalSellerInputs = null,
public readonly ?\DateTimeInterface $earliestEstimatedDeliveryDate = null,
public readonly ?\DateTimeInterface $latestEstimatedDeliveryDate = null,
public readonly ?AvailableShippingServiceOptions $availableShippingServiceOptions = null,
Expand Down

0 comments on commit a4f7d6d

Please sign in to comment.