Total Complexity | 59 |
Total Lines | 565 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
Complex classes like DoAuthorizationRequestType often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use DoAuthorizationRequestType, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
14 | class DoAuthorizationRequestType extends AbstractRequestType |
||
15 | { |
||
16 | /** |
||
17 | * The TransactionID |
||
18 | * Meta information extracted from the WSDL |
||
19 | * - documentation: The value of the order’s transaction identification number returned by a PayPal product. Required Character length and limits: 19 single-byte characters maximum |
||
20 | * - maxOccurs: 1 |
||
21 | * - minOccurs: 1 |
||
22 | * @var string |
||
23 | */ |
||
24 | public $TransactionID; |
||
25 | /** |
||
26 | * The Amount |
||
27 | * Meta information extracted from the WSDL |
||
28 | * - documentation: Amount to authorize. Required Limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Decimal separator must be a period (.), and the thousands separator must be a comma (,). |
||
29 | * - maxOccurs: 1 |
||
30 | * - minOccurs: 1 |
||
31 | * @var \PayPal\StructType\BasicAmountType |
||
32 | */ |
||
33 | public $Amount; |
||
34 | /** |
||
35 | * The TransactionEntity |
||
36 | * Meta information extracted from the WSDL |
||
37 | * - documentation: Type of transaction to authorize. The only allowable value is Order, which means that the transaction represents a customer order that can be fulfilled over 29 days. Optional |
||
38 | * - maxOccurs: 1 |
||
39 | * - minOccurs: 0 |
||
40 | * @var string |
||
41 | */ |
||
42 | public $TransactionEntity; |
||
43 | /** |
||
44 | * The ShipToAddress |
||
45 | * Meta information extracted from the WSDL |
||
46 | * - maxOccurs: 1 |
||
47 | * - minOccurs: 0 |
||
48 | * - ref: ebl:ShipToAddress |
||
49 | * @var \PayPal\StructType\AddressType |
||
50 | */ |
||
51 | public $ShipToAddress; |
||
52 | /** |
||
53 | * The PaymentDetailsItem |
||
54 | * Meta information extracted from the WSDL |
||
55 | * - maxOccurs: unbounded |
||
56 | * - minOccurs: 0 |
||
57 | * - ref: ebl:PaymentDetailsItem |
||
58 | * @var \PayPal\StructType\PaymentDetailsItemType[] |
||
59 | */ |
||
60 | public $PaymentDetailsItem; |
||
61 | /** |
||
62 | * The ItemTotal |
||
63 | * Meta information extracted from the WSDL |
||
64 | * - documentation: Sum of cost of all items in this order. You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies. Optional Limitations: Must not exceed $10,000 USD in any currency. |
||
65 | * No currency symbol. Decimal separator must be a period (.), and the thousands separator must be a comma (,). |
||
66 | * - maxOccurs: 1 |
||
67 | * - minOccurs: 0 |
||
68 | * @var \PayPal\StructType\BasicAmountType |
||
69 | */ |
||
70 | public $ItemTotal; |
||
71 | /** |
||
72 | * The ShippingTotal |
||
73 | * Meta information extracted from the WSDL |
||
74 | * - documentation: Total shipping costs for this order. You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies. Optional Limitations: Must not exceed $10,000 USD in any currency. No |
||
75 | * currency symbol. Decimal separator must be a period (.), and the thousands separator must be a comma (,). |
||
76 | * - maxOccurs: 1 |
||
77 | * - minOccurs: 0 |
||
78 | * @var \PayPal\StructType\BasicAmountType |
||
79 | */ |
||
80 | public $ShippingTotal; |
||
81 | /** |
||
82 | * The HandlingTotal |
||
83 | * Meta information extracted from the WSDL |
||
84 | * - documentation: Total handling costs for this order. You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies. Optional Limitations: Must not exceed $10,000 USD in any currency. No |
||
85 | * currency symbol. Decimal separator must be a period (.), and the thousands separator must be a comma (,). |
||
86 | * - maxOccurs: 1 |
||
87 | * - minOccurs: 0 |
||
88 | * @var \PayPal\StructType\BasicAmountType |
||
89 | */ |
||
90 | public $HandlingTotal; |
||
91 | /** |
||
92 | * The TaxTotal |
||
93 | * Meta information extracted from the WSDL |
||
94 | * - documentation: Sum of tax for all items in this order. You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies. Optional Limitations: Must not exceed $10,000 USD in any currency. |
||
95 | * No currency symbol. Decimal separator must be a period (.), and the thousands separator must be a comma (,). |
||
96 | * - maxOccurs: 1 |
||
97 | * - minOccurs: 0 |
||
98 | * @var \PayPal\StructType\BasicAmountType |
||
99 | */ |
||
100 | public $TaxTotal; |
||
101 | /** |
||
102 | * The InsuranceTotal |
||
103 | * Meta information extracted from the WSDL |
||
104 | * - documentation: Total shipping insurance costs for this order. Optional |
||
105 | * - maxOccurs: 1 |
||
106 | * - minOccurs: 0 |
||
107 | * @var \PayPal\StructType\BasicAmountType |
||
108 | */ |
||
109 | public $InsuranceTotal; |
||
110 | /** |
||
111 | * The ShippingDiscount |
||
112 | * Meta information extracted from the WSDL |
||
113 | * - documentation: Shipping discount for this order, specified as a negative number. Optional |
||
114 | * - maxOccurs: 1 |
||
115 | * - minOccurs: 0 |
||
116 | * @var \PayPal\StructType\BasicAmountType |
||
117 | */ |
||
118 | public $ShippingDiscount; |
||
119 | /** |
||
120 | * The OrderDescription |
||
121 | * Meta information extracted from the WSDL |
||
122 | * - documentation: Description of items the customer is purchasing. Optional Character length and limitations: 127 single-byte alphanumeric characters |
||
123 | * - maxOccurs: 1 |
||
124 | * - minOccurs: 0 |
||
125 | * @var string |
||
126 | */ |
||
127 | public $OrderDescription; |
||
128 | /** |
||
129 | * The Custom |
||
130 | * Meta information extracted from the WSDL |
||
131 | * - documentation: A free-form field for your own use. Optional Character length and limitations: 256 single-byte alphanumeric characters |
||
132 | * - maxOccurs: 1 |
||
133 | * - minOccurs: 0 |
||
134 | * @var string |
||
135 | */ |
||
136 | public $Custom; |
||
137 | /** |
||
138 | * The MsgSubID |
||
139 | * Meta information extracted from the WSDL |
||
140 | * - documentation: Unique id for each API request to prevent duplicate payments. Optional Character length and limits: 38 single-byte characters maximum. |
||
141 | * - maxOccurs: 1 |
||
142 | * - minOccurs: 0 |
||
143 | * @var string |
||
144 | */ |
||
145 | public $MsgSubID; |
||
146 | /** |
||
147 | * The IPAddress |
||
148 | * Meta information extracted from the WSDL |
||
149 | * - documentation: IP Address of the buyer |
||
150 | * - maxOccurs: 1 |
||
151 | * - minOccurs: 0 |
||
152 | * @var string |
||
153 | */ |
||
154 | public $IPAddress; |
||
155 | /** |
||
156 | * The ShipToStore |
||
157 | * Meta information extracted from the WSDL |
||
158 | * - documentation: A flag indicating that this transaction is a Ship to Store transaction. Optional |
||
159 | * - maxOccurs: 1 |
||
160 | * - minOccurs: 0 |
||
161 | * @var string |
||
162 | */ |
||
163 | public $ShipToStore; |
||
164 | /** |
||
165 | * Constructor method for DoAuthorizationRequestType |
||
166 | * @uses DoAuthorizationRequestType::setTransactionID() |
||
167 | * @uses DoAuthorizationRequestType::setAmount() |
||
168 | * @uses DoAuthorizationRequestType::setTransactionEntity() |
||
169 | * @uses DoAuthorizationRequestType::setShipToAddress() |
||
170 | * @uses DoAuthorizationRequestType::setPaymentDetailsItem() |
||
171 | * @uses DoAuthorizationRequestType::setItemTotal() |
||
172 | * @uses DoAuthorizationRequestType::setShippingTotal() |
||
173 | * @uses DoAuthorizationRequestType::setHandlingTotal() |
||
174 | * @uses DoAuthorizationRequestType::setTaxTotal() |
||
175 | * @uses DoAuthorizationRequestType::setInsuranceTotal() |
||
176 | * @uses DoAuthorizationRequestType::setShippingDiscount() |
||
177 | * @uses DoAuthorizationRequestType::setOrderDescription() |
||
178 | * @uses DoAuthorizationRequestType::setCustom() |
||
179 | * @uses DoAuthorizationRequestType::setMsgSubID() |
||
180 | * @uses DoAuthorizationRequestType::setIPAddress() |
||
181 | * @uses DoAuthorizationRequestType::setShipToStore() |
||
182 | * @param string $transactionID |
||
183 | * @param \PayPal\StructType\BasicAmountType $amount |
||
184 | * @param string $transactionEntity |
||
185 | * @param \PayPal\StructType\AddressType $shipToAddress |
||
186 | * @param \PayPal\StructType\PaymentDetailsItemType[] $paymentDetailsItem |
||
187 | * @param \PayPal\StructType\BasicAmountType $itemTotal |
||
188 | * @param \PayPal\StructType\BasicAmountType $shippingTotal |
||
189 | * @param \PayPal\StructType\BasicAmountType $handlingTotal |
||
190 | * @param \PayPal\StructType\BasicAmountType $taxTotal |
||
191 | * @param \PayPal\StructType\BasicAmountType $insuranceTotal |
||
192 | * @param \PayPal\StructType\BasicAmountType $shippingDiscount |
||
193 | * @param string $orderDescription |
||
194 | * @param string $custom |
||
195 | * @param string $msgSubID |
||
196 | * @param string $iPAddress |
||
197 | * @param string $shipToStore |
||
198 | */ |
||
199 | public function __construct($transactionID = null, \PayPal\StructType\BasicAmountType $amount = null, $transactionEntity = null, \PayPal\StructType\AddressType $shipToAddress = null, array $paymentDetailsItem = array(), \PayPal\StructType\BasicAmountType $itemTotal = null, \PayPal\StructType\BasicAmountType $shippingTotal = null, \PayPal\StructType\BasicAmountType $handlingTotal = null, \PayPal\StructType\BasicAmountType $taxTotal = null, \PayPal\StructType\BasicAmountType $insuranceTotal = null, \PayPal\StructType\BasicAmountType $shippingDiscount = null, $orderDescription = null, $custom = null, $msgSubID = null, $iPAddress = null, $shipToStore = null) |
||
200 | { |
||
201 | $this |
||
202 | ->setTransactionID($transactionID) |
||
203 | ->setAmount($amount) |
||
204 | ->setTransactionEntity($transactionEntity) |
||
205 | ->setShipToAddress($shipToAddress) |
||
206 | ->setPaymentDetailsItem($paymentDetailsItem) |
||
207 | ->setItemTotal($itemTotal) |
||
208 | ->setShippingTotal($shippingTotal) |
||
209 | ->setHandlingTotal($handlingTotal) |
||
210 | ->setTaxTotal($taxTotal) |
||
211 | ->setInsuranceTotal($insuranceTotal) |
||
212 | ->setShippingDiscount($shippingDiscount) |
||
213 | ->setOrderDescription($orderDescription) |
||
214 | ->setCustom($custom) |
||
215 | ->setMsgSubID($msgSubID) |
||
216 | ->setIPAddress($iPAddress) |
||
217 | ->setShipToStore($shipToStore); |
||
218 | } |
||
219 | /** |
||
220 | * Get TransactionID value |
||
221 | * @return string |
||
222 | */ |
||
223 | public function getTransactionID() |
||
224 | { |
||
225 | return $this->TransactionID; |
||
226 | } |
||
227 | /** |
||
228 | * Set TransactionID value |
||
229 | * @param string $transactionID |
||
230 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
231 | */ |
||
232 | public function setTransactionID($transactionID = null) |
||
240 | } |
||
241 | /** |
||
242 | * Get Amount value |
||
243 | * @return \PayPal\StructType\BasicAmountType |
||
244 | */ |
||
245 | public function getAmount() |
||
246 | { |
||
247 | return $this->Amount; |
||
248 | } |
||
249 | /** |
||
250 | * Set Amount value |
||
251 | * @param \PayPal\StructType\BasicAmountType $amount |
||
252 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
253 | */ |
||
254 | public function setAmount(\PayPal\StructType\BasicAmountType $amount = null) |
||
255 | { |
||
256 | $this->Amount = $amount; |
||
257 | return $this; |
||
258 | } |
||
259 | /** |
||
260 | * Get TransactionEntity value |
||
261 | * @return string|null |
||
262 | */ |
||
263 | public function getTransactionEntity() |
||
264 | { |
||
265 | return $this->TransactionEntity; |
||
266 | } |
||
267 | /** |
||
268 | * Set TransactionEntity value |
||
269 | * @uses \PayPal\EnumType\TransactionEntityType::valueIsValid() |
||
270 | * @uses \PayPal\EnumType\TransactionEntityType::getValidValues() |
||
271 | * @throws \InvalidArgumentException |
||
272 | * @param string $transactionEntity |
||
273 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
274 | */ |
||
275 | public function setTransactionEntity($transactionEntity = null) |
||
283 | } |
||
284 | /** |
||
285 | * Get ShipToAddress value |
||
286 | * @return \PayPal\StructType\AddressType|null |
||
287 | */ |
||
288 | public function getShipToAddress() |
||
289 | { |
||
290 | return $this->ShipToAddress; |
||
291 | } |
||
292 | /** |
||
293 | * Set ShipToAddress value |
||
294 | * @param \PayPal\StructType\AddressType $shipToAddress |
||
295 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
296 | */ |
||
297 | public function setShipToAddress(\PayPal\StructType\AddressType $shipToAddress = null) |
||
298 | { |
||
299 | $this->ShipToAddress = $shipToAddress; |
||
300 | return $this; |
||
301 | } |
||
302 | /** |
||
303 | * Get PaymentDetailsItem value |
||
304 | * @return \PayPal\StructType\PaymentDetailsItemType[]|null |
||
305 | */ |
||
306 | public function getPaymentDetailsItem() |
||
307 | { |
||
308 | return $this->PaymentDetailsItem; |
||
309 | } |
||
310 | /** |
||
311 | * This method is responsible for validating the values passed to the setPaymentDetailsItem method |
||
312 | * This method is willingly generated in order to preserve the one-line inline validation within the setPaymentDetailsItem method |
||
313 | * @param array $values |
||
314 | * @return string A non-empty message if the values does not match the validation rules |
||
315 | */ |
||
316 | public static function validatePaymentDetailsItemForArrayConstraintsFromSetPaymentDetailsItem(array $values = array()) |
||
317 | { |
||
318 | $message = ''; |
||
319 | $invalidValues = []; |
||
320 | foreach ($values as $doAuthorizationRequestTypePaymentDetailsItemItem) { |
||
321 | // validation for constraint: itemType |
||
322 | if (!$doAuthorizationRequestTypePaymentDetailsItemItem instanceof \PayPal\StructType\PaymentDetailsItemType) { |
||
323 | $invalidValues[] = is_object($doAuthorizationRequestTypePaymentDetailsItemItem) ? get_class($doAuthorizationRequestTypePaymentDetailsItemItem) : sprintf('%s(%s)', gettype($doAuthorizationRequestTypePaymentDetailsItemItem), var_export($doAuthorizationRequestTypePaymentDetailsItemItem, true)); |
||
324 | } |
||
325 | } |
||
326 | if (!empty($invalidValues)) { |
||
327 | $message = sprintf('The PaymentDetailsItem property can only contain items of type \PayPal\StructType\PaymentDetailsItemType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues))); |
||
328 | } |
||
329 | unset($invalidValues); |
||
330 | return $message; |
||
331 | } |
||
332 | /** |
||
333 | * Set PaymentDetailsItem value |
||
334 | * @throws \InvalidArgumentException |
||
335 | * @param \PayPal\StructType\PaymentDetailsItemType[] $paymentDetailsItem |
||
336 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
337 | */ |
||
338 | public function setPaymentDetailsItem(array $paymentDetailsItem = array()) |
||
339 | { |
||
340 | // validation for constraint: array |
||
341 | if ('' !== ($paymentDetailsItemArrayErrorMessage = self::validatePaymentDetailsItemForArrayConstraintsFromSetPaymentDetailsItem($paymentDetailsItem))) { |
||
342 | throw new \InvalidArgumentException($paymentDetailsItemArrayErrorMessage, __LINE__); |
||
343 | } |
||
344 | $this->PaymentDetailsItem = $paymentDetailsItem; |
||
345 | return $this; |
||
346 | } |
||
347 | /** |
||
348 | * Add item to PaymentDetailsItem value |
||
349 | * @throws \InvalidArgumentException |
||
350 | * @param \PayPal\StructType\PaymentDetailsItemType $item |
||
351 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
352 | */ |
||
353 | public function addToPaymentDetailsItem(\PayPal\StructType\PaymentDetailsItemType $item) |
||
354 | { |
||
355 | // validation for constraint: itemType |
||
356 | if (!$item instanceof \PayPal\StructType\PaymentDetailsItemType) { |
||
357 | throw new \InvalidArgumentException(sprintf('The PaymentDetailsItem property can only contain items of type \PayPal\StructType\PaymentDetailsItemType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__); |
||
358 | } |
||
359 | $this->PaymentDetailsItem[] = $item; |
||
360 | return $this; |
||
361 | } |
||
362 | /** |
||
363 | * Get ItemTotal value |
||
364 | * @return \PayPal\StructType\BasicAmountType|null |
||
365 | */ |
||
366 | public function getItemTotal() |
||
369 | } |
||
370 | /** |
||
371 | * Set ItemTotal value |
||
372 | * @param \PayPal\StructType\BasicAmountType $itemTotal |
||
373 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
374 | */ |
||
375 | public function setItemTotal(\PayPal\StructType\BasicAmountType $itemTotal = null) |
||
376 | { |
||
377 | $this->ItemTotal = $itemTotal; |
||
378 | return $this; |
||
379 | } |
||
380 | /** |
||
381 | * Get ShippingTotal value |
||
382 | * @return \PayPal\StructType\BasicAmountType|null |
||
383 | */ |
||
384 | public function getShippingTotal() |
||
385 | { |
||
386 | return $this->ShippingTotal; |
||
387 | } |
||
388 | /** |
||
389 | * Set ShippingTotal value |
||
390 | * @param \PayPal\StructType\BasicAmountType $shippingTotal |
||
391 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
392 | */ |
||
393 | public function setShippingTotal(\PayPal\StructType\BasicAmountType $shippingTotal = null) |
||
394 | { |
||
395 | $this->ShippingTotal = $shippingTotal; |
||
396 | return $this; |
||
397 | } |
||
398 | /** |
||
399 | * Get HandlingTotal value |
||
400 | * @return \PayPal\StructType\BasicAmountType|null |
||
401 | */ |
||
402 | public function getHandlingTotal() |
||
403 | { |
||
404 | return $this->HandlingTotal; |
||
405 | } |
||
406 | /** |
||
407 | * Set HandlingTotal value |
||
408 | * @param \PayPal\StructType\BasicAmountType $handlingTotal |
||
409 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
410 | */ |
||
411 | public function setHandlingTotal(\PayPal\StructType\BasicAmountType $handlingTotal = null) |
||
412 | { |
||
413 | $this->HandlingTotal = $handlingTotal; |
||
414 | return $this; |
||
415 | } |
||
416 | /** |
||
417 | * Get TaxTotal value |
||
418 | * @return \PayPal\StructType\BasicAmountType|null |
||
419 | */ |
||
420 | public function getTaxTotal() |
||
421 | { |
||
422 | return $this->TaxTotal; |
||
423 | } |
||
424 | /** |
||
425 | * Set TaxTotal value |
||
426 | * @param \PayPal\StructType\BasicAmountType $taxTotal |
||
427 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
428 | */ |
||
429 | public function setTaxTotal(\PayPal\StructType\BasicAmountType $taxTotal = null) |
||
433 | } |
||
434 | /** |
||
435 | * Get InsuranceTotal value |
||
436 | * @return \PayPal\StructType\BasicAmountType|null |
||
437 | */ |
||
438 | public function getInsuranceTotal() |
||
439 | { |
||
440 | return $this->InsuranceTotal; |
||
441 | } |
||
442 | /** |
||
443 | * Set InsuranceTotal value |
||
444 | * @param \PayPal\StructType\BasicAmountType $insuranceTotal |
||
445 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
446 | */ |
||
447 | public function setInsuranceTotal(\PayPal\StructType\BasicAmountType $insuranceTotal = null) |
||
448 | { |
||
449 | $this->InsuranceTotal = $insuranceTotal; |
||
450 | return $this; |
||
451 | } |
||
452 | /** |
||
453 | * Get ShippingDiscount value |
||
454 | * @return \PayPal\StructType\BasicAmountType|null |
||
455 | */ |
||
456 | public function getShippingDiscount() |
||
457 | { |
||
458 | return $this->ShippingDiscount; |
||
459 | } |
||
460 | /** |
||
461 | * Set ShippingDiscount value |
||
462 | * @param \PayPal\StructType\BasicAmountType $shippingDiscount |
||
463 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
464 | */ |
||
465 | public function setShippingDiscount(\PayPal\StructType\BasicAmountType $shippingDiscount = null) |
||
466 | { |
||
467 | $this->ShippingDiscount = $shippingDiscount; |
||
468 | return $this; |
||
469 | } |
||
470 | /** |
||
471 | * Get OrderDescription value |
||
472 | * @return string|null |
||
473 | */ |
||
474 | public function getOrderDescription() |
||
475 | { |
||
476 | return $this->OrderDescription; |
||
477 | } |
||
478 | /** |
||
479 | * Set OrderDescription value |
||
480 | * @param string $orderDescription |
||
481 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
482 | */ |
||
483 | public function setOrderDescription($orderDescription = null) |
||
484 | { |
||
485 | // validation for constraint: string |
||
486 | if (!is_null($orderDescription) && !is_string($orderDescription)) { |
||
487 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($orderDescription, true), gettype($orderDescription)), __LINE__); |
||
488 | } |
||
489 | $this->OrderDescription = $orderDescription; |
||
490 | return $this; |
||
491 | } |
||
492 | /** |
||
493 | * Get Custom value |
||
494 | * @return string|null |
||
495 | */ |
||
496 | public function getCustom() |
||
499 | } |
||
500 | /** |
||
501 | * Set Custom value |
||
502 | * @param string $custom |
||
503 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
504 | */ |
||
505 | public function setCustom($custom = null) |
||
506 | { |
||
507 | // validation for constraint: string |
||
508 | if (!is_null($custom) && !is_string($custom)) { |
||
509 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($custom, true), gettype($custom)), __LINE__); |
||
510 | } |
||
511 | $this->Custom = $custom; |
||
512 | return $this; |
||
513 | } |
||
514 | /** |
||
515 | * Get MsgSubID value |
||
516 | * @return string|null |
||
517 | */ |
||
518 | public function getMsgSubID() |
||
521 | } |
||
522 | /** |
||
523 | * Set MsgSubID value |
||
524 | * @param string $msgSubID |
||
525 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
526 | */ |
||
527 | public function setMsgSubID($msgSubID = null) |
||
528 | { |
||
529 | // validation for constraint: string |
||
530 | if (!is_null($msgSubID) && !is_string($msgSubID)) { |
||
531 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($msgSubID, true), gettype($msgSubID)), __LINE__); |
||
532 | } |
||
533 | $this->MsgSubID = $msgSubID; |
||
534 | return $this; |
||
535 | } |
||
536 | /** |
||
537 | * Get IPAddress value |
||
538 | * @return string|null |
||
539 | */ |
||
540 | public function getIPAddress() |
||
541 | { |
||
542 | return $this->IPAddress; |
||
543 | } |
||
544 | /** |
||
545 | * Set IPAddress value |
||
546 | * @param string $iPAddress |
||
547 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
548 | */ |
||
549 | public function setIPAddress($iPAddress = null) |
||
550 | { |
||
551 | // validation for constraint: string |
||
552 | if (!is_null($iPAddress) && !is_string($iPAddress)) { |
||
553 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($iPAddress, true), gettype($iPAddress)), __LINE__); |
||
554 | } |
||
555 | $this->IPAddress = $iPAddress; |
||
556 | return $this; |
||
557 | } |
||
558 | /** |
||
559 | * Get ShipToStore value |
||
560 | * @return string|null |
||
561 | */ |
||
562 | public function getShipToStore() |
||
565 | } |
||
566 | /** |
||
567 | * Set ShipToStore value |
||
568 | * @param string $shipToStore |
||
569 | * @return \PayPal\StructType\DoAuthorizationRequestType |
||
570 | */ |
||
571 | public function setShipToStore($shipToStore = null) |
||
579 | } |
||
580 | } |
||
581 |