Skip to content

Commit

Permalink
Update inbound plan creation schema
Browse files Browse the repository at this point in the history
  • Loading branch information
keithbrink committed Aug 9, 2024
1 parent c0e9055 commit 2977586
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@
use Jasara\AmznSPA\Data\Base\Validators\RuleValidator;
use Jasara\AmznSPA\Data\Requests\BaseRequest;
use Jasara\AmznSPA\Data\Schemas\AddressSchema;
use Jasara\AmznSPA\Data\Schemas\FulfillmentInbound\v20240320\ContactInformationSchema;
use Jasara\AmznSPA\Data\Schemas\FulfillmentInbound\v20240320\ItemInputSchemaList;

class CreateInboundPlanRequest extends BaseRequest
{
public function __construct(
public ContactInformationSchema $contact_information,
#[RuleValidator(['array', 'max:1'])]
public array $destination_marketplaces,
public ItemInputSchemaList $items,
#[RuleValidator(['min:1', 'max:40'])]
public ?string $name,
public ?AddressSchema $source_address,
public AddressSchema $source_address,
) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ enum LabelOwner: string
{
case Amazon = 'AMAZON';
case Seller = 'SELLER';
case None = 'NONE';
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ enum PrepOwner: string
{
case Amazon = 'AMAZON';
case Seller = 'SELLER';
case None = 'NONE';
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ public function testCreateInboundPlan(): void
$amzn = new AmznSPA($config);
$amzn = $amzn->usingMarketplace('ATVPDKIKX0DER');
$response = $amzn->fulfillment_inbound20240320->createInboundPlan(CreateInboundPlanRequest::from([
'contact_information' => [
'email' => '[email protected]',
],
'destination_marketplaces' => [
'ATVPDKIKX0DER',
],
Expand All @@ -110,6 +107,16 @@ public function testCreateInboundPlan(): void
'quantity' => 1,
],
],
'source_address' => [
'name' => Str::random(10),
'address_line_1' => Str::random(),
'address_line_2' => null,
'district_or_county' => Str::random(),
'city' => Str::random(),
'state_or_province_code' => Str::random(),
'country_code' => Str::random(2),
'postal_code' => Str::random(),
],
]));

$this->assertInstanceOf(CreateInboundPlanResponse::class, $response);
Expand Down

0 comments on commit 2977586

Please sign in to comment.