-
-
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
108020b
commit 6d3e1da
Showing
46 changed files
with
600 additions
and
37 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
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
11 changes: 11 additions & 0 deletions
11
src/DataTransferObjects/Requests/Feeds/CreateFeedDocumentSpecification.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,11 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\DataTransferObjects\Requests\Feeds; | ||
|
||
use Jasara\AmznSPA\DataTransferObjects\Requests\BaseRequest; | ||
use Jasara\AmznSPA\DataTransferObjects\Validators\StringEnumValidator; | ||
|
||
class CreateFeedDocumentSpecification extends BaseRequest | ||
{ | ||
public string $content_type; | ||
} |
20 changes: 20 additions & 0 deletions
20
src/DataTransferObjects/Requests/Feeds/CreateFeedSpecification.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,20 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\DataTransferObjects\Requests\Feeds; | ||
|
||
use Jasara\AmznSPA\Constants\AmazonEnums; | ||
use Jasara\AmznSPA\DataTransferObjects\Requests\BaseRequest; | ||
use Jasara\AmznSPA\DataTransferObjects\Validators\StringArrayEnumValidator; | ||
use Jasara\AmznSPA\DataTransferObjects\Validators\StringEnumValidator; | ||
|
||
class CreateFeedSpecification extends BaseRequest | ||
{ | ||
#[StringEnumValidator(AmazonEnums::FEED_TYPES)] | ||
public string $feed_type; | ||
|
||
public array $marketplace_ids; | ||
|
||
public string $input_feed_document_id; | ||
|
||
public ?array $feed_options; | ||
} |
12 changes: 12 additions & 0 deletions
12
src/DataTransferObjects/Responses/Feeds/CreateFeedDocumentResponse.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,12 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\DataTransferObjects\Responses\Feeds; | ||
|
||
use Jasara\AmznSPA\DataTransferObjects\Responses\BaseResponse; | ||
|
||
class CreateFeedDocumentResponse extends BaseResponse | ||
{ | ||
public string $feed_document_id; | ||
|
||
public string $url; | ||
} |
10 changes: 10 additions & 0 deletions
10
src/DataTransferObjects/Responses/Feeds/CreateFeedResponse.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,10 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\DataTransferObjects\Responses\Feeds; | ||
|
||
use Jasara\AmznSPA\DataTransferObjects\Responses\BaseResponse; | ||
|
||
class CreateFeedResponse extends BaseResponse | ||
{ | ||
public string $feed_id; | ||
} |
11 changes: 11 additions & 0 deletions
11
src/DataTransferObjects/Responses/Feeds/GetFeedDocumentResponse.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,11 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\DataTransferObjects\Responses\Feeds; | ||
|
||
use Jasara\AmznSPA\DataTransferObjects\Responses\BaseResponse; | ||
use Jasara\AmznSPA\DataTransferObjects\Schemas\Feeds\FeedDocumentSchema; | ||
|
||
class GetFeedDocumentResponse extends BaseResponse | ||
{ | ||
public FeedDocumentSchema $feed_document; | ||
} |
15 changes: 15 additions & 0 deletions
15
src/DataTransferObjects/Responses/Feeds/GetFeedResponse.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,15 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\DataTransferObjects\Responses\Feeds; | ||
|
||
use Jasara\AmznSPA\DataTransferObjects\Responses\BaseResponse; | ||
use Jasara\AmznSPA\DataTransferObjects\Schemas\Feeds\FeedListSchema; | ||
use Jasara\AmznSPA\DataTransferObjects\Schemas\Feeds\FeedSchema; | ||
use Spatie\DataTransferObject\Attributes\CastWith; | ||
use Spatie\DataTransferObject\Casters\ArrayCaster; | ||
use Spatie\DataTransferObject\DataTransferObject; | ||
|
||
class GetFeedResponse extends BaseResponse | ||
{ | ||
public ?FeedSchema $feed; | ||
} |
18 changes: 18 additions & 0 deletions
18
src/DataTransferObjects/Responses/Feeds/GetFeedsResponse.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,18 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\DataTransferObjects\Responses\Feeds; | ||
|
||
use Jasara\AmznSPA\DataTransferObjects\Responses\BaseResponse; | ||
use Jasara\AmznSPA\DataTransferObjects\Schemas\Feeds\FeedListSchema; | ||
use Jasara\AmznSPA\DataTransferObjects\Schemas\Feeds\FeedSchema; | ||
use Spatie\DataTransferObject\Attributes\CastWith; | ||
use Spatie\DataTransferObject\Casters\ArrayCaster; | ||
use Spatie\DataTransferObject\DataTransferObject; | ||
|
||
class GetFeedsResponse extends BaseResponse | ||
{ | ||
#[CastWith(ArrayCaster::class, itemType: FeedSchema::class)] | ||
public FeedListSchema $feeds; | ||
|
||
public ?string $next_token; | ||
} |
16 changes: 16 additions & 0 deletions
16
src/DataTransferObjects/Schemas/Feeds/FeedDocumentSchema.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\DataTransferObjects\Schemas\Feeds; | ||
|
||
use Jasara\AmznSPA\DataTransferObjects\Validators\StringEnumValidator; | ||
use Spatie\DataTransferObject\DataTransferObject; | ||
|
||
class FeedDocumentSchema extends DataTransferObject | ||
{ | ||
public string $feed_document_id; | ||
|
||
public string $url; | ||
|
||
#[StringEnumValidator(['GZIP'])] | ||
public ?string $compression_algorithm; | ||
} |
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\DataTransferObjects\Schemas\Feeds; | ||
|
||
use Illuminate\Support\Collection; | ||
|
||
class FeedListSchema extends Collection | ||
{ | ||
/** | ||
* @codeCoverageIgnore | ||
*/ | ||
public function offsetGet($key): FeedSchema | ||
{ | ||
return parent::offsetGet($key); | ||
} | ||
} |
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,30 @@ | ||
<?php | ||
|
||
namespace Jasara\AmznSPA\DataTransferObjects\Schemas\Feeds; | ||
|
||
use Carbon\CarbonImmutable; | ||
use Jasara\AmznSPA\DataTransferObjects\Casts\CarbonFromStringCaster; | ||
use Spatie\DataTransferObject\Attributes\CastWith; | ||
use Spatie\DataTransferObject\DataTransferObject; | ||
|
||
class FeedSchema extends DataTransferObject | ||
{ | ||
public string $feed_id; | ||
|
||
public string $feed_type; | ||
|
||
public ?array $marketplace_ids; | ||
|
||
#[CastWith(CarbonFromStringCaster::class)] | ||
public CarbonImmutable $created_time; | ||
|
||
public string $processing_status; | ||
|
||
#[CastWith(CarbonFromStringCaster::class)] | ||
public ?CarbonImmutable $processing_start_time; | ||
|
||
#[CastWith(CarbonFromStringCaster::class)] | ||
public ?CarbonImmutable $processing_end_time; | ||
|
||
public ?string $result_feed_document_id; | ||
} |
Oops, something went wrong.