-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathOperationDTO.php
More file actions
175 lines (155 loc) · 4.66 KB
/
Copy pathOperationDTO.php
File metadata and controls
175 lines (155 loc) · 4.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<?php
namespace Mindbox\DTO\V3;
use Mindbox\DTO\DTO;
use Mindbox\DTO\V3\Requests\AddProductToListRequestDTO;
use Mindbox\DTO\V3\Requests\CustomerIdentityRequestDTO;
use Mindbox\DTO\V3\Requests\CustomerRequestDTO;
use Mindbox\DTO\V3\Requests\PageRequestDTO;
use Mindbox\DTO\V3\Requests\ProductListItemRequestCollection;
use Mindbox\DTO\V3\Requests\RemoveProductFromListRequestDTO;
use Mindbox\DTO\V3\Requests\SetProductCountInListRequestDTO;
use Mindbox\DTO\V3\Requests\SmsConfirmationRequestDTO;
/**
* Class OperationDTO
*
* @package Mindbox\DTO\V3
* @property CustomerRequestDTO $customer
* @property string $authentificationCode
* @property SmsConfirmationRequestDTO $smsConfirmation
* @property PageRequestDTO $page
* @property ProductListItemRequestCollection $productList
* @property AddProductToListRequestDTO $addProductToList
* @property RemoveProductFromListRequestDTO $removeProductFromList
* @property SetProductCountInListRequestDTO $setProductCountInList
**/
class OperationDTO extends DTO
{
/**
* @var array Мэппинг преобразрования полей в объекты DTO.
*/
protected static $DTOMap = [
'customer' => CustomerRequestDTO::class,
'smsConfirmation' => SmsConfirmationRequestDTO::class,
'page' => PageRequestDTO::class,
'productList' => ProductListItemRequestCollection::class,
'addProductToList' => AddProductToListRequestDTO::class,
'removeProductFromList' => RemoveProductFromListRequestDTO::class,
'setProductCountInList' => SetProductCountInListRequestDTO::class,
];
/**
* @var string Название элемента для корректной генерации xml.
*/
protected static $xmlName = 'operation';
/**
* @return CustomerRequestDTO
*/
public function getCustomer()
{
return $this->getField('customer');
}
/**
* @param array|CustomerIdentityRequestDTO $customer
*/
public function setCustomer($customer)
{
$this->setField('customer', $customer);
}
/**
* @return string
*/
public function getAuthentificationCode()
{
return $this->getField('authentificationCode');
}
/**
* @param mixed $code
*/
public function setAuthentificationCode($code)
{
$this->setField('authentificationCode', $code);
}
/**
* @return SmsConfirmationRequestDTO
*/
public function getSmsConfirmation()
{
return $this->getField('smsConfirmation');
}
/**
* @param array|SmsConfirmationRequestDTO $smsConfirmation
*/
public function setSmsConfirmation($smsConfirmation)
{
$this->setField('smsConfirmation', $smsConfirmation);
}
/**
* @return PageRequestDTO
*/
public function getPage()
{
return $this->getField('page');
}
/**
* @param array|PageRequestDTO $page
*/
public function setPage($page)
{
$this->setField('page', $page);
}
/**
* @return ProductListItemRequestCollection
*/
public function getProductList()
{
return $this->getField('productList');
}
/**
* @param array|ProductListItemRequestCollection $productList
*/
public function setProductList($productList)
{
$this->setField('productList', $productList);
}
/**
* @return AddProductToListRequestDTO
*/
public function getAddProductToList()
{
return $this->getField('addProductToList');
}
/**
* @param array|AddProductToListRequestDTO $addProductToList
*/
public function setAddProductToList($addProductToList)
{
$this->setField('addProductToList', $addProductToList);
}
/**
* @return RemoveProductFromListRequestDTO
*/
public function getRemoveProductFromList()
{
return $this->getField('removeProductFromList');
}
/**
* @param array|RemoveProductFromListRequestDTO $removeProductFromList
*/
public function setRemoveProductFromList($removeProductFromList)
{
$this->setField('removeProductFromList', $removeProductFromList);
}
/**
* @return SetProductCountInListRequestDTO
*/
public function getSetProductCountInList()
{
return $this->getField('setProductCountInList');
}
/**
* @param array|SetProductCountInListRequestDTO $setProductCountInList
*/
public function setSetProductCountInList($setProductCountInList)
{
$this->setField('setProductCountInList', $setProductCountInList);
}
}