Total Complexity | 337 |
Total Lines | 2593 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 1 | Features | 0 |
Complex classes like SetExpressCheckoutRequestDetailsType 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 SetExpressCheckoutRequestDetailsType, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
12 | class SetExpressCheckoutRequestDetailsType extends AbstractStructBase |
||
13 | { |
||
14 | /** |
||
15 | * The OrderTotal |
||
16 | * Meta information extracted from the WSDL |
||
17 | * - documentation: The total cost of the order to the customer. If shipping cost and tax charges are known, include them in OrderTotal; if not, OrderTotal should be the current sub-total of the order. You must set the currencyID attribute to one of the |
||
18 | * three-character currency codes for any of the supported PayPal currencies. 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 (,). |
||
19 | * - minOccurs: 0 |
||
20 | * @var \PayPal\StructType\BasicAmountType |
||
21 | */ |
||
22 | public $OrderTotal; |
||
23 | /** |
||
24 | * The ReturnURL |
||
25 | * Meta information extracted from the WSDL |
||
26 | * - documentation: URL to which the customer's browser is returned after choosing to pay with PayPal. PayPal recommends that the value of ReturnURL be the final review page on which the customer confirms the order and payment. Required Character length |
||
27 | * and limitations: no limit. |
||
28 | * @var string |
||
29 | */ |
||
30 | public $ReturnURL; |
||
31 | /** |
||
32 | * The CancelURL |
||
33 | * Meta information extracted from the WSDL |
||
34 | * - documentation: URL to which the customer is returned if he does not approve the use of PayPal to pay you. PayPal recommends that the value of CancelURL be the original page on which the customer chose to pay with PayPal. Required Character length |
||
35 | * and limitations: no limit |
||
36 | * @var string |
||
37 | */ |
||
38 | public $CancelURL; |
||
39 | /** |
||
40 | * The TrackingImageURL |
||
41 | * Meta information extracted from the WSDL |
||
42 | * - documentation: Tracking URL for ebay. Required Character length and limitations: no limit |
||
43 | * - minOccurs: 0 |
||
44 | * @var string |
||
45 | */ |
||
46 | public $TrackingImageURL; |
||
47 | /** |
||
48 | * The giropaySuccessURL |
||
49 | * Meta information extracted from the WSDL |
||
50 | * - documentation: URL to which the customer's browser is returned after paying with giropay online. Optional Character length and limitations: no limit. |
||
51 | * - minOccurs: 0 |
||
52 | * @var string |
||
53 | */ |
||
54 | public $giropaySuccessURL; |
||
55 | /** |
||
56 | * The giropayCancelURL |
||
57 | * Meta information extracted from the WSDL |
||
58 | * - documentation: URL to which the customer's browser is returned after fail to pay with giropay online. Optional Character length and limitations: no limit. |
||
59 | * - minOccurs: 0 |
||
60 | * @var string |
||
61 | */ |
||
62 | public $giropayCancelURL; |
||
63 | /** |
||
64 | * The BanktxnPendingURL |
||
65 | * Meta information extracted from the WSDL |
||
66 | * - documentation: URL to which the customer's browser can be returned in the mEFT done page. Optional Character length and limitations: no limit. |
||
67 | * - minOccurs: 0 |
||
68 | * @var string |
||
69 | */ |
||
70 | public $BanktxnPendingURL; |
||
71 | /** |
||
72 | * The Token |
||
73 | * Meta information extracted from the WSDL |
||
74 | * - documentation: On your first invocation of SetExpressCheckoutRequest, the value of this token is returned by SetExpressCheckoutResponse. Optional Include this element and its value only if you want to modify an existing checkout session with |
||
75 | * another invocation of SetExpressCheckoutRequest; for example, if you want the customer to edit his shipping address on PayPal. Character length and limitations: 20 single-byte characters |
||
76 | * - base: xs:string |
||
77 | * - minOccurs: 0 |
||
78 | * @var string |
||
79 | */ |
||
80 | public $Token; |
||
81 | /** |
||
82 | * The MaxAmount |
||
83 | * Meta information extracted from the WSDL |
||
84 | * - documentation: The expected maximum total amount of the complete order, including shipping cost and tax charges. Optional You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies. |
||
85 | * 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 (,). |
||
86 | * - minOccurs: 0 |
||
87 | * @var \PayPal\StructType\BasicAmountType |
||
88 | */ |
||
89 | public $MaxAmount; |
||
90 | /** |
||
91 | * The OrderDescription |
||
92 | * Meta information extracted from the WSDL |
||
93 | * - documentation: Description of items the customer is purchasing. Optional Character length and limitations: 127 single-byte alphanumeric characters |
||
94 | * - minOccurs: 0 |
||
95 | * @var string |
||
96 | */ |
||
97 | public $OrderDescription; |
||
98 | /** |
||
99 | * The Custom |
||
100 | * Meta information extracted from the WSDL |
||
101 | * - documentation: A free-form field for your own use, such as a tracking number or other value you want PayPal to return on GetExpressCheckoutDetailsResponse and DoExpressCheckoutPaymentResponse. Optional Character length and limitations: 256 |
||
102 | * single-byte alphanumeric characters |
||
103 | * - minOccurs: 0 |
||
104 | * @var string |
||
105 | */ |
||
106 | public $Custom; |
||
107 | /** |
||
108 | * The InvoiceID |
||
109 | * Meta information extracted from the WSDL |
||
110 | * - documentation: Your own unique invoice or tracking number. PayPal returns this value to you on DoExpressCheckoutPaymentResponse. Optional Character length and limitations: 127 single-byte alphanumeric characters |
||
111 | * - minOccurs: 0 |
||
112 | * @var string |
||
113 | */ |
||
114 | public $InvoiceID; |
||
115 | /** |
||
116 | * The ReqConfirmShipping |
||
117 | * Meta information extracted from the WSDL |
||
118 | * - documentation: The value 1 indicates that you require that the customer's shipping address on file with PayPal be a confirmed address. Any value other than 1 indicates that the customer's shipping address on file with PayPal need NOT be a confirmed |
||
119 | * address. Setting this element overrides the setting you have specified in the recipient's Merchant Account Profile. Optional Character length and limitations: One single-byte numeric character. |
||
120 | * - minOccurs: 0 |
||
121 | * @var string |
||
122 | */ |
||
123 | public $ReqConfirmShipping; |
||
124 | /** |
||
125 | * The ReqBillingAddress |
||
126 | * Meta information extracted from the WSDL |
||
127 | * - documentation: The value 1 indicates that you require that the customer's billing address on file. Setting this element overrides the setting you have specified in Admin. Optional Character length and limitations: One single-byte numeric character. |
||
128 | * - minOccurs: 0 |
||
129 | * @var string |
||
130 | */ |
||
131 | public $ReqBillingAddress; |
||
132 | /** |
||
133 | * The BillingAddress |
||
134 | * Meta information extracted from the WSDL |
||
135 | * - documentation: The billing address for the buyer. Optional If you include the BillingAddress element, the AddressType elements are required: Name Street1 CityName CountryCode Do not set set the CountryName element. |
||
136 | * - minOccurs: 0 |
||
137 | * @var \PayPal\StructType\AddressType |
||
138 | */ |
||
139 | public $BillingAddress; |
||
140 | /** |
||
141 | * The NoShipping |
||
142 | * Meta information extracted from the WSDL |
||
143 | * - documentation: The value 1 indicates that on the PayPal pages, no shipping address fields should be displayed whatsoever. Optional Character length and limitations: Four single-byte numeric characters. |
||
144 | * - minOccurs: 0 |
||
145 | * @var string |
||
146 | */ |
||
147 | public $NoShipping; |
||
148 | /** |
||
149 | * The AddressOverride |
||
150 | * Meta information extracted from the WSDL |
||
151 | * - documentation: The value 1 indicates that the PayPal pages should display the shipping address set by you in the Address element on this SetExpressCheckoutRequest, not the shipping address on file with PayPal for this customer. Displaying the |
||
152 | * PayPal street address on file does not allow the customer to edit that address. Optional Character length and limitations: Four single-byte numeric characters. |
||
153 | * - minOccurs: 0 |
||
154 | * @var string |
||
155 | */ |
||
156 | public $AddressOverride; |
||
157 | /** |
||
158 | * The LocaleCode |
||
159 | * Meta information extracted from the WSDL |
||
160 | * - documentation: Locale of pages displayed by PayPal during Express Checkout. Optional Character length and limitations: Five single-byte alphabetic characters, upper- or lowercase. Allowable values: AU or en_AUDE or de_DEFR or fr_FRGB or en_GBIT or |
||
161 | * it_ITJP or ja_JPUS or en_US |
||
162 | * - minOccurs: 0 |
||
163 | * @var string |
||
164 | */ |
||
165 | public $LocaleCode; |
||
166 | /** |
||
167 | * The PageStyle |
||
168 | * Meta information extracted from the WSDL |
||
169 | * - documentation: Sets the Custom Payment Page Style for payment pages associated with this button/link. PageStyle corresponds to the HTML variable page_style for customizing payment pages. The value is the same as the Page Style Name you chose when |
||
170 | * adding or editing the page style from the Profile subtab of the My Account tab of your PayPal account. Optional Character length and limitations: 30 single-byte alphabetic characters. |
||
171 | * - minOccurs: 0 |
||
172 | * @var string |
||
173 | */ |
||
174 | public $PageStyle; |
||
175 | /** |
||
176 | * The cpp_header_image |
||
177 | * Meta information extracted from the WSDL |
||
178 | * - documentation: A URL for the image you want to appear at the top left of the payment page. The image has a maximum size of 750 pixels wide by 90 pixels high. PayPal recommends that you provide an image that is stored on a secure (https) server. |
||
179 | * Optional Character length and limitations: 127 |
||
180 | * - minOccurs: 0 |
||
181 | * @var string |
||
182 | */ |
||
183 | public $cpp_header_image; |
||
184 | /** |
||
185 | * The cpp_header_border_color |
||
186 | * Meta information extracted from the WSDL |
||
187 | * - documentation: Sets the border color around the header of the payment page. The border is a 2-pixel perimeter around the header space, which is 750 pixels wide by 90 pixels high. Optional Character length and limitations: Six character HTML |
||
188 | * hexadecimal color code in ASCII |
||
189 | * - minOccurs: 0 |
||
190 | * @var string |
||
191 | */ |
||
192 | public $cpp_header_border_color; |
||
193 | /** |
||
194 | * The cpp_header_back_color |
||
195 | * Meta information extracted from the WSDL |
||
196 | * - documentation: Sets the background color for the header of the payment page. Optional Character length and limitation: Six character HTML hexadecimal color code in ASCII |
||
197 | * - minOccurs: 0 |
||
198 | * @var string |
||
199 | */ |
||
200 | public $cpp_header_back_color; |
||
201 | /** |
||
202 | * The cpp_payflow_color |
||
203 | * Meta information extracted from the WSDL |
||
204 | * - documentation: Sets the background color for the payment page. Optional Character length and limitation: Six character HTML hexadecimal color code in ASCII |
||
205 | * - minOccurs: 0 |
||
206 | * @var string |
||
207 | */ |
||
208 | public $cpp_payflow_color; |
||
209 | /** |
||
210 | * The cpp_cart_border_color |
||
211 | * Meta information extracted from the WSDL |
||
212 | * - documentation: Sets the cart gradient color for the Mini Cart on 1X flow. Optional Character length and limitation: Six character HTML hexadecimal color code in ASCII |
||
213 | * - minOccurs: 0 |
||
214 | * @var string |
||
215 | */ |
||
216 | public $cpp_cart_border_color; |
||
217 | /** |
||
218 | * The cpp_logo_image |
||
219 | * Meta information extracted from the WSDL |
||
220 | * - documentation: A URL for the image you want to appear above the mini-cart. The image has a maximum size of 190 pixels wide by 60 pixels high. PayPal recommends that you provide an image that is stored on a secure (https) server. Optional Character |
||
221 | * length and limitations: 127 |
||
222 | * - minOccurs: 0 |
||
223 | * @var string |
||
224 | */ |
||
225 | public $cpp_logo_image; |
||
226 | /** |
||
227 | * The Address |
||
228 | * Meta information extracted from the WSDL |
||
229 | * - documentation: Customer's shipping address. Optional If you include a shipping address and set the AddressOverride element on the request, PayPal returns this same address in GetExpressCheckoutDetailsResponse. |
||
230 | * - minOccurs: 0 |
||
231 | * @var \PayPal\StructType\AddressType |
||
232 | */ |
||
233 | public $Address; |
||
234 | /** |
||
235 | * The PaymentAction |
||
236 | * Meta information extracted from the WSDL |
||
237 | * - documentation: How you want to obtain payment. Required Authorization indicates that this payment is a basic authorization subject to settlement with PayPal Authorization and Capture. Order indicates that this payment is is an order authorization |
||
238 | * 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 or Order on SetExpressCheckoutRequest and then change |
||
239 | * PaymentAction to Authorization on the final Express Checkout API, DoExpressCheckoutPaymentRequest. Character length and limit: Up to 13 single-byte alphabetic characters |
||
240 | * - minOccurs: 0 |
||
241 | * @var string |
||
242 | */ |
||
243 | public $PaymentAction; |
||
244 | /** |
||
245 | * The SolutionType |
||
246 | * Meta information extracted from the WSDL |
||
247 | * - documentation: This will indicate which flow you are choosing (expresschecheckout or expresscheckout optional) Optional None Sole indicates that you are in the ExpressO flow Mark indicates that you are in the old express flow. |
||
248 | * - minOccurs: 0 |
||
249 | * @var string |
||
250 | */ |
||
251 | public $SolutionType; |
||
252 | /** |
||
253 | * The LandingPage |
||
254 | * Meta information extracted from the WSDL |
||
255 | * - documentation: This indicates Which page to display for ExpressO (Billing or Login) Optional None Billing indicates that you are not a paypal account holder Login indicates that you are a paypal account holder |
||
256 | * - minOccurs: 0 |
||
257 | * @var string |
||
258 | */ |
||
259 | public $LandingPage; |
||
260 | /** |
||
261 | * The BuyerEmail |
||
262 | * Meta information extracted from the WSDL |
||
263 | * - documentation: Email address of the buyer as entered during checkout. PayPal uses this value to pre-fill the PayPal membership sign-up portion of the PayPal login page. Optional Character length and limit: 127 single-byte alphanumeric characters |
||
264 | * - base: xs:string |
||
265 | * - minOccurs: 0 |
||
266 | * @var string |
||
267 | */ |
||
268 | public $BuyerEmail; |
||
269 | /** |
||
270 | * The ChannelType |
||
271 | * Meta information extracted from the WSDL |
||
272 | * - minOccurs: 0 |
||
273 | * @var string |
||
274 | */ |
||
275 | public $ChannelType; |
||
276 | /** |
||
277 | * The BillingAgreementDetails |
||
278 | * Meta information extracted from the WSDL |
||
279 | * - maxOccurs: unbounded |
||
280 | * - minOccurs: 0 |
||
281 | * @var \PayPal\StructType\BillingAgreementDetailsType[] |
||
282 | */ |
||
283 | public $BillingAgreementDetails; |
||
284 | /** |
||
285 | * The PromoCodes |
||
286 | * Meta information extracted from the WSDL |
||
287 | * - documentation: Promo Code Optional List of promo codes supplied by merchant. These promo codes enable the Merchant Services Promotion Financing feature. |
||
288 | * - maxOccurs: unbounded |
||
289 | * - minOccurs: 0 |
||
290 | * @var string[] |
||
291 | */ |
||
292 | public $PromoCodes; |
||
293 | /** |
||
294 | * The PayPalCheckOutBtnType |
||
295 | * Meta information extracted from the WSDL |
||
296 | * - documentation: Default Funding option for PayLater Checkout button. |
||
297 | * - maxOccurs: 1 |
||
298 | * - minOccurs: 0 |
||
299 | * @var string |
||
300 | */ |
||
301 | public $PayPalCheckOutBtnType; |
||
302 | /** |
||
303 | * The ProductCategory |
||
304 | * Meta information extracted from the WSDL |
||
305 | * - maxOccurs: 1 |
||
306 | * - minOccurs: 0 |
||
307 | * @var string |
||
308 | */ |
||
309 | public $ProductCategory; |
||
310 | /** |
||
311 | * The ShippingMethod |
||
312 | * Meta information extracted from the WSDL |
||
313 | * - maxOccurs: 1 |
||
314 | * - minOccurs: 0 |
||
315 | * @var string |
||
316 | */ |
||
317 | public $ShippingMethod; |
||
318 | /** |
||
319 | * The ProfileAddressChangeDate |
||
320 | * Meta information extracted from the WSDL |
||
321 | * - documentation: Date and time (in GMT in the format yyyy-MM-ddTHH:mm:ssZ) at which address was changed by the user. |
||
322 | * - maxOccurs: 1 |
||
323 | * - minOccurs: 0 |
||
324 | * @var string |
||
325 | */ |
||
326 | public $ProfileAddressChangeDate; |
||
327 | /** |
||
328 | * The AllowNote |
||
329 | * Meta information extracted from the WSDL |
||
330 | * - documentation: The value 1 indicates that the customer may enter a note to the merchant on the PayPal page during checkout. The note is returned in the GetExpressCheckoutDetails response and the DoExpressCheckoutPayment response. Optional Character |
||
331 | * length and limitations: One single-byte numeric character. Allowable values: 0,1 |
||
332 | * - maxOccurs: 1 |
||
333 | * - minOccurs: 0 |
||
334 | * @var string |
||
335 | */ |
||
336 | public $AllowNote; |
||
337 | /** |
||
338 | * The FundingSourceDetails |
||
339 | * Meta information extracted from the WSDL |
||
340 | * - documentation: Funding source preferences. |
||
341 | * - maxOccurs: 1 |
||
342 | * - minOccurs: 0 |
||
343 | * @var \PayPal\StructType\FundingSourceDetailsType |
||
344 | */ |
||
345 | public $FundingSourceDetails; |
||
346 | /** |
||
347 | * The BrandName |
||
348 | * Meta information extracted from the WSDL |
||
349 | * - documentation: The label that needs to be displayed on the cancel links in the PayPal hosted checkout pages. Optional Character length and limit: 127 single-byte alphanumeric characters |
||
350 | * - maxOccurs: 1 |
||
351 | * - minOccurs: 0 |
||
352 | * @var string |
||
353 | */ |
||
354 | public $BrandName; |
||
355 | /** |
||
356 | * The CallbackURL |
||
357 | * Meta information extracted from the WSDL |
||
358 | * - documentation: URL for PayPal to use to retrieve shipping, handling, insurance, and tax details from your website. Optional Character length and limitations: 2048 characters. |
||
359 | * - maxOccurs: 1 |
||
360 | * - minOccurs: 0 |
||
361 | * @var string |
||
362 | */ |
||
363 | public $CallbackURL; |
||
364 | /** |
||
365 | * The EnhancedCheckoutData |
||
366 | * Meta information extracted from the WSDL |
||
367 | * - documentation: Enhanced data for different industry segments. Optional |
||
368 | * - maxOccurs: 1 |
||
369 | * - minOccurs: 0 |
||
370 | * @var \PayPal\StructType\EnhancedCheckoutDataType |
||
371 | */ |
||
372 | public $EnhancedCheckoutData; |
||
373 | /** |
||
374 | * The OtherPaymentMethods |
||
375 | * Meta information extracted from the WSDL |
||
376 | * - documentation: List of other payment methods the user can pay with. Optional Refer to the OtherPaymentMethodDetailsType for more details. |
||
377 | * - maxOccurs: unbounded |
||
378 | * - minOccurs: 0 |
||
379 | * @var \PayPal\StructType\OtherPaymentMethodDetailsType[] |
||
380 | */ |
||
381 | public $OtherPaymentMethods; |
||
382 | /** |
||
383 | * The BuyerDetails |
||
384 | * Meta information extracted from the WSDL |
||
385 | * - documentation: Details about the buyer's account. Optional Refer to the BuyerDetailsType for more details. |
||
386 | * - maxOccurs: 1 |
||
387 | * - minOccurs: 0 |
||
388 | * @var \PayPal\StructType\BuyerDetailsType |
||
389 | */ |
||
390 | public $BuyerDetails; |
||
391 | /** |
||
392 | * The PaymentDetails |
||
393 | * Meta information extracted from the WSDL |
||
394 | * - documentation: Information about the payment. |
||
395 | * - maxOccurs: 10 |
||
396 | * - minOccurs: 0 |
||
397 | * @var \PayPal\StructType\PaymentDetailsType[] |
||
398 | */ |
||
399 | public $PaymentDetails; |
||
400 | /** |
||
401 | * The FlatRateShippingOptions |
||
402 | * Meta information extracted from the WSDL |
||
403 | * - documentation: List of Fall Back Shipping options provided by merchant. |
||
404 | * - maxOccurs: unbounded |
||
405 | * - minOccurs: 0 |
||
406 | * @var \PayPal\StructType\ShippingOptionType[] |
||
407 | */ |
||
408 | public $FlatRateShippingOptions; |
||
409 | /** |
||
410 | * The CallbackTimeout |
||
411 | * Meta information extracted from the WSDL |
||
412 | * - documentation: Information about the call back timeout override. |
||
413 | * - maxOccurs: 1 |
||
414 | * - minOccurs: 0 |
||
415 | * @var string |
||
416 | */ |
||
417 | public $CallbackTimeout; |
||
418 | /** |
||
419 | * The CallbackVersion |
||
420 | * Meta information extracted from the WSDL |
||
421 | * - documentation: Information about the call back version. |
||
422 | * - maxOccurs: 1 |
||
423 | * - minOccurs: 0 |
||
424 | * @var string |
||
425 | */ |
||
426 | public $CallbackVersion; |
||
427 | /** |
||
428 | * The CustomerServiceNumber |
||
429 | * Meta information extracted from the WSDL |
||
430 | * - documentation: Information about the Customer service number. |
||
431 | * - maxOccurs: 1 |
||
432 | * - minOccurs: 0 |
||
433 | * @var string |
||
434 | */ |
||
435 | public $CustomerServiceNumber; |
||
436 | /** |
||
437 | * The GiftMessageEnable |
||
438 | * Meta information extracted from the WSDL |
||
439 | * - documentation: Information about the Gift message enable. |
||
440 | * - maxOccurs: 1 |
||
441 | * - minOccurs: 0 |
||
442 | * @var string |
||
443 | */ |
||
444 | public $GiftMessageEnable; |
||
445 | /** |
||
446 | * The GiftReceiptEnable |
||
447 | * Meta information extracted from the WSDL |
||
448 | * - documentation: Information about the Gift receipt enable. |
||
449 | * - maxOccurs: 1 |
||
450 | * - minOccurs: 0 |
||
451 | * @var string |
||
452 | */ |
||
453 | public $GiftReceiptEnable; |
||
454 | /** |
||
455 | * The GiftWrapEnable |
||
456 | * Meta information extracted from the WSDL |
||
457 | * - documentation: Information about the Gift Wrap enable. |
||
458 | * - maxOccurs: 1 |
||
459 | * - minOccurs: 0 |
||
460 | * @var string |
||
461 | */ |
||
462 | public $GiftWrapEnable; |
||
463 | /** |
||
464 | * The GiftWrapName |
||
465 | * Meta information extracted from the WSDL |
||
466 | * - documentation: Information about the Gift Wrap name. |
||
467 | * - maxOccurs: 1 |
||
468 | * - minOccurs: 0 |
||
469 | * @var string |
||
470 | */ |
||
471 | public $GiftWrapName; |
||
472 | /** |
||
473 | * The GiftWrapAmount |
||
474 | * Meta information extracted from the WSDL |
||
475 | * - documentation: Information about the Gift Wrap amount. |
||
476 | * - maxOccurs: 1 |
||
477 | * - minOccurs: 0 |
||
478 | * @var \PayPal\StructType\BasicAmountType |
||
479 | */ |
||
480 | public $GiftWrapAmount; |
||
481 | /** |
||
482 | * The BuyerEmailOptInEnable |
||
483 | * Meta information extracted from the WSDL |
||
484 | * - documentation: Information about the Buyer email option enable . |
||
485 | * - maxOccurs: 1 |
||
486 | * - minOccurs: 0 |
||
487 | * @var string |
||
488 | */ |
||
489 | public $BuyerEmailOptInEnable; |
||
490 | /** |
||
491 | * The SurveyEnable |
||
492 | * Meta information extracted from the WSDL |
||
493 | * - documentation: Information about the survey enable. |
||
494 | * - maxOccurs: 1 |
||
495 | * - minOccurs: 0 |
||
496 | * @var string |
||
497 | */ |
||
498 | public $SurveyEnable; |
||
499 | /** |
||
500 | * The SurveyQuestion |
||
501 | * Meta information extracted from the WSDL |
||
502 | * - documentation: Information about the survey question. |
||
503 | * - maxOccurs: 1 |
||
504 | * - minOccurs: 0 |
||
505 | * @var string |
||
506 | */ |
||
507 | public $SurveyQuestion; |
||
508 | /** |
||
509 | * The SurveyChoice |
||
510 | * Meta information extracted from the WSDL |
||
511 | * - documentation: Information about the survey choices for survey question. |
||
512 | * - maxOccurs: unbounded |
||
513 | * - minOccurs: 0 |
||
514 | * @var string[] |
||
515 | */ |
||
516 | public $SurveyChoice; |
||
517 | /** |
||
518 | * The TotalType |
||
519 | * Meta information extracted from the WSDL |
||
520 | * - minOccurs: 0 |
||
521 | * @var string |
||
522 | */ |
||
523 | public $TotalType; |
||
524 | /** |
||
525 | * The NoteToBuyer |
||
526 | * Meta information extracted from the WSDL |
||
527 | * - documentation: Any message the seller would like to be displayed in the Mini Cart for UX. |
||
528 | * - maxOccurs: 1 |
||
529 | * - minOccurs: 0 |
||
530 | * @var string |
||
531 | */ |
||
532 | public $NoteToBuyer; |
||
533 | /** |
||
534 | * The Incentives |
||
535 | * Meta information extracted from the WSDL |
||
536 | * - documentation: Incentive Code Optional List of incentive codes supplied by ebay/merchant. |
||
537 | * - maxOccurs: unbounded |
||
538 | * - minOccurs: 0 |
||
539 | * @var \PayPal\StructType\IncentiveInfoType[] |
||
540 | */ |
||
541 | public $Incentives; |
||
542 | /** |
||
543 | * The ReqInstrumentDetails |
||
544 | * Meta information extracted from the WSDL |
||
545 | * - documentation: Merchant specified flag which indicates whether to return Funding Instrument Details in DoEC or not. Optional |
||
546 | * - maxOccurs: 1 |
||
547 | * - minOccurs: 0 |
||
548 | * @var string |
||
549 | */ |
||
550 | public $ReqInstrumentDetails; |
||
551 | /** |
||
552 | * The ExternalRememberMeOptInDetails |
||
553 | * Meta information extracted from the WSDL |
||
554 | * - documentation: This element contains information that allows the merchant to request to opt into external remember me on behalf of the buyer or to request login bypass using external remember me. Note the opt-in details are silently ignored if the |
||
555 | * ExternalRememberMeID is present. |
||
556 | * - maxOccurs: 1 |
||
557 | * - minOccurs: 0 |
||
558 | * @var \PayPal\StructType\ExternalRememberMeOptInDetailsType |
||
559 | */ |
||
560 | public $ExternalRememberMeOptInDetails; |
||
561 | /** |
||
562 | * The FlowControlDetails |
||
563 | * Meta information extracted from the WSDL |
||
564 | * - documentation: An optional set of values related to flow-specific details. |
||
565 | * - maxOccurs: 1 |
||
566 | * - minOccurs: 0 |
||
567 | * @var \PayPal\StructType\FlowControlDetailsType |
||
568 | */ |
||
569 | public $FlowControlDetails; |
||
570 | /** |
||
571 | * The DisplayControlDetails |
||
572 | * Meta information extracted from the WSDL |
||
573 | * - documentation: An optional set of values related to display-specific details. |
||
574 | * - maxOccurs: 1 |
||
575 | * - minOccurs: 0 |
||
576 | * @var \PayPal\StructType\DisplayControlDetailsType |
||
577 | */ |
||
578 | public $DisplayControlDetails; |
||
579 | /** |
||
580 | * The ExternalPartnerTrackingDetails |
||
581 | * Meta information extracted from the WSDL |
||
582 | * - documentation: An optional set of values related to tracking for external partner. |
||
583 | * - maxOccurs: 1 |
||
584 | * - minOccurs: 0 |
||
585 | * @var \PayPal\StructType\ExternalPartnerTrackingDetailsType |
||
586 | */ |
||
587 | public $ExternalPartnerTrackingDetails; |
||
588 | /** |
||
589 | * The CoupledBuckets |
||
590 | * Meta information extracted from the WSDL |
||
591 | * - documentation: Optional element that defines relationship between buckets |
||
592 | * - maxOccurs: 5 |
||
593 | * - minOccurs: 0 |
||
594 | * @var \PayPal\StructType\CoupledBucketsType[] |
||
595 | */ |
||
596 | public $CoupledBuckets; |
||
597 | /** |
||
598 | * The BillingAgreementID |
||
599 | * Meta information extracted from the WSDL |
||
600 | * - documentation: Billing agreement id for edit funding instrument which enables buyer to select given instrument for current purchase |
||
601 | * - maxOccurs: 1 |
||
602 | * - minOccurs: 0 |
||
603 | * @var string |
||
604 | */ |
||
605 | public $BillingAgreementID; |
||
606 | /** |
||
607 | * Constructor method for SetExpressCheckoutRequestDetailsType |
||
608 | * @uses SetExpressCheckoutRequestDetailsType::setOrderTotal() |
||
609 | * @uses SetExpressCheckoutRequestDetailsType::setReturnURL() |
||
610 | * @uses SetExpressCheckoutRequestDetailsType::setCancelURL() |
||
611 | * @uses SetExpressCheckoutRequestDetailsType::setTrackingImageURL() |
||
612 | * @uses SetExpressCheckoutRequestDetailsType::setGiropaySuccessURL() |
||
613 | * @uses SetExpressCheckoutRequestDetailsType::setGiropayCancelURL() |
||
614 | * @uses SetExpressCheckoutRequestDetailsType::setBanktxnPendingURL() |
||
615 | * @uses SetExpressCheckoutRequestDetailsType::setToken() |
||
616 | * @uses SetExpressCheckoutRequestDetailsType::setMaxAmount() |
||
617 | * @uses SetExpressCheckoutRequestDetailsType::setOrderDescription() |
||
618 | * @uses SetExpressCheckoutRequestDetailsType::setCustom() |
||
619 | * @uses SetExpressCheckoutRequestDetailsType::setInvoiceID() |
||
620 | * @uses SetExpressCheckoutRequestDetailsType::setReqConfirmShipping() |
||
621 | * @uses SetExpressCheckoutRequestDetailsType::setReqBillingAddress() |
||
622 | * @uses SetExpressCheckoutRequestDetailsType::setBillingAddress() |
||
623 | * @uses SetExpressCheckoutRequestDetailsType::setNoShipping() |
||
624 | * @uses SetExpressCheckoutRequestDetailsType::setAddressOverride() |
||
625 | * @uses SetExpressCheckoutRequestDetailsType::setLocaleCode() |
||
626 | * @uses SetExpressCheckoutRequestDetailsType::setPageStyle() |
||
627 | * @uses SetExpressCheckoutRequestDetailsType::setCpp_header_image() |
||
628 | * @uses SetExpressCheckoutRequestDetailsType::setCpp_header_border_color() |
||
629 | * @uses SetExpressCheckoutRequestDetailsType::setCpp_header_back_color() |
||
630 | * @uses SetExpressCheckoutRequestDetailsType::setCpp_payflow_color() |
||
631 | * @uses SetExpressCheckoutRequestDetailsType::setCpp_cart_border_color() |
||
632 | * @uses SetExpressCheckoutRequestDetailsType::setCpp_logo_image() |
||
633 | * @uses SetExpressCheckoutRequestDetailsType::setAddress() |
||
634 | * @uses SetExpressCheckoutRequestDetailsType::setPaymentAction() |
||
635 | * @uses SetExpressCheckoutRequestDetailsType::setSolutionType() |
||
636 | * @uses SetExpressCheckoutRequestDetailsType::setLandingPage() |
||
637 | * @uses SetExpressCheckoutRequestDetailsType::setBuyerEmail() |
||
638 | * @uses SetExpressCheckoutRequestDetailsType::setChannelType() |
||
639 | * @uses SetExpressCheckoutRequestDetailsType::setBillingAgreementDetails() |
||
640 | * @uses SetExpressCheckoutRequestDetailsType::setPromoCodes() |
||
641 | * @uses SetExpressCheckoutRequestDetailsType::setPayPalCheckOutBtnType() |
||
642 | * @uses SetExpressCheckoutRequestDetailsType::setProductCategory() |
||
643 | * @uses SetExpressCheckoutRequestDetailsType::setShippingMethod() |
||
644 | * @uses SetExpressCheckoutRequestDetailsType::setProfileAddressChangeDate() |
||
645 | * @uses SetExpressCheckoutRequestDetailsType::setAllowNote() |
||
646 | * @uses SetExpressCheckoutRequestDetailsType::setFundingSourceDetails() |
||
647 | * @uses SetExpressCheckoutRequestDetailsType::setBrandName() |
||
648 | * @uses SetExpressCheckoutRequestDetailsType::setCallbackURL() |
||
649 | * @uses SetExpressCheckoutRequestDetailsType::setEnhancedCheckoutData() |
||
650 | * @uses SetExpressCheckoutRequestDetailsType::setOtherPaymentMethods() |
||
651 | * @uses SetExpressCheckoutRequestDetailsType::setBuyerDetails() |
||
652 | * @uses SetExpressCheckoutRequestDetailsType::setPaymentDetails() |
||
653 | * @uses SetExpressCheckoutRequestDetailsType::setFlatRateShippingOptions() |
||
654 | * @uses SetExpressCheckoutRequestDetailsType::setCallbackTimeout() |
||
655 | * @uses SetExpressCheckoutRequestDetailsType::setCallbackVersion() |
||
656 | * @uses SetExpressCheckoutRequestDetailsType::setCustomerServiceNumber() |
||
657 | * @uses SetExpressCheckoutRequestDetailsType::setGiftMessageEnable() |
||
658 | * @uses SetExpressCheckoutRequestDetailsType::setGiftReceiptEnable() |
||
659 | * @uses SetExpressCheckoutRequestDetailsType::setGiftWrapEnable() |
||
660 | * @uses SetExpressCheckoutRequestDetailsType::setGiftWrapName() |
||
661 | * @uses SetExpressCheckoutRequestDetailsType::setGiftWrapAmount() |
||
662 | * @uses SetExpressCheckoutRequestDetailsType::setBuyerEmailOptInEnable() |
||
663 | * @uses SetExpressCheckoutRequestDetailsType::setSurveyEnable() |
||
664 | * @uses SetExpressCheckoutRequestDetailsType::setSurveyQuestion() |
||
665 | * @uses SetExpressCheckoutRequestDetailsType::setSurveyChoice() |
||
666 | * @uses SetExpressCheckoutRequestDetailsType::setTotalType() |
||
667 | * @uses SetExpressCheckoutRequestDetailsType::setNoteToBuyer() |
||
668 | * @uses SetExpressCheckoutRequestDetailsType::setIncentives() |
||
669 | * @uses SetExpressCheckoutRequestDetailsType::setReqInstrumentDetails() |
||
670 | * @uses SetExpressCheckoutRequestDetailsType::setExternalRememberMeOptInDetails() |
||
671 | * @uses SetExpressCheckoutRequestDetailsType::setFlowControlDetails() |
||
672 | * @uses SetExpressCheckoutRequestDetailsType::setDisplayControlDetails() |
||
673 | * @uses SetExpressCheckoutRequestDetailsType::setExternalPartnerTrackingDetails() |
||
674 | * @uses SetExpressCheckoutRequestDetailsType::setCoupledBuckets() |
||
675 | * @uses SetExpressCheckoutRequestDetailsType::setBillingAgreementID() |
||
676 | * @param \PayPal\StructType\BasicAmountType $orderTotal |
||
677 | * @param string $returnURL |
||
678 | * @param string $cancelURL |
||
679 | * @param string $trackingImageURL |
||
680 | * @param string $giropaySuccessURL |
||
681 | * @param string $giropayCancelURL |
||
682 | * @param string $banktxnPendingURL |
||
683 | * @param string $token |
||
684 | * @param \PayPal\StructType\BasicAmountType $maxAmount |
||
685 | * @param string $orderDescription |
||
686 | * @param string $custom |
||
687 | * @param string $invoiceID |
||
688 | * @param string $reqConfirmShipping |
||
689 | * @param string $reqBillingAddress |
||
690 | * @param \PayPal\StructType\AddressType $billingAddress |
||
691 | * @param string $noShipping |
||
692 | * @param string $addressOverride |
||
693 | * @param string $localeCode |
||
694 | * @param string $pageStyle |
||
695 | * @param string $cpp_header_image |
||
696 | * @param string $cpp_header_border_color |
||
697 | * @param string $cpp_header_back_color |
||
698 | * @param string $cpp_payflow_color |
||
699 | * @param string $cpp_cart_border_color |
||
700 | * @param string $cpp_logo_image |
||
701 | * @param \PayPal\StructType\AddressType $address |
||
702 | * @param string $paymentAction |
||
703 | * @param string $solutionType |
||
704 | * @param string $landingPage |
||
705 | * @param string $buyerEmail |
||
706 | * @param string $channelType |
||
707 | * @param \PayPal\StructType\BillingAgreementDetailsType[] $billingAgreementDetails |
||
708 | * @param string[] $promoCodes |
||
709 | * @param string $payPalCheckOutBtnType |
||
710 | * @param string $productCategory |
||
711 | * @param string $shippingMethod |
||
712 | * @param string $profileAddressChangeDate |
||
713 | * @param string $allowNote |
||
714 | * @param \PayPal\StructType\FundingSourceDetailsType $fundingSourceDetails |
||
715 | * @param string $brandName |
||
716 | * @param string $callbackURL |
||
717 | * @param \PayPal\StructType\EnhancedCheckoutDataType $enhancedCheckoutData |
||
718 | * @param \PayPal\StructType\OtherPaymentMethodDetailsType[] $otherPaymentMethods |
||
719 | * @param \PayPal\StructType\BuyerDetailsType $buyerDetails |
||
720 | * @param \PayPal\StructType\PaymentDetailsType[] $paymentDetails |
||
721 | * @param \PayPal\StructType\ShippingOptionType[] $flatRateShippingOptions |
||
722 | * @param string $callbackTimeout |
||
723 | * @param string $callbackVersion |
||
724 | * @param string $customerServiceNumber |
||
725 | * @param string $giftMessageEnable |
||
726 | * @param string $giftReceiptEnable |
||
727 | * @param string $giftWrapEnable |
||
728 | * @param string $giftWrapName |
||
729 | * @param \PayPal\StructType\BasicAmountType $giftWrapAmount |
||
730 | * @param string $buyerEmailOptInEnable |
||
731 | * @param string $surveyEnable |
||
732 | * @param string $surveyQuestion |
||
733 | * @param string[] $surveyChoice |
||
734 | * @param string $totalType |
||
735 | * @param string $noteToBuyer |
||
736 | * @param \PayPal\StructType\IncentiveInfoType[] $incentives |
||
737 | * @param string $reqInstrumentDetails |
||
738 | * @param \PayPal\StructType\ExternalRememberMeOptInDetailsType $externalRememberMeOptInDetails |
||
739 | * @param \PayPal\StructType\FlowControlDetailsType $flowControlDetails |
||
740 | * @param \PayPal\StructType\DisplayControlDetailsType $displayControlDetails |
||
741 | * @param \PayPal\StructType\ExternalPartnerTrackingDetailsType $externalPartnerTrackingDetails |
||
742 | * @param \PayPal\StructType\CoupledBucketsType[] $coupledBuckets |
||
743 | * @param string $billingAgreementID |
||
744 | */ |
||
745 | public function __construct(\PayPal\StructType\BasicAmountType $orderTotal = null, $returnURL = null, $cancelURL = null, $trackingImageURL = null, $giropaySuccessURL = null, $giropayCancelURL = null, $banktxnPendingURL = null, $token = null, \PayPal\StructType\BasicAmountType $maxAmount = null, $orderDescription = null, $custom = null, $invoiceID = null, $reqConfirmShipping = null, $reqBillingAddress = null, \PayPal\StructType\AddressType $billingAddress = null, $noShipping = null, $addressOverride = null, $localeCode = null, $pageStyle = null, $cpp_header_image = null, $cpp_header_border_color = null, $cpp_header_back_color = null, $cpp_payflow_color = null, $cpp_cart_border_color = null, $cpp_logo_image = null, \PayPal\StructType\AddressType $address = null, $paymentAction = null, $solutionType = null, $landingPage = null, $buyerEmail = null, $channelType = null, array $billingAgreementDetails = array(), array $promoCodes = array(), $payPalCheckOutBtnType = null, $productCategory = null, $shippingMethod = null, $profileAddressChangeDate = null, $allowNote = null, \PayPal\StructType\FundingSourceDetailsType $fundingSourceDetails = null, $brandName = null, $callbackURL = null, \PayPal\StructType\EnhancedCheckoutDataType $enhancedCheckoutData = null, array $otherPaymentMethods = array(), \PayPal\StructType\BuyerDetailsType $buyerDetails = null, array $paymentDetails = array(), array $flatRateShippingOptions = array(), $callbackTimeout = null, $callbackVersion = null, $customerServiceNumber = null, $giftMessageEnable = null, $giftReceiptEnable = null, $giftWrapEnable = null, $giftWrapName = null, \PayPal\StructType\BasicAmountType $giftWrapAmount = null, $buyerEmailOptInEnable = null, $surveyEnable = null, $surveyQuestion = null, array $surveyChoice = array(), $totalType = null, $noteToBuyer = null, array $incentives = array(), $reqInstrumentDetails = null, \PayPal\StructType\ExternalRememberMeOptInDetailsType $externalRememberMeOptInDetails = null, \PayPal\StructType\FlowControlDetailsType $flowControlDetails = null, \PayPal\StructType\DisplayControlDetailsType $displayControlDetails = null, \PayPal\StructType\ExternalPartnerTrackingDetailsType $externalPartnerTrackingDetails = null, array $coupledBuckets = array(), $billingAgreementID = null) |
||
746 | { |
||
747 | $this |
||
748 | ->setOrderTotal($orderTotal) |
||
749 | ->setReturnURL($returnURL) |
||
750 | ->setCancelURL($cancelURL) |
||
751 | ->setTrackingImageURL($trackingImageURL) |
||
752 | ->setGiropaySuccessURL($giropaySuccessURL) |
||
753 | ->setGiropayCancelURL($giropayCancelURL) |
||
754 | ->setBanktxnPendingURL($banktxnPendingURL) |
||
755 | ->setToken($token) |
||
756 | ->setMaxAmount($maxAmount) |
||
757 | ->setOrderDescription($orderDescription) |
||
758 | ->setCustom($custom) |
||
759 | ->setInvoiceID($invoiceID) |
||
760 | ->setReqConfirmShipping($reqConfirmShipping) |
||
761 | ->setReqBillingAddress($reqBillingAddress) |
||
762 | ->setBillingAddress($billingAddress) |
||
763 | ->setNoShipping($noShipping) |
||
764 | ->setAddressOverride($addressOverride) |
||
765 | ->setLocaleCode($localeCode) |
||
766 | ->setPageStyle($pageStyle) |
||
767 | ->setCpp_header_image($cpp_header_image) |
||
768 | ->setCpp_header_border_color($cpp_header_border_color) |
||
769 | ->setCpp_header_back_color($cpp_header_back_color) |
||
770 | ->setCpp_payflow_color($cpp_payflow_color) |
||
771 | ->setCpp_cart_border_color($cpp_cart_border_color) |
||
772 | ->setCpp_logo_image($cpp_logo_image) |
||
773 | ->setAddress($address) |
||
774 | ->setPaymentAction($paymentAction) |
||
775 | ->setSolutionType($solutionType) |
||
776 | ->setLandingPage($landingPage) |
||
777 | ->setBuyerEmail($buyerEmail) |
||
778 | ->setChannelType($channelType) |
||
779 | ->setBillingAgreementDetails($billingAgreementDetails) |
||
780 | ->setPromoCodes($promoCodes) |
||
781 | ->setPayPalCheckOutBtnType($payPalCheckOutBtnType) |
||
782 | ->setProductCategory($productCategory) |
||
783 | ->setShippingMethod($shippingMethod) |
||
784 | ->setProfileAddressChangeDate($profileAddressChangeDate) |
||
785 | ->setAllowNote($allowNote) |
||
786 | ->setFundingSourceDetails($fundingSourceDetails) |
||
787 | ->setBrandName($brandName) |
||
788 | ->setCallbackURL($callbackURL) |
||
789 | ->setEnhancedCheckoutData($enhancedCheckoutData) |
||
790 | ->setOtherPaymentMethods($otherPaymentMethods) |
||
791 | ->setBuyerDetails($buyerDetails) |
||
792 | ->setPaymentDetails($paymentDetails) |
||
793 | ->setFlatRateShippingOptions($flatRateShippingOptions) |
||
794 | ->setCallbackTimeout($callbackTimeout) |
||
795 | ->setCallbackVersion($callbackVersion) |
||
796 | ->setCustomerServiceNumber($customerServiceNumber) |
||
797 | ->setGiftMessageEnable($giftMessageEnable) |
||
798 | ->setGiftReceiptEnable($giftReceiptEnable) |
||
799 | ->setGiftWrapEnable($giftWrapEnable) |
||
800 | ->setGiftWrapName($giftWrapName) |
||
801 | ->setGiftWrapAmount($giftWrapAmount) |
||
802 | ->setBuyerEmailOptInEnable($buyerEmailOptInEnable) |
||
803 | ->setSurveyEnable($surveyEnable) |
||
804 | ->setSurveyQuestion($surveyQuestion) |
||
805 | ->setSurveyChoice($surveyChoice) |
||
806 | ->setTotalType($totalType) |
||
807 | ->setNoteToBuyer($noteToBuyer) |
||
808 | ->setIncentives($incentives) |
||
809 | ->setReqInstrumentDetails($reqInstrumentDetails) |
||
810 | ->setExternalRememberMeOptInDetails($externalRememberMeOptInDetails) |
||
811 | ->setFlowControlDetails($flowControlDetails) |
||
812 | ->setDisplayControlDetails($displayControlDetails) |
||
813 | ->setExternalPartnerTrackingDetails($externalPartnerTrackingDetails) |
||
814 | ->setCoupledBuckets($coupledBuckets) |
||
815 | ->setBillingAgreementID($billingAgreementID); |
||
816 | } |
||
817 | /** |
||
818 | * Get OrderTotal value |
||
819 | * @return \PayPal\StructType\BasicAmountType|null |
||
820 | */ |
||
821 | public function getOrderTotal() |
||
822 | { |
||
823 | return $this->OrderTotal; |
||
824 | } |
||
825 | /** |
||
826 | * Set OrderTotal value |
||
827 | * @param \PayPal\StructType\BasicAmountType $orderTotal |
||
828 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
829 | */ |
||
830 | public function setOrderTotal(\PayPal\StructType\BasicAmountType $orderTotal = null) |
||
831 | { |
||
832 | $this->OrderTotal = $orderTotal; |
||
833 | return $this; |
||
834 | } |
||
835 | /** |
||
836 | * Get ReturnURL value |
||
837 | * @return string|null |
||
838 | */ |
||
839 | public function getReturnURL() |
||
840 | { |
||
841 | return $this->ReturnURL; |
||
842 | } |
||
843 | /** |
||
844 | * Set ReturnURL value |
||
845 | * @param string $returnURL |
||
846 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
847 | */ |
||
848 | public function setReturnURL($returnURL = null) |
||
849 | { |
||
850 | // validation for constraint: string |
||
851 | if (!is_null($returnURL) && !is_string($returnURL)) { |
||
|
|||
852 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($returnURL, true), gettype($returnURL)), __LINE__); |
||
853 | } |
||
854 | $this->ReturnURL = $returnURL; |
||
855 | return $this; |
||
856 | } |
||
857 | /** |
||
858 | * Get CancelURL value |
||
859 | * @return string|null |
||
860 | */ |
||
861 | public function getCancelURL() |
||
862 | { |
||
863 | return $this->CancelURL; |
||
864 | } |
||
865 | /** |
||
866 | * Set CancelURL value |
||
867 | * @param string $cancelURL |
||
868 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
869 | */ |
||
870 | public function setCancelURL($cancelURL = null) |
||
871 | { |
||
872 | // validation for constraint: string |
||
873 | if (!is_null($cancelURL) && !is_string($cancelURL)) { |
||
874 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cancelURL, true), gettype($cancelURL)), __LINE__); |
||
875 | } |
||
876 | $this->CancelURL = $cancelURL; |
||
877 | return $this; |
||
878 | } |
||
879 | /** |
||
880 | * Get TrackingImageURL value |
||
881 | * @return string|null |
||
882 | */ |
||
883 | public function getTrackingImageURL() |
||
884 | { |
||
885 | return $this->TrackingImageURL; |
||
886 | } |
||
887 | /** |
||
888 | * Set TrackingImageURL value |
||
889 | * @param string $trackingImageURL |
||
890 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
891 | */ |
||
892 | public function setTrackingImageURL($trackingImageURL = null) |
||
893 | { |
||
894 | // validation for constraint: string |
||
895 | if (!is_null($trackingImageURL) && !is_string($trackingImageURL)) { |
||
896 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($trackingImageURL, true), gettype($trackingImageURL)), __LINE__); |
||
897 | } |
||
898 | $this->TrackingImageURL = $trackingImageURL; |
||
899 | return $this; |
||
900 | } |
||
901 | /** |
||
902 | * Get giropaySuccessURL value |
||
903 | * @return string|null |
||
904 | */ |
||
905 | public function getGiropaySuccessURL() |
||
906 | { |
||
907 | return $this->giropaySuccessURL; |
||
908 | } |
||
909 | /** |
||
910 | * Set giropaySuccessURL value |
||
911 | * @param string $giropaySuccessURL |
||
912 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
913 | */ |
||
914 | public function setGiropaySuccessURL($giropaySuccessURL = null) |
||
915 | { |
||
916 | // validation for constraint: string |
||
917 | if (!is_null($giropaySuccessURL) && !is_string($giropaySuccessURL)) { |
||
918 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($giropaySuccessURL, true), gettype($giropaySuccessURL)), __LINE__); |
||
919 | } |
||
920 | $this->giropaySuccessURL = $giropaySuccessURL; |
||
921 | return $this; |
||
922 | } |
||
923 | /** |
||
924 | * Get giropayCancelURL value |
||
925 | * @return string|null |
||
926 | */ |
||
927 | public function getGiropayCancelURL() |
||
928 | { |
||
929 | return $this->giropayCancelURL; |
||
930 | } |
||
931 | /** |
||
932 | * Set giropayCancelURL value |
||
933 | * @param string $giropayCancelURL |
||
934 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
935 | */ |
||
936 | public function setGiropayCancelURL($giropayCancelURL = null) |
||
937 | { |
||
938 | // validation for constraint: string |
||
939 | if (!is_null($giropayCancelURL) && !is_string($giropayCancelURL)) { |
||
940 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($giropayCancelURL, true), gettype($giropayCancelURL)), __LINE__); |
||
941 | } |
||
942 | $this->giropayCancelURL = $giropayCancelURL; |
||
943 | return $this; |
||
944 | } |
||
945 | /** |
||
946 | * Get BanktxnPendingURL value |
||
947 | * @return string|null |
||
948 | */ |
||
949 | public function getBanktxnPendingURL() |
||
950 | { |
||
951 | return $this->BanktxnPendingURL; |
||
952 | } |
||
953 | /** |
||
954 | * Set BanktxnPendingURL value |
||
955 | * @param string $banktxnPendingURL |
||
956 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
957 | */ |
||
958 | public function setBanktxnPendingURL($banktxnPendingURL = null) |
||
959 | { |
||
960 | // validation for constraint: string |
||
961 | if (!is_null($banktxnPendingURL) && !is_string($banktxnPendingURL)) { |
||
962 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($banktxnPendingURL, true), gettype($banktxnPendingURL)), __LINE__); |
||
963 | } |
||
964 | $this->BanktxnPendingURL = $banktxnPendingURL; |
||
965 | return $this; |
||
966 | } |
||
967 | /** |
||
968 | * Get Token value |
||
969 | * @return string|null |
||
970 | */ |
||
971 | public function getToken() |
||
972 | { |
||
973 | return $this->Token; |
||
974 | } |
||
975 | /** |
||
976 | * Set Token value |
||
977 | * @param string $token |
||
978 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
979 | */ |
||
980 | public function setToken($token = null) |
||
981 | { |
||
982 | // validation for constraint: string |
||
983 | if (!is_null($token) && !is_string($token)) { |
||
984 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($token, true), gettype($token)), __LINE__); |
||
985 | } |
||
986 | $this->Token = $token; |
||
987 | return $this; |
||
988 | } |
||
989 | /** |
||
990 | * Get MaxAmount value |
||
991 | * @return \PayPal\StructType\BasicAmountType|null |
||
992 | */ |
||
993 | public function getMaxAmount() |
||
994 | { |
||
995 | return $this->MaxAmount; |
||
996 | } |
||
997 | /** |
||
998 | * Set MaxAmount value |
||
999 | * @param \PayPal\StructType\BasicAmountType $maxAmount |
||
1000 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1001 | */ |
||
1002 | public function setMaxAmount(\PayPal\StructType\BasicAmountType $maxAmount = null) |
||
1003 | { |
||
1004 | $this->MaxAmount = $maxAmount; |
||
1005 | return $this; |
||
1006 | } |
||
1007 | /** |
||
1008 | * Get OrderDescription value |
||
1009 | * @return string|null |
||
1010 | */ |
||
1011 | public function getOrderDescription() |
||
1012 | { |
||
1013 | return $this->OrderDescription; |
||
1014 | } |
||
1015 | /** |
||
1016 | * Set OrderDescription value |
||
1017 | * @param string $orderDescription |
||
1018 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1019 | */ |
||
1020 | public function setOrderDescription($orderDescription = null) |
||
1021 | { |
||
1022 | // validation for constraint: string |
||
1023 | if (!is_null($orderDescription) && !is_string($orderDescription)) { |
||
1024 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($orderDescription, true), gettype($orderDescription)), __LINE__); |
||
1025 | } |
||
1026 | $this->OrderDescription = $orderDescription; |
||
1027 | return $this; |
||
1028 | } |
||
1029 | /** |
||
1030 | * Get Custom value |
||
1031 | * @return string|null |
||
1032 | */ |
||
1033 | public function getCustom() |
||
1034 | { |
||
1035 | return $this->Custom; |
||
1036 | } |
||
1037 | /** |
||
1038 | * Set Custom value |
||
1039 | * @param string $custom |
||
1040 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1041 | */ |
||
1042 | public function setCustom($custom = null) |
||
1043 | { |
||
1044 | // validation for constraint: string |
||
1045 | if (!is_null($custom) && !is_string($custom)) { |
||
1046 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($custom, true), gettype($custom)), __LINE__); |
||
1047 | } |
||
1048 | $this->Custom = $custom; |
||
1049 | return $this; |
||
1050 | } |
||
1051 | /** |
||
1052 | * Get InvoiceID value |
||
1053 | * @return string|null |
||
1054 | */ |
||
1055 | public function getInvoiceID() |
||
1056 | { |
||
1057 | return $this->InvoiceID; |
||
1058 | } |
||
1059 | /** |
||
1060 | * Set InvoiceID value |
||
1061 | * @param string $invoiceID |
||
1062 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1063 | */ |
||
1064 | public function setInvoiceID($invoiceID = null) |
||
1065 | { |
||
1066 | // validation for constraint: string |
||
1067 | if (!is_null($invoiceID) && !is_string($invoiceID)) { |
||
1068 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($invoiceID, true), gettype($invoiceID)), __LINE__); |
||
1069 | } |
||
1070 | $this->InvoiceID = $invoiceID; |
||
1071 | return $this; |
||
1072 | } |
||
1073 | /** |
||
1074 | * Get ReqConfirmShipping value |
||
1075 | * @return string|null |
||
1076 | */ |
||
1077 | public function getReqConfirmShipping() |
||
1078 | { |
||
1079 | return $this->ReqConfirmShipping; |
||
1080 | } |
||
1081 | /** |
||
1082 | * Set ReqConfirmShipping value |
||
1083 | * @param string $reqConfirmShipping |
||
1084 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1085 | */ |
||
1086 | public function setReqConfirmShipping($reqConfirmShipping = null) |
||
1087 | { |
||
1088 | // validation for constraint: string |
||
1089 | if (!is_null($reqConfirmShipping) && !is_string($reqConfirmShipping)) { |
||
1090 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($reqConfirmShipping, true), gettype($reqConfirmShipping)), __LINE__); |
||
1091 | } |
||
1092 | $this->ReqConfirmShipping = $reqConfirmShipping; |
||
1093 | return $this; |
||
1094 | } |
||
1095 | /** |
||
1096 | * Get ReqBillingAddress value |
||
1097 | * @return string|null |
||
1098 | */ |
||
1099 | public function getReqBillingAddress() |
||
1100 | { |
||
1101 | return $this->ReqBillingAddress; |
||
1102 | } |
||
1103 | /** |
||
1104 | * Set ReqBillingAddress value |
||
1105 | * @param string $reqBillingAddress |
||
1106 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1107 | */ |
||
1108 | public function setReqBillingAddress($reqBillingAddress = null) |
||
1109 | { |
||
1110 | // validation for constraint: string |
||
1111 | if (!is_null($reqBillingAddress) && !is_string($reqBillingAddress)) { |
||
1112 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($reqBillingAddress, true), gettype($reqBillingAddress)), __LINE__); |
||
1113 | } |
||
1114 | $this->ReqBillingAddress = $reqBillingAddress; |
||
1115 | return $this; |
||
1116 | } |
||
1117 | /** |
||
1118 | * Get BillingAddress value |
||
1119 | * @return \PayPal\StructType\AddressType|null |
||
1120 | */ |
||
1121 | public function getBillingAddress() |
||
1122 | { |
||
1123 | return $this->BillingAddress; |
||
1124 | } |
||
1125 | /** |
||
1126 | * Set BillingAddress value |
||
1127 | * @param \PayPal\StructType\AddressType $billingAddress |
||
1128 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1129 | */ |
||
1130 | public function setBillingAddress(\PayPal\StructType\AddressType $billingAddress = null) |
||
1134 | } |
||
1135 | /** |
||
1136 | * Get NoShipping value |
||
1137 | * @return string|null |
||
1138 | */ |
||
1139 | public function getNoShipping() |
||
1140 | { |
||
1141 | return $this->NoShipping; |
||
1142 | } |
||
1143 | /** |
||
1144 | * Set NoShipping value |
||
1145 | * @param string $noShipping |
||
1146 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1147 | */ |
||
1148 | public function setNoShipping($noShipping = null) |
||
1149 | { |
||
1150 | // validation for constraint: string |
||
1151 | if (!is_null($noShipping) && !is_string($noShipping)) { |
||
1152 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($noShipping, true), gettype($noShipping)), __LINE__); |
||
1153 | } |
||
1154 | $this->NoShipping = $noShipping; |
||
1155 | return $this; |
||
1156 | } |
||
1157 | /** |
||
1158 | * Get AddressOverride value |
||
1159 | * @return string|null |
||
1160 | */ |
||
1161 | public function getAddressOverride() |
||
1162 | { |
||
1163 | return $this->AddressOverride; |
||
1164 | } |
||
1165 | /** |
||
1166 | * Set AddressOverride value |
||
1167 | * @param string $addressOverride |
||
1168 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1169 | */ |
||
1170 | public function setAddressOverride($addressOverride = null) |
||
1171 | { |
||
1172 | // validation for constraint: string |
||
1173 | if (!is_null($addressOverride) && !is_string($addressOverride)) { |
||
1174 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($addressOverride, true), gettype($addressOverride)), __LINE__); |
||
1175 | } |
||
1176 | $this->AddressOverride = $addressOverride; |
||
1177 | return $this; |
||
1178 | } |
||
1179 | /** |
||
1180 | * Get LocaleCode value |
||
1181 | * @return string|null |
||
1182 | */ |
||
1183 | public function getLocaleCode() |
||
1184 | { |
||
1185 | return $this->LocaleCode; |
||
1186 | } |
||
1187 | /** |
||
1188 | * Set LocaleCode value |
||
1189 | * @param string $localeCode |
||
1190 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1191 | */ |
||
1192 | public function setLocaleCode($localeCode = null) |
||
1193 | { |
||
1194 | // validation for constraint: string |
||
1195 | if (!is_null($localeCode) && !is_string($localeCode)) { |
||
1196 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($localeCode, true), gettype($localeCode)), __LINE__); |
||
1197 | } |
||
1198 | $this->LocaleCode = $localeCode; |
||
1199 | return $this; |
||
1200 | } |
||
1201 | /** |
||
1202 | * Get PageStyle value |
||
1203 | * @return string|null |
||
1204 | */ |
||
1205 | public function getPageStyle() |
||
1206 | { |
||
1207 | return $this->PageStyle; |
||
1208 | } |
||
1209 | /** |
||
1210 | * Set PageStyle value |
||
1211 | * @param string $pageStyle |
||
1212 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1213 | */ |
||
1214 | public function setPageStyle($pageStyle = null) |
||
1215 | { |
||
1216 | // validation for constraint: string |
||
1217 | if (!is_null($pageStyle) && !is_string($pageStyle)) { |
||
1218 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($pageStyle, true), gettype($pageStyle)), __LINE__); |
||
1219 | } |
||
1220 | $this->PageStyle = $pageStyle; |
||
1221 | return $this; |
||
1222 | } |
||
1223 | /** |
||
1224 | * Get cpp_header_image value |
||
1225 | * @return string|null |
||
1226 | */ |
||
1227 | public function getCpp_header_image() |
||
1228 | { |
||
1229 | return $this->{'cpp-header-image'}; |
||
1230 | } |
||
1231 | /** |
||
1232 | * Set cpp_header_image value |
||
1233 | * @param string $cpp_header_image |
||
1234 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1235 | */ |
||
1236 | public function setCpp_header_image($cpp_header_image = null) |
||
1237 | { |
||
1238 | // validation for constraint: string |
||
1239 | if (!is_null($cpp_header_image) && !is_string($cpp_header_image)) { |
||
1240 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cpp_header_image, true), gettype($cpp_header_image)), __LINE__); |
||
1241 | } |
||
1242 | $this->cpp_header_image = $this->{'cpp-header-image'} = $cpp_header_image; |
||
1243 | return $this; |
||
1244 | } |
||
1245 | /** |
||
1246 | * Get cpp_header_border_color value |
||
1247 | * @return string|null |
||
1248 | */ |
||
1249 | public function getCpp_header_border_color() |
||
1250 | { |
||
1251 | return $this->{'cpp-header-border-color'}; |
||
1252 | } |
||
1253 | /** |
||
1254 | * Set cpp_header_border_color value |
||
1255 | * @param string $cpp_header_border_color |
||
1256 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1257 | */ |
||
1258 | public function setCpp_header_border_color($cpp_header_border_color = null) |
||
1259 | { |
||
1260 | // validation for constraint: string |
||
1261 | if (!is_null($cpp_header_border_color) && !is_string($cpp_header_border_color)) { |
||
1262 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cpp_header_border_color, true), gettype($cpp_header_border_color)), __LINE__); |
||
1263 | } |
||
1264 | $this->cpp_header_border_color = $this->{'cpp-header-border-color'} = $cpp_header_border_color; |
||
1265 | return $this; |
||
1266 | } |
||
1267 | /** |
||
1268 | * Get cpp_header_back_color value |
||
1269 | * @return string|null |
||
1270 | */ |
||
1271 | public function getCpp_header_back_color() |
||
1272 | { |
||
1273 | return $this->{'cpp-header-back-color'}; |
||
1274 | } |
||
1275 | /** |
||
1276 | * Set cpp_header_back_color value |
||
1277 | * @param string $cpp_header_back_color |
||
1278 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1279 | */ |
||
1280 | public function setCpp_header_back_color($cpp_header_back_color = null) |
||
1281 | { |
||
1282 | // validation for constraint: string |
||
1283 | if (!is_null($cpp_header_back_color) && !is_string($cpp_header_back_color)) { |
||
1284 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cpp_header_back_color, true), gettype($cpp_header_back_color)), __LINE__); |
||
1285 | } |
||
1286 | $this->cpp_header_back_color = $this->{'cpp-header-back-color'} = $cpp_header_back_color; |
||
1287 | return $this; |
||
1288 | } |
||
1289 | /** |
||
1290 | * Get cpp_payflow_color value |
||
1291 | * @return string|null |
||
1292 | */ |
||
1293 | public function getCpp_payflow_color() |
||
1294 | { |
||
1295 | return $this->{'cpp-payflow-color'}; |
||
1296 | } |
||
1297 | /** |
||
1298 | * Set cpp_payflow_color value |
||
1299 | * @param string $cpp_payflow_color |
||
1300 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1301 | */ |
||
1302 | public function setCpp_payflow_color($cpp_payflow_color = null) |
||
1303 | { |
||
1304 | // validation for constraint: string |
||
1305 | if (!is_null($cpp_payflow_color) && !is_string($cpp_payflow_color)) { |
||
1306 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cpp_payflow_color, true), gettype($cpp_payflow_color)), __LINE__); |
||
1307 | } |
||
1308 | $this->cpp_payflow_color = $this->{'cpp-payflow-color'} = $cpp_payflow_color; |
||
1309 | return $this; |
||
1310 | } |
||
1311 | /** |
||
1312 | * Get cpp_cart_border_color value |
||
1313 | * @return string|null |
||
1314 | */ |
||
1315 | public function getCpp_cart_border_color() |
||
1316 | { |
||
1317 | return $this->{'cpp-cart-border-color'}; |
||
1318 | } |
||
1319 | /** |
||
1320 | * Set cpp_cart_border_color value |
||
1321 | * @param string $cpp_cart_border_color |
||
1322 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1323 | */ |
||
1324 | public function setCpp_cart_border_color($cpp_cart_border_color = null) |
||
1325 | { |
||
1326 | // validation for constraint: string |
||
1327 | if (!is_null($cpp_cart_border_color) && !is_string($cpp_cart_border_color)) { |
||
1328 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cpp_cart_border_color, true), gettype($cpp_cart_border_color)), __LINE__); |
||
1329 | } |
||
1330 | $this->cpp_cart_border_color = $this->{'cpp-cart-border-color'} = $cpp_cart_border_color; |
||
1331 | return $this; |
||
1332 | } |
||
1333 | /** |
||
1334 | * Get cpp_logo_image value |
||
1335 | * @return string|null |
||
1336 | */ |
||
1337 | public function getCpp_logo_image() |
||
1338 | { |
||
1339 | return $this->{'cpp-logo-image'}; |
||
1340 | } |
||
1341 | /** |
||
1342 | * Set cpp_logo_image value |
||
1343 | * @param string $cpp_logo_image |
||
1344 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1345 | */ |
||
1346 | public function setCpp_logo_image($cpp_logo_image = null) |
||
1347 | { |
||
1348 | // validation for constraint: string |
||
1349 | if (!is_null($cpp_logo_image) && !is_string($cpp_logo_image)) { |
||
1350 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cpp_logo_image, true), gettype($cpp_logo_image)), __LINE__); |
||
1351 | } |
||
1352 | $this->cpp_logo_image = $this->{'cpp-logo-image'} = $cpp_logo_image; |
||
1353 | return $this; |
||
1354 | } |
||
1355 | /** |
||
1356 | * Get Address value |
||
1357 | * @return \PayPal\StructType\AddressType|null |
||
1358 | */ |
||
1359 | public function getAddress() |
||
1360 | { |
||
1361 | return $this->Address; |
||
1362 | } |
||
1363 | /** |
||
1364 | * Set Address value |
||
1365 | * @param \PayPal\StructType\AddressType $address |
||
1366 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1367 | */ |
||
1368 | public function setAddress(\PayPal\StructType\AddressType $address = null) |
||
1369 | { |
||
1370 | $this->Address = $address; |
||
1371 | return $this; |
||
1372 | } |
||
1373 | /** |
||
1374 | * Get PaymentAction value |
||
1375 | * @return string|null |
||
1376 | */ |
||
1377 | public function getPaymentAction() |
||
1378 | { |
||
1379 | return $this->PaymentAction; |
||
1380 | } |
||
1381 | /** |
||
1382 | * Set PaymentAction value |
||
1383 | * @uses \PayPal\EnumType\PaymentActionCodeType::valueIsValid() |
||
1384 | * @uses \PayPal\EnumType\PaymentActionCodeType::getValidValues() |
||
1385 | * @throws \InvalidArgumentException |
||
1386 | * @param string $paymentAction |
||
1387 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1388 | */ |
||
1389 | public function setPaymentAction($paymentAction = null) |
||
1390 | { |
||
1391 | // validation for constraint: enumeration |
||
1392 | if (!\PayPal\EnumType\PaymentActionCodeType::valueIsValid($paymentAction)) { |
||
1393 | 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__); |
||
1394 | } |
||
1395 | $this->PaymentAction = $paymentAction; |
||
1396 | return $this; |
||
1397 | } |
||
1398 | /** |
||
1399 | * Get SolutionType value |
||
1400 | * @return string|null |
||
1401 | */ |
||
1402 | public function getSolutionType() |
||
1403 | { |
||
1404 | return $this->SolutionType; |
||
1405 | } |
||
1406 | /** |
||
1407 | * Set SolutionType value |
||
1408 | * @uses \PayPal\EnumType\SolutionTypeType::valueIsValid() |
||
1409 | * @uses \PayPal\EnumType\SolutionTypeType::getValidValues() |
||
1410 | * @throws \InvalidArgumentException |
||
1411 | * @param string $solutionType |
||
1412 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1413 | */ |
||
1414 | public function setSolutionType($solutionType = null) |
||
1415 | { |
||
1416 | // validation for constraint: enumeration |
||
1417 | if (!\PayPal\EnumType\SolutionTypeType::valueIsValid($solutionType)) { |
||
1418 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\SolutionTypeType', is_array($solutionType) ? implode(', ', $solutionType) : var_export($solutionType, true), implode(', ', \PayPal\EnumType\SolutionTypeType::getValidValues())), __LINE__); |
||
1419 | } |
||
1420 | $this->SolutionType = $solutionType; |
||
1421 | return $this; |
||
1422 | } |
||
1423 | /** |
||
1424 | * Get LandingPage value |
||
1425 | * @return string|null |
||
1426 | */ |
||
1427 | public function getLandingPage() |
||
1428 | { |
||
1429 | return $this->LandingPage; |
||
1430 | } |
||
1431 | /** |
||
1432 | * Set LandingPage value |
||
1433 | * @uses \PayPal\EnumType\LandingPageType::valueIsValid() |
||
1434 | * @uses \PayPal\EnumType\LandingPageType::getValidValues() |
||
1435 | * @throws \InvalidArgumentException |
||
1436 | * @param string $landingPage |
||
1437 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1438 | */ |
||
1439 | public function setLandingPage($landingPage = null) |
||
1440 | { |
||
1441 | // validation for constraint: enumeration |
||
1442 | if (!\PayPal\EnumType\LandingPageType::valueIsValid($landingPage)) { |
||
1443 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\LandingPageType', is_array($landingPage) ? implode(', ', $landingPage) : var_export($landingPage, true), implode(', ', \PayPal\EnumType\LandingPageType::getValidValues())), __LINE__); |
||
1444 | } |
||
1445 | $this->LandingPage = $landingPage; |
||
1446 | return $this; |
||
1447 | } |
||
1448 | /** |
||
1449 | * Get BuyerEmail value |
||
1450 | * @return string|null |
||
1451 | */ |
||
1452 | public function getBuyerEmail() |
||
1453 | { |
||
1454 | return $this->BuyerEmail; |
||
1455 | } |
||
1456 | /** |
||
1457 | * Set BuyerEmail value |
||
1458 | * @param string $buyerEmail |
||
1459 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1460 | */ |
||
1461 | public function setBuyerEmail($buyerEmail = null) |
||
1462 | { |
||
1463 | // validation for constraint: string |
||
1464 | if (!is_null($buyerEmail) && !is_string($buyerEmail)) { |
||
1465 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($buyerEmail, true), gettype($buyerEmail)), __LINE__); |
||
1466 | } |
||
1467 | $this->BuyerEmail = $buyerEmail; |
||
1468 | return $this; |
||
1469 | } |
||
1470 | /** |
||
1471 | * Get ChannelType value |
||
1472 | * @return string|null |
||
1473 | */ |
||
1474 | public function getChannelType() |
||
1475 | { |
||
1476 | return $this->ChannelType; |
||
1477 | } |
||
1478 | /** |
||
1479 | * Set ChannelType value |
||
1480 | * @uses \PayPal\EnumType\ChannelType::valueIsValid() |
||
1481 | * @uses \PayPal\EnumType\ChannelType::getValidValues() |
||
1482 | * @throws \InvalidArgumentException |
||
1483 | * @param string $channelType |
||
1484 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1485 | */ |
||
1486 | public function setChannelType($channelType = null) |
||
1487 | { |
||
1488 | // validation for constraint: enumeration |
||
1489 | if (!\PayPal\EnumType\ChannelType::valueIsValid($channelType)) { |
||
1490 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\ChannelType', is_array($channelType) ? implode(', ', $channelType) : var_export($channelType, true), implode(', ', \PayPal\EnumType\ChannelType::getValidValues())), __LINE__); |
||
1491 | } |
||
1492 | $this->ChannelType = $channelType; |
||
1493 | return $this; |
||
1494 | } |
||
1495 | /** |
||
1496 | * Get BillingAgreementDetails value |
||
1497 | * @return \PayPal\StructType\BillingAgreementDetailsType[]|null |
||
1498 | */ |
||
1499 | public function getBillingAgreementDetails() |
||
1500 | { |
||
1501 | return $this->BillingAgreementDetails; |
||
1502 | } |
||
1503 | /** |
||
1504 | * This method is responsible for validating the values passed to the setBillingAgreementDetails method |
||
1505 | * This method is willingly generated in order to preserve the one-line inline validation within the setBillingAgreementDetails method |
||
1506 | * @param array $values |
||
1507 | * @return string A non-empty message if the values does not match the validation rules |
||
1508 | */ |
||
1509 | public static function validateBillingAgreementDetailsForArrayConstraintsFromSetBillingAgreementDetails(array $values = array()) |
||
1510 | { |
||
1511 | $message = ''; |
||
1512 | $invalidValues = []; |
||
1513 | foreach ($values as $setExpressCheckoutRequestDetailsTypeBillingAgreementDetailsItem) { |
||
1514 | // validation for constraint: itemType |
||
1515 | if (!$setExpressCheckoutRequestDetailsTypeBillingAgreementDetailsItem instanceof \PayPal\StructType\BillingAgreementDetailsType) { |
||
1516 | $invalidValues[] = is_object($setExpressCheckoutRequestDetailsTypeBillingAgreementDetailsItem) ? get_class($setExpressCheckoutRequestDetailsTypeBillingAgreementDetailsItem) : sprintf('%s(%s)', gettype($setExpressCheckoutRequestDetailsTypeBillingAgreementDetailsItem), var_export($setExpressCheckoutRequestDetailsTypeBillingAgreementDetailsItem, true)); |
||
1517 | } |
||
1518 | } |
||
1519 | if (!empty($invalidValues)) { |
||
1520 | $message = sprintf('The BillingAgreementDetails property can only contain items of type \PayPal\StructType\BillingAgreementDetailsType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues))); |
||
1521 | } |
||
1522 | unset($invalidValues); |
||
1523 | return $message; |
||
1524 | } |
||
1525 | /** |
||
1526 | * Set BillingAgreementDetails value |
||
1527 | * @throws \InvalidArgumentException |
||
1528 | * @param \PayPal\StructType\BillingAgreementDetailsType[] $billingAgreementDetails |
||
1529 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1530 | */ |
||
1531 | public function setBillingAgreementDetails(array $billingAgreementDetails = array()) |
||
1532 | { |
||
1533 | // validation for constraint: array |
||
1534 | if ('' !== ($billingAgreementDetailsArrayErrorMessage = self::validateBillingAgreementDetailsForArrayConstraintsFromSetBillingAgreementDetails($billingAgreementDetails))) { |
||
1535 | throw new \InvalidArgumentException($billingAgreementDetailsArrayErrorMessage, __LINE__); |
||
1536 | } |
||
1537 | $this->BillingAgreementDetails = $billingAgreementDetails; |
||
1538 | return $this; |
||
1539 | } |
||
1540 | /** |
||
1541 | * Add item to BillingAgreementDetails value |
||
1542 | * @throws \InvalidArgumentException |
||
1543 | * @param \PayPal\StructType\BillingAgreementDetailsType $item |
||
1544 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1545 | */ |
||
1546 | public function addToBillingAgreementDetails(\PayPal\StructType\BillingAgreementDetailsType $item) |
||
1547 | { |
||
1548 | // validation for constraint: itemType |
||
1549 | if (!$item instanceof \PayPal\StructType\BillingAgreementDetailsType) { |
||
1550 | throw new \InvalidArgumentException(sprintf('The BillingAgreementDetails property can only contain items of type \PayPal\StructType\BillingAgreementDetailsType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__); |
||
1551 | } |
||
1552 | $this->BillingAgreementDetails[] = $item; |
||
1553 | return $this; |
||
1554 | } |
||
1555 | /** |
||
1556 | * Get PromoCodes value |
||
1557 | * @return string[]|null |
||
1558 | */ |
||
1559 | public function getPromoCodes() |
||
1560 | { |
||
1561 | return $this->PromoCodes; |
||
1562 | } |
||
1563 | /** |
||
1564 | * This method is responsible for validating the values passed to the setPromoCodes method |
||
1565 | * This method is willingly generated in order to preserve the one-line inline validation within the setPromoCodes method |
||
1566 | * @param array $values |
||
1567 | * @return string A non-empty message if the values does not match the validation rules |
||
1568 | */ |
||
1569 | public static function validatePromoCodesForArrayConstraintsFromSetPromoCodes(array $values = array()) |
||
1570 | { |
||
1571 | $message = ''; |
||
1572 | $invalidValues = []; |
||
1573 | foreach ($values as $setExpressCheckoutRequestDetailsTypePromoCodesItem) { |
||
1574 | // validation for constraint: itemType |
||
1575 | if (!is_string($setExpressCheckoutRequestDetailsTypePromoCodesItem)) { |
||
1576 | $invalidValues[] = is_object($setExpressCheckoutRequestDetailsTypePromoCodesItem) ? get_class($setExpressCheckoutRequestDetailsTypePromoCodesItem) : sprintf('%s(%s)', gettype($setExpressCheckoutRequestDetailsTypePromoCodesItem), var_export($setExpressCheckoutRequestDetailsTypePromoCodesItem, true)); |
||
1577 | } |
||
1578 | } |
||
1579 | if (!empty($invalidValues)) { |
||
1580 | $message = sprintf('The PromoCodes property can only contain items of type string, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues))); |
||
1581 | } |
||
1582 | unset($invalidValues); |
||
1583 | return $message; |
||
1584 | } |
||
1585 | /** |
||
1586 | * Set PromoCodes value |
||
1587 | * @throws \InvalidArgumentException |
||
1588 | * @param string[] $promoCodes |
||
1589 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1590 | */ |
||
1591 | public function setPromoCodes(array $promoCodes = array()) |
||
1592 | { |
||
1593 | // validation for constraint: array |
||
1594 | if ('' !== ($promoCodesArrayErrorMessage = self::validatePromoCodesForArrayConstraintsFromSetPromoCodes($promoCodes))) { |
||
1595 | throw new \InvalidArgumentException($promoCodesArrayErrorMessage, __LINE__); |
||
1596 | } |
||
1597 | $this->PromoCodes = $promoCodes; |
||
1598 | return $this; |
||
1599 | } |
||
1600 | /** |
||
1601 | * Add item to PromoCodes value |
||
1602 | * @throws \InvalidArgumentException |
||
1603 | * @param string $item |
||
1604 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1605 | */ |
||
1606 | public function addToPromoCodes($item) |
||
1607 | { |
||
1608 | // validation for constraint: itemType |
||
1609 | if (!is_string($item)) { |
||
1610 | throw new \InvalidArgumentException(sprintf('The PromoCodes property can only contain items of type string, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__); |
||
1611 | } |
||
1612 | $this->PromoCodes[] = $item; |
||
1613 | return $this; |
||
1614 | } |
||
1615 | /** |
||
1616 | * Get PayPalCheckOutBtnType value |
||
1617 | * @return string|null |
||
1618 | */ |
||
1619 | public function getPayPalCheckOutBtnType() |
||
1620 | { |
||
1621 | return $this->PayPalCheckOutBtnType; |
||
1622 | } |
||
1623 | /** |
||
1624 | * Set PayPalCheckOutBtnType value |
||
1625 | * @param string $payPalCheckOutBtnType |
||
1626 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1627 | */ |
||
1628 | public function setPayPalCheckOutBtnType($payPalCheckOutBtnType = null) |
||
1629 | { |
||
1630 | // validation for constraint: string |
||
1631 | if (!is_null($payPalCheckOutBtnType) && !is_string($payPalCheckOutBtnType)) { |
||
1632 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($payPalCheckOutBtnType, true), gettype($payPalCheckOutBtnType)), __LINE__); |
||
1633 | } |
||
1634 | $this->PayPalCheckOutBtnType = $payPalCheckOutBtnType; |
||
1635 | return $this; |
||
1636 | } |
||
1637 | /** |
||
1638 | * Get ProductCategory value |
||
1639 | * @return string|null |
||
1640 | */ |
||
1641 | public function getProductCategory() |
||
1642 | { |
||
1643 | return $this->ProductCategory; |
||
1644 | } |
||
1645 | /** |
||
1646 | * Set ProductCategory value |
||
1647 | * @uses \PayPal\EnumType\ProductCategoryType::valueIsValid() |
||
1648 | * @uses \PayPal\EnumType\ProductCategoryType::getValidValues() |
||
1649 | * @throws \InvalidArgumentException |
||
1650 | * @param string $productCategory |
||
1651 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1652 | */ |
||
1653 | public function setProductCategory($productCategory = null) |
||
1654 | { |
||
1655 | // validation for constraint: enumeration |
||
1656 | if (!\PayPal\EnumType\ProductCategoryType::valueIsValid($productCategory)) { |
||
1657 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\ProductCategoryType', is_array($productCategory) ? implode(', ', $productCategory) : var_export($productCategory, true), implode(', ', \PayPal\EnumType\ProductCategoryType::getValidValues())), __LINE__); |
||
1658 | } |
||
1659 | $this->ProductCategory = $productCategory; |
||
1660 | return $this; |
||
1661 | } |
||
1662 | /** |
||
1663 | * Get ShippingMethod value |
||
1664 | * @return string|null |
||
1665 | */ |
||
1666 | public function getShippingMethod() |
||
1667 | { |
||
1668 | return $this->ShippingMethod; |
||
1669 | } |
||
1670 | /** |
||
1671 | * Set ShippingMethod value |
||
1672 | * @uses \PayPal\EnumType\ShippingServiceCodeType::valueIsValid() |
||
1673 | * @uses \PayPal\EnumType\ShippingServiceCodeType::getValidValues() |
||
1674 | * @throws \InvalidArgumentException |
||
1675 | * @param string $shippingMethod |
||
1676 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1677 | */ |
||
1678 | public function setShippingMethod($shippingMethod = null) |
||
1679 | { |
||
1680 | // validation for constraint: enumeration |
||
1681 | if (!\PayPal\EnumType\ShippingServiceCodeType::valueIsValid($shippingMethod)) { |
||
1682 | 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__); |
||
1683 | } |
||
1684 | $this->ShippingMethod = $shippingMethod; |
||
1685 | return $this; |
||
1686 | } |
||
1687 | /** |
||
1688 | * Get ProfileAddressChangeDate value |
||
1689 | * @return string|null |
||
1690 | */ |
||
1691 | public function getProfileAddressChangeDate() |
||
1692 | { |
||
1693 | return $this->ProfileAddressChangeDate; |
||
1694 | } |
||
1695 | /** |
||
1696 | * Set ProfileAddressChangeDate value |
||
1697 | * @param string $profileAddressChangeDate |
||
1698 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1699 | */ |
||
1700 | public function setProfileAddressChangeDate($profileAddressChangeDate = null) |
||
1701 | { |
||
1702 | // validation for constraint: string |
||
1703 | if (!is_null($profileAddressChangeDate) && !is_string($profileAddressChangeDate)) { |
||
1704 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($profileAddressChangeDate, true), gettype($profileAddressChangeDate)), __LINE__); |
||
1705 | } |
||
1706 | $this->ProfileAddressChangeDate = $profileAddressChangeDate; |
||
1707 | return $this; |
||
1708 | } |
||
1709 | /** |
||
1710 | * Get AllowNote value |
||
1711 | * @return string|null |
||
1712 | */ |
||
1713 | public function getAllowNote() |
||
1714 | { |
||
1715 | return $this->AllowNote; |
||
1716 | } |
||
1717 | /** |
||
1718 | * Set AllowNote value |
||
1719 | * @param string $allowNote |
||
1720 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1721 | */ |
||
1722 | public function setAllowNote($allowNote = null) |
||
1723 | { |
||
1724 | // validation for constraint: string |
||
1725 | if (!is_null($allowNote) && !is_string($allowNote)) { |
||
1726 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($allowNote, true), gettype($allowNote)), __LINE__); |
||
1727 | } |
||
1728 | $this->AllowNote = $allowNote; |
||
1729 | return $this; |
||
1730 | } |
||
1731 | /** |
||
1732 | * Get FundingSourceDetails value |
||
1733 | * @return \PayPal\StructType\FundingSourceDetailsType|null |
||
1734 | */ |
||
1735 | public function getFundingSourceDetails() |
||
1736 | { |
||
1737 | return $this->FundingSourceDetails; |
||
1738 | } |
||
1739 | /** |
||
1740 | * Set FundingSourceDetails value |
||
1741 | * @param \PayPal\StructType\FundingSourceDetailsType $fundingSourceDetails |
||
1742 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1743 | */ |
||
1744 | public function setFundingSourceDetails(\PayPal\StructType\FundingSourceDetailsType $fundingSourceDetails = null) |
||
1745 | { |
||
1746 | $this->FundingSourceDetails = $fundingSourceDetails; |
||
1747 | return $this; |
||
1748 | } |
||
1749 | /** |
||
1750 | * Get BrandName value |
||
1751 | * @return string|null |
||
1752 | */ |
||
1753 | public function getBrandName() |
||
1754 | { |
||
1755 | return $this->BrandName; |
||
1756 | } |
||
1757 | /** |
||
1758 | * Set BrandName value |
||
1759 | * @param string $brandName |
||
1760 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1761 | */ |
||
1762 | public function setBrandName($brandName = null) |
||
1763 | { |
||
1764 | // validation for constraint: string |
||
1765 | if (!is_null($brandName) && !is_string($brandName)) { |
||
1766 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($brandName, true), gettype($brandName)), __LINE__); |
||
1767 | } |
||
1768 | $this->BrandName = $brandName; |
||
1769 | return $this; |
||
1770 | } |
||
1771 | /** |
||
1772 | * Get CallbackURL value |
||
1773 | * @return string|null |
||
1774 | */ |
||
1775 | public function getCallbackURL() |
||
1776 | { |
||
1777 | return $this->CallbackURL; |
||
1778 | } |
||
1779 | /** |
||
1780 | * Set CallbackURL value |
||
1781 | * @param string $callbackURL |
||
1782 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1783 | */ |
||
1784 | public function setCallbackURL($callbackURL = null) |
||
1785 | { |
||
1786 | // validation for constraint: string |
||
1787 | if (!is_null($callbackURL) && !is_string($callbackURL)) { |
||
1788 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($callbackURL, true), gettype($callbackURL)), __LINE__); |
||
1789 | } |
||
1790 | $this->CallbackURL = $callbackURL; |
||
1791 | return $this; |
||
1792 | } |
||
1793 | /** |
||
1794 | * Get EnhancedCheckoutData value |
||
1795 | * @return \PayPal\StructType\EnhancedCheckoutDataType|null |
||
1796 | */ |
||
1797 | public function getEnhancedCheckoutData() |
||
1798 | { |
||
1799 | return $this->EnhancedCheckoutData; |
||
1800 | } |
||
1801 | /** |
||
1802 | * Set EnhancedCheckoutData value |
||
1803 | * @param \PayPal\StructType\EnhancedCheckoutDataType $enhancedCheckoutData |
||
1804 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1805 | */ |
||
1806 | public function setEnhancedCheckoutData(\PayPal\StructType\EnhancedCheckoutDataType $enhancedCheckoutData = null) |
||
1807 | { |
||
1808 | $this->EnhancedCheckoutData = $enhancedCheckoutData; |
||
1809 | return $this; |
||
1810 | } |
||
1811 | /** |
||
1812 | * Get OtherPaymentMethods value |
||
1813 | * @return \PayPal\StructType\OtherPaymentMethodDetailsType[]|null |
||
1814 | */ |
||
1815 | public function getOtherPaymentMethods() |
||
1816 | { |
||
1817 | return $this->OtherPaymentMethods; |
||
1818 | } |
||
1819 | /** |
||
1820 | * This method is responsible for validating the values passed to the setOtherPaymentMethods method |
||
1821 | * This method is willingly generated in order to preserve the one-line inline validation within the setOtherPaymentMethods method |
||
1822 | * @param array $values |
||
1823 | * @return string A non-empty message if the values does not match the validation rules |
||
1824 | */ |
||
1825 | public static function validateOtherPaymentMethodsForArrayConstraintsFromSetOtherPaymentMethods(array $values = array()) |
||
1826 | { |
||
1827 | $message = ''; |
||
1828 | $invalidValues = []; |
||
1829 | foreach ($values as $setExpressCheckoutRequestDetailsTypeOtherPaymentMethodsItem) { |
||
1830 | // validation for constraint: itemType |
||
1831 | if (!$setExpressCheckoutRequestDetailsTypeOtherPaymentMethodsItem instanceof \PayPal\StructType\OtherPaymentMethodDetailsType) { |
||
1832 | $invalidValues[] = is_object($setExpressCheckoutRequestDetailsTypeOtherPaymentMethodsItem) ? get_class($setExpressCheckoutRequestDetailsTypeOtherPaymentMethodsItem) : sprintf('%s(%s)', gettype($setExpressCheckoutRequestDetailsTypeOtherPaymentMethodsItem), var_export($setExpressCheckoutRequestDetailsTypeOtherPaymentMethodsItem, true)); |
||
1833 | } |
||
1834 | } |
||
1835 | if (!empty($invalidValues)) { |
||
1836 | $message = sprintf('The OtherPaymentMethods property can only contain items of type \PayPal\StructType\OtherPaymentMethodDetailsType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues))); |
||
1837 | } |
||
1838 | unset($invalidValues); |
||
1839 | return $message; |
||
1840 | } |
||
1841 | /** |
||
1842 | * Set OtherPaymentMethods value |
||
1843 | * @throws \InvalidArgumentException |
||
1844 | * @param \PayPal\StructType\OtherPaymentMethodDetailsType[] $otherPaymentMethods |
||
1845 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1846 | */ |
||
1847 | public function setOtherPaymentMethods(array $otherPaymentMethods = array()) |
||
1848 | { |
||
1849 | // validation for constraint: array |
||
1850 | if ('' !== ($otherPaymentMethodsArrayErrorMessage = self::validateOtherPaymentMethodsForArrayConstraintsFromSetOtherPaymentMethods($otherPaymentMethods))) { |
||
1851 | throw new \InvalidArgumentException($otherPaymentMethodsArrayErrorMessage, __LINE__); |
||
1852 | } |
||
1853 | $this->OtherPaymentMethods = $otherPaymentMethods; |
||
1854 | return $this; |
||
1855 | } |
||
1856 | /** |
||
1857 | * Add item to OtherPaymentMethods value |
||
1858 | * @throws \InvalidArgumentException |
||
1859 | * @param \PayPal\StructType\OtherPaymentMethodDetailsType $item |
||
1860 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1861 | */ |
||
1862 | public function addToOtherPaymentMethods(\PayPal\StructType\OtherPaymentMethodDetailsType $item) |
||
1863 | { |
||
1864 | // validation for constraint: itemType |
||
1865 | if (!$item instanceof \PayPal\StructType\OtherPaymentMethodDetailsType) { |
||
1866 | throw new \InvalidArgumentException(sprintf('The OtherPaymentMethods property can only contain items of type \PayPal\StructType\OtherPaymentMethodDetailsType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__); |
||
1867 | } |
||
1868 | $this->OtherPaymentMethods[] = $item; |
||
1869 | return $this; |
||
1870 | } |
||
1871 | /** |
||
1872 | * Get BuyerDetails value |
||
1873 | * @return \PayPal\StructType\BuyerDetailsType|null |
||
1874 | */ |
||
1875 | public function getBuyerDetails() |
||
1876 | { |
||
1877 | return $this->BuyerDetails; |
||
1878 | } |
||
1879 | /** |
||
1880 | * Set BuyerDetails value |
||
1881 | * @param \PayPal\StructType\BuyerDetailsType $buyerDetails |
||
1882 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1883 | */ |
||
1884 | public function setBuyerDetails(\PayPal\StructType\BuyerDetailsType $buyerDetails = null) |
||
1885 | { |
||
1886 | $this->BuyerDetails = $buyerDetails; |
||
1887 | return $this; |
||
1888 | } |
||
1889 | /** |
||
1890 | * Get PaymentDetails value |
||
1891 | * @return \PayPal\StructType\PaymentDetailsType[]|null |
||
1892 | */ |
||
1893 | public function getPaymentDetails() |
||
1894 | { |
||
1895 | return $this->PaymentDetails; |
||
1896 | } |
||
1897 | /** |
||
1898 | * This method is responsible for validating the values passed to the setPaymentDetails method |
||
1899 | * This method is willingly generated in order to preserve the one-line inline validation within the setPaymentDetails method |
||
1900 | * @param array $values |
||
1901 | * @return string A non-empty message if the values does not match the validation rules |
||
1902 | */ |
||
1903 | public static function validatePaymentDetailsForArrayConstraintsFromSetPaymentDetails(array $values = array()) |
||
1904 | { |
||
1905 | $message = ''; |
||
1906 | $invalidValues = []; |
||
1907 | foreach ($values as $setExpressCheckoutRequestDetailsTypePaymentDetailsItem) { |
||
1908 | // validation for constraint: itemType |
||
1909 | if (!$setExpressCheckoutRequestDetailsTypePaymentDetailsItem instanceof \PayPal\StructType\PaymentDetailsType) { |
||
1910 | $invalidValues[] = is_object($setExpressCheckoutRequestDetailsTypePaymentDetailsItem) ? get_class($setExpressCheckoutRequestDetailsTypePaymentDetailsItem) : sprintf('%s(%s)', gettype($setExpressCheckoutRequestDetailsTypePaymentDetailsItem), var_export($setExpressCheckoutRequestDetailsTypePaymentDetailsItem, true)); |
||
1911 | } |
||
1912 | } |
||
1913 | if (!empty($invalidValues)) { |
||
1914 | $message = sprintf('The PaymentDetails property can only contain items of type \PayPal\StructType\PaymentDetailsType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues))); |
||
1915 | } |
||
1916 | unset($invalidValues); |
||
1917 | return $message; |
||
1918 | } |
||
1919 | /** |
||
1920 | * Set PaymentDetails value |
||
1921 | * @throws \InvalidArgumentException |
||
1922 | * @param \PayPal\StructType\PaymentDetailsType[] $paymentDetails |
||
1923 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1924 | */ |
||
1925 | public function setPaymentDetails(array $paymentDetails = array()) |
||
1926 | { |
||
1927 | // validation for constraint: array |
||
1928 | if ('' !== ($paymentDetailsArrayErrorMessage = self::validatePaymentDetailsForArrayConstraintsFromSetPaymentDetails($paymentDetails))) { |
||
1929 | throw new \InvalidArgumentException($paymentDetailsArrayErrorMessage, __LINE__); |
||
1930 | } |
||
1931 | // validation for constraint: maxOccurs(10) |
||
1932 | if (is_array($paymentDetails) && count($paymentDetails) > 10) { |
||
1933 | throw new \InvalidArgumentException(sprintf('Invalid count of %s, the number of elements contained by the property must be less than or equal to 10', count($paymentDetails)), __LINE__); |
||
1934 | } |
||
1935 | $this->PaymentDetails = $paymentDetails; |
||
1936 | return $this; |
||
1937 | } |
||
1938 | /** |
||
1939 | * Add item to PaymentDetails value |
||
1940 | * @throws \InvalidArgumentException |
||
1941 | * @param \PayPal\StructType\PaymentDetailsType $item |
||
1942 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1943 | */ |
||
1944 | public function addToPaymentDetails(\PayPal\StructType\PaymentDetailsType $item) |
||
1945 | { |
||
1946 | // validation for constraint: itemType |
||
1947 | if (!$item instanceof \PayPal\StructType\PaymentDetailsType) { |
||
1948 | throw new \InvalidArgumentException(sprintf('The PaymentDetails property can only contain items of type \PayPal\StructType\PaymentDetailsType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__); |
||
1949 | } |
||
1950 | // validation for constraint: maxOccurs(10) |
||
1951 | if (is_array($this->PaymentDetails) && count($this->PaymentDetails) >= 10) { |
||
1952 | 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 10', count($this->PaymentDetails)), __LINE__); |
||
1953 | } |
||
1954 | $this->PaymentDetails[] = $item; |
||
1955 | return $this; |
||
1956 | } |
||
1957 | /** |
||
1958 | * Get FlatRateShippingOptions value |
||
1959 | * @return \PayPal\StructType\ShippingOptionType[]|null |
||
1960 | */ |
||
1961 | public function getFlatRateShippingOptions() |
||
1962 | { |
||
1963 | return $this->FlatRateShippingOptions; |
||
1964 | } |
||
1965 | /** |
||
1966 | * This method is responsible for validating the values passed to the setFlatRateShippingOptions method |
||
1967 | * This method is willingly generated in order to preserve the one-line inline validation within the setFlatRateShippingOptions method |
||
1968 | * @param array $values |
||
1969 | * @return string A non-empty message if the values does not match the validation rules |
||
1970 | */ |
||
1971 | public static function validateFlatRateShippingOptionsForArrayConstraintsFromSetFlatRateShippingOptions(array $values = array()) |
||
1972 | { |
||
1973 | $message = ''; |
||
1974 | $invalidValues = []; |
||
1975 | foreach ($values as $setExpressCheckoutRequestDetailsTypeFlatRateShippingOptionsItem) { |
||
1976 | // validation for constraint: itemType |
||
1977 | if (!$setExpressCheckoutRequestDetailsTypeFlatRateShippingOptionsItem instanceof \PayPal\StructType\ShippingOptionType) { |
||
1978 | $invalidValues[] = is_object($setExpressCheckoutRequestDetailsTypeFlatRateShippingOptionsItem) ? get_class($setExpressCheckoutRequestDetailsTypeFlatRateShippingOptionsItem) : sprintf('%s(%s)', gettype($setExpressCheckoutRequestDetailsTypeFlatRateShippingOptionsItem), var_export($setExpressCheckoutRequestDetailsTypeFlatRateShippingOptionsItem, true)); |
||
1979 | } |
||
1980 | } |
||
1981 | if (!empty($invalidValues)) { |
||
1982 | $message = sprintf('The FlatRateShippingOptions property can only contain items of type \PayPal\StructType\ShippingOptionType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues))); |
||
1983 | } |
||
1984 | unset($invalidValues); |
||
1985 | return $message; |
||
1986 | } |
||
1987 | /** |
||
1988 | * Set FlatRateShippingOptions value |
||
1989 | * @throws \InvalidArgumentException |
||
1990 | * @param \PayPal\StructType\ShippingOptionType[] $flatRateShippingOptions |
||
1991 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
1992 | */ |
||
1993 | public function setFlatRateShippingOptions(array $flatRateShippingOptions = array()) |
||
1994 | { |
||
1995 | // validation for constraint: array |
||
1996 | if ('' !== ($flatRateShippingOptionsArrayErrorMessage = self::validateFlatRateShippingOptionsForArrayConstraintsFromSetFlatRateShippingOptions($flatRateShippingOptions))) { |
||
1997 | throw new \InvalidArgumentException($flatRateShippingOptionsArrayErrorMessage, __LINE__); |
||
1998 | } |
||
1999 | $this->FlatRateShippingOptions = $flatRateShippingOptions; |
||
2000 | return $this; |
||
2001 | } |
||
2002 | /** |
||
2003 | * Add item to FlatRateShippingOptions value |
||
2004 | * @throws \InvalidArgumentException |
||
2005 | * @param \PayPal\StructType\ShippingOptionType $item |
||
2006 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2007 | */ |
||
2008 | public function addToFlatRateShippingOptions(\PayPal\StructType\ShippingOptionType $item) |
||
2009 | { |
||
2010 | // validation for constraint: itemType |
||
2011 | if (!$item instanceof \PayPal\StructType\ShippingOptionType) { |
||
2012 | throw new \InvalidArgumentException(sprintf('The FlatRateShippingOptions property can only contain items of type \PayPal\StructType\ShippingOptionType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__); |
||
2013 | } |
||
2014 | $this->FlatRateShippingOptions[] = $item; |
||
2015 | return $this; |
||
2016 | } |
||
2017 | /** |
||
2018 | * Get CallbackTimeout value |
||
2019 | * @return string|null |
||
2020 | */ |
||
2021 | public function getCallbackTimeout() |
||
2022 | { |
||
2023 | return $this->CallbackTimeout; |
||
2024 | } |
||
2025 | /** |
||
2026 | * Set CallbackTimeout value |
||
2027 | * @param string $callbackTimeout |
||
2028 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2029 | */ |
||
2030 | public function setCallbackTimeout($callbackTimeout = null) |
||
2031 | { |
||
2032 | // validation for constraint: string |
||
2033 | if (!is_null($callbackTimeout) && !is_string($callbackTimeout)) { |
||
2034 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($callbackTimeout, true), gettype($callbackTimeout)), __LINE__); |
||
2035 | } |
||
2036 | $this->CallbackTimeout = $callbackTimeout; |
||
2037 | return $this; |
||
2038 | } |
||
2039 | /** |
||
2040 | * Get CallbackVersion value |
||
2041 | * @return string|null |
||
2042 | */ |
||
2043 | public function getCallbackVersion() |
||
2044 | { |
||
2045 | return $this->CallbackVersion; |
||
2046 | } |
||
2047 | /** |
||
2048 | * Set CallbackVersion value |
||
2049 | * @param string $callbackVersion |
||
2050 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2051 | */ |
||
2052 | public function setCallbackVersion($callbackVersion = null) |
||
2060 | } |
||
2061 | /** |
||
2062 | * Get CustomerServiceNumber value |
||
2063 | * @return string|null |
||
2064 | */ |
||
2065 | public function getCustomerServiceNumber() |
||
2066 | { |
||
2067 | return $this->CustomerServiceNumber; |
||
2068 | } |
||
2069 | /** |
||
2070 | * Set CustomerServiceNumber value |
||
2071 | * @param string $customerServiceNumber |
||
2072 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2073 | */ |
||
2074 | public function setCustomerServiceNumber($customerServiceNumber = null) |
||
2075 | { |
||
2076 | // validation for constraint: string |
||
2077 | if (!is_null($customerServiceNumber) && !is_string($customerServiceNumber)) { |
||
2078 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($customerServiceNumber, true), gettype($customerServiceNumber)), __LINE__); |
||
2079 | } |
||
2080 | $this->CustomerServiceNumber = $customerServiceNumber; |
||
2081 | return $this; |
||
2082 | } |
||
2083 | /** |
||
2084 | * Get GiftMessageEnable value |
||
2085 | * @return string|null |
||
2086 | */ |
||
2087 | public function getGiftMessageEnable() |
||
2088 | { |
||
2089 | return $this->GiftMessageEnable; |
||
2090 | } |
||
2091 | /** |
||
2092 | * Set GiftMessageEnable value |
||
2093 | * @param string $giftMessageEnable |
||
2094 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2095 | */ |
||
2096 | public function setGiftMessageEnable($giftMessageEnable = null) |
||
2097 | { |
||
2098 | // validation for constraint: string |
||
2099 | if (!is_null($giftMessageEnable) && !is_string($giftMessageEnable)) { |
||
2100 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($giftMessageEnable, true), gettype($giftMessageEnable)), __LINE__); |
||
2101 | } |
||
2102 | $this->GiftMessageEnable = $giftMessageEnable; |
||
2103 | return $this; |
||
2104 | } |
||
2105 | /** |
||
2106 | * Get GiftReceiptEnable value |
||
2107 | * @return string|null |
||
2108 | */ |
||
2109 | public function getGiftReceiptEnable() |
||
2110 | { |
||
2111 | return $this->GiftReceiptEnable; |
||
2112 | } |
||
2113 | /** |
||
2114 | * Set GiftReceiptEnable value |
||
2115 | * @param string $giftReceiptEnable |
||
2116 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2117 | */ |
||
2118 | public function setGiftReceiptEnable($giftReceiptEnable = null) |
||
2119 | { |
||
2120 | // validation for constraint: string |
||
2121 | if (!is_null($giftReceiptEnable) && !is_string($giftReceiptEnable)) { |
||
2122 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($giftReceiptEnable, true), gettype($giftReceiptEnable)), __LINE__); |
||
2123 | } |
||
2124 | $this->GiftReceiptEnable = $giftReceiptEnable; |
||
2125 | return $this; |
||
2126 | } |
||
2127 | /** |
||
2128 | * Get GiftWrapEnable value |
||
2129 | * @return string|null |
||
2130 | */ |
||
2131 | public function getGiftWrapEnable() |
||
2132 | { |
||
2133 | return $this->GiftWrapEnable; |
||
2134 | } |
||
2135 | /** |
||
2136 | * Set GiftWrapEnable value |
||
2137 | * @param string $giftWrapEnable |
||
2138 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2139 | */ |
||
2140 | public function setGiftWrapEnable($giftWrapEnable = null) |
||
2141 | { |
||
2142 | // validation for constraint: string |
||
2143 | if (!is_null($giftWrapEnable) && !is_string($giftWrapEnable)) { |
||
2144 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($giftWrapEnable, true), gettype($giftWrapEnable)), __LINE__); |
||
2145 | } |
||
2146 | $this->GiftWrapEnable = $giftWrapEnable; |
||
2147 | return $this; |
||
2148 | } |
||
2149 | /** |
||
2150 | * Get GiftWrapName value |
||
2151 | * @return string|null |
||
2152 | */ |
||
2153 | public function getGiftWrapName() |
||
2154 | { |
||
2155 | return $this->GiftWrapName; |
||
2156 | } |
||
2157 | /** |
||
2158 | * Set GiftWrapName value |
||
2159 | * @param string $giftWrapName |
||
2160 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2161 | */ |
||
2162 | public function setGiftWrapName($giftWrapName = null) |
||
2163 | { |
||
2164 | // validation for constraint: string |
||
2165 | if (!is_null($giftWrapName) && !is_string($giftWrapName)) { |
||
2166 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($giftWrapName, true), gettype($giftWrapName)), __LINE__); |
||
2167 | } |
||
2168 | $this->GiftWrapName = $giftWrapName; |
||
2169 | return $this; |
||
2170 | } |
||
2171 | /** |
||
2172 | * Get GiftWrapAmount value |
||
2173 | * @return \PayPal\StructType\BasicAmountType|null |
||
2174 | */ |
||
2175 | public function getGiftWrapAmount() |
||
2178 | } |
||
2179 | /** |
||
2180 | * Set GiftWrapAmount value |
||
2181 | * @param \PayPal\StructType\BasicAmountType $giftWrapAmount |
||
2182 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2183 | */ |
||
2184 | public function setGiftWrapAmount(\PayPal\StructType\BasicAmountType $giftWrapAmount = null) |
||
2185 | { |
||
2186 | $this->GiftWrapAmount = $giftWrapAmount; |
||
2187 | return $this; |
||
2188 | } |
||
2189 | /** |
||
2190 | * Get BuyerEmailOptInEnable value |
||
2191 | * @return string|null |
||
2192 | */ |
||
2193 | public function getBuyerEmailOptInEnable() |
||
2196 | } |
||
2197 | /** |
||
2198 | * Set BuyerEmailOptInEnable value |
||
2199 | * @param string $buyerEmailOptInEnable |
||
2200 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2201 | */ |
||
2202 | public function setBuyerEmailOptInEnable($buyerEmailOptInEnable = null) |
||
2203 | { |
||
2204 | // validation for constraint: string |
||
2205 | if (!is_null($buyerEmailOptInEnable) && !is_string($buyerEmailOptInEnable)) { |
||
2206 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($buyerEmailOptInEnable, true), gettype($buyerEmailOptInEnable)), __LINE__); |
||
2207 | } |
||
2208 | $this->BuyerEmailOptInEnable = $buyerEmailOptInEnable; |
||
2209 | return $this; |
||
2210 | } |
||
2211 | /** |
||
2212 | * Get SurveyEnable value |
||
2213 | * @return string|null |
||
2214 | */ |
||
2215 | public function getSurveyEnable() |
||
2216 | { |
||
2217 | return $this->SurveyEnable; |
||
2218 | } |
||
2219 | /** |
||
2220 | * Set SurveyEnable value |
||
2221 | * @param string $surveyEnable |
||
2222 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2223 | */ |
||
2224 | public function setSurveyEnable($surveyEnable = null) |
||
2225 | { |
||
2226 | // validation for constraint: string |
||
2227 | if (!is_null($surveyEnable) && !is_string($surveyEnable)) { |
||
2228 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($surveyEnable, true), gettype($surveyEnable)), __LINE__); |
||
2229 | } |
||
2230 | $this->SurveyEnable = $surveyEnable; |
||
2231 | return $this; |
||
2232 | } |
||
2233 | /** |
||
2234 | * Get SurveyQuestion value |
||
2235 | * @return string|null |
||
2236 | */ |
||
2237 | public function getSurveyQuestion() |
||
2238 | { |
||
2239 | return $this->SurveyQuestion; |
||
2240 | } |
||
2241 | /** |
||
2242 | * Set SurveyQuestion value |
||
2243 | * @param string $surveyQuestion |
||
2244 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2245 | */ |
||
2246 | public function setSurveyQuestion($surveyQuestion = null) |
||
2247 | { |
||
2248 | // validation for constraint: string |
||
2249 | if (!is_null($surveyQuestion) && !is_string($surveyQuestion)) { |
||
2250 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($surveyQuestion, true), gettype($surveyQuestion)), __LINE__); |
||
2251 | } |
||
2252 | $this->SurveyQuestion = $surveyQuestion; |
||
2253 | return $this; |
||
2254 | } |
||
2255 | /** |
||
2256 | * Get SurveyChoice value |
||
2257 | * @return string[]|null |
||
2258 | */ |
||
2259 | public function getSurveyChoice() |
||
2260 | { |
||
2261 | return $this->SurveyChoice; |
||
2262 | } |
||
2263 | /** |
||
2264 | * This method is responsible for validating the values passed to the setSurveyChoice method |
||
2265 | * This method is willingly generated in order to preserve the one-line inline validation within the setSurveyChoice method |
||
2266 | * @param array $values |
||
2267 | * @return string A non-empty message if the values does not match the validation rules |
||
2268 | */ |
||
2269 | public static function validateSurveyChoiceForArrayConstraintsFromSetSurveyChoice(array $values = array()) |
||
2270 | { |
||
2271 | $message = ''; |
||
2272 | $invalidValues = []; |
||
2273 | foreach ($values as $setExpressCheckoutRequestDetailsTypeSurveyChoiceItem) { |
||
2274 | // validation for constraint: itemType |
||
2275 | if (!is_string($setExpressCheckoutRequestDetailsTypeSurveyChoiceItem)) { |
||
2276 | $invalidValues[] = is_object($setExpressCheckoutRequestDetailsTypeSurveyChoiceItem) ? get_class($setExpressCheckoutRequestDetailsTypeSurveyChoiceItem) : sprintf('%s(%s)', gettype($setExpressCheckoutRequestDetailsTypeSurveyChoiceItem), var_export($setExpressCheckoutRequestDetailsTypeSurveyChoiceItem, true)); |
||
2277 | } |
||
2278 | } |
||
2279 | if (!empty($invalidValues)) { |
||
2280 | $message = sprintf('The SurveyChoice property can only contain items of type string, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues))); |
||
2281 | } |
||
2282 | unset($invalidValues); |
||
2283 | return $message; |
||
2284 | } |
||
2285 | /** |
||
2286 | * Set SurveyChoice value |
||
2287 | * @throws \InvalidArgumentException |
||
2288 | * @param string[] $surveyChoice |
||
2289 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2290 | */ |
||
2291 | public function setSurveyChoice(array $surveyChoice = array()) |
||
2292 | { |
||
2293 | // validation for constraint: array |
||
2294 | if ('' !== ($surveyChoiceArrayErrorMessage = self::validateSurveyChoiceForArrayConstraintsFromSetSurveyChoice($surveyChoice))) { |
||
2295 | throw new \InvalidArgumentException($surveyChoiceArrayErrorMessage, __LINE__); |
||
2296 | } |
||
2297 | $this->SurveyChoice = $surveyChoice; |
||
2298 | return $this; |
||
2299 | } |
||
2300 | /** |
||
2301 | * Add item to SurveyChoice value |
||
2302 | * @throws \InvalidArgumentException |
||
2303 | * @param string $item |
||
2304 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2305 | */ |
||
2306 | public function addToSurveyChoice($item) |
||
2314 | } |
||
2315 | /** |
||
2316 | * Get TotalType value |
||
2317 | * @return string|null |
||
2318 | */ |
||
2319 | public function getTotalType() |
||
2320 | { |
||
2321 | return $this->TotalType; |
||
2322 | } |
||
2323 | /** |
||
2324 | * Set TotalType value |
||
2325 | * @uses \PayPal\EnumType\TotalType::valueIsValid() |
||
2326 | * @uses \PayPal\EnumType\TotalType::getValidValues() |
||
2327 | * @throws \InvalidArgumentException |
||
2328 | * @param string $totalType |
||
2329 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2330 | */ |
||
2331 | public function setTotalType($totalType = null) |
||
2332 | { |
||
2333 | // validation for constraint: enumeration |
||
2334 | if (!\PayPal\EnumType\TotalType::valueIsValid($totalType)) { |
||
2335 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\TotalType', is_array($totalType) ? implode(', ', $totalType) : var_export($totalType, true), implode(', ', \PayPal\EnumType\TotalType::getValidValues())), __LINE__); |
||
2336 | } |
||
2337 | $this->TotalType = $totalType; |
||
2338 | return $this; |
||
2339 | } |
||
2340 | /** |
||
2341 | * Get NoteToBuyer value |
||
2342 | * @return string|null |
||
2343 | */ |
||
2344 | public function getNoteToBuyer() |
||
2345 | { |
||
2346 | return $this->NoteToBuyer; |
||
2347 | } |
||
2348 | /** |
||
2349 | * Set NoteToBuyer value |
||
2350 | * @param string $noteToBuyer |
||
2351 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2352 | */ |
||
2353 | public function setNoteToBuyer($noteToBuyer = null) |
||
2354 | { |
||
2355 | // validation for constraint: string |
||
2356 | if (!is_null($noteToBuyer) && !is_string($noteToBuyer)) { |
||
2357 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($noteToBuyer, true), gettype($noteToBuyer)), __LINE__); |
||
2358 | } |
||
2359 | $this->NoteToBuyer = $noteToBuyer; |
||
2360 | return $this; |
||
2361 | } |
||
2362 | /** |
||
2363 | * Get Incentives value |
||
2364 | * @return \PayPal\StructType\IncentiveInfoType[]|null |
||
2365 | */ |
||
2366 | public function getIncentives() |
||
2367 | { |
||
2368 | return $this->Incentives; |
||
2369 | } |
||
2370 | /** |
||
2371 | * This method is responsible for validating the values passed to the setIncentives method |
||
2372 | * This method is willingly generated in order to preserve the one-line inline validation within the setIncentives method |
||
2373 | * @param array $values |
||
2374 | * @return string A non-empty message if the values does not match the validation rules |
||
2375 | */ |
||
2376 | public static function validateIncentivesForArrayConstraintsFromSetIncentives(array $values = array()) |
||
2377 | { |
||
2378 | $message = ''; |
||
2379 | $invalidValues = []; |
||
2380 | foreach ($values as $setExpressCheckoutRequestDetailsTypeIncentivesItem) { |
||
2381 | // validation for constraint: itemType |
||
2382 | if (!$setExpressCheckoutRequestDetailsTypeIncentivesItem instanceof \PayPal\StructType\IncentiveInfoType) { |
||
2383 | $invalidValues[] = is_object($setExpressCheckoutRequestDetailsTypeIncentivesItem) ? get_class($setExpressCheckoutRequestDetailsTypeIncentivesItem) : sprintf('%s(%s)', gettype($setExpressCheckoutRequestDetailsTypeIncentivesItem), var_export($setExpressCheckoutRequestDetailsTypeIncentivesItem, true)); |
||
2384 | } |
||
2385 | } |
||
2386 | if (!empty($invalidValues)) { |
||
2387 | $message = sprintf('The Incentives property can only contain items of type \PayPal\StructType\IncentiveInfoType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues))); |
||
2388 | } |
||
2389 | unset($invalidValues); |
||
2390 | return $message; |
||
2391 | } |
||
2392 | /** |
||
2393 | * Set Incentives value |
||
2394 | * @throws \InvalidArgumentException |
||
2395 | * @param \PayPal\StructType\IncentiveInfoType[] $incentives |
||
2396 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2397 | */ |
||
2398 | public function setIncentives(array $incentives = array()) |
||
2399 | { |
||
2400 | // validation for constraint: array |
||
2401 | if ('' !== ($incentivesArrayErrorMessage = self::validateIncentivesForArrayConstraintsFromSetIncentives($incentives))) { |
||
2402 | throw new \InvalidArgumentException($incentivesArrayErrorMessage, __LINE__); |
||
2403 | } |
||
2404 | $this->Incentives = $incentives; |
||
2405 | return $this; |
||
2406 | } |
||
2407 | /** |
||
2408 | * Add item to Incentives value |
||
2409 | * @throws \InvalidArgumentException |
||
2410 | * @param \PayPal\StructType\IncentiveInfoType $item |
||
2411 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2412 | */ |
||
2413 | public function addToIncentives(\PayPal\StructType\IncentiveInfoType $item) |
||
2414 | { |
||
2415 | // validation for constraint: itemType |
||
2416 | if (!$item instanceof \PayPal\StructType\IncentiveInfoType) { |
||
2417 | throw new \InvalidArgumentException(sprintf('The Incentives property can only contain items of type \PayPal\StructType\IncentiveInfoType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__); |
||
2418 | } |
||
2419 | $this->Incentives[] = $item; |
||
2420 | return $this; |
||
2421 | } |
||
2422 | /** |
||
2423 | * Get ReqInstrumentDetails value |
||
2424 | * @return string|null |
||
2425 | */ |
||
2426 | public function getReqInstrumentDetails() |
||
2427 | { |
||
2428 | return $this->ReqInstrumentDetails; |
||
2429 | } |
||
2430 | /** |
||
2431 | * Set ReqInstrumentDetails value |
||
2432 | * @param string $reqInstrumentDetails |
||
2433 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2434 | */ |
||
2435 | public function setReqInstrumentDetails($reqInstrumentDetails = null) |
||
2436 | { |
||
2437 | // validation for constraint: string |
||
2438 | if (!is_null($reqInstrumentDetails) && !is_string($reqInstrumentDetails)) { |
||
2439 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($reqInstrumentDetails, true), gettype($reqInstrumentDetails)), __LINE__); |
||
2440 | } |
||
2441 | $this->ReqInstrumentDetails = $reqInstrumentDetails; |
||
2442 | return $this; |
||
2443 | } |
||
2444 | /** |
||
2445 | * Get ExternalRememberMeOptInDetails value |
||
2446 | * @return \PayPal\StructType\ExternalRememberMeOptInDetailsType|null |
||
2447 | */ |
||
2448 | public function getExternalRememberMeOptInDetails() |
||
2449 | { |
||
2450 | return $this->ExternalRememberMeOptInDetails; |
||
2451 | } |
||
2452 | /** |
||
2453 | * Set ExternalRememberMeOptInDetails value |
||
2454 | * @param \PayPal\StructType\ExternalRememberMeOptInDetailsType $externalRememberMeOptInDetails |
||
2455 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2456 | */ |
||
2457 | public function setExternalRememberMeOptInDetails(\PayPal\StructType\ExternalRememberMeOptInDetailsType $externalRememberMeOptInDetails = null) |
||
2458 | { |
||
2459 | $this->ExternalRememberMeOptInDetails = $externalRememberMeOptInDetails; |
||
2460 | return $this; |
||
2461 | } |
||
2462 | /** |
||
2463 | * Get FlowControlDetails value |
||
2464 | * @return \PayPal\StructType\FlowControlDetailsType|null |
||
2465 | */ |
||
2466 | public function getFlowControlDetails() |
||
2467 | { |
||
2468 | return $this->FlowControlDetails; |
||
2469 | } |
||
2470 | /** |
||
2471 | * Set FlowControlDetails value |
||
2472 | * @param \PayPal\StructType\FlowControlDetailsType $flowControlDetails |
||
2473 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2474 | */ |
||
2475 | public function setFlowControlDetails(\PayPal\StructType\FlowControlDetailsType $flowControlDetails = null) |
||
2476 | { |
||
2477 | $this->FlowControlDetails = $flowControlDetails; |
||
2478 | return $this; |
||
2479 | } |
||
2480 | /** |
||
2481 | * Get DisplayControlDetails value |
||
2482 | * @return \PayPal\StructType\DisplayControlDetailsType|null |
||
2483 | */ |
||
2484 | public function getDisplayControlDetails() |
||
2487 | } |
||
2488 | /** |
||
2489 | * Set DisplayControlDetails value |
||
2490 | * @param \PayPal\StructType\DisplayControlDetailsType $displayControlDetails |
||
2491 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2492 | */ |
||
2493 | public function setDisplayControlDetails(\PayPal\StructType\DisplayControlDetailsType $displayControlDetails = null) |
||
2494 | { |
||
2495 | $this->DisplayControlDetails = $displayControlDetails; |
||
2496 | return $this; |
||
2497 | } |
||
2498 | /** |
||
2499 | * Get ExternalPartnerTrackingDetails value |
||
2500 | * @return \PayPal\StructType\ExternalPartnerTrackingDetailsType|null |
||
2501 | */ |
||
2502 | public function getExternalPartnerTrackingDetails() |
||
2503 | { |
||
2504 | return $this->ExternalPartnerTrackingDetails; |
||
2505 | } |
||
2506 | /** |
||
2507 | * Set ExternalPartnerTrackingDetails value |
||
2508 | * @param \PayPal\StructType\ExternalPartnerTrackingDetailsType $externalPartnerTrackingDetails |
||
2509 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2510 | */ |
||
2511 | public function setExternalPartnerTrackingDetails(\PayPal\StructType\ExternalPartnerTrackingDetailsType $externalPartnerTrackingDetails = null) |
||
2512 | { |
||
2513 | $this->ExternalPartnerTrackingDetails = $externalPartnerTrackingDetails; |
||
2514 | return $this; |
||
2515 | } |
||
2516 | /** |
||
2517 | * Get CoupledBuckets value |
||
2518 | * @return \PayPal\StructType\CoupledBucketsType[]|null |
||
2519 | */ |
||
2520 | public function getCoupledBuckets() |
||
2521 | { |
||
2522 | return $this->CoupledBuckets; |
||
2523 | } |
||
2524 | /** |
||
2525 | * This method is responsible for validating the values passed to the setCoupledBuckets method |
||
2526 | * This method is willingly generated in order to preserve the one-line inline validation within the setCoupledBuckets method |
||
2527 | * @param array $values |
||
2528 | * @return string A non-empty message if the values does not match the validation rules |
||
2529 | */ |
||
2530 | public static function validateCoupledBucketsForArrayConstraintsFromSetCoupledBuckets(array $values = array()) |
||
2545 | } |
||
2546 | /** |
||
2547 | * Set CoupledBuckets value |
||
2548 | * @throws \InvalidArgumentException |
||
2549 | * @param \PayPal\StructType\CoupledBucketsType[] $coupledBuckets |
||
2550 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2551 | */ |
||
2552 | public function setCoupledBuckets(array $coupledBuckets = array()) |
||
2553 | { |
||
2554 | // validation for constraint: array |
||
2555 | if ('' !== ($coupledBucketsArrayErrorMessage = self::validateCoupledBucketsForArrayConstraintsFromSetCoupledBuckets($coupledBuckets))) { |
||
2556 | throw new \InvalidArgumentException($coupledBucketsArrayErrorMessage, __LINE__); |
||
2557 | } |
||
2558 | // validation for constraint: maxOccurs(5) |
||
2559 | if (is_array($coupledBuckets) && count($coupledBuckets) > 5) { |
||
2560 | throw new \InvalidArgumentException(sprintf('Invalid count of %s, the number of elements contained by the property must be less than or equal to 5', count($coupledBuckets)), __LINE__); |
||
2561 | } |
||
2562 | $this->CoupledBuckets = $coupledBuckets; |
||
2563 | return $this; |
||
2564 | } |
||
2565 | /** |
||
2566 | * Add item to CoupledBuckets value |
||
2567 | * @throws \InvalidArgumentException |
||
2568 | * @param \PayPal\StructType\CoupledBucketsType $item |
||
2569 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2570 | */ |
||
2571 | public function addToCoupledBuckets(\PayPal\StructType\CoupledBucketsType $item) |
||
2572 | { |
||
2573 | // validation for constraint: itemType |
||
2574 | if (!$item instanceof \PayPal\StructType\CoupledBucketsType) { |
||
2575 | throw new \InvalidArgumentException(sprintf('The CoupledBuckets property can only contain items of type \PayPal\StructType\CoupledBucketsType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__); |
||
2576 | } |
||
2577 | // validation for constraint: maxOccurs(5) |
||
2578 | if (is_array($this->CoupledBuckets) && count($this->CoupledBuckets) >= 5) { |
||
2579 | 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 5', count($this->CoupledBuckets)), __LINE__); |
||
2580 | } |
||
2581 | $this->CoupledBuckets[] = $item; |
||
2582 | return $this; |
||
2583 | } |
||
2584 | /** |
||
2585 | * Get BillingAgreementID value |
||
2586 | * @return string|null |
||
2587 | */ |
||
2588 | public function getBillingAgreementID() |
||
2591 | } |
||
2592 | /** |
||
2593 | * Set BillingAgreementID value |
||
2594 | * @param string $billingAgreementID |
||
2595 | * @return \PayPal\StructType\SetExpressCheckoutRequestDetailsType |
||
2596 | */ |
||
2597 | public function setBillingAgreementID($billingAgreementID = null) |
||
2598 | { |
||
2599 | // validation for constraint: string |
||
2600 | if (!is_null($billingAgreementID) && !is_string($billingAgreementID)) { |
||
2601 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($billingAgreementID, true), gettype($billingAgreementID)), __LINE__); |
||
2602 | } |
||
2603 | $this->BillingAgreementID = $billingAgreementID; |
||
2604 | return $this; |
||
2605 | } |
||
2606 | } |
||
2607 |