-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathResultDTO.php
More file actions
181 lines (162 loc) · 5.15 KB
/
Copy pathResultDTO.php
File metadata and controls
181 lines (162 loc) · 5.15 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
176
177
178
179
180
181
<?php
namespace Mindbox\DTO;
use Mindbox\DTO\V3\Responses\OrderResponseCollection;
use Mindbox\DTO\V3\Responses\OrderResponseDTO;
use Mindbox\DTO\V3\Responses\BalanceResponseCollection;
use Mindbox\DTO\V3\Responses\CustomerActionResponseCollection;
use Mindbox\DTO\V3\Responses\CustomerIdentityResponseCollection;
use Mindbox\DTO\V3\Responses\CustomerIdentityResponseDTO;
use Mindbox\DTO\V3\Responses\CustomerResponseDTO;
use Mindbox\DTO\V3\Responses\CustomerSegmentationResponseCollection;
use Mindbox\DTO\V3\Responses\DiscountCardResponseCollection;
use Mindbox\DTO\V3\Responses\ProductListItemResponseCollection;
use Mindbox\DTO\V3\Responses\SmsConfirmationResponseDTO;
use Mindbox\DTO\V3\Responses\ValidationMessageResponseCollection;
/**
* Class ResultDTO
*
* @package Mindbox\DTO
* @property string $status
* @property ValidationMessageResponseCollection $validationMessages
* @property CustomerResponseDTO $customer
* @property SmsConfirmationResponseDTO $smsConfirmation
* @property CustomerIdentityResponseCollection $customersToMerge
* @property CustomerIdentityResponseDTO $resultingCustomer
* @property OrderResponseCollection $orders
* @property CustomerActionResponseCollection $customerActions
* @property CustomerSegmentationResponseCollection $customerSegmentations
* @property ProductListItemResponseCollection $productList
* @property BalanceResponseCollection $balances
* @property string $totalCount
* @property OrderResponseDTO $order
* @property DiscountCardResponseCollection $discountCards
**/
class ResultDTO extends DTO
{
/**
* @var array Мэппинг преобразрования полей в объекты DTO.
*/
protected static $DTOMap = [
'validationMessages' => ValidationMessageResponseCollection::class,
'customer' => CustomerResponseDTO::class,
'smsConfirmation' => SmsConfirmationResponseDTO::class,
'customersToMerge' => CustomerIdentityResponseCollection::class,
'resultingCustomer' => CustomerIdentityResponseDTO::class,
'orders' => OrderResponseCollection::class,
'customerActions' => CustomerActionResponseCollection::class,
'customerSegmentations' => CustomerSegmentationResponseCollection::class,
'productList' => ProductListItemResponseCollection::class,
'balances' => BalanceResponseCollection::class,
'order' => OrderResponseDTO::class,
'discountCards' => DiscountCardResponseCollection::class,
];
/**
* @var string Название элемента для корректной генерации xml.
*/
protected static $xmlName = 'result';
/**
* @return string
*/
public function getStatus()
{
return $this->getField('status');
}
/**
* @return ValidationMessageResponseCollection
*/
public function getValidationMessages()
{
return $this->getField('validationMessages');
}
/**
* @return CustomerResponseDTO
*/
public function getCustomer()
{
return $this->getField('customer');
}
/**
* @return SmsConfirmationResponseDTO
*/
public function getSmsConfirmation()
{
return $this->getField('smsConfirmation');
}
/**
* @return CustomerIdentityResponseCollection
*/
public function getCustomersToMerge()
{
return $this->getField('customersToMerge');
}
/**
* @return CustomerIdentityResponseDTO
*/
public function getResultingCustomer()
{
return $this->getField('resultingCustomer');
}
/**
* @return OrderResponseCollection
*/
public function getOrders()
{
return $this->getField('orders');
}
/**
* @return OrderResponseDTO
*/
public function getOrder()
{
return $this->getField('order');
}
/**
* @return CustomerActionResponseCollection
*/
public function getCustomerActions()
{
return $this->getField('customerActions');
}
/**
* @return string
*/
public function getCustomerActionsCount()
{
return $this->getField('customerActionsCount');
}
/**
* @return CustomerSegmentationResponseCollection
*/
public function getCustomerSegmentations()
{
return $this->getField('customerSegmentations');
}
/**
* @return ProductListItemResponseCollection
*/
public function getProductList()
{
return $this->getField('productList');
}
/**
* @return BalanceResponseCollection
*/
public function getBalances()
{
return $this->getField('balances');
}
/**
* @return string
*/
public function getTotalCount()
{
return $this->getField('totalCount');
}
/**
* @return DiscountCardResponseCollection
*/
public function getDiscountCards()
{
return $this->getField('discountCards');
}
}