Skip to content

Commit 053bab5

Browse files
Merge pull request #9 from mindbox-moscow/hotfix/refactorNamespaces
refactoring dto namespaces
2 parents cde7785 + 6d5a33d commit 053bab5

File tree

83 files changed

+245
-121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+245
-121
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ $mindbox = new \Mindbox\Mindbox([
109109
'domain' => '{domain}',
110110
], $logger);
111111

112-
$operation = new \Mindbox\DTO\OperationDTO();
112+
$operation = new \Mindbox\DTO\V3\OperationDTO();
113113

114114
$customer = new \Mindbox\DTO\V3\Requests\CustomerRequestDTO();
115115
$customer->setEmail('test@test.ru');

docs/examples/customer_helper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ var_dump($response->getBody());
208208

209209
/* Подключение автозагрузчика и инициализация SDK */
210210

211-
$mergeCustomers = new Mindbox\DTO\MergeCustomersRequestDTO();
211+
$mergeCustomers = new Mindbox\DTO\V3\Requests\MergeCustomersRequestDTO();
212212

213213
$customerToMerge = new \Mindbox\DTO\V3\Requests\CustomerIdentityRequestDTO();
214214
$customerToMerge->setId('mindboxId', 1029);

docs/examples/dto_constructor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DTO в Mindbox SDK используются для упрощения форми
1111
``` php
1212
require_once __DIR__ . '{путь/до/автозагрузчика}';
1313

14-
$operation = new \Mindbox\DTO\OperationDTO([
14+
$operation = new \Mindbox\DTO\V3\OperationDTO([
1515
'customer' => [
1616
'firstName' => 'some_firstName',
1717
'middleName' => 'some_middleName',
@@ -87,7 +87,7 @@ JSON:
8787
``` php
8888
require_once __DIR__ . '{путь/до/автозагрузчика}';
8989

90-
$operation = new \Mindbox\DTO\OperationDTO([
90+
$operation = new \Mindbox\DTO\V3\OperationDTO([
9191
'customer' => [
9292
'firstName' => 'some_firstName',
9393
'middleName' => 'some_middleName',

docs/examples/dto_setters.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ DTO в Mindbox SDK используются для упрощения форми
1212
``` php
1313
require_once __DIR__ . '{путь/до/автозагрузчика}';
1414

15-
$operation = new \Mindbox\DTO\OperationDTO();
15+
$operation = new \Mindbox\DTO\V3\OperationDTO();
1616

1717
$customer = new \Mindbox\DTO\V3\Requests\CustomerRequestDTO();
1818
$customer->setFirstName('some_firstName');
@@ -100,7 +100,7 @@ JSON:
100100
``` php
101101
require_once __DIR__ . '{путь/до/автозагрузчика}';
102102

103-
$operation = new \Mindbox\DTO\OperationDTO();
103+
$operation = new \Mindbox\DTO\V3\OperationDTO();
104104

105105
$customer = new \Mindbox\DTO\V3\Requests\CustomerRequestDTO();
106106
$customer->setFirstName('some_firstName');

docs/examples/product_list_helper.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
$addProductToListRequest = new \Mindbox\DTO\V3\Requests\AddProductToListRequestDTO();
1616

17-
$product = new Mindbox\DTO\ProductRequestDTO();
17+
$product = new Mindbox\DTO\V3\Requests\ProductRequestDTO();
1818
$product->setName('name');
1919

2020
/* Формирование данных о продукте */
@@ -46,7 +46,7 @@ var_dump($response->getBody());
4646

4747
$removeProductFromListRequest = new \Mindbox\DTO\V3\Requests\RemoveProductFromListRequestDTO();
4848

49-
$product = new Mindbox\DTO\ProductRequestDTO();
49+
$product = new Mindbox\DTO\V3\Requests\ProductRequestDTO();
5050
$product->setName('name');
5151

5252
/* Формирование данных о продукте */
@@ -78,7 +78,7 @@ var_dump($response->getBody());
7878

7979
$setProductCountInListRequest = new \Mindbox\DTO\V3\Requests\SetProductCountInListRequestDTO();
8080

81-
$product = new Mindbox\DTO\ProductRequestDTO();
81+
$product = new Mindbox\DTO\V3\Requests\ProductRequestDTO();
8282
$product->setName('name');
8383

8484
/* Формирование данных о продукте */
@@ -108,7 +108,7 @@ var_dump($response->getBody());
108108

109109
/* Подключение автозагрузчика и инициализация SDK */
110110

111-
$product = new Mindbox\DTO\ProductListItemRequestDTO();
111+
$product = new Mindbox\DTO\V3\Requests\ProductListItemRequestDTO();
112112
$product->setCount(6);
113113

114114
$products[] = $product;

docs/examples/send_request_to_v3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* isSync - флаг, синхронный или асинхронный запрос, по умолчанию true (синхронный), необязательный параметр;
1111
* addDeviceUUID - флаг, добавлять ли DeviceUUID в запрос, по умолчанию true (добавляет DeviceUUID из куки mindboxDeviceUUID в query-параметры запроса и IP-адрес потребителя в заголовок X-Customer-IP), необязательный параметр.
1212

13-
Базовый DTO для формирования тела запроса к v3 - \Mindbox\DTO\OperationDTO().
13+
Базовый DTO для формирования тела запроса к v3 - \Mindbox\DTO\V3\OperationDTO().
1414

1515
Запросы к Mindbox API v3 отправляются в формате JSON, в кодировке UTF-8.
1616

@@ -33,7 +33,7 @@ $customer->setMobilePhone('79374134389');
3333
$customer->setId('bitrixId', '123456');
3434
$customer->setId('mindboxId', '1028');
3535

36-
$operation = new \Mindbox\DTO\OperationDTO();
36+
$operation = new \Mindbox\DTO\V3\OperationDTO();
3737
$operation->setCustomer($customer);
3838

3939
/* Формирование состава операции */

docs/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ $mindbox = new \Mindbox\Mindbox([
139139
'domain' => '{domain}',
140140
], $logger);
141141

142-
$operation = new \Mindbox\DTO\OperationDTO();
142+
$operation = new \Mindbox\DTO\V3\OperationDTO();
143143

144144
$customer = new \Mindbox\DTO\V3\Requests\CustomerRequestDTO();
145145
$customer->setEmail('test@test.ru');

docs/structure/ApiIndex.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ API Index
22
=========
33

44
* Mindbox
5+
* Mindbox\XMLHelper
6+
* [MindboxXMLSerializer](Mindbox-XMLHelper-MindboxXMLSerializer.md)
57
* Mindbox\DTO
68
* [DTO](Mindbox-DTO-DTO.md)
79
* Mindbox\DTO\V2
@@ -80,7 +82,6 @@ API Index
8082
* [GiftCardDTO](Mindbox-DTO-V2-GiftCardDTO.md)
8183
* [CustomerIdentityDTO](Mindbox-DTO-V2-CustomerIdentityDTO.md)
8284
* [SkuIdentityDTO](Mindbox-DTO-V2-SkuIdentityDTO.md)
83-
* [MindboxXMLSerializer](Mindbox-DTO-MindboxXMLSerializer.md)
8485
* Mindbox\DTO\V3
8586
* [LineDTO](Mindbox-DTO-V3-LineDTO.md)
8687
* Mindbox\DTO\V3\Requests
@@ -160,11 +161,11 @@ API Index
160161
* [SubscriptionDTO](Mindbox-DTO-V3-SubscriptionDTO.md)
161162
* [PaymentDTO](Mindbox-DTO-V3-PaymentDTO.md)
162163
* [AreaDTO](Mindbox-DTO-V3-AreaDTO.md)
164+
* [OperationDTO](Mindbox-DTO-V3-OperationDTO.md)
163165
* [ProductListItemDTO](Mindbox-DTO-V3-ProductListItemDTO.md)
164166
* [CustomerIdentityDTO](Mindbox-DTO-V3-CustomerIdentityDTO.md)
165167
* [ProductIdentityDTO](Mindbox-DTO-V3-ProductIdentityDTO.md)
166168
* [SkuIdentityDTO](Mindbox-DTO-V3-SkuIdentityDTO.md)
167-
* [OperationDTO](Mindbox-DTO-OperationDTO.md)
168169
* [DTOCollection](Mindbox-DTO-DTOCollection.md)
169170
* [ResultDTO](Mindbox-DTO-ResultDTO.md)
170171
* Mindbox\Loggers

docs/structure/Mindbox-Clients-MindboxClientV2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Properties
5757

5858
### $xmlSerializer
5959

60-
private \Mindbox\DTO\MindboxXMLSerializer $xmlSerializer
60+
private \Mindbox\XMLHelper\MindboxXMLSerializer $xmlSerializer
6161

6262

6363

docs/structure/Mindbox-DTO-OperationDTO.md renamed to docs/structure/Mindbox-DTO-V3-OperationDTO.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Mindbox\DTO\OperationDTO
1+
Mindbox\DTO\V3\OperationDTO
22
===============
33

44
Class OperationDTO
@@ -7,7 +7,7 @@ Class OperationDTO
77

88

99
* Class name: OperationDTO
10-
* Namespace: Mindbox\DTO
10+
* Namespace: Mindbox\DTO\V3
1111
* Parent class: [Mindbox\DTO\DTO](Mindbox-DTO-DTO.md)
1212

1313

@@ -157,7 +157,7 @@ Methods
157157

158158
### getCustomer
159159

160-
\Mindbox\DTO\V3\Requests\CustomerRequestDTO Mindbox\DTO\OperationDTO::getCustomer()
160+
\Mindbox\DTO\V3\Requests\CustomerRequestDTO Mindbox\DTO\V3\OperationDTO::getCustomer()
161161

162162

163163

@@ -170,7 +170,7 @@ Methods
170170

171171
### setCustomer
172172

173-
mixed Mindbox\DTO\OperationDTO::setCustomer(array|\Mindbox\DTO\V3\Requests\CustomerIdentityRequestDTO $customer)
173+
mixed Mindbox\DTO\V3\OperationDTO::setCustomer(array|\Mindbox\DTO\V3\Requests\CustomerIdentityRequestDTO $customer)
174174

175175

176176

@@ -186,7 +186,7 @@ Methods
186186

187187
### getAuthentificationCode
188188

189-
string Mindbox\DTO\OperationDTO::getAuthentificationCode()
189+
string Mindbox\DTO\V3\OperationDTO::getAuthentificationCode()
190190

191191

192192

@@ -199,7 +199,7 @@ Methods
199199

200200
### setAuthentificationCode
201201

202-
mixed Mindbox\DTO\OperationDTO::setAuthentificationCode(mixed $code)
202+
mixed Mindbox\DTO\V3\OperationDTO::setAuthentificationCode(mixed $code)
203203

204204

205205

@@ -215,7 +215,7 @@ Methods
215215

216216
### getSmsConfirmation
217217

218-
\Mindbox\DTO\V3\Requests\SmsConfirmationRequestDTO Mindbox\DTO\OperationDTO::getSmsConfirmation()
218+
\Mindbox\DTO\V3\Requests\SmsConfirmationRequestDTO Mindbox\DTO\V3\OperationDTO::getSmsConfirmation()
219219

220220

221221

@@ -228,7 +228,7 @@ Methods
228228

229229
### setSmsConfirmation
230230

231-
mixed Mindbox\DTO\OperationDTO::setSmsConfirmation(array|\Mindbox\DTO\V3\Requests\SmsConfirmationRequestDTO $smsConfirmation)
231+
mixed Mindbox\DTO\V3\OperationDTO::setSmsConfirmation(array|\Mindbox\DTO\V3\Requests\SmsConfirmationRequestDTO $smsConfirmation)
232232

233233

234234

@@ -244,7 +244,7 @@ Methods
244244

245245
### getPage
246246

247-
\Mindbox\DTO\V3\Requests\PageRequestDTO Mindbox\DTO\OperationDTO::getPage()
247+
\Mindbox\DTO\V3\Requests\PageRequestDTO Mindbox\DTO\V3\OperationDTO::getPage()
248248

249249

250250

@@ -257,7 +257,7 @@ Methods
257257

258258
### setPage
259259

260-
mixed Mindbox\DTO\OperationDTO::setPage(array|\Mindbox\DTO\V3\Requests\PageRequestDTO $page)
260+
mixed Mindbox\DTO\V3\OperationDTO::setPage(array|\Mindbox\DTO\V3\Requests\PageRequestDTO $page)
261261

262262

263263

@@ -273,7 +273,7 @@ Methods
273273

274274
### getProductList
275275

276-
\Mindbox\DTO\V3\Requests\ProductListItemRequestCollection Mindbox\DTO\OperationDTO::getProductList()
276+
\Mindbox\DTO\V3\Requests\ProductListItemRequestCollection Mindbox\DTO\V3\OperationDTO::getProductList()
277277

278278

279279

@@ -286,7 +286,7 @@ Methods
286286

287287
### setProductList
288288

289-
mixed Mindbox\DTO\OperationDTO::setProductList(array|\Mindbox\DTO\V3\Requests\ProductListItemRequestCollection $productList)
289+
mixed Mindbox\DTO\V3\OperationDTO::setProductList(array|\Mindbox\DTO\V3\Requests\ProductListItemRequestCollection $productList)
290290

291291

292292

@@ -302,7 +302,7 @@ Methods
302302

303303
### getAddProductToList
304304

305-
\Mindbox\DTO\V3\Requests\AddProductToListRequestDTO Mindbox\DTO\OperationDTO::getAddProductToList()
305+
\Mindbox\DTO\V3\Requests\AddProductToListRequestDTO Mindbox\DTO\V3\OperationDTO::getAddProductToList()
306306

307307

308308

@@ -315,7 +315,7 @@ Methods
315315

316316
### setAddProductToList
317317

318-
mixed Mindbox\DTO\OperationDTO::setAddProductToList(array|\Mindbox\DTO\V3\Requests\AddProductToListRequestDTO $addProductToList)
318+
mixed Mindbox\DTO\V3\OperationDTO::setAddProductToList(array|\Mindbox\DTO\V3\Requests\AddProductToListRequestDTO $addProductToList)
319319

320320

321321

@@ -331,7 +331,7 @@ Methods
331331

332332
### getRemoveProductFromList
333333

334-
\Mindbox\DTO\V3\Requests\RemoveProductFromListRequestDTO Mindbox\DTO\OperationDTO::getRemoveProductFromList()
334+
\Mindbox\DTO\V3\Requests\RemoveProductFromListRequestDTO Mindbox\DTO\V3\OperationDTO::getRemoveProductFromList()
335335

336336

337337

@@ -344,7 +344,7 @@ Methods
344344

345345
### setRemoveProductFromList
346346

347-
mixed Mindbox\DTO\OperationDTO::setRemoveProductFromList(array|\Mindbox\DTO\V3\Requests\RemoveProductFromListRequestDTO $removeProductFromList)
347+
mixed Mindbox\DTO\V3\OperationDTO::setRemoveProductFromList(array|\Mindbox\DTO\V3\Requests\RemoveProductFromListRequestDTO $removeProductFromList)
348348

349349

350350

@@ -360,7 +360,7 @@ Methods
360360

361361
### getSetProductCountInList
362362

363-
\Mindbox\DTO\V3\Requests\SetProductCountInListRequestDTO Mindbox\DTO\OperationDTO::getSetProductCountInList()
363+
\Mindbox\DTO\V3\Requests\SetProductCountInListRequestDTO Mindbox\DTO\V3\OperationDTO::getSetProductCountInList()
364364

365365

366366

@@ -373,7 +373,7 @@ Methods
373373

374374
### setSetProductCountInList
375375

376-
mixed Mindbox\DTO\OperationDTO::setSetProductCountInList(array|\Mindbox\DTO\V3\Requests\SetProductCountInListRequestDTO $setProductCountInList)
376+
mixed Mindbox\DTO\V3\OperationDTO::setSetProductCountInList(array|\Mindbox\DTO\V3\Requests\SetProductCountInListRequestDTO $setProductCountInList)
377377

378378

379379

0 commit comments

Comments
 (0)