Skip to content

Commit e35b8a2

Browse files
committed
build(codegen): updating SDK
1 parent a87f7c3 commit e35b8a2

5 files changed

Lines changed: 88 additions & 87 deletions

File tree

changes.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -683,20 +683,20 @@
683683
<details>
684684
<summary>Added Method(s)</summary>
685685

686-
- added method `$apiRoot->withProjectKeyValue()->productSelections()->importContainers()->withImportContainerKeyValue()->post()`
687686
- added method `$apiRoot->withProjectKeyValue()->businessUnits()->importContainers()->withImportContainerKeyValue()->post()`
687+
- added method `$apiRoot->withProjectKeyValue()->productSelections()->importContainers()->withImportContainerKeyValue()->post()`
688688
</details>
689689

690690

691691
<details>
692692
<summary>Added Resource(s)</summary>
693693

694-
- added resource `/{projectKey}/product-selections`
695694
- added resource `/{projectKey}/business-units`
696-
- added resource `/{projectKey}/product-selections/import-containers`
697-
- added resource `/{projectKey}/product-selections/import-containers/{importContainerKey}`
695+
- added resource `/{projectKey}/product-selections`
698696
- added resource `/{projectKey}/business-units/import-containers`
699697
- added resource `/{projectKey}/business-units/import-containers/{importContainerKey}`
698+
- added resource `/{projectKey}/product-selections/import-containers`
699+
- added resource `/{projectKey}/product-selections/import-containers/{importContainerKey}`
700700
</details>
701701

702702
**History changes**

lib/commercetools-import-tests/test/unit/Client/Resource/ResourceByProjectKeyTest.php

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@ function (ImportRequestBuilder $builder): ResourceByProjectKeyImportOperations {
8989
['projectKey' => 'test_projectKey'],
9090
'/{projectKey}/import-operations'
9191
],
92+
'ResourceByProjectKeyBusinessUnits' => [
93+
function (ImportRequestBuilder $builder): ResourceByProjectKeyBusinessUnits {
94+
return $builder
95+
->withProjectKeyValue("test_projectKey")
96+
->businessUnits();
97+
},
98+
ResourceByProjectKeyBusinessUnits::class,
99+
['projectKey' => 'test_projectKey'],
100+
'/{projectKey}/business-units'
101+
],
92102
'ResourceByProjectKeyCategories' => [
93103
function (ImportRequestBuilder $builder): ResourceByProjectKeyCategories {
94104
return $builder
@@ -99,6 +109,26 @@ function (ImportRequestBuilder $builder): ResourceByProjectKeyCategories {
99109
['projectKey' => 'test_projectKey'],
100110
'/{projectKey}/categories'
101111
],
112+
'ResourceByProjectKeyCustomers' => [
113+
function (ImportRequestBuilder $builder): ResourceByProjectKeyCustomers {
114+
return $builder
115+
->withProjectKeyValue("test_projectKey")
116+
->customers();
117+
},
118+
ResourceByProjectKeyCustomers::class,
119+
['projectKey' => 'test_projectKey'],
120+
'/{projectKey}/customers'
121+
],
122+
'ResourceByProjectKeyDiscountCodes' => [
123+
function (ImportRequestBuilder $builder): ResourceByProjectKeyDiscountCodes {
124+
return $builder
125+
->withProjectKeyValue("test_projectKey")
126+
->discountCodes();
127+
},
128+
ResourceByProjectKeyDiscountCodes::class,
129+
['projectKey' => 'test_projectKey'],
130+
'/{projectKey}/discount-codes'
131+
],
102132
'ResourceByProjectKeyPrices' => [
103133
function (ImportRequestBuilder $builder): ResourceByProjectKeyPrices {
104134
return $builder
@@ -109,15 +139,15 @@ function (ImportRequestBuilder $builder): ResourceByProjectKeyPrices {
109139
['projectKey' => 'test_projectKey'],
110140
'/{projectKey}/prices'
111141
],
112-
'ResourceByProjectKeyStandalonePrices' => [
113-
function (ImportRequestBuilder $builder): ResourceByProjectKeyStandalonePrices {
142+
'ResourceByProjectKeyInventories' => [
143+
function (ImportRequestBuilder $builder): ResourceByProjectKeyInventories {
114144
return $builder
115145
->withProjectKeyValue("test_projectKey")
116-
->standalonePrices();
146+
->inventories();
117147
},
118-
ResourceByProjectKeyStandalonePrices::class,
148+
ResourceByProjectKeyInventories::class,
119149
['projectKey' => 'test_projectKey'],
120-
'/{projectKey}/standalone-prices'
150+
'/{projectKey}/inventories'
121151
],
122152
'ResourceByProjectKeyProducts' => [
123153
function (ImportRequestBuilder $builder): ResourceByProjectKeyProducts {
@@ -169,6 +199,16 @@ function (ImportRequestBuilder $builder): ResourceByProjectKeyProductVariantPatc
169199
['projectKey' => 'test_projectKey'],
170200
'/{projectKey}/product-variant-patches'
171201
],
202+
'ResourceByProjectKeyProductSelections' => [
203+
function (ImportRequestBuilder $builder): ResourceByProjectKeyProductSelections {
204+
return $builder
205+
->withProjectKeyValue("test_projectKey")
206+
->productSelections();
207+
},
208+
ResourceByProjectKeyProductSelections::class,
209+
['projectKey' => 'test_projectKey'],
210+
'/{projectKey}/product-selections'
211+
],
172212
'ResourceByProjectKeyOrders' => [
173213
function (ImportRequestBuilder $builder): ResourceByProjectKeyOrders {
174214
return $builder
@@ -189,25 +229,15 @@ function (ImportRequestBuilder $builder): ResourceByProjectKeyOrderPatches {
189229
['projectKey' => 'test_projectKey'],
190230
'/{projectKey}/order-patches'
191231
],
192-
'ResourceByProjectKeyCustomers' => [
193-
function (ImportRequestBuilder $builder): ResourceByProjectKeyCustomers {
194-
return $builder
195-
->withProjectKeyValue("test_projectKey")
196-
->customers();
197-
},
198-
ResourceByProjectKeyCustomers::class,
199-
['projectKey' => 'test_projectKey'],
200-
'/{projectKey}/customers'
201-
],
202-
'ResourceByProjectKeyInventories' => [
203-
function (ImportRequestBuilder $builder): ResourceByProjectKeyInventories {
232+
'ResourceByProjectKeyStandalonePrices' => [
233+
function (ImportRequestBuilder $builder): ResourceByProjectKeyStandalonePrices {
204234
return $builder
205235
->withProjectKeyValue("test_projectKey")
206-
->inventories();
236+
->standalonePrices();
207237
},
208-
ResourceByProjectKeyInventories::class,
238+
ResourceByProjectKeyStandalonePrices::class,
209239
['projectKey' => 'test_projectKey'],
210-
'/{projectKey}/inventories'
240+
'/{projectKey}/standalone-prices'
211241
],
212242
'ResourceByProjectKeyTypes' => [
213243
function (ImportRequestBuilder $builder): ResourceByProjectKeyTypes {
@@ -218,36 +248,6 @@ function (ImportRequestBuilder $builder): ResourceByProjectKeyTypes {
218248
ResourceByProjectKeyTypes::class,
219249
['projectKey' => 'test_projectKey'],
220250
'/{projectKey}/types'
221-
],
222-
'ResourceByProjectKeyDiscountCodes' => [
223-
function (ImportRequestBuilder $builder): ResourceByProjectKeyDiscountCodes {
224-
return $builder
225-
->withProjectKeyValue("test_projectKey")
226-
->discountCodes();
227-
},
228-
ResourceByProjectKeyDiscountCodes::class,
229-
['projectKey' => 'test_projectKey'],
230-
'/{projectKey}/discount-codes'
231-
],
232-
'ResourceByProjectKeyProductSelections' => [
233-
function (ImportRequestBuilder $builder): ResourceByProjectKeyProductSelections {
234-
return $builder
235-
->withProjectKeyValue("test_projectKey")
236-
->productSelections();
237-
},
238-
ResourceByProjectKeyProductSelections::class,
239-
['projectKey' => 'test_projectKey'],
240-
'/{projectKey}/product-selections'
241-
],
242-
'ResourceByProjectKeyBusinessUnits' => [
243-
function (ImportRequestBuilder $builder): ResourceByProjectKeyBusinessUnits {
244-
return $builder
245-
->withProjectKeyValue("test_projectKey")
246-
->businessUnits();
247-
},
248-
ResourceByProjectKeyBusinessUnits::class,
249-
['projectKey' => 'test_projectKey'],
250-
'/{projectKey}/business-units'
251251
]
252252
];
253253
}

lib/commercetools-import/docs/RequestBuilder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ $request = $builder
251251
```
252252
## `withProjectKeyValue("projectKey")->prices()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)`
253253

254-
Creates an Import Request for Prices.
254+
Creates an Import Request for Embedded Prices.
255255

256256
### Example
257257
```php

lib/commercetools-import/src/Client/Resource/ResourceByProjectKey.php

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -43,130 +43,130 @@ public function importOperations(): ResourceByProjectKeyImportOperations
4343
}
4444
/**
4545
*/
46-
public function categories(): ResourceByProjectKeyCategories
46+
public function businessUnits(): ResourceByProjectKeyBusinessUnits
4747
{
4848
$args = $this->getArgs();
4949

50-
return new ResourceByProjectKeyCategories($args, $this->getClient());
50+
return new ResourceByProjectKeyBusinessUnits($args, $this->getClient());
5151
}
5252
/**
5353
*/
54-
public function prices(): ResourceByProjectKeyPrices
54+
public function categories(): ResourceByProjectKeyCategories
5555
{
5656
$args = $this->getArgs();
5757

58-
return new ResourceByProjectKeyPrices($args, $this->getClient());
58+
return new ResourceByProjectKeyCategories($args, $this->getClient());
5959
}
6060
/**
6161
*/
62-
public function standalonePrices(): ResourceByProjectKeyStandalonePrices
62+
public function customers(): ResourceByProjectKeyCustomers
6363
{
6464
$args = $this->getArgs();
6565

66-
return new ResourceByProjectKeyStandalonePrices($args, $this->getClient());
66+
return new ResourceByProjectKeyCustomers($args, $this->getClient());
6767
}
6868
/**
6969
*/
70-
public function products(): ResourceByProjectKeyProducts
70+
public function discountCodes(): ResourceByProjectKeyDiscountCodes
7171
{
7272
$args = $this->getArgs();
7373

74-
return new ResourceByProjectKeyProducts($args, $this->getClient());
74+
return new ResourceByProjectKeyDiscountCodes($args, $this->getClient());
7575
}
7676
/**
7777
*/
78-
public function productDrafts(): ResourceByProjectKeyProductDrafts
78+
public function prices(): ResourceByProjectKeyPrices
7979
{
8080
$args = $this->getArgs();
8181

82-
return new ResourceByProjectKeyProductDrafts($args, $this->getClient());
82+
return new ResourceByProjectKeyPrices($args, $this->getClient());
8383
}
8484
/**
8585
*/
86-
public function productTypes(): ResourceByProjectKeyProductTypes
86+
public function inventories(): ResourceByProjectKeyInventories
8787
{
8888
$args = $this->getArgs();
8989

90-
return new ResourceByProjectKeyProductTypes($args, $this->getClient());
90+
return new ResourceByProjectKeyInventories($args, $this->getClient());
9191
}
9292
/**
9393
*/
94-
public function productVariants(): ResourceByProjectKeyProductVariants
94+
public function products(): ResourceByProjectKeyProducts
9595
{
9696
$args = $this->getArgs();
9797

98-
return new ResourceByProjectKeyProductVariants($args, $this->getClient());
98+
return new ResourceByProjectKeyProducts($args, $this->getClient());
9999
}
100100
/**
101101
*/
102-
public function productVariantPatches(): ResourceByProjectKeyProductVariantPatches
102+
public function productDrafts(): ResourceByProjectKeyProductDrafts
103103
{
104104
$args = $this->getArgs();
105105

106-
return new ResourceByProjectKeyProductVariantPatches($args, $this->getClient());
106+
return new ResourceByProjectKeyProductDrafts($args, $this->getClient());
107107
}
108108
/**
109109
*/
110-
public function orders(): ResourceByProjectKeyOrders
110+
public function productTypes(): ResourceByProjectKeyProductTypes
111111
{
112112
$args = $this->getArgs();
113113

114-
return new ResourceByProjectKeyOrders($args, $this->getClient());
114+
return new ResourceByProjectKeyProductTypes($args, $this->getClient());
115115
}
116116
/**
117117
*/
118-
public function orderPatches(): ResourceByProjectKeyOrderPatches
118+
public function productVariants(): ResourceByProjectKeyProductVariants
119119
{
120120
$args = $this->getArgs();
121121

122-
return new ResourceByProjectKeyOrderPatches($args, $this->getClient());
122+
return new ResourceByProjectKeyProductVariants($args, $this->getClient());
123123
}
124124
/**
125125
*/
126-
public function customers(): ResourceByProjectKeyCustomers
126+
public function productVariantPatches(): ResourceByProjectKeyProductVariantPatches
127127
{
128128
$args = $this->getArgs();
129129

130-
return new ResourceByProjectKeyCustomers($args, $this->getClient());
130+
return new ResourceByProjectKeyProductVariantPatches($args, $this->getClient());
131131
}
132132
/**
133133
*/
134-
public function inventories(): ResourceByProjectKeyInventories
134+
public function productSelections(): ResourceByProjectKeyProductSelections
135135
{
136136
$args = $this->getArgs();
137137

138-
return new ResourceByProjectKeyInventories($args, $this->getClient());
138+
return new ResourceByProjectKeyProductSelections($args, $this->getClient());
139139
}
140140
/**
141141
*/
142-
public function types(): ResourceByProjectKeyTypes
142+
public function orders(): ResourceByProjectKeyOrders
143143
{
144144
$args = $this->getArgs();
145145

146-
return new ResourceByProjectKeyTypes($args, $this->getClient());
146+
return new ResourceByProjectKeyOrders($args, $this->getClient());
147147
}
148148
/**
149149
*/
150-
public function discountCodes(): ResourceByProjectKeyDiscountCodes
150+
public function orderPatches(): ResourceByProjectKeyOrderPatches
151151
{
152152
$args = $this->getArgs();
153153

154-
return new ResourceByProjectKeyDiscountCodes($args, $this->getClient());
154+
return new ResourceByProjectKeyOrderPatches($args, $this->getClient());
155155
}
156156
/**
157157
*/
158-
public function productSelections(): ResourceByProjectKeyProductSelections
158+
public function standalonePrices(): ResourceByProjectKeyStandalonePrices
159159
{
160160
$args = $this->getArgs();
161161

162-
return new ResourceByProjectKeyProductSelections($args, $this->getClient());
162+
return new ResourceByProjectKeyStandalonePrices($args, $this->getClient());
163163
}
164164
/**
165165
*/
166-
public function businessUnits(): ResourceByProjectKeyBusinessUnits
166+
public function types(): ResourceByProjectKeyTypes
167167
{
168168
$args = $this->getArgs();
169169

170-
return new ResourceByProjectKeyBusinessUnits($args, $this->getClient());
170+
return new ResourceByProjectKeyTypes($args, $this->getClient());
171171
}
172172
}

references.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,3 +521,4 @@ e5d97cd9fa03ef3c4fe45f051ad8a4a80e690656
521521
2b09ff0ae5722d1867af3a5c93f9f4ec7de2b423
522522
85ec5b54fce964cd50dc254ed39d0ab1137076bc
523523
65b14540239650479b1799503b3c9e3180d93186
524+
2e90c8c066eb618de26c10124e1d007cdfc842a4

0 commit comments

Comments
 (0)