PaymentDetailsType::getProfileAddressChangeDate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace PayPal\StructType;
4
5
use \WsdlToPhp\PackageBase\AbstractStructBase;
6
7
/**
8
 * This class stands for PaymentDetailsType StructType
9
 * Meta information extracted from the WSDL
10
 * - documentation: PaymentDetailsType Information about a payment. Used by DCC and Express Checkout.
11
 * @subpackage Structs
12
 * @author WsdlToPhp <[email protected]>
13
 */
14
class PaymentDetailsType extends AbstractStructBase
15
{
16
    /**
17
     * The OrderTotal
18
     * Meta information extracted from the WSDL
19
     * - documentation: Total of order, including shipping, handling, and tax. You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies. Limitations: Must not exceed $10,000 USD in any
20
     * currency. No currency symbol. Decimal separator must be a period (.), and the thousands separator must be a comma (,).
21
     * - minOccurs: 0
22
     * @var \PayPal\StructType\BasicAmountType
23
     */
24
    public $OrderTotal;
25
    /**
26
     * The ItemTotal
27
     * Meta information extracted from the WSDL
28
     * - 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 separator must be a comma (,).
29
     * - minOccurs: 0
30
     * @var \PayPal\StructType\BasicAmountType
31
     */
32
    public $ItemTotal;
33
    /**
34
     * The ShippingTotal
35
     * Meta information extracted from the WSDL
36
     * - 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
37
     * currency symbol. Decimal separator must be a period (.), and the thousands separator must be a comma (,).
38
     * - minOccurs: 0
39
     * @var \PayPal\StructType\BasicAmountType
40
     */
41
    public $ShippingTotal;
42
    /**
43
     * The HandlingTotal
44
     * Meta information extracted from the WSDL
45
     * - 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
46
     * currency symbol. Decimal separator must be a period (.), and the thousands separator must be a comma (,).
47
     * - minOccurs: 0
48
     * @var \PayPal\StructType\BasicAmountType
49
     */
50
    public $HandlingTotal;
51
    /**
52
     * The TaxTotal
53
     * Meta information extracted from the WSDL
54
     * - 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.
55
     * No currency symbol. Decimal separator must be a period (.), and the thousands separator must be a comma (,).
56
     * - minOccurs: 0
57
     * @var \PayPal\StructType\BasicAmountType
58
     */
59
    public $TaxTotal;
60
    /**
61
     * The OrderDescription
62
     * Meta information extracted from the WSDL
63
     * - documentation: Description of items the customer is purchasing. Optional Character length and limitations: 127 single-byte alphanumeric characters
64
     * - minOccurs: 0
65
     * @var string
66
     */
67
    public $OrderDescription;
68
    /**
69
     * The Custom
70
     * Meta information extracted from the WSDL
71
     * - documentation: A free-form field for your own use. Optional Character length and limitations: 256 single-byte alphanumeric characters
72
     * - minOccurs: 0
73
     * @var string
74
     */
75
    public $Custom;
76
    /**
77
     * The InvoiceID
78
     * Meta information extracted from the WSDL
79
     * - documentation: Your own invoice or tracking number. Optional Character length and limitations: 127 single-byte alphanumeric characters
80
     * - minOccurs: 0
81
     * @var string
82
     */
83
    public $InvoiceID;
84
    /**
85
     * The ButtonSource
86
     * Meta information extracted from the WSDL
87
     * - documentation: An identification code for use by third-party applications to identify transactions. Optional Character length and limitations: 32 single-byte alphanumeric characters
88
     * - minOccurs: 0
89
     * @var string
90
     */
91
    public $ButtonSource;
92
    /**
93
     * The NotifyURL
94
     * Meta information extracted from the WSDL
95
     * - documentation: Your URL for receiving Instant Payment Notification (IPN) about this transaction. Optional If you do not specify NotifyURL in the request, the notification URL from your Merchant Profile is used, if one exists. Character length and
96
     * limitations: 2,048 single-byte alphanumeric characters
97
     * - minOccurs: 0
98
     * @var string
99
     */
100
    public $NotifyURL;
101
    /**
102
     * The ShipToAddress
103
     * Meta information extracted from the WSDL
104
     * - documentation: Address the order will be shipped to. Optional If you include the ShipToAddress element, the AddressType elements are required: Name Street1 CityName CountryCode Do not set set the CountryName element.
105
     * - minOccurs: 0
106
     * @var \PayPal\StructType\AddressType
107
     */
108
    public $ShipToAddress;
109
    /**
110
     * The MultiShipping
111
     * Meta information extracted from the WSDL
112
     * - documentation: The value 1 indicates that this payment is associated with multiple shipping addresses. Optional Character length and limitations: Four single-byte numeric characters.
113
     * - minOccurs: 0
114
     * @var string
115
     */
116
    public $MultiShipping;
117
    /**
118
     * The FulfillmentReferenceNumber
119
     * Meta information extracted from the WSDL
120
     * - documentation: Thirdparty Fulfillment Reference Number. Optional Character length and limitations: 32 alphanumeric characters.
121
     * - maxOccurs: 1
122
     * - minOccurs: 0
123
     * @var string
124
     */
125
    public $FulfillmentReferenceNumber;
126
    /**
127
     * The FulfillmentAddress
128
     * Meta information extracted from the WSDL
129
     * - maxOccurs: 1
130
     * - minOccurs: 0
131
     * @var \PayPal\StructType\AddressType
132
     */
133
    public $FulfillmentAddress;
134
    /**
135
     * The PaymentCategoryType
136
     * Meta information extracted from the WSDL
137
     * - maxOccurs: 1
138
     * - minOccurs: 0
139
     * @var string
140
     */
141
    public $PaymentCategoryType;
142
    /**
143
     * The LocationType
144
     * Meta information extracted from the WSDL
145
     * - maxOccurs: 1
146
     * - minOccurs: 0
147
     * @var string
148
     */
149
    public $LocationType;
150
    /**
151
     * The ShippingMethod
152
     * Meta information extracted from the WSDL
153
     * - maxOccurs: 1
154
     * - minOccurs: 0
155
     * @var string
156
     */
157
    public $ShippingMethod;
158
    /**
159
     * The ProfileAddressChangeDate
160
     * Meta information extracted from the WSDL
161
     * - documentation: Date and time (in GMT in the format yyyy-MM-ddTHH:mm:ssZ) at which address was changed by the user.
162
     * - maxOccurs: 1
163
     * - minOccurs: 0
164
     * @var string
165
     */
166
    public $ProfileAddressChangeDate;
167
    /**
168
     * The PaymentDetailsItem
169
     * Meta information extracted from the WSDL
170
     * - documentation: Information about the individual purchased items
171
     * - maxOccurs: unbounded
172
     * - minOccurs: 0
173
     * @var \PayPal\StructType\PaymentDetailsItemType[]
174
     */
175
    public $PaymentDetailsItem;
176
    /**
177
     * The InsuranceTotal
178
     * Meta information extracted from the WSDL
179
     * - documentation: Total shipping insurance costs for this order. Optional
180
     * - maxOccurs: 1
181
     * - minOccurs: 0
182
     * @var \PayPal\StructType\BasicAmountType
183
     */
184
    public $InsuranceTotal;
185
    /**
186
     * The ShippingDiscount
187
     * Meta information extracted from the WSDL
188
     * - documentation: Shipping discount for this order, specified as a negative number. Optional
189
     * - maxOccurs: 1
190
     * - minOccurs: 0
191
     * @var \PayPal\StructType\BasicAmountType
192
     */
193
    public $ShippingDiscount;
194
    /**
195
     * The InsuranceOptionOffered
196
     * Meta information extracted from the WSDL
197
     * - documentation: Information about the Insurance options.
198
     * - maxOccurs: 1
199
     * - minOccurs: 0
200
     * @var string
201
     */
202
    public $InsuranceOptionOffered;
203
    /**
204
     * The AllowedPaymentMethod
205
     * Meta information extracted from the WSDL
206
     * - documentation: Allowed payment methods for this transaction.
207
     * - maxOccurs: 1
208
     * - minOccurs: 0
209
     * @var string
210
     */
211
    public $AllowedPaymentMethod;
212
    /**
213
     * The EnhancedPaymentData
214
     * Meta information extracted from the WSDL
215
     * - documentation: Enhanced Data section to accept channel specific data. Applicable for version 62 and above, use this tag to pass airline itinerary data. Optional Refer to EnhancedPaymentDataType for details.
216
     * - maxOccurs: 1
217
     * - minOccurs: 0
218
     * @var \PayPal\StructType\EnhancedPaymentDataType
219
     */
220
    public $EnhancedPaymentData;
221
    /**
222
     * The SellerDetails
223
     * Meta information extracted from the WSDL
224
     * - documentation: Details about the seller. Optional
225
     * - maxOccurs: 1
226
     * - minOccurs: 0
227
     * @var \PayPal\StructType\SellerDetailsType
228
     */
229
    public $SellerDetails;
230
    /**
231
     * The NoteText
232
     * Meta information extracted from the WSDL
233
     * - documentation: Note to recipient/seller. Optional Character length and limitations: 127 single-byte alphanumeric characters.
234
     * - maxOccurs: 1
235
     * - minOccurs: 0
236
     * @var string
237
     */
238
    public $NoteText;
239
    /**
240
     * The TransactionId
241
     * Meta information extracted from the WSDL
242
     * - documentation: PayPal Transaction Id, returned once DoExpressCheckout is completed.
243
     * - maxOccurs: 1
244
     * - minOccurs: 0
245
     * @var string
246
     */
247
    public $TransactionId;
248
    /**
249
     * The PaymentAction
250
     * Meta information extracted from the WSDL
251
     * - documentation: How you want to obtain payment. This payment action input will be used for split payments Authorization indicates that this payment is a basic authorization subject to settlement with PayPal Authorization and Capture. Order indicates
252
     * that this payment is is an order authorization subject to settlement with PayPal Authorization and Capture. Sale indicates that this is a final sale for which you are requesting payment. IMPORTANT: You cannot set PaymentAction to Sale on
253
     * SetExpressCheckoutRequest and then change PaymentAction to Authorization on the final Express Checkout API, DoExpressCheckoutPaymentRequest. Character length and limit: Up to 13 single-byte alphabetic characters
254
     * - maxOccurs: 1
255
     * - minOccurs: 0
256
     * @var string
257
     */
258
    public $PaymentAction;
259
    /**
260
     * The PaymentRequestID
261
     * Meta information extracted from the WSDL
262
     * - documentation: Unique identifier and mandatory for the particular payment request in case of multiple payment
263
     * - minOccurs: 0
264
     * @var string
265
     */
266
    public $PaymentRequestID;
267
    /**
268
     * The OrderURL
269
     * Meta information extracted from the WSDL
270
     * - documentation: URL on Merchant site pertaining to this invoice. Optional
271
     * - maxOccurs: 1
272
     * - minOccurs: 0
273
     * @var string
274
     */
275
    public $OrderURL;
276
    /**
277
     * The SoftDescriptor
278
     * Meta information extracted from the WSDL
279
     * - documentation: Soft Descriptor supported for Sale and Auth in DEC only. For Order this will be ignored.
280
     * - maxOccurs: 1
281
     * - minOccurs: 0
282
     * @var string
283
     */
284
    public $SoftDescriptor;
285
    /**
286
     * The BranchLevel
287
     * Meta information extracted from the WSDL
288
     * - documentation: BranchLevel is used to identify chain payment. If BranchLevel is 0 or 1, this payment is where money moves to. If BranchLevel greater than 1, this payment contains the actual seller info. Optional
289
     * - maxOccurs: 1
290
     * - minOccurs: 0
291
     * @var int
292
     */
293
    public $BranchLevel;
294
    /**
295
     * The OfferDetails
296
     * Meta information extracted from the WSDL
297
     * - documentation: Soft Descriptor supported for Sale and Auth in DEC only. For Order this will be ignored.
298
     * - maxOccurs: 1
299
     * - minOccurs: 0
300
     * @var \PayPal\StructType\OfferDetailsType
301
     */
302
    public $OfferDetails;
303
    /**
304
     * The Recurring
305
     * Meta information extracted from the WSDL
306
     * - documentation: Flag to indicate the recurring transaction
307
     * - maxOccurs: 1
308
     * - minOccurs: 0
309
     * @var string
310
     */
311
    public $Recurring;
312
    /**
313
     * The PaymentReason
314
     * Meta information extracted from the WSDL
315
     * - documentation: Indicates the purpose of this payment like Refund
316
     * - maxOccurs: 1
317
     * - minOccurs: 0
318
     * @var string
319
     */
320
    public $PaymentReason;
321
    /**
322
     * The LocationID
323
     * Meta information extracted from the WSDL
324
     * - documentation: Location ID Specified by merchant Optional Character length and limitations: 50 single-byte alphanumeric characters
325
     * - minOccurs: 0
326
     * @var string
327
     */
328
    public $LocationID;
329
    /**
330
     * The RedeemedOffers
331
     * Meta information extracted from the WSDL
332
     * - documentation: For instance single use coupons should not be returned in future CheckIn calls once they are redeemed.
333
     * - maxOccurs: 100
334
     * - minOccurs: 0
335
     * @var \PayPal\StructType\DiscountInfoType[]
336
     */
337
    public $RedeemedOffers;
338
    /**
339
     * The CummulativePoints
340
     * Meta information extracted from the WSDL
341
     * - documentation: Total loyalty points for a given id accumulated by the consumre so far.
342
     * - maxOccurs: 100
343
     * - minOccurs: 0
344
     * @var \PayPal\StructType\DiscountInfoType[]
345
     */
346
    public $CummulativePoints;
347
    /**
348
     * The MerchantData
349
     * Meta information extracted from the WSDL
350
     * - documentation: Merchant Data that is passed through from Merchant to Processor
351
     * - maxOccurs: 16
352
     * - minOccurs: 0
353
     * @var \PayPal\StructType\MerchantDataType[]
354
     */
355
    public $MerchantData;
356
    /**
357
     * Constructor method for PaymentDetailsType
358
     * @uses PaymentDetailsType::setOrderTotal()
359
     * @uses PaymentDetailsType::setItemTotal()
360
     * @uses PaymentDetailsType::setShippingTotal()
361
     * @uses PaymentDetailsType::setHandlingTotal()
362
     * @uses PaymentDetailsType::setTaxTotal()
363
     * @uses PaymentDetailsType::setOrderDescription()
364
     * @uses PaymentDetailsType::setCustom()
365
     * @uses PaymentDetailsType::setInvoiceID()
366
     * @uses PaymentDetailsType::setButtonSource()
367
     * @uses PaymentDetailsType::setNotifyURL()
368
     * @uses PaymentDetailsType::setShipToAddress()
369
     * @uses PaymentDetailsType::setMultiShipping()
370
     * @uses PaymentDetailsType::setFulfillmentReferenceNumber()
371
     * @uses PaymentDetailsType::setFulfillmentAddress()
372
     * @uses PaymentDetailsType::setPaymentCategoryType()
373
     * @uses PaymentDetailsType::setLocationType()
374
     * @uses PaymentDetailsType::setShippingMethod()
375
     * @uses PaymentDetailsType::setProfileAddressChangeDate()
376
     * @uses PaymentDetailsType::setPaymentDetailsItem()
377
     * @uses PaymentDetailsType::setInsuranceTotal()
378
     * @uses PaymentDetailsType::setShippingDiscount()
379
     * @uses PaymentDetailsType::setInsuranceOptionOffered()
380
     * @uses PaymentDetailsType::setAllowedPaymentMethod()
381
     * @uses PaymentDetailsType::setEnhancedPaymentData()
382
     * @uses PaymentDetailsType::setSellerDetails()
383
     * @uses PaymentDetailsType::setNoteText()
384
     * @uses PaymentDetailsType::setTransactionId()
385
     * @uses PaymentDetailsType::setPaymentAction()
386
     * @uses PaymentDetailsType::setPaymentRequestID()
387
     * @uses PaymentDetailsType::setOrderURL()
388
     * @uses PaymentDetailsType::setSoftDescriptor()
389
     * @uses PaymentDetailsType::setBranchLevel()
390
     * @uses PaymentDetailsType::setOfferDetails()
391
     * @uses PaymentDetailsType::setRecurring()
392
     * @uses PaymentDetailsType::setPaymentReason()
393
     * @uses PaymentDetailsType::setLocationID()
394
     * @uses PaymentDetailsType::setRedeemedOffers()
395
     * @uses PaymentDetailsType::setCummulativePoints()
396
     * @uses PaymentDetailsType::setMerchantData()
397
     * @param \PayPal\StructType\BasicAmountType $orderTotal
398
     * @param \PayPal\StructType\BasicAmountType $itemTotal
399
     * @param \PayPal\StructType\BasicAmountType $shippingTotal
400
     * @param \PayPal\StructType\BasicAmountType $handlingTotal
401
     * @param \PayPal\StructType\BasicAmountType $taxTotal
402
     * @param string $orderDescription
403
     * @param string $custom
404
     * @param string $invoiceID
405
     * @param string $buttonSource
406
     * @param string $notifyURL
407
     * @param \PayPal\StructType\AddressType $shipToAddress
408
     * @param string $multiShipping
409
     * @param string $fulfillmentReferenceNumber
410
     * @param \PayPal\StructType\AddressType $fulfillmentAddress
411
     * @param string $paymentCategoryType
412
     * @param string $locationType
413
     * @param string $shippingMethod
414
     * @param string $profileAddressChangeDate
415
     * @param \PayPal\StructType\PaymentDetailsItemType[] $paymentDetailsItem
416
     * @param \PayPal\StructType\BasicAmountType $insuranceTotal
417
     * @param \PayPal\StructType\BasicAmountType $shippingDiscount
418
     * @param string $insuranceOptionOffered
419
     * @param string $allowedPaymentMethod
420
     * @param \PayPal\StructType\EnhancedPaymentDataType $enhancedPaymentData
421
     * @param \PayPal\StructType\SellerDetailsType $sellerDetails
422
     * @param string $noteText
423
     * @param string $transactionId
424
     * @param string $paymentAction
425
     * @param string $paymentRequestID
426
     * @param string $orderURL
427
     * @param string $softDescriptor
428
     * @param int $branchLevel
429
     * @param \PayPal\StructType\OfferDetailsType $offerDetails
430
     * @param string $recurring
431
     * @param string $paymentReason
432
     * @param string $locationID
433
     * @param \PayPal\StructType\DiscountInfoType[] $redeemedOffers
434
     * @param \PayPal\StructType\DiscountInfoType[] $cummulativePoints
435
     * @param \PayPal\StructType\MerchantDataType[] $merchantData
436
     */
437
    public function __construct(\PayPal\StructType\BasicAmountType $orderTotal = null, \PayPal\StructType\BasicAmountType $itemTotal = null, \PayPal\StructType\BasicAmountType $shippingTotal = null, \PayPal\StructType\BasicAmountType $handlingTotal = null, \PayPal\StructType\BasicAmountType $taxTotal = null, $orderDescription = null, $custom = null, $invoiceID = null, $buttonSource = null, $notifyURL = null, \PayPal\StructType\AddressType $shipToAddress = null, $multiShipping = null, $fulfillmentReferenceNumber = null, \PayPal\StructType\AddressType $fulfillmentAddress = null, $paymentCategoryType = null, $locationType = null, $shippingMethod = null, $profileAddressChangeDate = null, array $paymentDetailsItem = array(), \PayPal\StructType\BasicAmountType $insuranceTotal = null, \PayPal\StructType\BasicAmountType $shippingDiscount = null, $insuranceOptionOffered = null, $allowedPaymentMethod = null, \PayPal\StructType\EnhancedPaymentDataType $enhancedPaymentData = null, \PayPal\StructType\SellerDetailsType $sellerDetails = null, $noteText = null, $transactionId = null, $paymentAction = null, $paymentRequestID = null, $orderURL = null, $softDescriptor = null, $branchLevel = null, \PayPal\StructType\OfferDetailsType $offerDetails = null, $recurring = null, $paymentReason = null, $locationID = null, array $redeemedOffers = array(), array $cummulativePoints = array(), array $merchantData = array())
438
    {
439
        $this
440
            ->setOrderTotal($orderTotal)
441
            ->setItemTotal($itemTotal)
442
            ->setShippingTotal($shippingTotal)
443
            ->setHandlingTotal($handlingTotal)
444
            ->setTaxTotal($taxTotal)
445
            ->setOrderDescription($orderDescription)
446
            ->setCustom($custom)
447
            ->setInvoiceID($invoiceID)
448
            ->setButtonSource($buttonSource)
449
            ->setNotifyURL($notifyURL)
450
            ->setShipToAddress($shipToAddress)
451
            ->setMultiShipping($multiShipping)
452
            ->setFulfillmentReferenceNumber($fulfillmentReferenceNumber)
453
            ->setFulfillmentAddress($fulfillmentAddress)
454
            ->setPaymentCategoryType($paymentCategoryType)
455
            ->setLocationType($locationType)
456
            ->setShippingMethod($shippingMethod)
457
            ->setProfileAddressChangeDate($profileAddressChangeDate)
458
            ->setPaymentDetailsItem($paymentDetailsItem)
459
            ->setInsuranceTotal($insuranceTotal)
460
            ->setShippingDiscount($shippingDiscount)
461
            ->setInsuranceOptionOffered($insuranceOptionOffered)
462
            ->setAllowedPaymentMethod($allowedPaymentMethod)
463
            ->setEnhancedPaymentData($enhancedPaymentData)
464
            ->setSellerDetails($sellerDetails)
465
            ->setNoteText($noteText)
466
            ->setTransactionId($transactionId)
467
            ->setPaymentAction($paymentAction)
468
            ->setPaymentRequestID($paymentRequestID)
469
            ->setOrderURL($orderURL)
470
            ->setSoftDescriptor($softDescriptor)
471
            ->setBranchLevel($branchLevel)
472
            ->setOfferDetails($offerDetails)
473
            ->setRecurring($recurring)
474
            ->setPaymentReason($paymentReason)
475
            ->setLocationID($locationID)
476
            ->setRedeemedOffers($redeemedOffers)
477
            ->setCummulativePoints($cummulativePoints)
478
            ->setMerchantData($merchantData);
479
    }
480
    /**
481
     * Get OrderTotal value
482
     * @return \PayPal\StructType\BasicAmountType|null
483
     */
484
    public function getOrderTotal()
485
    {
486
        return $this->OrderTotal;
487
    }
488
    /**
489
     * Set OrderTotal value
490
     * @param \PayPal\StructType\BasicAmountType $orderTotal
491
     * @return \PayPal\StructType\PaymentDetailsType
492
     */
493
    public function setOrderTotal(\PayPal\StructType\BasicAmountType $orderTotal = null)
494
    {
495
        $this->OrderTotal = $orderTotal;
496
        return $this;
497
    }
498
    /**
499
     * Get ItemTotal value
500
     * @return \PayPal\StructType\BasicAmountType|null
501
     */
502
    public function getItemTotal()
503
    {
504
        return $this->ItemTotal;
505
    }
506
    /**
507
     * Set ItemTotal value
508
     * @param \PayPal\StructType\BasicAmountType $itemTotal
509
     * @return \PayPal\StructType\PaymentDetailsType
510
     */
511
    public function setItemTotal(\PayPal\StructType\BasicAmountType $itemTotal = null)
512
    {
513
        $this->ItemTotal = $itemTotal;
514
        return $this;
515
    }
516
    /**
517
     * Get ShippingTotal value
518
     * @return \PayPal\StructType\BasicAmountType|null
519
     */
520
    public function getShippingTotal()
521
    {
522
        return $this->ShippingTotal;
523
    }
524
    /**
525
     * Set ShippingTotal value
526
     * @param \PayPal\StructType\BasicAmountType $shippingTotal
527
     * @return \PayPal\StructType\PaymentDetailsType
528
     */
529
    public function setShippingTotal(\PayPal\StructType\BasicAmountType $shippingTotal = null)
530
    {
531
        $this->ShippingTotal = $shippingTotal;
532
        return $this;
533
    }
534
    /**
535
     * Get HandlingTotal value
536
     * @return \PayPal\StructType\BasicAmountType|null
537
     */
538
    public function getHandlingTotal()
539
    {
540
        return $this->HandlingTotal;
541
    }
542
    /**
543
     * Set HandlingTotal value
544
     * @param \PayPal\StructType\BasicAmountType $handlingTotal
545
     * @return \PayPal\StructType\PaymentDetailsType
546
     */
547
    public function setHandlingTotal(\PayPal\StructType\BasicAmountType $handlingTotal = null)
548
    {
549
        $this->HandlingTotal = $handlingTotal;
550
        return $this;
551
    }
552
    /**
553
     * Get TaxTotal value
554
     * @return \PayPal\StructType\BasicAmountType|null
555
     */
556
    public function getTaxTotal()
557
    {
558
        return $this->TaxTotal;
559
    }
560
    /**
561
     * Set TaxTotal value
562
     * @param \PayPal\StructType\BasicAmountType $taxTotal
563
     * @return \PayPal\StructType\PaymentDetailsType
564
     */
565
    public function setTaxTotal(\PayPal\StructType\BasicAmountType $taxTotal = null)
566
    {
567
        $this->TaxTotal = $taxTotal;
568
        return $this;
569
    }
570
    /**
571
     * Get OrderDescription value
572
     * @return string|null
573
     */
574
    public function getOrderDescription()
575
    {
576
        return $this->OrderDescription;
577
    }
578
    /**
579
     * Set OrderDescription value
580
     * @param string $orderDescription
581
     * @return \PayPal\StructType\PaymentDetailsType
582
     */
583
    public function setOrderDescription($orderDescription = null)
584
    {
585
        // validation for constraint: string
586
        if (!is_null($orderDescription) && !is_string($orderDescription)) {
0 ignored issues
show
introduced by
The condition is_string($orderDescription) is always true.
Loading history...
587
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($orderDescription, true), gettype($orderDescription)), __LINE__);
588
        }
589
        $this->OrderDescription = $orderDescription;
590
        return $this;
591
    }
592
    /**
593
     * Get Custom value
594
     * @return string|null
595
     */
596
    public function getCustom()
597
    {
598
        return $this->Custom;
599
    }
600
    /**
601
     * Set Custom value
602
     * @param string $custom
603
     * @return \PayPal\StructType\PaymentDetailsType
604
     */
605
    public function setCustom($custom = null)
606
    {
607
        // validation for constraint: string
608
        if (!is_null($custom) && !is_string($custom)) {
0 ignored issues
show
introduced by
The condition is_string($custom) is always true.
Loading history...
609
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($custom, true), gettype($custom)), __LINE__);
610
        }
611
        $this->Custom = $custom;
612
        return $this;
613
    }
614
    /**
615
     * Get InvoiceID value
616
     * @return string|null
617
     */
618
    public function getInvoiceID()
619
    {
620
        return $this->InvoiceID;
621
    }
622
    /**
623
     * Set InvoiceID value
624
     * @param string $invoiceID
625
     * @return \PayPal\StructType\PaymentDetailsType
626
     */
627
    public function setInvoiceID($invoiceID = null)
628
    {
629
        // validation for constraint: string
630
        if (!is_null($invoiceID) && !is_string($invoiceID)) {
0 ignored issues
show
introduced by
The condition is_string($invoiceID) is always true.
Loading history...
631
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($invoiceID, true), gettype($invoiceID)), __LINE__);
632
        }
633
        $this->InvoiceID = $invoiceID;
634
        return $this;
635
    }
636
    /**
637
     * Get ButtonSource value
638
     * @return string|null
639
     */
640
    public function getButtonSource()
641
    {
642
        return $this->ButtonSource;
643
    }
644
    /**
645
     * Set ButtonSource value
646
     * @param string $buttonSource
647
     * @return \PayPal\StructType\PaymentDetailsType
648
     */
649
    public function setButtonSource($buttonSource = null)
650
    {
651
        // validation for constraint: string
652
        if (!is_null($buttonSource) && !is_string($buttonSource)) {
0 ignored issues
show
introduced by
The condition is_string($buttonSource) is always true.
Loading history...
653
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($buttonSource, true), gettype($buttonSource)), __LINE__);
654
        }
655
        $this->ButtonSource = $buttonSource;
656
        return $this;
657
    }
658
    /**
659
     * Get NotifyURL value
660
     * @return string|null
661
     */
662
    public function getNotifyURL()
663
    {
664
        return $this->NotifyURL;
665
    }
666
    /**
667
     * Set NotifyURL value
668
     * @param string $notifyURL
669
     * @return \PayPal\StructType\PaymentDetailsType
670
     */
671
    public function setNotifyURL($notifyURL = null)
672
    {
673
        // validation for constraint: string
674
        if (!is_null($notifyURL) && !is_string($notifyURL)) {
0 ignored issues
show
introduced by
The condition is_string($notifyURL) is always true.
Loading history...
675
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($notifyURL, true), gettype($notifyURL)), __LINE__);
676
        }
677
        $this->NotifyURL = $notifyURL;
678
        return $this;
679
    }
680
    /**
681
     * Get ShipToAddress value
682
     * @return \PayPal\StructType\AddressType|null
683
     */
684
    public function getShipToAddress()
685
    {
686
        return $this->ShipToAddress;
687
    }
688
    /**
689
     * Set ShipToAddress value
690
     * @param \PayPal\StructType\AddressType $shipToAddress
691
     * @return \PayPal\StructType\PaymentDetailsType
692
     */
693
    public function setShipToAddress(\PayPal\StructType\AddressType $shipToAddress = null)
694
    {
695
        $this->ShipToAddress = $shipToAddress;
696
        return $this;
697
    }
698
    /**
699
     * Get MultiShipping value
700
     * @return string|null
701
     */
702
    public function getMultiShipping()
703
    {
704
        return $this->MultiShipping;
705
    }
706
    /**
707
     * Set MultiShipping value
708
     * @param string $multiShipping
709
     * @return \PayPal\StructType\PaymentDetailsType
710
     */
711
    public function setMultiShipping($multiShipping = null)
712
    {
713
        // validation for constraint: string
714
        if (!is_null($multiShipping) && !is_string($multiShipping)) {
0 ignored issues
show
introduced by
The condition is_string($multiShipping) is always true.
Loading history...
715
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($multiShipping, true), gettype($multiShipping)), __LINE__);
716
        }
717
        $this->MultiShipping = $multiShipping;
718
        return $this;
719
    }
720
    /**
721
     * Get FulfillmentReferenceNumber value
722
     * @return string|null
723
     */
724
    public function getFulfillmentReferenceNumber()
725
    {
726
        return $this->FulfillmentReferenceNumber;
727
    }
728
    /**
729
     * Set FulfillmentReferenceNumber value
730
     * @param string $fulfillmentReferenceNumber
731
     * @return \PayPal\StructType\PaymentDetailsType
732
     */
733
    public function setFulfillmentReferenceNumber($fulfillmentReferenceNumber = null)
734
    {
735
        // validation for constraint: string
736
        if (!is_null($fulfillmentReferenceNumber) && !is_string($fulfillmentReferenceNumber)) {
0 ignored issues
show
introduced by
The condition is_string($fulfillmentReferenceNumber) is always true.
Loading history...
737
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fulfillmentReferenceNumber, true), gettype($fulfillmentReferenceNumber)), __LINE__);
738
        }
739
        $this->FulfillmentReferenceNumber = $fulfillmentReferenceNumber;
740
        return $this;
741
    }
742
    /**
743
     * Get FulfillmentAddress value
744
     * @return \PayPal\StructType\AddressType|null
745
     */
746
    public function getFulfillmentAddress()
747
    {
748
        return $this->FulfillmentAddress;
749
    }
750
    /**
751
     * Set FulfillmentAddress value
752
     * @param \PayPal\StructType\AddressType $fulfillmentAddress
753
     * @return \PayPal\StructType\PaymentDetailsType
754
     */
755
    public function setFulfillmentAddress(\PayPal\StructType\AddressType $fulfillmentAddress = null)
756
    {
757
        $this->FulfillmentAddress = $fulfillmentAddress;
758
        return $this;
759
    }
760
    /**
761
     * Get PaymentCategoryType value
762
     * @return string|null
763
     */
764
    public function getPaymentCategoryType()
765
    {
766
        return $this->PaymentCategoryType;
767
    }
768
    /**
769
     * Set PaymentCategoryType value
770
     * @uses \PayPal\EnumType\PaymentCategoryType::valueIsValid()
771
     * @uses \PayPal\EnumType\PaymentCategoryType::getValidValues()
772
     * @throws \InvalidArgumentException
773
     * @param string $paymentCategoryType
774
     * @return \PayPal\StructType\PaymentDetailsType
775
     */
776
    public function setPaymentCategoryType($paymentCategoryType = null)
777
    {
778
        // validation for constraint: enumeration
779
        if (!\PayPal\EnumType\PaymentCategoryType::valueIsValid($paymentCategoryType)) {
780
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\PaymentCategoryType', is_array($paymentCategoryType) ? implode(', ', $paymentCategoryType) : var_export($paymentCategoryType, true), implode(', ', \PayPal\EnumType\PaymentCategoryType::getValidValues())), __LINE__);
0 ignored issues
show
introduced by
The condition is_array($paymentCategoryType) is always false.
Loading history...
781
        }
782
        $this->PaymentCategoryType = $paymentCategoryType;
783
        return $this;
784
    }
785
    /**
786
     * Get LocationType value
787
     * @return string|null
788
     */
789
    public function getLocationType()
790
    {
791
        return $this->LocationType;
792
    }
793
    /**
794
     * Set LocationType value
795
     * @uses \PayPal\EnumType\LocationType::valueIsValid()
796
     * @uses \PayPal\EnumType\LocationType::getValidValues()
797
     * @throws \InvalidArgumentException
798
     * @param string $locationType
799
     * @return \PayPal\StructType\PaymentDetailsType
800
     */
801
    public function setLocationType($locationType = null)
802
    {
803
        // validation for constraint: enumeration
804
        if (!\PayPal\EnumType\LocationType::valueIsValid($locationType)) {
805
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\LocationType', is_array($locationType) ? implode(', ', $locationType) : var_export($locationType, true), implode(', ', \PayPal\EnumType\LocationType::getValidValues())), __LINE__);
0 ignored issues
show
introduced by
The condition is_array($locationType) is always false.
Loading history...
806
        }
807
        $this->LocationType = $locationType;
808
        return $this;
809
    }
810
    /**
811
     * Get ShippingMethod value
812
     * @return string|null
813
     */
814
    public function getShippingMethod()
815
    {
816
        return $this->ShippingMethod;
817
    }
818
    /**
819
     * Set ShippingMethod value
820
     * @uses \PayPal\EnumType\ShippingServiceCodeType::valueIsValid()
821
     * @uses \PayPal\EnumType\ShippingServiceCodeType::getValidValues()
822
     * @throws \InvalidArgumentException
823
     * @param string $shippingMethod
824
     * @return \PayPal\StructType\PaymentDetailsType
825
     */
826
    public function setShippingMethod($shippingMethod = null)
827
    {
828
        // validation for constraint: enumeration
829
        if (!\PayPal\EnumType\ShippingServiceCodeType::valueIsValid($shippingMethod)) {
830
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\ShippingServiceCodeType', is_array($shippingMethod) ? implode(', ', $shippingMethod) : var_export($shippingMethod, true), implode(', ', \PayPal\EnumType\ShippingServiceCodeType::getValidValues())), __LINE__);
0 ignored issues
show
introduced by
The condition is_array($shippingMethod) is always false.
Loading history...
831
        }
832
        $this->ShippingMethod = $shippingMethod;
833
        return $this;
834
    }
835
    /**
836
     * Get ProfileAddressChangeDate value
837
     * @return string|null
838
     */
839
    public function getProfileAddressChangeDate()
840
    {
841
        return $this->ProfileAddressChangeDate;
842
    }
843
    /**
844
     * Set ProfileAddressChangeDate value
845
     * @param string $profileAddressChangeDate
846
     * @return \PayPal\StructType\PaymentDetailsType
847
     */
848
    public function setProfileAddressChangeDate($profileAddressChangeDate = null)
849
    {
850
        // validation for constraint: string
851
        if (!is_null($profileAddressChangeDate) && !is_string($profileAddressChangeDate)) {
0 ignored issues
show
introduced by
The condition is_string($profileAddressChangeDate) is always true.
Loading history...
852
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($profileAddressChangeDate, true), gettype($profileAddressChangeDate)), __LINE__);
853
        }
854
        $this->ProfileAddressChangeDate = $profileAddressChangeDate;
855
        return $this;
856
    }
857
    /**
858
     * Get PaymentDetailsItem value
859
     * @return \PayPal\StructType\PaymentDetailsItemType[]|null
860
     */
861
    public function getPaymentDetailsItem()
862
    {
863
        return $this->PaymentDetailsItem;
864
    }
865
    /**
866
     * This method is responsible for validating the values passed to the setPaymentDetailsItem method
867
     * This method is willingly generated in order to preserve the one-line inline validation within the setPaymentDetailsItem method
868
     * @param array $values
869
     * @return string A non-empty message if the values does not match the validation rules
870
     */
871
    public static function validatePaymentDetailsItemForArrayConstraintsFromSetPaymentDetailsItem(array $values = array())
872
    {
873
        $message = '';
874
        $invalidValues = [];
875
        foreach ($values as $paymentDetailsTypePaymentDetailsItemItem) {
876
            // validation for constraint: itemType
877
            if (!$paymentDetailsTypePaymentDetailsItemItem instanceof \PayPal\StructType\PaymentDetailsItemType) {
878
                $invalidValues[] = is_object($paymentDetailsTypePaymentDetailsItemItem) ? get_class($paymentDetailsTypePaymentDetailsItemItem) : sprintf('%s(%s)', gettype($paymentDetailsTypePaymentDetailsItemItem), var_export($paymentDetailsTypePaymentDetailsItemItem, true));
879
            }
880
        }
881
        if (!empty($invalidValues)) {
882
            $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)));
0 ignored issues
show
introduced by
The condition is_object($invalidValues) is always false.
Loading history...
introduced by
The condition is_array($invalidValues) is always true.
Loading history...
883
        }
884
        unset($invalidValues);
885
        return $message;
886
    }
887
    /**
888
     * Set PaymentDetailsItem value
889
     * @throws \InvalidArgumentException
890
     * @param \PayPal\StructType\PaymentDetailsItemType[] $paymentDetailsItem
891
     * @return \PayPal\StructType\PaymentDetailsType
892
     */
893
    public function setPaymentDetailsItem(array $paymentDetailsItem = array())
894
    {
895
        // validation for constraint: array
896
        if ('' !== ($paymentDetailsItemArrayErrorMessage = self::validatePaymentDetailsItemForArrayConstraintsFromSetPaymentDetailsItem($paymentDetailsItem))) {
897
            throw new \InvalidArgumentException($paymentDetailsItemArrayErrorMessage, __LINE__);
898
        }
899
        $this->PaymentDetailsItem = $paymentDetailsItem;
900
        return $this;
901
    }
902
    /**
903
     * Add item to PaymentDetailsItem value
904
     * @throws \InvalidArgumentException
905
     * @param \PayPal\StructType\PaymentDetailsItemType $item
906
     * @return \PayPal\StructType\PaymentDetailsType
907
     */
908
    public function addToPaymentDetailsItem(\PayPal\StructType\PaymentDetailsItemType $item)
909
    {
910
        // validation for constraint: itemType
911
        if (!$item instanceof \PayPal\StructType\PaymentDetailsItemType) {
0 ignored issues
show
introduced by
$item is always a sub-type of PayPal\StructType\PaymentDetailsItemType.
Loading history...
912
            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__);
913
        }
914
        $this->PaymentDetailsItem[] = $item;
915
        return $this;
916
    }
917
    /**
918
     * Get InsuranceTotal value
919
     * @return \PayPal\StructType\BasicAmountType|null
920
     */
921
    public function getInsuranceTotal()
922
    {
923
        return $this->InsuranceTotal;
924
    }
925
    /**
926
     * Set InsuranceTotal value
927
     * @param \PayPal\StructType\BasicAmountType $insuranceTotal
928
     * @return \PayPal\StructType\PaymentDetailsType
929
     */
930
    public function setInsuranceTotal(\PayPal\StructType\BasicAmountType $insuranceTotal = null)
931
    {
932
        $this->InsuranceTotal = $insuranceTotal;
933
        return $this;
934
    }
935
    /**
936
     * Get ShippingDiscount value
937
     * @return \PayPal\StructType\BasicAmountType|null
938
     */
939
    public function getShippingDiscount()
940
    {
941
        return $this->ShippingDiscount;
942
    }
943
    /**
944
     * Set ShippingDiscount value
945
     * @param \PayPal\StructType\BasicAmountType $shippingDiscount
946
     * @return \PayPal\StructType\PaymentDetailsType
947
     */
948
    public function setShippingDiscount(\PayPal\StructType\BasicAmountType $shippingDiscount = null)
949
    {
950
        $this->ShippingDiscount = $shippingDiscount;
951
        return $this;
952
    }
953
    /**
954
     * Get InsuranceOptionOffered value
955
     * @return string|null
956
     */
957
    public function getInsuranceOptionOffered()
958
    {
959
        return $this->InsuranceOptionOffered;
960
    }
961
    /**
962
     * Set InsuranceOptionOffered value
963
     * @param string $insuranceOptionOffered
964
     * @return \PayPal\StructType\PaymentDetailsType
965
     */
966
    public function setInsuranceOptionOffered($insuranceOptionOffered = null)
967
    {
968
        // validation for constraint: string
969
        if (!is_null($insuranceOptionOffered) && !is_string($insuranceOptionOffered)) {
0 ignored issues
show
introduced by
The condition is_string($insuranceOptionOffered) is always true.
Loading history...
970
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($insuranceOptionOffered, true), gettype($insuranceOptionOffered)), __LINE__);
971
        }
972
        $this->InsuranceOptionOffered = $insuranceOptionOffered;
973
        return $this;
974
    }
975
    /**
976
     * Get AllowedPaymentMethod value
977
     * @return string|null
978
     */
979
    public function getAllowedPaymentMethod()
980
    {
981
        return $this->AllowedPaymentMethod;
982
    }
983
    /**
984
     * Set AllowedPaymentMethod value
985
     * @uses \PayPal\EnumType\AllowedPaymentMethodType::valueIsValid()
986
     * @uses \PayPal\EnumType\AllowedPaymentMethodType::getValidValues()
987
     * @throws \InvalidArgumentException
988
     * @param string $allowedPaymentMethod
989
     * @return \PayPal\StructType\PaymentDetailsType
990
     */
991
    public function setAllowedPaymentMethod($allowedPaymentMethod = null)
992
    {
993
        // validation for constraint: enumeration
994
        if (!\PayPal\EnumType\AllowedPaymentMethodType::valueIsValid($allowedPaymentMethod)) {
995
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\AllowedPaymentMethodType', is_array($allowedPaymentMethod) ? implode(', ', $allowedPaymentMethod) : var_export($allowedPaymentMethod, true), implode(', ', \PayPal\EnumType\AllowedPaymentMethodType::getValidValues())), __LINE__);
0 ignored issues
show
introduced by
The condition is_array($allowedPaymentMethod) is always false.
Loading history...
996
        }
997
        $this->AllowedPaymentMethod = $allowedPaymentMethod;
998
        return $this;
999
    }
1000
    /**
1001
     * Get EnhancedPaymentData value
1002
     * @return \PayPal\StructType\EnhancedPaymentDataType|null
1003
     */
1004
    public function getEnhancedPaymentData()
1005
    {
1006
        return $this->EnhancedPaymentData;
1007
    }
1008
    /**
1009
     * Set EnhancedPaymentData value
1010
     * @param \PayPal\StructType\EnhancedPaymentDataType $enhancedPaymentData
1011
     * @return \PayPal\StructType\PaymentDetailsType
1012
     */
1013
    public function setEnhancedPaymentData(\PayPal\StructType\EnhancedPaymentDataType $enhancedPaymentData = null)
1014
    {
1015
        $this->EnhancedPaymentData = $enhancedPaymentData;
1016
        return $this;
1017
    }
1018
    /**
1019
     * Get SellerDetails value
1020
     * @return \PayPal\StructType\SellerDetailsType|null
1021
     */
1022
    public function getSellerDetails()
1023
    {
1024
        return $this->SellerDetails;
1025
    }
1026
    /**
1027
     * Set SellerDetails value
1028
     * @param \PayPal\StructType\SellerDetailsType $sellerDetails
1029
     * @return \PayPal\StructType\PaymentDetailsType
1030
     */
1031
    public function setSellerDetails(\PayPal\StructType\SellerDetailsType $sellerDetails = null)
1032
    {
1033
        $this->SellerDetails = $sellerDetails;
1034
        return $this;
1035
    }
1036
    /**
1037
     * Get NoteText value
1038
     * @return string|null
1039
     */
1040
    public function getNoteText()
1041
    {
1042
        return $this->NoteText;
1043
    }
1044
    /**
1045
     * Set NoteText value
1046
     * @param string $noteText
1047
     * @return \PayPal\StructType\PaymentDetailsType
1048
     */
1049
    public function setNoteText($noteText = null)
1050
    {
1051
        // validation for constraint: string
1052
        if (!is_null($noteText) && !is_string($noteText)) {
0 ignored issues
show
introduced by
The condition is_string($noteText) is always true.
Loading history...
1053
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($noteText, true), gettype($noteText)), __LINE__);
1054
        }
1055
        $this->NoteText = $noteText;
1056
        return $this;
1057
    }
1058
    /**
1059
     * Get TransactionId value
1060
     * @return string|null
1061
     */
1062
    public function getTransactionId()
1063
    {
1064
        return $this->TransactionId;
1065
    }
1066
    /**
1067
     * Set TransactionId value
1068
     * @param string $transactionId
1069
     * @return \PayPal\StructType\PaymentDetailsType
1070
     */
1071
    public function setTransactionId($transactionId = null)
1072
    {
1073
        // validation for constraint: string
1074
        if (!is_null($transactionId) && !is_string($transactionId)) {
0 ignored issues
show
introduced by
The condition is_string($transactionId) is always true.
Loading history...
1075
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($transactionId, true), gettype($transactionId)), __LINE__);
1076
        }
1077
        $this->TransactionId = $transactionId;
1078
        return $this;
1079
    }
1080
    /**
1081
     * Get PaymentAction value
1082
     * @return string|null
1083
     */
1084
    public function getPaymentAction()
1085
    {
1086
        return $this->PaymentAction;
1087
    }
1088
    /**
1089
     * Set PaymentAction value
1090
     * @uses \PayPal\EnumType\PaymentActionCodeType::valueIsValid()
1091
     * @uses \PayPal\EnumType\PaymentActionCodeType::getValidValues()
1092
     * @throws \InvalidArgumentException
1093
     * @param string $paymentAction
1094
     * @return \PayPal\StructType\PaymentDetailsType
1095
     */
1096
    public function setPaymentAction($paymentAction = null)
1097
    {
1098
        // validation for constraint: enumeration
1099
        if (!\PayPal\EnumType\PaymentActionCodeType::valueIsValid($paymentAction)) {
1100
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\PaymentActionCodeType', is_array($paymentAction) ? implode(', ', $paymentAction) : var_export($paymentAction, true), implode(', ', \PayPal\EnumType\PaymentActionCodeType::getValidValues())), __LINE__);
0 ignored issues
show
introduced by
The condition is_array($paymentAction) is always false.
Loading history...
1101
        }
1102
        $this->PaymentAction = $paymentAction;
1103
        return $this;
1104
    }
1105
    /**
1106
     * Get PaymentRequestID value
1107
     * @return string|null
1108
     */
1109
    public function getPaymentRequestID()
1110
    {
1111
        return $this->PaymentRequestID;
1112
    }
1113
    /**
1114
     * Set PaymentRequestID value
1115
     * @param string $paymentRequestID
1116
     * @return \PayPal\StructType\PaymentDetailsType
1117
     */
1118
    public function setPaymentRequestID($paymentRequestID = null)
1119
    {
1120
        // validation for constraint: string
1121
        if (!is_null($paymentRequestID) && !is_string($paymentRequestID)) {
0 ignored issues
show
introduced by
The condition is_string($paymentRequestID) is always true.
Loading history...
1122
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($paymentRequestID, true), gettype($paymentRequestID)), __LINE__);
1123
        }
1124
        $this->PaymentRequestID = $paymentRequestID;
1125
        return $this;
1126
    }
1127
    /**
1128
     * Get OrderURL value
1129
     * @return string|null
1130
     */
1131
    public function getOrderURL()
1132
    {
1133
        return $this->OrderURL;
1134
    }
1135
    /**
1136
     * Set OrderURL value
1137
     * @param string $orderURL
1138
     * @return \PayPal\StructType\PaymentDetailsType
1139
     */
1140
    public function setOrderURL($orderURL = null)
1141
    {
1142
        // validation for constraint: string
1143
        if (!is_null($orderURL) && !is_string($orderURL)) {
0 ignored issues
show
introduced by
The condition is_string($orderURL) is always true.
Loading history...
1144
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($orderURL, true), gettype($orderURL)), __LINE__);
1145
        }
1146
        $this->OrderURL = $orderURL;
1147
        return $this;
1148
    }
1149
    /**
1150
     * Get SoftDescriptor value
1151
     * @return string|null
1152
     */
1153
    public function getSoftDescriptor()
1154
    {
1155
        return $this->SoftDescriptor;
1156
    }
1157
    /**
1158
     * Set SoftDescriptor value
1159
     * @param string $softDescriptor
1160
     * @return \PayPal\StructType\PaymentDetailsType
1161
     */
1162
    public function setSoftDescriptor($softDescriptor = null)
1163
    {
1164
        // validation for constraint: string
1165
        if (!is_null($softDescriptor) && !is_string($softDescriptor)) {
0 ignored issues
show
introduced by
The condition is_string($softDescriptor) is always true.
Loading history...
1166
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($softDescriptor, true), gettype($softDescriptor)), __LINE__);
1167
        }
1168
        $this->SoftDescriptor = $softDescriptor;
1169
        return $this;
1170
    }
1171
    /**
1172
     * Get BranchLevel value
1173
     * @return int|null
1174
     */
1175
    public function getBranchLevel()
1176
    {
1177
        return $this->BranchLevel;
1178
    }
1179
    /**
1180
     * Set BranchLevel value
1181
     * @param int $branchLevel
1182
     * @return \PayPal\StructType\PaymentDetailsType
1183
     */
1184
    public function setBranchLevel($branchLevel = null)
1185
    {
1186
        // validation for constraint: int
1187
        if (!is_null($branchLevel) && !(is_int($branchLevel) || ctype_digit($branchLevel))) {
0 ignored issues
show
introduced by
The condition is_int($branchLevel) is always true.
Loading history...
1188
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($branchLevel, true), gettype($branchLevel)), __LINE__);
1189
        }
1190
        $this->BranchLevel = $branchLevel;
1191
        return $this;
1192
    }
1193
    /**
1194
     * Get OfferDetails value
1195
     * @return \PayPal\StructType\OfferDetailsType|null
1196
     */
1197
    public function getOfferDetails()
1198
    {
1199
        return $this->OfferDetails;
1200
    }
1201
    /**
1202
     * Set OfferDetails value
1203
     * @param \PayPal\StructType\OfferDetailsType $offerDetails
1204
     * @return \PayPal\StructType\PaymentDetailsType
1205
     */
1206
    public function setOfferDetails(\PayPal\StructType\OfferDetailsType $offerDetails = null)
1207
    {
1208
        $this->OfferDetails = $offerDetails;
1209
        return $this;
1210
    }
1211
    /**
1212
     * Get Recurring value
1213
     * @return string|null
1214
     */
1215
    public function getRecurring()
1216
    {
1217
        return $this->Recurring;
1218
    }
1219
    /**
1220
     * Set Recurring value
1221
     * @uses \PayPal\EnumType\RecurringFlagType::valueIsValid()
1222
     * @uses \PayPal\EnumType\RecurringFlagType::getValidValues()
1223
     * @throws \InvalidArgumentException
1224
     * @param string $recurring
1225
     * @return \PayPal\StructType\PaymentDetailsType
1226
     */
1227
    public function setRecurring($recurring = null)
1228
    {
1229
        // validation for constraint: enumeration
1230
        if (!\PayPal\EnumType\RecurringFlagType::valueIsValid($recurring)) {
1231
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\RecurringFlagType', is_array($recurring) ? implode(', ', $recurring) : var_export($recurring, true), implode(', ', \PayPal\EnumType\RecurringFlagType::getValidValues())), __LINE__);
0 ignored issues
show
introduced by
The condition is_array($recurring) is always false.
Loading history...
1232
        }
1233
        $this->Recurring = $recurring;
1234
        return $this;
1235
    }
1236
    /**
1237
     * Get PaymentReason value
1238
     * @return string|null
1239
     */
1240
    public function getPaymentReason()
1241
    {
1242
        return $this->PaymentReason;
1243
    }
1244
    /**
1245
     * Set PaymentReason value
1246
     * @uses \PayPal\EnumType\PaymentReasonType::valueIsValid()
1247
     * @uses \PayPal\EnumType\PaymentReasonType::getValidValues()
1248
     * @throws \InvalidArgumentException
1249
     * @param string $paymentReason
1250
     * @return \PayPal\StructType\PaymentDetailsType
1251
     */
1252
    public function setPaymentReason($paymentReason = null)
1253
    {
1254
        // validation for constraint: enumeration
1255
        if (!\PayPal\EnumType\PaymentReasonType::valueIsValid($paymentReason)) {
1256
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\PaymentReasonType', is_array($paymentReason) ? implode(', ', $paymentReason) : var_export($paymentReason, true), implode(', ', \PayPal\EnumType\PaymentReasonType::getValidValues())), __LINE__);
0 ignored issues
show
introduced by
The condition is_array($paymentReason) is always false.
Loading history...
1257
        }
1258
        $this->PaymentReason = $paymentReason;
1259
        return $this;
1260
    }
1261
    /**
1262
     * Get LocationID value
1263
     * @return string|null
1264
     */
1265
    public function getLocationID()
1266
    {
1267
        return $this->LocationID;
1268
    }
1269
    /**
1270
     * Set LocationID value
1271
     * @param string $locationID
1272
     * @return \PayPal\StructType\PaymentDetailsType
1273
     */
1274
    public function setLocationID($locationID = null)
1275
    {
1276
        // validation for constraint: string
1277
        if (!is_null($locationID) && !is_string($locationID)) {
0 ignored issues
show
introduced by
The condition is_string($locationID) is always true.
Loading history...
1278
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($locationID, true), gettype($locationID)), __LINE__);
1279
        }
1280
        $this->LocationID = $locationID;
1281
        return $this;
1282
    }
1283
    /**
1284
     * Get RedeemedOffers value
1285
     * @return \PayPal\StructType\DiscountInfoType[]|null
1286
     */
1287
    public function getRedeemedOffers()
1288
    {
1289
        return $this->RedeemedOffers;
1290
    }
1291
    /**
1292
     * This method is responsible for validating the values passed to the setRedeemedOffers method
1293
     * This method is willingly generated in order to preserve the one-line inline validation within the setRedeemedOffers method
1294
     * @param array $values
1295
     * @return string A non-empty message if the values does not match the validation rules
1296
     */
1297
    public static function validateRedeemedOffersForArrayConstraintsFromSetRedeemedOffers(array $values = array())
1298
    {
1299
        $message = '';
1300
        $invalidValues = [];
1301
        foreach ($values as $paymentDetailsTypeRedeemedOffersItem) {
1302
            // validation for constraint: itemType
1303
            if (!$paymentDetailsTypeRedeemedOffersItem instanceof \PayPal\StructType\DiscountInfoType) {
1304
                $invalidValues[] = is_object($paymentDetailsTypeRedeemedOffersItem) ? get_class($paymentDetailsTypeRedeemedOffersItem) : sprintf('%s(%s)', gettype($paymentDetailsTypeRedeemedOffersItem), var_export($paymentDetailsTypeRedeemedOffersItem, true));
1305
            }
1306
        }
1307
        if (!empty($invalidValues)) {
1308
            $message = sprintf('The RedeemedOffers property can only contain items of type \PayPal\StructType\DiscountInfoType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
0 ignored issues
show
introduced by
The condition is_array($invalidValues) is always true.
Loading history...
introduced by
The condition is_object($invalidValues) is always false.
Loading history...
1309
        }
1310
        unset($invalidValues);
1311
        return $message;
1312
    }
1313
    /**
1314
     * Set RedeemedOffers value
1315
     * @throws \InvalidArgumentException
1316
     * @param \PayPal\StructType\DiscountInfoType[] $redeemedOffers
1317
     * @return \PayPal\StructType\PaymentDetailsType
1318
     */
1319
    public function setRedeemedOffers(array $redeemedOffers = array())
1320
    {
1321
        // validation for constraint: array
1322
        if ('' !== ($redeemedOffersArrayErrorMessage = self::validateRedeemedOffersForArrayConstraintsFromSetRedeemedOffers($redeemedOffers))) {
1323
            throw new \InvalidArgumentException($redeemedOffersArrayErrorMessage, __LINE__);
1324
        }
1325
        // validation for constraint: maxOccurs(100)
1326
        if (is_array($redeemedOffers) && count($redeemedOffers) > 100) {
1327
            throw new \InvalidArgumentException(sprintf('Invalid count of %s, the number of elements contained by the property must be less than or equal to 100', count($redeemedOffers)), __LINE__);
1328
        }
1329
        $this->RedeemedOffers = $redeemedOffers;
1330
        return $this;
1331
    }
1332
    /**
1333
     * Add item to RedeemedOffers value
1334
     * @throws \InvalidArgumentException
1335
     * @param \PayPal\StructType\DiscountInfoType $item
1336
     * @return \PayPal\StructType\PaymentDetailsType
1337
     */
1338
    public function addToRedeemedOffers(\PayPal\StructType\DiscountInfoType $item)
1339
    {
1340
        // validation for constraint: itemType
1341
        if (!$item instanceof \PayPal\StructType\DiscountInfoType) {
0 ignored issues
show
introduced by
$item is always a sub-type of PayPal\StructType\DiscountInfoType.
Loading history...
1342
            throw new \InvalidArgumentException(sprintf('The RedeemedOffers property can only contain items of type \PayPal\StructType\DiscountInfoType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
1343
        }
1344
        // validation for constraint: maxOccurs(100)
1345
        if (is_array($this->RedeemedOffers) && count($this->RedeemedOffers) >= 100) {
1346
            throw new \InvalidArgumentException(sprintf('You can\'t add anymore element to this property that already contains %s elements, the number of elements contained by the property must be less than or equal to 100', count($this->RedeemedOffers)), __LINE__);
1347
        }
1348
        $this->RedeemedOffers[] = $item;
1349
        return $this;
1350
    }
1351
    /**
1352
     * Get CummulativePoints value
1353
     * @return \PayPal\StructType\DiscountInfoType[]|null
1354
     */
1355
    public function getCummulativePoints()
1356
    {
1357
        return $this->CummulativePoints;
1358
    }
1359
    /**
1360
     * This method is responsible for validating the values passed to the setCummulativePoints method
1361
     * This method is willingly generated in order to preserve the one-line inline validation within the setCummulativePoints method
1362
     * @param array $values
1363
     * @return string A non-empty message if the values does not match the validation rules
1364
     */
1365
    public static function validateCummulativePointsForArrayConstraintsFromSetCummulativePoints(array $values = array())
1366
    {
1367
        $message = '';
1368
        $invalidValues = [];
1369
        foreach ($values as $paymentDetailsTypeCummulativePointsItem) {
1370
            // validation for constraint: itemType
1371
            if (!$paymentDetailsTypeCummulativePointsItem instanceof \PayPal\StructType\DiscountInfoType) {
1372
                $invalidValues[] = is_object($paymentDetailsTypeCummulativePointsItem) ? get_class($paymentDetailsTypeCummulativePointsItem) : sprintf('%s(%s)', gettype($paymentDetailsTypeCummulativePointsItem), var_export($paymentDetailsTypeCummulativePointsItem, true));
1373
            }
1374
        }
1375
        if (!empty($invalidValues)) {
1376
            $message = sprintf('The CummulativePoints property can only contain items of type \PayPal\StructType\DiscountInfoType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
0 ignored issues
show
introduced by
The condition is_object($invalidValues) is always false.
Loading history...
introduced by
The condition is_array($invalidValues) is always true.
Loading history...
1377
        }
1378
        unset($invalidValues);
1379
        return $message;
1380
    }
1381
    /**
1382
     * Set CummulativePoints value
1383
     * @throws \InvalidArgumentException
1384
     * @param \PayPal\StructType\DiscountInfoType[] $cummulativePoints
1385
     * @return \PayPal\StructType\PaymentDetailsType
1386
     */
1387
    public function setCummulativePoints(array $cummulativePoints = array())
1388
    {
1389
        // validation for constraint: array
1390
        if ('' !== ($cummulativePointsArrayErrorMessage = self::validateCummulativePointsForArrayConstraintsFromSetCummulativePoints($cummulativePoints))) {
1391
            throw new \InvalidArgumentException($cummulativePointsArrayErrorMessage, __LINE__);
1392
        }
1393
        // validation for constraint: maxOccurs(100)
1394
        if (is_array($cummulativePoints) && count($cummulativePoints) > 100) {
1395
            throw new \InvalidArgumentException(sprintf('Invalid count of %s, the number of elements contained by the property must be less than or equal to 100', count($cummulativePoints)), __LINE__);
1396
        }
1397
        $this->CummulativePoints = $cummulativePoints;
1398
        return $this;
1399
    }
1400
    /**
1401
     * Add item to CummulativePoints value
1402
     * @throws \InvalidArgumentException
1403
     * @param \PayPal\StructType\DiscountInfoType $item
1404
     * @return \PayPal\StructType\PaymentDetailsType
1405
     */
1406
    public function addToCummulativePoints(\PayPal\StructType\DiscountInfoType $item)
1407
    {
1408
        // validation for constraint: itemType
1409
        if (!$item instanceof \PayPal\StructType\DiscountInfoType) {
0 ignored issues
show
introduced by
$item is always a sub-type of PayPal\StructType\DiscountInfoType.
Loading history...
1410
            throw new \InvalidArgumentException(sprintf('The CummulativePoints property can only contain items of type \PayPal\StructType\DiscountInfoType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
1411
        }
1412
        // validation for constraint: maxOccurs(100)
1413
        if (is_array($this->CummulativePoints) && count($this->CummulativePoints) >= 100) {
1414
            throw new \InvalidArgumentException(sprintf('You can\'t add anymore element to this property that already contains %s elements, the number of elements contained by the property must be less than or equal to 100', count($this->CummulativePoints)), __LINE__);
1415
        }
1416
        $this->CummulativePoints[] = $item;
1417
        return $this;
1418
    }
1419
    /**
1420
     * Get MerchantData value
1421
     * @return \PayPal\StructType\MerchantDataType[]|null
1422
     */
1423
    public function getMerchantData()
1424
    {
1425
        return $this->MerchantData;
1426
    }
1427
    /**
1428
     * This method is responsible for validating the values passed to the setMerchantData method
1429
     * This method is willingly generated in order to preserve the one-line inline validation within the setMerchantData method
1430
     * @param array $values
1431
     * @return string A non-empty message if the values does not match the validation rules
1432
     */
1433
    public static function validateMerchantDataForArrayConstraintsFromSetMerchantData(array $values = array())
1434
    {
1435
        $message = '';
1436
        $invalidValues = [];
1437
        foreach ($values as $paymentDetailsTypeMerchantDataItem) {
1438
            // validation for constraint: itemType
1439
            if (!$paymentDetailsTypeMerchantDataItem instanceof \PayPal\StructType\MerchantDataType) {
1440
                $invalidValues[] = is_object($paymentDetailsTypeMerchantDataItem) ? get_class($paymentDetailsTypeMerchantDataItem) : sprintf('%s(%s)', gettype($paymentDetailsTypeMerchantDataItem), var_export($paymentDetailsTypeMerchantDataItem, true));
1441
            }
1442
        }
1443
        if (!empty($invalidValues)) {
1444
            $message = sprintf('The MerchantData property can only contain items of type \PayPal\StructType\MerchantDataType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
0 ignored issues
show
introduced by
The condition is_array($invalidValues) is always true.
Loading history...
introduced by
The condition is_object($invalidValues) is always false.
Loading history...
1445
        }
1446
        unset($invalidValues);
1447
        return $message;
1448
    }
1449
    /**
1450
     * Set MerchantData value
1451
     * @throws \InvalidArgumentException
1452
     * @param \PayPal\StructType\MerchantDataType[] $merchantData
1453
     * @return \PayPal\StructType\PaymentDetailsType
1454
     */
1455
    public function setMerchantData(array $merchantData = array())
1456
    {
1457
        // validation for constraint: array
1458
        if ('' !== ($merchantDataArrayErrorMessage = self::validateMerchantDataForArrayConstraintsFromSetMerchantData($merchantData))) {
1459
            throw new \InvalidArgumentException($merchantDataArrayErrorMessage, __LINE__);
1460
        }
1461
        // validation for constraint: maxOccurs(16)
1462
        if (is_array($merchantData) && count($merchantData) > 16) {
1463
            throw new \InvalidArgumentException(sprintf('Invalid count of %s, the number of elements contained by the property must be less than or equal to 16', count($merchantData)), __LINE__);
1464
        }
1465
        $this->MerchantData = $merchantData;
1466
        return $this;
1467
    }
1468
    /**
1469
     * Add item to MerchantData value
1470
     * @throws \InvalidArgumentException
1471
     * @param \PayPal\StructType\MerchantDataType $item
1472
     * @return \PayPal\StructType\PaymentDetailsType
1473
     */
1474
    public function addToMerchantData(\PayPal\StructType\MerchantDataType $item)
1475
    {
1476
        // validation for constraint: itemType
1477
        if (!$item instanceof \PayPal\StructType\MerchantDataType) {
0 ignored issues
show
introduced by
$item is always a sub-type of PayPal\StructType\MerchantDataType.
Loading history...
1478
            throw new \InvalidArgumentException(sprintf('The MerchantData property can only contain items of type \PayPal\StructType\MerchantDataType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
1479
        }
1480
        // validation for constraint: maxOccurs(16)
1481
        if (is_array($this->MerchantData) && count($this->MerchantData) >= 16) {
1482
            throw new \InvalidArgumentException(sprintf('You can\'t add anymore element to this property that already contains %s elements, the number of elements contained by the property must be less than or equal to 16', count($this->MerchantData)), __LINE__);
1483
        }
1484
        $this->MerchantData[] = $item;
1485
        return $this;
1486
    }
1487
}
1488