-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
22789b8
commit 1df11e1
Showing
16 changed files
with
223 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\Data\Responses\Sellers; | ||
|
||
use Jasara\AmznSPA\Data\Responses\BaseResponse; | ||
use Jasara\AmznSPA\Data\Schemas\Sellers\AccountSchema; | ||
|
||
class GetAccountResponse extends BaseResponse | ||
{ | ||
public function __construct( | ||
public ?AccountSchema $payload, | ||
) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\Data\Schemas\Sellers; | ||
|
||
use Jasara\AmznSPA\Data\Schemas\BaseSchema; | ||
|
||
class AccountSchema extends BaseSchema | ||
{ | ||
public function __construct( | ||
public MarketplaceLevelAttributesSchemaList $marketplace_level_attributes, | ||
public BusinessType $business_type, | ||
public ?BusinessSchema $business, | ||
public ?PrimaryContactSchema $primary_contact, | ||
) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\Data\Schemas\Sellers; | ||
|
||
use Jasara\AmznSPA\Data\Schemas\BaseSchema; | ||
|
||
class BusinessSchema extends BaseSchema | ||
{ | ||
public function __construct( | ||
public string $name, | ||
public SellersAddressSchema $registered_business_address, | ||
public ?string $company_registration_number, | ||
public ?string $company_tax_identification_number, | ||
public ?string $non_latin_name, | ||
) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\Data\Schemas\Sellers; | ||
|
||
enum BusinessType: string | ||
{ | ||
case Charity = 'CHARITY'; | ||
case Craftsman = 'CRAFTSMAN'; | ||
case NaturalPersonCompany = 'NATURAL_PERSON_COMPANY'; | ||
case PublicListed = 'PUBLIC_LISTED'; | ||
case PrivateLimited = 'PRIVATE_LIMITED'; | ||
case SoleProprietorship = 'SOLE_PROPRIETORSHIP'; | ||
case StateOwned = 'STATE_OWNED'; | ||
case Individual = 'INDIVIDUAL'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\Data\Schemas\Sellers; | ||
|
||
enum ListingStatus: string | ||
{ | ||
case Active = 'ACTIVE'; | ||
case Inactive = 'INACTIVE'; | ||
} |
16 changes: 16 additions & 0 deletions
16
src/Data/Schemas/Sellers/MarketplaceLevelAttributesSchema.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\Data\Schemas\Sellers; | ||
|
||
use Jasara\AmznSPA\Data\Schemas\BaseSchema; | ||
|
||
class MarketplaceLevelAttributesSchema extends BaseSchema | ||
{ | ||
public function __construct( | ||
public MarketplaceSchema $marketplace, | ||
public string $store_name, | ||
public ListingStatus $listing_status, | ||
public SellingPlan $selling_plan, | ||
) { | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/Data/Schemas/Sellers/MarketplaceLevelAttributesSchemaList.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\Data\Schemas\Sellers; | ||
|
||
use Jasara\AmznSPA\Data\Base\TypedCollection; | ||
|
||
/** | ||
* @template-extends TypedCollection<MarketplaceLevelAttributesSchema> | ||
*/ | ||
class MarketplaceLevelAttributesSchemaList extends TypedCollection | ||
{ | ||
public const ITEM_CLASS = MarketplaceLevelAttributesSchema::class; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\Data\Schemas\Sellers; | ||
|
||
use Jasara\AmznSPA\Data\Schemas\BaseSchema; | ||
|
||
class PrimaryContactSchema extends BaseSchema | ||
{ | ||
public function __construct( | ||
public string $name, | ||
public SellersAddressSchema $address, | ||
public ?string $non_latin_name, | ||
) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\Data\Schemas\Sellers; | ||
|
||
use Jasara\AmznSPA\Data\Base\Validators\MaxLengthValidator; | ||
use Jasara\AmznSPA\Data\Schemas\BaseSchema; | ||
|
||
class SellersAddressSchema extends BaseSchema | ||
{ | ||
public function __construct( | ||
public string $address_line_1, | ||
public ?string $address_line_2, | ||
public ?string $city, | ||
public ?string $state_or_province_code, | ||
#[MaxLengthValidator(2)] | ||
public string $country_code, | ||
public string $postal_code, | ||
) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\Data\Schemas\Sellers; | ||
|
||
enum SellingPlan: string | ||
{ | ||
case Professional = 'PROFESSIONAL'; | ||
case Individual = 'INDIVIDUAL'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"payload": { | ||
"businessType": "PRIVATE_LIMITED", | ||
"marketplaceLevelAttributes": [ | ||
{ | ||
"marketplace": { | ||
"id": "ATVPDKIKX0DER", | ||
"name": "United States", | ||
"countryCode": "US", | ||
"domainName": "www.amazon.com" | ||
}, | ||
"storeName": "BestSellerStore", | ||
"listingStatus": "ACTIVE", | ||
"sellingPlan": "PROFESSIONAL" | ||
} | ||
], | ||
"business": { | ||
"name": "BestSeller Inc.", | ||
"nonLatinName": "ベストセラー株式会社", | ||
"registeredBusinessAddress": { | ||
"addressLine1": "123 Main St", | ||
"addressLine2": "Suite 500", | ||
"city": "Seattle", | ||
"stateOrProvinceCode": "WA", | ||
"postalCode": "98101", | ||
"countryCode": "US" | ||
}, | ||
"companyRegistrationNumber": "123456789" | ||
}, | ||
"primaryContact": { | ||
"name": "John Doe", | ||
"nonLatinName": "ジョン・ドゥ", | ||
"address": { | ||
"addressLine1": "456 Oak St", | ||
"addressLine2": "Apt 12", | ||
"city": "Seattle", | ||
"stateOrProvinceCode": "WA", | ||
"postalCode": "98102", | ||
"countryCode": "US" | ||
} | ||
} | ||
} | ||
} |