diff --git a/src/DataTransferObjects/Requests/FulfillmentInbound/CreateInboundShipmentPlanRequest.php b/src/DataTransferObjects/Requests/FulfillmentInbound/CreateInboundShipmentPlanRequest.php index ec309ba3..72fd076e 100644 --- a/src/DataTransferObjects/Requests/FulfillmentInbound/CreateInboundShipmentPlanRequest.php +++ b/src/DataTransferObjects/Requests/FulfillmentInbound/CreateInboundShipmentPlanRequest.php @@ -3,8 +3,11 @@ namespace Jasara\AmznSPA\DataTransferObjects\Requests\FulfillmentInbound; use Jasara\AmznSPA\DataTransferObjects\Schemas\AddressSchema; +use Jasara\AmznSPA\DataTransferObjects\Schemas\FulfillmentInbound\InboundShipmentPlanRequestItemSchema; use Jasara\AmznSPA\DataTransferObjects\Validators\MaxLengthValidator; use Jasara\AmznSPA\DataTransferObjects\Validators\StringEnumValidator; +use Spatie\DataTransferObject\Attributes\CastWith; +use Spatie\DataTransferObject\Casters\ArrayCaster; use Spatie\DataTransferObject\DataTransferObject; class CreateInboundShipmentPlanRequest extends DataTransferObject @@ -19,5 +22,6 @@ class CreateInboundShipmentPlanRequest extends DataTransferObject public ?string $ship_to_country_subdivision_code; + #[CastWith(ArrayCaster::class, itemType: InboundShipmentPlanRequestItemSchema::class)] public $inbound_shipment_plan_request_items; } diff --git a/src/DataTransferObjects/Responses/FulfillmentInbound/GetTransportDetailsResponse.php b/src/DataTransferObjects/Responses/FulfillmentInbound/GetTransportDetailsResponse.php index baf74830..64c03b31 100644 --- a/src/DataTransferObjects/Responses/FulfillmentInbound/GetTransportDetailsResponse.php +++ b/src/DataTransferObjects/Responses/FulfillmentInbound/GetTransportDetailsResponse.php @@ -7,5 +7,5 @@ class GetTransportDetailsResponse extends BaseResponse { - public GetTransportDetailsResultSchema $payload; + public ?GetTransportDetailsResultSchema $payload; } diff --git a/src/DataTransferObjects/Schemas/FulfillmentInbound/InboundShipmentPlanRequestItemListSchema.php b/src/DataTransferObjects/Schemas/FulfillmentInbound/InboundShipmentPlanRequestItemListSchema.php new file mode 100644 index 00000000..eca4b232 --- /dev/null +++ b/src/DataTransferObjects/Schemas/FulfillmentInbound/InboundShipmentPlanRequestItemListSchema.php @@ -0,0 +1,16 @@ +