From c59b7bb830bc13f966b04a3247b923e6d50dd171 Mon Sep 17 00:00:00 2001 From: Pavel Voborsky Date: Tue, 28 Dec 2021 12:41:31 +0100 Subject: [PATCH 1/4] Updated media order in test fixtures to match order from API --- tests/functional/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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), ), ); From bc082ddd44cdf18c7608406f1acfcf6fa93127da Mon Sep 17 00:00:00 2001 From: Josef Erneker Date: Fri, 18 Feb 2022 10:01:21 +0100 Subject: [PATCH 2/4] MAR-12585 Add information list as pdf --- example/Article.php | 3 +++ 1 file changed, 3 insertions(+) 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'), From 4b5876c7a6110d05e9e8e4113445dfd8d6a5372b Mon Sep 17 00:00:00 2001 From: Josef Erneker Date: Mon, 21 Feb 2022 16:42:42 +0100 Subject: [PATCH 3/4] MAR-12585 Add changelog entry and update version --- CHANGELOG.md | 6 ++++++ src/MpApiClient.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ca4428..0cbeede 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ 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.1 - 2022-02-21 + +### Added + +- added information list media example in PDF + ## 4.1.0 - 2021-12-16 ### Added diff --git a/src/MpApiClient.php b/src/MpApiClient.php index 2eaa9da..96349b2 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.1'; private BrandClientInterface $brandClient; private CategoryClientInterface $categoryClient; From 244cb7fed7c81256e3c605750307f604807d70b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Bedn=C3=A1=C5=99?= Date: Fri, 1 Jul 2022 15:18:02 +0200 Subject: [PATCH 4/4] feature - MAR-13064 - add tracking number to ConsigmentStatusHistoryItem --- CHANGELOG.md | 6 ++++++ src/MpApiClient.php | 2 +- src/Order/Entity/ConsignmentStatusHistoryItem.php | 14 +++++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cbeede..7a7bcaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ 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 diff --git a/src/MpApiClient.php b/src/MpApiClient.php index 96349b2..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.1'; + 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; + } + }