Skip to content

Commit 1720eec

Browse files
committed
build(codegen): updating SDK
1 parent 3f8c542 commit 1720eec

21 files changed

Lines changed: 3360 additions & 2 deletions

changes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,18 @@
4141
- added type `DiscountGroupSetKeyAction`
4242
- added type `DiscountGroupSetNameAction`
4343
- added type `DiscountGroupSetSortOrderAction`
44+
- added type `ExactLockConflictError`
4445
- added type `ExpiredCustomerEmailTokenError`
4546
- added type `ExpiredCustomerPasswordTokenError`
4647
- added type `MaxDiscountGroupsReachedError`
4748
- added type `RecurringOrderFailureError`
49+
- added type `ValidityLockConflictError`
50+
- added type `GraphQLExactLockConflictError`
4851
- added type `GraphQLExpiredCustomerEmailTokenError`
4952
- added type `GraphQLExpiredCustomerPasswordTokenError`
5053
- added type `GraphQLMaxDiscountGroupsReachedError`
5154
- added type `GraphQLRecurringOrderFailureError`
55+
- added type `GraphQLValidityLockConflictError`
5256
- added type `BaseEvent`
5357
- added type `CheckoutOrderCreationFailedEvent`
5458
- added type `CheckoutPaymentAuthorizationCancelledEvent`

lib/commercetools-api/docs/RequestBuilder.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12002,6 +12002,7 @@ Creating a Standalone Price produces the [StandalonePriceCreated](ctp:api:type:S
1200212002

1200312003
- If the Standalone Price has the same price scope as an existing Standalone Price, a [DuplicateStandalonePriceScope](ctp:api:type:DuplicateStandalonePriceScopeError) error is returned.
1200412004
- If the Standalone Price has overlapping validity periods within the same price scope, a [OverlappingStandalonePriceValidity](ctp:api:type:OverlappingStandalonePriceValidityError) error is returned. A Price without validity period does not conflict with a Price defined for a time period.
12005+
- If a modification is already in progress for the exact combination of SKU and price scope fields, an [ExactLockConflict](ctp:api:type:ExactLockConflictError) or [ValidityLockConflict](ctp:api:type:ValidityLockConflictError) error is returned.
1200512006

1200612007

1200712008
### Example
@@ -12046,7 +12047,8 @@ $request = $builder
1204612047
```
1204712048
## `withProjectKey("projectKey")->standalonePrices()->withId("ID")->post(null)`
1204812049

12049-
null
12050+
If a modification is already in progress for the exact combination of SKU and price scope fields, an [ExactLockConflict](ctp:api:type:ExactLockConflictError) or [ValidityLockConflict](ctp:api:type:ValidityLockConflictError) error is returned.
12051+
1205012052

1205112053
### Example
1205212054
```php
@@ -12107,7 +12109,8 @@ $request = $builder
1210712109
```
1210812110
## `withProjectKey("projectKey")->standalonePrices()->withKey("key")->post(null)`
1210912111

12110-
null
12112+
If a modification is already in progress for the exact combination of SKU and price scope fields, an [ExactLockConflict](ctp:api:type:ExactLockConflictError) or [ValidityLockConflict](ctp:api:type:ValidityLockConflictError) error is returned.
12113+
1211112114

1211212115
### Example
1211312116
```php

lib/commercetools-api/src/Models/Error/ErrorObjectModel.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ final class ErrorObjectModel extends JsonObjectModel implements ErrorObject
6161
'EnumKeyDoesNotExist' => EnumKeyDoesNotExistErrorModel::class,
6262
'EnumValueIsUsed' => EnumValueIsUsedErrorModel::class,
6363
'EnumValuesMustMatch' => EnumValuesMustMatchErrorModel::class,
64+
'ExactLockConflict' => ExactLockConflictErrorModel::class,
6465
'ExpiredCustomerEmailToken' => ExpiredCustomerEmailTokenErrorModel::class,
6566
'ExpiredCustomerPasswordToken' => ExpiredCustomerPasswordTokenErrorModel::class,
6667
'ExtensionBadResponse' => ExtensionBadResponseErrorModel::class,
@@ -116,6 +117,7 @@ final class ErrorObjectModel extends JsonObjectModel implements ErrorObject
116117
'ShippingMethodDoesNotMatchCart' => ShippingMethodDoesNotMatchCartErrorModel::class,
117118
'StoreCartDiscountsLimitReached' => StoreCartDiscountsLimitReachedErrorModel::class,
118119
'SyntaxError' => SyntaxErrorErrorModel::class,
120+
'ValidityLockConflict' => ValidityLockConflictErrorModel::class,
119121
'insufficient_scope' => InsufficientScopeErrorModel::class,
120122
'invalid_token' => InvalidTokenErrorModel::class,
121123
];
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
/**
5+
* This file has been auto generated
6+
* Do not change it.
7+
*/
8+
9+
namespace Commercetools\Api\Models\Error;
10+
11+
use Commercetools\Api\Models\Channel\ChannelResourceIdentifier;
12+
use Commercetools\Api\Models\CustomerGroup\CustomerGroupResourceIdentifier;
13+
use Commercetools\Api\Models\RecurrencePolicy\RecurrencePolicyReference;
14+
use Commercetools\Base\DateTimeImmutableCollection;
15+
use Commercetools\Base\JsonObject;
16+
use DateTimeImmutable;
17+
18+
interface ExactLockConflictError extends ErrorObject
19+
{
20+
public const FIELD_SKU = 'sku';
21+
public const FIELD_CURRENCY = 'currency';
22+
public const FIELD_COUNTRY = 'country';
23+
public const FIELD_CUSTOMER_GROUP = 'customerGroup';
24+
public const FIELD_CHANNEL = 'channel';
25+
public const FIELD_VALID_FROM = 'validFrom';
26+
public const FIELD_VALID_UNTIL = 'validUntil';
27+
public const FIELD_RECURRENCE_POLICY = 'recurrencePolicy';
28+
29+
/**
30+
31+
* @return null|string
32+
*/
33+
public function getCode();
34+
35+
/**
36+
* <p><code>&quot;Modification already in progress for the combination of SKU and price scope fields.&quot;</code></p>
37+
*
38+
39+
* @return null|string
40+
*/
41+
public function getMessage();
42+
43+
/**
44+
* <p>SKU for which the modification conflict occurred.</p>
45+
*
46+
47+
* @return null|string
48+
*/
49+
public function getSku();
50+
51+
/**
52+
* <p>Currency code of the Standalone Price.</p>
53+
*
54+
55+
* @return null|string
56+
*/
57+
public function getCurrency();
58+
59+
/**
60+
* <p>Country code of the geographic location.</p>
61+
*
62+
63+
* @return null|string
64+
*/
65+
public function getCountry();
66+
67+
/**
68+
* <p><a href="ctp:api:type:CustomerGroup">CustomerGroup</a> for which the Standalone Price is valid.</p>
69+
*
70+
71+
* @return null|CustomerGroupResourceIdentifier
72+
*/
73+
public function getCustomerGroup();
74+
75+
/**
76+
* <p><a href="ctp:api:type:Channel">Channel</a> for which the Standalone Price is valid.</p>
77+
*
78+
79+
* @return null|ChannelResourceIdentifier
80+
*/
81+
public function getChannel();
82+
83+
/**
84+
* <p>Date and time (UTC) from which the Standalone Price is valid.</p>
85+
*
86+
87+
* @return null|DateTimeImmutable
88+
*/
89+
public function getValidFrom();
90+
91+
/**
92+
* <p>Date and time (UTC) until which the Standalone Price is valid.</p>
93+
*
94+
95+
* @return null|DateTimeImmutable
96+
*/
97+
public function getValidUntil();
98+
99+
/**
100+
* <p><a href="ctp:api:type:RecurrencePolicy">RecurrencePolicy</a> that applies to the Standalone Price.</p>
101+
*
102+
103+
* @return null|RecurrencePolicyReference
104+
*/
105+
public function getRecurrencePolicy();
106+
107+
/**
108+
* @param ?string $message
109+
*/
110+
public function setMessage(?string $message): void;
111+
112+
/**
113+
* @param ?string $sku
114+
*/
115+
public function setSku(?string $sku): void;
116+
117+
/**
118+
* @param ?string $currency
119+
*/
120+
public function setCurrency(?string $currency): void;
121+
122+
/**
123+
* @param ?string $country
124+
*/
125+
public function setCountry(?string $country): void;
126+
127+
/**
128+
* @param ?CustomerGroupResourceIdentifier $customerGroup
129+
*/
130+
public function setCustomerGroup(?CustomerGroupResourceIdentifier $customerGroup): void;
131+
132+
/**
133+
* @param ?ChannelResourceIdentifier $channel
134+
*/
135+
public function setChannel(?ChannelResourceIdentifier $channel): void;
136+
137+
/**
138+
* @param ?DateTimeImmutable $validFrom
139+
*/
140+
public function setValidFrom(?DateTimeImmutable $validFrom): void;
141+
142+
/**
143+
* @param ?DateTimeImmutable $validUntil
144+
*/
145+
public function setValidUntil(?DateTimeImmutable $validUntil): void;
146+
147+
/**
148+
* @param ?RecurrencePolicyReference $recurrencePolicy
149+
*/
150+
public function setRecurrencePolicy(?RecurrencePolicyReference $recurrencePolicy): void;
151+
}

0 commit comments

Comments
 (0)