diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ca4428..7a7bcaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 4.1.2 - 2022-06-30 + +### Added + +- extendsion `consigment_status_history` in order detail by a `tracking_number` + +## 4.1.1 - 2022-02-21 + +### Added + +- added information list media example in PDF + ## 4.1.0 - 2021-12-16 ### Added diff --git a/example/Article.php b/example/Article.php index d7a19b1..7352606 100644 --- a/example/Article.php +++ b/example/Article.php @@ -90,6 +90,7 @@ new MediaIterator( new Media('https://cdn.my-domain.com/my-product-id-1.jpg', true), new Media('https://cdn.my-domain.com/my-product-id-energy-label.jpg', false, null, true, false), + new Media('https://cdn.my-domain.com/my-product-id-information-list.pdf', false, null, false, true), ), ); $productRequest->setPrice(69); @@ -281,6 +282,7 @@ new MediaIterator( new Media('https://cdn.my-domain.com/my-variant-id-1.jpg', true), new Media('https://cdn.my-domain.com/my-variant-id-energy-label.jpg', false, null, true, false), + new Media('https://cdn.my-domain.com/my-variant-id-information-list.pdf', false, null, false, true), ), new ParameterIterator( Parameter::create('MP_PARAMETER', 'a', 'b', 'c'), @@ -323,6 +325,7 @@ new MediaIterator( new Media('https://cdn.my-domain.com/my-variant-id-1.jpg', true), new Media('https://cdn.my-domain.com/my-variant-id-energy-label.jpg', false, null, true, false), + new Media('https://cdn.my-domain.com/my-variant-id-information-list.pdf', false, null, false, true), ), new ParameterIterator( Parameter::create('MP_PARAMETER', 'a', 'b', 'c'), diff --git a/src/MpApiClient.php b/src/MpApiClient.php index 2eaa9da..4f92562 100644 --- a/src/MpApiClient.php +++ b/src/MpApiClient.php @@ -29,7 +29,7 @@ final class MpApiClient implements ClientInterface, MpApiClientInterface { const APP_NAME = 'mp-api-client'; - const APP_VERSION = '4.1.0'; + const APP_VERSION = '4.1.2'; private BrandClientInterface $brandClient; private CategoryClientInterface $categoryClient; diff --git a/src/Order/Entity/ConsignmentStatusHistoryItem.php b/src/Order/Entity/ConsignmentStatusHistoryItem.php index 68c94c8..99ed10e 100644 --- a/src/Order/Entity/ConsignmentStatusHistoryItem.php +++ b/src/Order/Entity/ConsignmentStatusHistoryItem.php @@ -20,16 +20,19 @@ final class ConsignmentStatusHistoryItem implements JsonSerializable */ private array $flags; + private string $trackingNumber; + /** * @param DateTimeInterface $date * @param ConsignmentStatusEnum $code * @param ConsignmentStatusFlagEnum[] $flags */ - private function __construct(ConsignmentStatusEnum $code, DateTimeInterface $date, array $flags) + private function __construct(ConsignmentStatusEnum $code, DateTimeInterface $date, array $flags, string $trackingNumber) { $this->code = $code; $this->date = $date; $this->flags = $flags; + $this->trackingNumber = $trackingNumber; } /** @@ -44,6 +47,7 @@ public static function createFromApi(array $data): self new ConsignmentStatusEnum($data[ConsignmentStatusEnum::KEY_NAME]), new DateTime($data['date']), array_map(fn(string $flag): ConsignmentStatusFlagEnum => new ConsignmentStatusFlagEnum($flag), $data[ConsignmentStatusFlagEnum::KEY_NAME]), + $data['tracking_number'] ); } @@ -65,4 +69,12 @@ public function getFlags(): array return $this->flags; } + /** + * @return string + */ + public function getTrackingNumber(): string + { + return $this->trackingNumber; + } + } diff --git a/tests/functional/bootstrap.php b/tests/functional/bootstrap.php index 53d49aa..7cd56f9 100644 --- a/tests/functional/bootstrap.php +++ b/tests/functional/bootstrap.php @@ -260,8 +260,8 @@ Fixtures::add( 'article-media', new MediaIterator( - new Media('https://i.cdn.nrholding.net/21749466', false, null, true, false), new Media('https://i.cdn.nrholding.net/21749465', true), + new Media('https://i.cdn.nrholding.net/21749466', false, null, true, false), ), );