@frontastic/common 2.31.0 → 2.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # common Changelog
2
2
 
3
+ ## `2.32.0` (2022-04-13)
4
+
5
+ * fix: rehused cart on api test order
6
+ * fix: added salutaion to api test address.
7
+ * feat(FP-840): included cart rawApiData when placing order in Shopware
8
+
9
+ ## `2.31.2` (2022-04-11)
10
+
11
+ * fix: Categories with same name are returned
12
+
13
+ ## `2.31.1` (2022-04-08)
14
+
15
+ * fix: prevent bc break on commercetools CartApi
16
+
3
17
  ## `2.31.0` (2022-04-07)
4
18
 
5
19
  * feat(FP-1794): extracted logic to validate cart status before checkout
package/composer.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "frontastic/common",
3
3
  "license": "None",
4
- "version": "2.31.0",
4
+ "version": "2.32.0",
5
5
  "repositories": [
6
6
  {
7
7
  "type": "path",
@@ -25,9 +25,9 @@ public function __construct(
25
25
  Commercetools\Mapper $cartMapper,
26
26
  Commercetools\Locale\CommercetoolsLocaleCreator $localeCreator,
27
27
  OrderIdGeneratorV2 $orderIdGenerator,
28
- CartCheckoutService $cartCheckoutService,
29
28
  \Psr\Log\LoggerInterface $logger,
30
- ?Commercetools\Options $options = null
29
+ ?Commercetools\Options $options = null,
30
+ ?CartCheckoutService $cartCheckoutService = null
31
31
  ): mixed
32
32
  ```
33
33
 
@@ -37,9 +37,9 @@ Argument|Type|Default|Description
37
37
  `$cartMapper`|[`Commercetools`](Commercetools.md)\Mapper||
38
38
  `$localeCreator`|[`Commercetools`](../../../ProductApiBundle/Domain/ProductApi/Commercetools.md)\Locale\CommercetoolsLocaleCreator||
39
39
  `$orderIdGenerator`|[`OrderIdGeneratorV2`](../OrderIdGeneratorV2.md)||
40
- `$cartCheckoutService`|[`CartCheckoutService`](../CartCheckoutService.md)||
41
40
  `$logger`|`\Psr\Log\LoggerInterface`||
42
41
  `$options`|?[`Commercetools`](Commercetools.md)\Options|`null`|
42
+ `$cartCheckoutService`|?[`CartCheckoutService`](../CartCheckoutService.md)|`null`|
43
43
 
44
44
  Return Value: `mixed`
45
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontastic/common",
3
- "version": "2.31.0",
3
+ "version": "2.32.0",
4
4
  "devDependencies": {
5
5
  "@babel/core": "7.5.4",
6
6
  "@babel/plugin-proposal-class-properties": "^7.5.0",
@@ -196,15 +196,14 @@ class AnonymousCartTest extends FrontasticApiTestCase
196
196
  $cartApi = $this->getCartApiForProject($project);
197
197
  $email = 'integration-tests-' . uniqid('', true) . '@frontastic.com';
198
198
 
199
- $product = $this->getAProduct($project, $language);
200
199
  $cartApi->startTransaction($cart);
201
- $cartApi->addToCart($cart, $this->getLineItemForProduct($this->getAProduct($project, $language)), $language);
202
- $cartApi->setEmail($cart, $email, $language);
203
- $cartApi->setShippingAddress($cart, $this->getFrontasticAddress(), $language);
204
- $cartApi->setBillingAddress($cart, $this->getFrontasticAddress(), $language);
200
+ $cart = $cartApi->addToCart($cart, $this->getLineItemForProduct($this->getAProduct($project, $language)), $language);
201
+ $cart = $cartApi->setEmail($cart, $email, $language);
202
+ $cart = $cartApi->setShippingAddress($cart, $this->getFrontasticAddress(), $language);
203
+ $cart = $cartApi->setBillingAddress($cart, $this->getFrontasticAddress(), $language);
205
204
  $cart = $cartApi->commit($language);
206
205
 
207
- $order = $cartApi->order($cart);
206
+ $order = $cartApi->order($cart, $language);
208
207
 
209
208
  $this->assertInstanceOf(Order::class, $order);
210
209
 
@@ -509,6 +509,7 @@ class FrontasticApiTestCase extends KernelTestCase
509
509
  protected function getFrontasticAddress(): Address
510
510
  {
511
511
  return new Address([
512
+ 'salutation' => 'Frau',
512
513
  'firstName' => 'FRONTASTIC',
513
514
  'lastName' => 'GmbH',
514
515
  'streetName' => 'Hafenweg',