Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ShippingService.php #753

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading