Skip to content

Commit

Permalink
Schema fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
keithbrink committed Sep 30, 2021
1 parent 34dca6c commit 22f93dd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

class GetTransportDetailsResponse extends BaseResponse
{
public GetTransportDetailsResultSchema $payload;
public ?GetTransportDetailsResultSchema $payload;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Jasara\AmznSPA\DataTransferObjects\Schemas\FulfillmentInbound;

use Illuminate\Support\Collection;

class InboundShipmentPlanRequestItemListSchema extends Collection
{
/**
* @codeCoverageIgnore
*/
public function offsetGet($key): InboundShipmentPlanRequestItemSchema
{
return parent::offsetGet($key);
}
}

0 comments on commit 22f93dd

Please sign in to comment.