Total Complexity | 201 |
Total Lines | 1805 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
Complex classes like ItemType 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 ItemType, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
17 | class ItemType extends AbstractStructBase |
||
18 | { |
||
19 | /** |
||
20 | * The ApplicationData |
||
21 | * Meta information extracted from the WSDL |
||
22 | * - documentation: Returns custom, application-specific data associated with the item. The data in this field is stored with the item in the items table at eBay, but is not used in any way by eBay. Use ApplicationData to store such special information |
||
23 | * as a part or SKU number. Maximum 32 characters in length. |
||
24 | * - minOccurs: 0 |
||
25 | * @var string |
||
26 | */ |
||
27 | public $ApplicationData; |
||
28 | /** |
||
29 | * The ListOfAttributeSets |
||
30 | * Meta information extracted from the WSDL |
||
31 | * - documentation: Carries one or more instances of the AttributeSet in a list. |
||
32 | * - minOccurs: 0 |
||
33 | * @var \PayPal\StructType\ListOfAttributeSetType |
||
34 | */ |
||
35 | public $ListOfAttributeSets; |
||
36 | /** |
||
37 | * The AutoPay |
||
38 | * Meta information extracted from the WSDL |
||
39 | * - documentation: If true (1), indicates that the seller requested immediate payment for the item. False (0) if immediate payment was not requested. (Does not indicate whether the item is still a candidate for puchase via immediate payment.) Only |
||
40 | * applicable for items listed on US and UK sites in categories that support immediate payment, when seller has a Premier or Business PayPal account. |
||
41 | * - minOccurs: 0 |
||
42 | * @var bool |
||
43 | */ |
||
44 | public $AutoPay; |
||
45 | /** |
||
46 | * The BuyerProtection |
||
47 | * Meta information extracted from the WSDL |
||
48 | * - documentation: Indicates the status of the item's eligibility for the Buyer Protection Program. Possible values: ItemIneligible - Item is ineligible (e.g., category not applicable) ItemEligible - Item is eligible per standard criteria |
||
49 | * ItemMarkedIneligible - Item marked ineligible per special criteria (e.g., seller's account closed) ItemMarkedIneligible - Item marked elegible per other criteria Applicable for items listed to the US site and for the Parts and Accessories category |
||
50 | * (6028) or Everything Else category (10368) (or their subcategories) on the eBay Motors site. |
||
51 | * - minOccurs: 0 |
||
52 | * @var string |
||
53 | */ |
||
54 | public $BuyerProtection; |
||
55 | /** |
||
56 | * The BuyItNowPrice |
||
57 | * Meta information extracted from the WSDL |
||
58 | * - documentation: Amount a Buyer would need to bid to take advantage of the Buy It Now feature. Not applicable to Fixed-Price items (Type = 7 or 9) or AdFormat-type listings. For Fixed-Price items, see StartPrice instead. |
||
59 | * - minOccurs: 0 |
||
60 | * @var \PayPal\StructType\AmountType |
||
61 | */ |
||
62 | public $BuyItNowPrice; |
||
63 | /** |
||
64 | * The Charity |
||
65 | * Meta information extracted from the WSDL |
||
66 | * - documentation: Charity listing container. |
||
67 | * - minOccurs: 0 |
||
68 | * @var \PayPal\StructType\CharityType |
||
69 | */ |
||
70 | public $Charity; |
||
71 | /** |
||
72 | * The Country |
||
73 | * Meta information extracted from the WSDL |
||
74 | * - minOccurs: 0 |
||
75 | * - ref: ns:Country |
||
76 | * @var string |
||
77 | */ |
||
78 | public $Country; |
||
79 | /** |
||
80 | * The CrossPromotion |
||
81 | * Meta information extracted from the WSDL |
||
82 | * - documentation: CrossPromotions container, if applicable shows promoted items |
||
83 | * - minOccurs: 0 |
||
84 | * @var \PayPal\StructType\CrossPromotionsType |
||
85 | */ |
||
86 | public $CrossPromotion; |
||
87 | /** |
||
88 | * The Currency |
||
89 | * Meta information extracted from the WSDL |
||
90 | * - minOccurs: 0 |
||
91 | * - ref: ns:Currency |
||
92 | * @var string |
||
93 | */ |
||
94 | public $Currency; |
||
95 | /** |
||
96 | * The Description |
||
97 | * Meta information extracted from the WSDL |
||
98 | * - documentation: Item Description. |
||
99 | * - minOccurs: 0 |
||
100 | * @var string |
||
101 | */ |
||
102 | public $Description; |
||
103 | /** |
||
104 | * The Escrow |
||
105 | * Meta information extracted from the WSDL |
||
106 | * - documentation: Online Escrow paid for by buyer or seller. Cannot use with real estate auctions. Escrow is recommended for for transactions over $500. Escrow service, available via Escrow.com, protects both buyer and seller by acting as a trusted |
||
107 | * third-party during the transaction and managing the payment process from start to finish. Also, if escrow by seller option used, then for Motors, this means that Escrow will be negotiated at the end of the auction. |
||
108 | * - minOccurs: 0 |
||
109 | * @var string |
||
110 | */ |
||
111 | public $Escrow; |
||
112 | /** |
||
113 | * The GiftIcon |
||
114 | * Meta information extracted from the WSDL |
||
115 | * - documentation: If set, a generic gift icon displays in the listing's Title. GiftIcon must be set to to be able to use GiftServices options (e.g., GiftExpressShipping, GiftShipToRecipient, or GiftWrap). |
||
116 | * - minOccurs: 0 |
||
117 | * @var int |
||
118 | */ |
||
119 | public $GiftIcon; |
||
120 | /** |
||
121 | * The GiftServices |
||
122 | * Meta information extracted from the WSDL |
||
123 | * - documentation: Gift service options offered by the seller of the listed item. |
||
124 | * - maxOccurs: unbounded |
||
125 | * - minOccurs: 0 |
||
126 | * @var string[] |
||
127 | */ |
||
128 | public $GiftServices; |
||
129 | /** |
||
130 | * The HitCounter |
||
131 | * Meta information extracted from the WSDL |
||
132 | * - documentation: Optional hit counter for the item's listing page. Possible values are: "NoHitCounter" "HonestyStyle" "GreenLED" "Hidden" |
||
133 | * - minOccurs: 0 |
||
134 | * @var string |
||
135 | */ |
||
136 | public $HitCounter; |
||
137 | /** |
||
138 | * The ItemID |
||
139 | * Meta information extracted from the WSDL |
||
140 | * - documentation: Represents the unique identifier for an item. To be used to specify the elements that represents an ItemID. |
||
141 | * - base: xs:string |
||
142 | * - minOccurs: 0 |
||
143 | * - ref: ns:ItemID |
||
144 | * @var string |
||
145 | */ |
||
146 | public $ItemID; |
||
147 | /** |
||
148 | * The ListingDetails |
||
149 | * Meta information extracted from the WSDL |
||
150 | * - documentation: Includes listing details in terms of start and end time of listing (in GMT) as well as other details (e.g., orginal item for second chance, converted start price, etc.). |
||
151 | * - minOccurs: 0 |
||
152 | * @var \PayPal\StructType\ListingDetailsType |
||
153 | */ |
||
154 | public $ListingDetails; |
||
155 | /** |
||
156 | * The ListingDesigner |
||
157 | * Meta information extracted from the WSDL |
||
158 | * - documentation: When an item is first listed (using AddItem), a Layout template or a Theme template (or both) can be assigned to the item. A Layout template is assigned to a new item by specifying the Layout template ID (in the AddItem input |
||
159 | * argument LayoutID). Similarly, a Theme template is assigned to the item using the ThemeID argument. |
||
160 | * - minOccurs: 0 |
||
161 | * @var \PayPal\StructType\ListingDesignerType |
||
162 | */ |
||
163 | public $ListingDesigner; |
||
164 | /** |
||
165 | * The ListingDuration |
||
166 | * Meta information extracted from the WSDL |
||
167 | * - minOccurs: 0 |
||
168 | * - ref: ns:ListingDuration |
||
169 | * @var string |
||
170 | */ |
||
171 | public $ListingDuration; |
||
172 | /** |
||
173 | * The ListingEnhancement |
||
174 | * Meta information extracted from the WSDL |
||
175 | * - documentation: Describes the types of enhancment supported for the item's listing. |
||
176 | * - maxOccurs: unbounded |
||
177 | * - minOccurs: 0 |
||
178 | * @var string[] |
||
179 | */ |
||
180 | public $ListingEnhancement; |
||
181 | /** |
||
182 | * The ListingType |
||
183 | * Meta information extracted from the WSDL |
||
184 | * - documentation: Describes the type of listing for the item a seller has chosen (e.g., Chinese, Dutch, FixedPrice, etc.). |
||
185 | * - minOccurs: 0 |
||
186 | * @var string |
||
187 | */ |
||
188 | public $ListingType; |
||
189 | /** |
||
190 | * The Location |
||
191 | * Meta information extracted from the WSDL |
||
192 | * - documentation: Indicates the geographical location of the item. |
||
193 | * - minOccurs: 0 |
||
194 | * @var string |
||
195 | */ |
||
196 | public $Location; |
||
197 | /** |
||
198 | * The PartnerCode |
||
199 | * Meta information extracted from the WSDL |
||
200 | * - documentation: Needed for add item only for partners. |
||
201 | * - minOccurs: 0 |
||
202 | * @var string |
||
203 | */ |
||
204 | public $PartnerCode; |
||
205 | /** |
||
206 | * The PartnerName |
||
207 | * Meta information extracted from the WSDL |
||
208 | * - documentation: Needed for add item only for partners. |
||
209 | * - minOccurs: 0 |
||
210 | * @var string |
||
211 | */ |
||
212 | public $PartnerName; |
||
213 | /** |
||
214 | * The PaymentMethods |
||
215 | * Meta information extracted from the WSDL |
||
216 | * - maxOccurs: unbounded |
||
217 | * - minOccurs: 0 |
||
218 | * - ref: ns:PaymentMethods |
||
219 | * @var string[] |
||
220 | */ |
||
221 | public $PaymentMethods; |
||
222 | /** |
||
223 | * The PayPalEmailAddress |
||
224 | * Meta information extracted from the WSDL |
||
225 | * - documentation: Valid PayPal e-mail address if seller has chosen PayPal as a payment method for the listed item. |
||
226 | * - minOccurs: 0 |
||
227 | * @var string |
||
228 | */ |
||
229 | public $PayPalEmailAddress; |
||
230 | /** |
||
231 | * The PrimaryCategory |
||
232 | * Meta information extracted from the WSDL |
||
233 | * - documentation: Container for data on the primary category of listing. |
||
234 | * - minOccurs: 0 |
||
235 | * @var \PayPal\StructType\CategoryType |
||
236 | */ |
||
237 | public $PrimaryCategory; |
||
238 | /** |
||
239 | * The PrivateListing |
||
240 | * Meta information extracted from the WSDL |
||
241 | * - documentation: Private auction. Not applicable to Fixed Price items. |
||
242 | * - minOccurs: 0 |
||
243 | * @var bool |
||
244 | */ |
||
245 | public $PrivateListing; |
||
246 | /** |
||
247 | * The Quantity |
||
248 | * Meta information extracted from the WSDL |
||
249 | * - documentation: Number of items being sold in the auction. |
||
250 | * - minOccurs: 0 |
||
251 | * @var int |
||
252 | */ |
||
253 | public $Quantity; |
||
254 | /** |
||
255 | * The RegionID |
||
256 | * Meta information extracted from the WSDL |
||
257 | * - minOccurs: 0 |
||
258 | * - ref: ns:RegionID |
||
259 | * @var string |
||
260 | */ |
||
261 | public $RegionID; |
||
262 | /** |
||
263 | * The RelistLink |
||
264 | * Meta information extracted from the WSDL |
||
265 | * - documentation: If true, creates a link from the old listing for the item to the new relist page, which accommodates users who might still look for the item under its old item ID. Also adds the relist ID to the old listing's record in the eBay |
||
266 | * database, which can be returned by calling GetItem for the old ItemId. If your application creates the listing page for the user, you need to add the relist link option to your application for your users. |
||
267 | * - minOccurs: 0 |
||
268 | * @var bool |
||
269 | */ |
||
270 | public $RelistLink; |
||
271 | /** |
||
272 | * The ReservePrice |
||
273 | * Meta information extracted from the WSDL |
||
274 | * - documentation: Indicates the reserve price for a reserve auction. Returned only if DetailLevel = 4. ReservePrice is only returned for auctions with a reserve price where the user calling GetItem is the item's seller. Returned as null for |
||
275 | * International Fixed Price items. For more information on reserve price auctions, see http://pages.ebay.com/help/basics/f-format.html#1. |
||
276 | * - minOccurs: 0 |
||
277 | * @var \PayPal\StructType\AmountType |
||
278 | */ |
||
279 | public $ReservePrice; |
||
280 | /** |
||
281 | * The ReviseStatus |
||
282 | * Meta information extracted from the WSDL |
||
283 | * - minOccurs: 0 |
||
284 | * - ref: ns:ReviseStatus |
||
285 | * @var \PayPal\StructType\ReviseStatusType |
||
286 | */ |
||
287 | public $ReviseStatus; |
||
288 | /** |
||
289 | * The ScheduleTime |
||
290 | * Meta information extracted from the WSDL |
||
291 | * - minOccurs: 0 |
||
292 | * @var string |
||
293 | */ |
||
294 | public $ScheduleTime; |
||
295 | /** |
||
296 | * The SecondaryCategory |
||
297 | * Meta information extracted from the WSDL |
||
298 | * - documentation: Container for data on the secondary category of listing. Secondary category is optional. |
||
299 | * - minOccurs: 0 |
||
300 | * @var \PayPal\StructType\CategoryType |
||
301 | */ |
||
302 | public $SecondaryCategory; |
||
303 | /** |
||
304 | * The SiteHostedPicture |
||
305 | * Meta information extracted from the WSDL |
||
306 | * - documentation: Item picture information for pictures hosted at eBay site. |
||
307 | * - minOccurs: 0 |
||
308 | * @var \PayPal\StructType\SiteHostedPictureType |
||
309 | */ |
||
310 | public $SiteHostedPicture; |
||
311 | /** |
||
312 | * The Seller |
||
313 | * Meta information extracted from the WSDL |
||
314 | * - minOccurs: 0 |
||
315 | * - ref: ns:Seller |
||
316 | * @var \PayPal\StructType\UserType |
||
317 | */ |
||
318 | public $Seller; |
||
319 | /** |
||
320 | * The SellingStatus |
||
321 | * Meta information extracted from the WSDL |
||
322 | * - minOccurs: 0 |
||
323 | * - ref: ns:SellingStatus |
||
324 | * @var \PayPal\StructType\SellingStatusType |
||
325 | */ |
||
326 | public $SellingStatus; |
||
327 | /** |
||
328 | * The ShippingOption |
||
329 | * Meta information extracted from the WSDL |
||
330 | * - documentation: Specifies where the seller is willing to ship the item. Default "SiteOnly". Valid values are: SiteOnly (the default) WorldWide SitePlusRegions WillNotShip If SitePlusRegions is selected, then at least one regions argument |
||
331 | * (ShipToNorthAmerica, ShipToEurope, etc.) must also be set. |
||
332 | * - minOccurs: 0 |
||
333 | * @var string |
||
334 | */ |
||
335 | public $ShippingOption; |
||
336 | /** |
||
337 | * The ShippingDetails |
||
338 | * Meta information extracted from the WSDL |
||
339 | * - minOccurs: 0 |
||
340 | * - ref: ns:ShippingDetails |
||
341 | * @var \PayPal\StructType\ShippingDetailsType |
||
342 | */ |
||
343 | public $ShippingDetails; |
||
344 | /** |
||
345 | * The ShippingRegions |
||
346 | * Meta information extracted from the WSDL |
||
347 | * - maxOccurs: unbounded |
||
348 | * - minOccurs: 0 |
||
349 | * - ref: ns:ShippingRegions |
||
350 | * @var string[] |
||
351 | */ |
||
352 | public $ShippingRegions; |
||
353 | /** |
||
354 | * The ShippingTerms |
||
355 | * Meta information extracted from the WSDL |
||
356 | * - documentation: Describes who pays for the delivery of an item (e.g., buyer or seller). |
||
357 | * - minOccurs: 0 |
||
358 | * @var string |
||
359 | */ |
||
360 | public $ShippingTerms; |
||
361 | /** |
||
362 | * The Site |
||
363 | * Meta information extracted from the WSDL |
||
364 | * - minOccurs: 0 |
||
365 | * - ref: ns:Site |
||
366 | * @var string |
||
367 | */ |
||
368 | public $Site; |
||
369 | /** |
||
370 | * The StartPrice |
||
371 | * Meta information extracted from the WSDL |
||
372 | * - documentation: Starting price for the item. For Type=7 or Type=9 (Fixed Price) items, if the item price (MinimumBid) is revised, this field returns the new price. |
||
373 | * - minOccurs: 0 |
||
374 | * @var \PayPal\StructType\AmountType |
||
375 | */ |
||
376 | public $StartPrice; |
||
377 | /** |
||
378 | * The Storefront |
||
379 | * Meta information extracted from the WSDL |
||
380 | * - documentation: Storefront is shown for any item that belongs to an eBay Store owner, regardless of whether it is fixed price or auction type. Not returned for International Fixed Price items. |
||
381 | * - minOccurs: 0 |
||
382 | * @var \PayPal\StructType\StorefrontType |
||
383 | */ |
||
384 | public $Storefront; |
||
385 | /** |
||
386 | * The SubTitle |
||
387 | * Meta information extracted from the WSDL |
||
388 | * - documentation: Subtitle to use in addition to the title. Provides more keywords when buyers search in titles and descriptions. |
||
389 | * - minOccurs: 0 |
||
390 | * @var string |
||
391 | */ |
||
392 | public $SubTitle; |
||
393 | /** |
||
394 | * The TimeLeft |
||
395 | * Meta information extracted from the WSDL |
||
396 | * - documentation: Time until the the end of the listing (e.g., the amount of time left in an active auction). |
||
397 | * - minOccurs: 0 |
||
398 | * @var string |
||
399 | */ |
||
400 | public $TimeLeft; |
||
401 | /** |
||
402 | * The Title |
||
403 | * Meta information extracted from the WSDL |
||
404 | * - documentation: Name of the item as it appears for auctions. |
||
405 | * - minOccurs: 0 |
||
406 | * @var string |
||
407 | */ |
||
408 | public $Title; |
||
409 | /** |
||
410 | * The UUID |
||
411 | * Meta information extracted from the WSDL |
||
412 | * - documentation: Specifies a universally unique identifier. The UUID can only contain digits from 0-9 and letters from A-F. The UUID must be 32 characters long. For example, 1FB02B2-9D27-3acb-ABA2-9D539C374228 |
||
413 | * - base: xs:string |
||
414 | * - length: 36 |
||
415 | * - minOccurs: 0 |
||
416 | * - ref: ns:UUID |
||
417 | * @var string |
||
418 | */ |
||
419 | public $UUID; |
||
420 | /** |
||
421 | * The VATDetails |
||
422 | * Meta information extracted from the WSDL |
||
423 | * - documentation: VAT info container. |
||
424 | * - minOccurs: 0 |
||
425 | * @var \PayPal\StructType\VATDetailsType |
||
426 | */ |
||
427 | public $VATDetails; |
||
428 | /** |
||
429 | * The VendorHostedPicture |
||
430 | * Meta information extracted from the WSDL |
||
431 | * - documentation: Item picture information for pictures hosted at vendor (i.e., remote) site. |
||
432 | * - minOccurs: 0 |
||
433 | * @var \PayPal\StructType\VendorHostedPictureType |
||
434 | */ |
||
435 | public $VendorHostedPicture; |
||
436 | /** |
||
437 | * Constructor method for ItemType |
||
438 | * @uses ItemType::setApplicationData() |
||
439 | * @uses ItemType::setListOfAttributeSets() |
||
440 | * @uses ItemType::setAutoPay() |
||
441 | * @uses ItemType::setBuyerProtection() |
||
442 | * @uses ItemType::setBuyItNowPrice() |
||
443 | * @uses ItemType::setCharity() |
||
444 | * @uses ItemType::setCountry() |
||
445 | * @uses ItemType::setCrossPromotion() |
||
446 | * @uses ItemType::setCurrency() |
||
447 | * @uses ItemType::setDescription() |
||
448 | * @uses ItemType::setEscrow() |
||
449 | * @uses ItemType::setGiftIcon() |
||
450 | * @uses ItemType::setGiftServices() |
||
451 | * @uses ItemType::setHitCounter() |
||
452 | * @uses ItemType::setItemID() |
||
453 | * @uses ItemType::setListingDetails() |
||
454 | * @uses ItemType::setListingDesigner() |
||
455 | * @uses ItemType::setListingDuration() |
||
456 | * @uses ItemType::setListingEnhancement() |
||
457 | * @uses ItemType::setListingType() |
||
458 | * @uses ItemType::setLocation() |
||
459 | * @uses ItemType::setPartnerCode() |
||
460 | * @uses ItemType::setPartnerName() |
||
461 | * @uses ItemType::setPaymentMethods() |
||
462 | * @uses ItemType::setPayPalEmailAddress() |
||
463 | * @uses ItemType::setPrimaryCategory() |
||
464 | * @uses ItemType::setPrivateListing() |
||
465 | * @uses ItemType::setQuantity() |
||
466 | * @uses ItemType::setRegionID() |
||
467 | * @uses ItemType::setRelistLink() |
||
468 | * @uses ItemType::setReservePrice() |
||
469 | * @uses ItemType::setReviseStatus() |
||
470 | * @uses ItemType::setScheduleTime() |
||
471 | * @uses ItemType::setSecondaryCategory() |
||
472 | * @uses ItemType::setSiteHostedPicture() |
||
473 | * @uses ItemType::setSeller() |
||
474 | * @uses ItemType::setSellingStatus() |
||
475 | * @uses ItemType::setShippingOption() |
||
476 | * @uses ItemType::setShippingDetails() |
||
477 | * @uses ItemType::setShippingRegions() |
||
478 | * @uses ItemType::setShippingTerms() |
||
479 | * @uses ItemType::setSite() |
||
480 | * @uses ItemType::setStartPrice() |
||
481 | * @uses ItemType::setStorefront() |
||
482 | * @uses ItemType::setSubTitle() |
||
483 | * @uses ItemType::setTimeLeft() |
||
484 | * @uses ItemType::setTitle() |
||
485 | * @uses ItemType::setUUID() |
||
486 | * @uses ItemType::setVATDetails() |
||
487 | * @uses ItemType::setVendorHostedPicture() |
||
488 | * @param string $applicationData |
||
489 | * @param \PayPal\StructType\ListOfAttributeSetType $listOfAttributeSets |
||
490 | * @param bool $autoPay |
||
491 | * @param string $buyerProtection |
||
492 | * @param \PayPal\StructType\AmountType $buyItNowPrice |
||
493 | * @param \PayPal\StructType\CharityType $charity |
||
494 | * @param string $country |
||
495 | * @param \PayPal\StructType\CrossPromotionsType $crossPromotion |
||
496 | * @param string $currency |
||
497 | * @param string $description |
||
498 | * @param string $escrow |
||
499 | * @param int $giftIcon |
||
500 | * @param string[] $giftServices |
||
501 | * @param string $hitCounter |
||
502 | * @param string $itemID |
||
503 | * @param \PayPal\StructType\ListingDetailsType $listingDetails |
||
504 | * @param \PayPal\StructType\ListingDesignerType $listingDesigner |
||
505 | * @param string $listingDuration |
||
506 | * @param string[] $listingEnhancement |
||
507 | * @param string $listingType |
||
508 | * @param string $location |
||
509 | * @param string $partnerCode |
||
510 | * @param string $partnerName |
||
511 | * @param string[] $paymentMethods |
||
512 | * @param string $payPalEmailAddress |
||
513 | * @param \PayPal\StructType\CategoryType $primaryCategory |
||
514 | * @param bool $privateListing |
||
515 | * @param int $quantity |
||
516 | * @param string $regionID |
||
517 | * @param bool $relistLink |
||
518 | * @param \PayPal\StructType\AmountType $reservePrice |
||
519 | * @param \PayPal\StructType\ReviseStatusType $reviseStatus |
||
520 | * @param string $scheduleTime |
||
521 | * @param \PayPal\StructType\CategoryType $secondaryCategory |
||
522 | * @param \PayPal\StructType\SiteHostedPictureType $siteHostedPicture |
||
523 | * @param \PayPal\StructType\UserType $seller |
||
524 | * @param \PayPal\StructType\SellingStatusType $sellingStatus |
||
525 | * @param string $shippingOption |
||
526 | * @param \PayPal\StructType\ShippingDetailsType $shippingDetails |
||
527 | * @param string[] $shippingRegions |
||
528 | * @param string $shippingTerms |
||
529 | * @param string $site |
||
530 | * @param \PayPal\StructType\AmountType $startPrice |
||
531 | * @param \PayPal\StructType\StorefrontType $storefront |
||
532 | * @param string $subTitle |
||
533 | * @param string $timeLeft |
||
534 | * @param string $title |
||
535 | * @param string $uUID |
||
536 | * @param \PayPal\StructType\VATDetailsType $vATDetails |
||
537 | * @param \PayPal\StructType\VendorHostedPictureType $vendorHostedPicture |
||
538 | */ |
||
539 | public function __construct($applicationData = null, \PayPal\StructType\ListOfAttributeSetType $listOfAttributeSets = null, $autoPay = null, $buyerProtection = null, \PayPal\StructType\AmountType $buyItNowPrice = null, \PayPal\StructType\CharityType $charity = null, $country = null, \PayPal\StructType\CrossPromotionsType $crossPromotion = null, $currency = null, $description = null, $escrow = null, $giftIcon = null, array $giftServices = array(), $hitCounter = null, $itemID = null, \PayPal\StructType\ListingDetailsType $listingDetails = null, \PayPal\StructType\ListingDesignerType $listingDesigner = null, $listingDuration = null, array $listingEnhancement = array(), $listingType = null, $location = null, $partnerCode = null, $partnerName = null, array $paymentMethods = array(), $payPalEmailAddress = null, \PayPal\StructType\CategoryType $primaryCategory = null, $privateListing = null, $quantity = null, $regionID = null, $relistLink = null, \PayPal\StructType\AmountType $reservePrice = null, \PayPal\StructType\ReviseStatusType $reviseStatus = null, $scheduleTime = null, \PayPal\StructType\CategoryType $secondaryCategory = null, \PayPal\StructType\SiteHostedPictureType $siteHostedPicture = null, \PayPal\StructType\UserType $seller = null, \PayPal\StructType\SellingStatusType $sellingStatus = null, $shippingOption = null, \PayPal\StructType\ShippingDetailsType $shippingDetails = null, array $shippingRegions = array(), $shippingTerms = null, $site = null, \PayPal\StructType\AmountType $startPrice = null, \PayPal\StructType\StorefrontType $storefront = null, $subTitle = null, $timeLeft = null, $title = null, $uUID = null, \PayPal\StructType\VATDetailsType $vATDetails = null, \PayPal\StructType\VendorHostedPictureType $vendorHostedPicture = null) |
||
540 | { |
||
541 | $this |
||
542 | ->setApplicationData($applicationData) |
||
543 | ->setListOfAttributeSets($listOfAttributeSets) |
||
544 | ->setAutoPay($autoPay) |
||
545 | ->setBuyerProtection($buyerProtection) |
||
546 | ->setBuyItNowPrice($buyItNowPrice) |
||
547 | ->setCharity($charity) |
||
548 | ->setCountry($country) |
||
549 | ->setCrossPromotion($crossPromotion) |
||
550 | ->setCurrency($currency) |
||
551 | ->setDescription($description) |
||
552 | ->setEscrow($escrow) |
||
553 | ->setGiftIcon($giftIcon) |
||
554 | ->setGiftServices($giftServices) |
||
555 | ->setHitCounter($hitCounter) |
||
556 | ->setItemID($itemID) |
||
557 | ->setListingDetails($listingDetails) |
||
558 | ->setListingDesigner($listingDesigner) |
||
559 | ->setListingDuration($listingDuration) |
||
560 | ->setListingEnhancement($listingEnhancement) |
||
561 | ->setListingType($listingType) |
||
562 | ->setLocation($location) |
||
563 | ->setPartnerCode($partnerCode) |
||
564 | ->setPartnerName($partnerName) |
||
565 | ->setPaymentMethods($paymentMethods) |
||
566 | ->setPayPalEmailAddress($payPalEmailAddress) |
||
567 | ->setPrimaryCategory($primaryCategory) |
||
568 | ->setPrivateListing($privateListing) |
||
569 | ->setQuantity($quantity) |
||
570 | ->setRegionID($regionID) |
||
571 | ->setRelistLink($relistLink) |
||
572 | ->setReservePrice($reservePrice) |
||
573 | ->setReviseStatus($reviseStatus) |
||
574 | ->setScheduleTime($scheduleTime) |
||
575 | ->setSecondaryCategory($secondaryCategory) |
||
576 | ->setSiteHostedPicture($siteHostedPicture) |
||
577 | ->setSeller($seller) |
||
578 | ->setSellingStatus($sellingStatus) |
||
579 | ->setShippingOption($shippingOption) |
||
580 | ->setShippingDetails($shippingDetails) |
||
581 | ->setShippingRegions($shippingRegions) |
||
582 | ->setShippingTerms($shippingTerms) |
||
583 | ->setSite($site) |
||
584 | ->setStartPrice($startPrice) |
||
585 | ->setStorefront($storefront) |
||
586 | ->setSubTitle($subTitle) |
||
587 | ->setTimeLeft($timeLeft) |
||
588 | ->setTitle($title) |
||
589 | ->setUUID($uUID) |
||
590 | ->setVATDetails($vATDetails) |
||
591 | ->setVendorHostedPicture($vendorHostedPicture); |
||
592 | } |
||
593 | /** |
||
594 | * Get ApplicationData value |
||
595 | * @return string|null |
||
596 | */ |
||
597 | public function getApplicationData() |
||
598 | { |
||
599 | return $this->ApplicationData; |
||
600 | } |
||
601 | /** |
||
602 | * Set ApplicationData value |
||
603 | * @param string $applicationData |
||
604 | * @return \PayPal\StructType\ItemType |
||
605 | */ |
||
606 | public function setApplicationData($applicationData = null) |
||
607 | { |
||
608 | // validation for constraint: string |
||
609 | if (!is_null($applicationData) && !is_string($applicationData)) { |
||
|
|||
610 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($applicationData, true), gettype($applicationData)), __LINE__); |
||
611 | } |
||
612 | $this->ApplicationData = $applicationData; |
||
613 | return $this; |
||
614 | } |
||
615 | /** |
||
616 | * Get ListOfAttributeSets value |
||
617 | * @return \PayPal\StructType\ListOfAttributeSetType|null |
||
618 | */ |
||
619 | public function getListOfAttributeSets() |
||
620 | { |
||
621 | return $this->ListOfAttributeSets; |
||
622 | } |
||
623 | /** |
||
624 | * Set ListOfAttributeSets value |
||
625 | * @param \PayPal\StructType\ListOfAttributeSetType $listOfAttributeSets |
||
626 | * @return \PayPal\StructType\ItemType |
||
627 | */ |
||
628 | public function setListOfAttributeSets(\PayPal\StructType\ListOfAttributeSetType $listOfAttributeSets = null) |
||
629 | { |
||
630 | $this->ListOfAttributeSets = $listOfAttributeSets; |
||
631 | return $this; |
||
632 | } |
||
633 | /** |
||
634 | * Get AutoPay value |
||
635 | * @return bool|null |
||
636 | */ |
||
637 | public function getAutoPay() |
||
638 | { |
||
639 | return $this->AutoPay; |
||
640 | } |
||
641 | /** |
||
642 | * Set AutoPay value |
||
643 | * @param bool $autoPay |
||
644 | * @return \PayPal\StructType\ItemType |
||
645 | */ |
||
646 | public function setAutoPay($autoPay = null) |
||
647 | { |
||
648 | // validation for constraint: boolean |
||
649 | if (!is_null($autoPay) && !is_bool($autoPay)) { |
||
650 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($autoPay, true), gettype($autoPay)), __LINE__); |
||
651 | } |
||
652 | $this->AutoPay = $autoPay; |
||
653 | return $this; |
||
654 | } |
||
655 | /** |
||
656 | * Get BuyerProtection value |
||
657 | * @return string|null |
||
658 | */ |
||
659 | public function getBuyerProtection() |
||
660 | { |
||
661 | return $this->BuyerProtection; |
||
662 | } |
||
663 | /** |
||
664 | * Set BuyerProtection value |
||
665 | * @uses \PayPal\EnumType\BuyerProtectionCodeType::valueIsValid() |
||
666 | * @uses \PayPal\EnumType\BuyerProtectionCodeType::getValidValues() |
||
667 | * @throws \InvalidArgumentException |
||
668 | * @param string $buyerProtection |
||
669 | * @return \PayPal\StructType\ItemType |
||
670 | */ |
||
671 | public function setBuyerProtection($buyerProtection = null) |
||
672 | { |
||
673 | // validation for constraint: enumeration |
||
674 | if (!\PayPal\EnumType\BuyerProtectionCodeType::valueIsValid($buyerProtection)) { |
||
675 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\BuyerProtectionCodeType', is_array($buyerProtection) ? implode(', ', $buyerProtection) : var_export($buyerProtection, true), implode(', ', \PayPal\EnumType\BuyerProtectionCodeType::getValidValues())), __LINE__); |
||
676 | } |
||
677 | $this->BuyerProtection = $buyerProtection; |
||
678 | return $this; |
||
679 | } |
||
680 | /** |
||
681 | * Get BuyItNowPrice value |
||
682 | * @return \PayPal\StructType\AmountType|null |
||
683 | */ |
||
684 | public function getBuyItNowPrice() |
||
685 | { |
||
686 | return $this->BuyItNowPrice; |
||
687 | } |
||
688 | /** |
||
689 | * Set BuyItNowPrice value |
||
690 | * @param \PayPal\StructType\AmountType $buyItNowPrice |
||
691 | * @return \PayPal\StructType\ItemType |
||
692 | */ |
||
693 | public function setBuyItNowPrice(\PayPal\StructType\AmountType $buyItNowPrice = null) |
||
694 | { |
||
695 | $this->BuyItNowPrice = $buyItNowPrice; |
||
696 | return $this; |
||
697 | } |
||
698 | /** |
||
699 | * Get Charity value |
||
700 | * @return \PayPal\StructType\CharityType|null |
||
701 | */ |
||
702 | public function getCharity() |
||
703 | { |
||
704 | return $this->Charity; |
||
705 | } |
||
706 | /** |
||
707 | * Set Charity value |
||
708 | * @param \PayPal\StructType\CharityType $charity |
||
709 | * @return \PayPal\StructType\ItemType |
||
710 | */ |
||
711 | public function setCharity(\PayPal\StructType\CharityType $charity = null) |
||
712 | { |
||
713 | $this->Charity = $charity; |
||
714 | return $this; |
||
715 | } |
||
716 | /** |
||
717 | * Get Country value |
||
718 | * @return string|null |
||
719 | */ |
||
720 | public function getCountry() |
||
721 | { |
||
722 | return $this->Country; |
||
723 | } |
||
724 | /** |
||
725 | * Set Country value |
||
726 | * @uses \PayPal\EnumType\CountryCodeType::valueIsValid() |
||
727 | * @uses \PayPal\EnumType\CountryCodeType::getValidValues() |
||
728 | * @throws \InvalidArgumentException |
||
729 | * @param string $country |
||
730 | * @return \PayPal\StructType\ItemType |
||
731 | */ |
||
732 | public function setCountry($country = null) |
||
733 | { |
||
734 | // validation for constraint: enumeration |
||
735 | if (!\PayPal\EnumType\CountryCodeType::valueIsValid($country)) { |
||
736 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\CountryCodeType', is_array($country) ? implode(', ', $country) : var_export($country, true), implode(', ', \PayPal\EnumType\CountryCodeType::getValidValues())), __LINE__); |
||
737 | } |
||
738 | $this->Country = $country; |
||
739 | return $this; |
||
740 | } |
||
741 | /** |
||
742 | * Get CrossPromotion value |
||
743 | * @return \PayPal\StructType\CrossPromotionsType|null |
||
744 | */ |
||
745 | public function getCrossPromotion() |
||
746 | { |
||
747 | return $this->CrossPromotion; |
||
748 | } |
||
749 | /** |
||
750 | * Set CrossPromotion value |
||
751 | * @param \PayPal\StructType\CrossPromotionsType $crossPromotion |
||
752 | * @return \PayPal\StructType\ItemType |
||
753 | */ |
||
754 | public function setCrossPromotion(\PayPal\StructType\CrossPromotionsType $crossPromotion = null) |
||
755 | { |
||
756 | $this->CrossPromotion = $crossPromotion; |
||
757 | return $this; |
||
758 | } |
||
759 | /** |
||
760 | * Get Currency value |
||
761 | * @return string|null |
||
762 | */ |
||
763 | public function getCurrency() |
||
764 | { |
||
765 | return $this->Currency; |
||
766 | } |
||
767 | /** |
||
768 | * Set Currency value |
||
769 | * @uses \PayPal\EnumType\CurrencyCodeType::valueIsValid() |
||
770 | * @uses \PayPal\EnumType\CurrencyCodeType::getValidValues() |
||
771 | * @throws \InvalidArgumentException |
||
772 | * @param string $currency |
||
773 | * @return \PayPal\StructType\ItemType |
||
774 | */ |
||
775 | public function setCurrency($currency = null) |
||
776 | { |
||
777 | // validation for constraint: enumeration |
||
778 | if (!\PayPal\EnumType\CurrencyCodeType::valueIsValid($currency)) { |
||
779 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\CurrencyCodeType', is_array($currency) ? implode(', ', $currency) : var_export($currency, true), implode(', ', \PayPal\EnumType\CurrencyCodeType::getValidValues())), __LINE__); |
||
780 | } |
||
781 | $this->Currency = $currency; |
||
782 | return $this; |
||
783 | } |
||
784 | /** |
||
785 | * Get Description value |
||
786 | * @return string|null |
||
787 | */ |
||
788 | public function getDescription() |
||
789 | { |
||
790 | return $this->Description; |
||
791 | } |
||
792 | /** |
||
793 | * Set Description value |
||
794 | * @param string $description |
||
795 | * @return \PayPal\StructType\ItemType |
||
796 | */ |
||
797 | public function setDescription($description = null) |
||
798 | { |
||
799 | // validation for constraint: string |
||
800 | if (!is_null($description) && !is_string($description)) { |
||
801 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($description, true), gettype($description)), __LINE__); |
||
802 | } |
||
803 | $this->Description = $description; |
||
804 | return $this; |
||
805 | } |
||
806 | /** |
||
807 | * Get Escrow value |
||
808 | * @return string|null |
||
809 | */ |
||
810 | public function getEscrow() |
||
811 | { |
||
812 | return $this->Escrow; |
||
813 | } |
||
814 | /** |
||
815 | * Set Escrow value |
||
816 | * @uses \PayPal\EnumType\EscrowCodeType::valueIsValid() |
||
817 | * @uses \PayPal\EnumType\EscrowCodeType::getValidValues() |
||
818 | * @throws \InvalidArgumentException |
||
819 | * @param string $escrow |
||
820 | * @return \PayPal\StructType\ItemType |
||
821 | */ |
||
822 | public function setEscrow($escrow = null) |
||
823 | { |
||
824 | // validation for constraint: enumeration |
||
825 | if (!\PayPal\EnumType\EscrowCodeType::valueIsValid($escrow)) { |
||
826 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\EscrowCodeType', is_array($escrow) ? implode(', ', $escrow) : var_export($escrow, true), implode(', ', \PayPal\EnumType\EscrowCodeType::getValidValues())), __LINE__); |
||
827 | } |
||
828 | $this->Escrow = $escrow; |
||
829 | return $this; |
||
830 | } |
||
831 | /** |
||
832 | * Get GiftIcon value |
||
833 | * @return int|null |
||
834 | */ |
||
835 | public function getGiftIcon() |
||
836 | { |
||
837 | return $this->GiftIcon; |
||
838 | } |
||
839 | /** |
||
840 | * Set GiftIcon value |
||
841 | * @param int $giftIcon |
||
842 | * @return \PayPal\StructType\ItemType |
||
843 | */ |
||
844 | public function setGiftIcon($giftIcon = null) |
||
845 | { |
||
846 | // validation for constraint: int |
||
847 | if (!is_null($giftIcon) && !(is_int($giftIcon) || ctype_digit($giftIcon))) { |
||
848 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($giftIcon, true), gettype($giftIcon)), __LINE__); |
||
849 | } |
||
850 | $this->GiftIcon = $giftIcon; |
||
851 | return $this; |
||
852 | } |
||
853 | /** |
||
854 | * Get GiftServices value |
||
855 | * @return string[]|null |
||
856 | */ |
||
857 | public function getGiftServices() |
||
858 | { |
||
859 | return $this->GiftServices; |
||
860 | } |
||
861 | /** |
||
862 | * This method is responsible for validating the values passed to the setGiftServices method |
||
863 | * This method is willingly generated in order to preserve the one-line inline validation within the setGiftServices method |
||
864 | * @param array $values |
||
865 | * @return string A non-empty message if the values does not match the validation rules |
||
866 | */ |
||
867 | public static function validateGiftServicesForArrayConstraintsFromSetGiftServices(array $values = array()) |
||
868 | { |
||
869 | $message = ''; |
||
870 | $invalidValues = []; |
||
871 | foreach ($values as $itemTypeGiftServicesItem) { |
||
872 | // validation for constraint: enumeration |
||
873 | if (!\PayPal\EnumType\GiftServicesCodeType::valueIsValid($itemTypeGiftServicesItem)) { |
||
874 | $invalidValues[] = is_object($itemTypeGiftServicesItem) ? get_class($itemTypeGiftServicesItem) : sprintf('%s(%s)', gettype($itemTypeGiftServicesItem), var_export($itemTypeGiftServicesItem, true)); |
||
875 | } |
||
876 | } |
||
877 | if (!empty($invalidValues)) { |
||
878 | $message = sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\GiftServicesCodeType', is_array($invalidValues) ? implode(', ', $invalidValues) : var_export($invalidValues, true), implode(', ', \PayPal\EnumType\GiftServicesCodeType::getValidValues())); |
||
879 | } |
||
880 | unset($invalidValues); |
||
881 | return $message; |
||
882 | } |
||
883 | /** |
||
884 | * Set GiftServices value |
||
885 | * @uses \PayPal\EnumType\GiftServicesCodeType::valueIsValid() |
||
886 | * @uses \PayPal\EnumType\GiftServicesCodeType::getValidValues() |
||
887 | * @throws \InvalidArgumentException |
||
888 | * @param string[] $giftServices |
||
889 | * @return \PayPal\StructType\ItemType |
||
890 | */ |
||
891 | public function setGiftServices(array $giftServices = array()) |
||
892 | { |
||
893 | // validation for constraint: array |
||
894 | if ('' !== ($giftServicesArrayErrorMessage = self::validateGiftServicesForArrayConstraintsFromSetGiftServices($giftServices))) { |
||
895 | throw new \InvalidArgumentException($giftServicesArrayErrorMessage, __LINE__); |
||
896 | } |
||
897 | $this->GiftServices = $giftServices; |
||
898 | return $this; |
||
899 | } |
||
900 | /** |
||
901 | * Add item to GiftServices value |
||
902 | * @uses \PayPal\EnumType\GiftServicesCodeType::valueIsValid() |
||
903 | * @uses \PayPal\EnumType\GiftServicesCodeType::getValidValues() |
||
904 | * @throws \InvalidArgumentException |
||
905 | * @param string $item |
||
906 | * @return \PayPal\StructType\ItemType |
||
907 | */ |
||
908 | public function addToGiftServices($item) |
||
909 | { |
||
910 | // validation for constraint: enumeration |
||
911 | if (!\PayPal\EnumType\GiftServicesCodeType::valueIsValid($item)) { |
||
912 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\GiftServicesCodeType', is_array($item) ? implode(', ', $item) : var_export($item, true), implode(', ', \PayPal\EnumType\GiftServicesCodeType::getValidValues())), __LINE__); |
||
913 | } |
||
914 | $this->GiftServices[] = $item; |
||
915 | return $this; |
||
916 | } |
||
917 | /** |
||
918 | * Get HitCounter value |
||
919 | * @return string|null |
||
920 | */ |
||
921 | public function getHitCounter() |
||
922 | { |
||
923 | return $this->HitCounter; |
||
924 | } |
||
925 | /** |
||
926 | * Set HitCounter value |
||
927 | * @uses \PayPal\EnumType\HitCounterCodeType::valueIsValid() |
||
928 | * @uses \PayPal\EnumType\HitCounterCodeType::getValidValues() |
||
929 | * @throws \InvalidArgumentException |
||
930 | * @param string $hitCounter |
||
931 | * @return \PayPal\StructType\ItemType |
||
932 | */ |
||
933 | public function setHitCounter($hitCounter = null) |
||
934 | { |
||
935 | // validation for constraint: enumeration |
||
936 | if (!\PayPal\EnumType\HitCounterCodeType::valueIsValid($hitCounter)) { |
||
937 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\HitCounterCodeType', is_array($hitCounter) ? implode(', ', $hitCounter) : var_export($hitCounter, true), implode(', ', \PayPal\EnumType\HitCounterCodeType::getValidValues())), __LINE__); |
||
938 | } |
||
939 | $this->HitCounter = $hitCounter; |
||
940 | return $this; |
||
941 | } |
||
942 | /** |
||
943 | * Get ItemID value |
||
944 | * @return string|null |
||
945 | */ |
||
946 | public function getItemID() |
||
947 | { |
||
948 | return $this->ItemID; |
||
949 | } |
||
950 | /** |
||
951 | * Set ItemID value |
||
952 | * @param string $itemID |
||
953 | * @return \PayPal\StructType\ItemType |
||
954 | */ |
||
955 | public function setItemID($itemID = null) |
||
956 | { |
||
957 | // validation for constraint: string |
||
958 | if (!is_null($itemID) && !is_string($itemID)) { |
||
959 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($itemID, true), gettype($itemID)), __LINE__); |
||
960 | } |
||
961 | $this->ItemID = $itemID; |
||
962 | return $this; |
||
963 | } |
||
964 | /** |
||
965 | * Get ListingDetails value |
||
966 | * @return \PayPal\StructType\ListingDetailsType|null |
||
967 | */ |
||
968 | public function getListingDetails() |
||
969 | { |
||
970 | return $this->ListingDetails; |
||
971 | } |
||
972 | /** |
||
973 | * Set ListingDetails value |
||
974 | * @param \PayPal\StructType\ListingDetailsType $listingDetails |
||
975 | * @return \PayPal\StructType\ItemType |
||
976 | */ |
||
977 | public function setListingDetails(\PayPal\StructType\ListingDetailsType $listingDetails = null) |
||
978 | { |
||
979 | $this->ListingDetails = $listingDetails; |
||
980 | return $this; |
||
981 | } |
||
982 | /** |
||
983 | * Get ListingDesigner value |
||
984 | * @return \PayPal\StructType\ListingDesignerType|null |
||
985 | */ |
||
986 | public function getListingDesigner() |
||
987 | { |
||
988 | return $this->ListingDesigner; |
||
989 | } |
||
990 | /** |
||
991 | * Set ListingDesigner value |
||
992 | * @param \PayPal\StructType\ListingDesignerType $listingDesigner |
||
993 | * @return \PayPal\StructType\ItemType |
||
994 | */ |
||
995 | public function setListingDesigner(\PayPal\StructType\ListingDesignerType $listingDesigner = null) |
||
996 | { |
||
997 | $this->ListingDesigner = $listingDesigner; |
||
998 | return $this; |
||
999 | } |
||
1000 | /** |
||
1001 | * Get ListingDuration value |
||
1002 | * @return string|null |
||
1003 | */ |
||
1004 | public function getListingDuration() |
||
1005 | { |
||
1006 | return $this->ListingDuration; |
||
1007 | } |
||
1008 | /** |
||
1009 | * Set ListingDuration value |
||
1010 | * @uses \PayPal\EnumType\ListingDurationCodeType::valueIsValid() |
||
1011 | * @uses \PayPal\EnumType\ListingDurationCodeType::getValidValues() |
||
1012 | * @throws \InvalidArgumentException |
||
1013 | * @param string $listingDuration |
||
1014 | * @return \PayPal\StructType\ItemType |
||
1015 | */ |
||
1016 | public function setListingDuration($listingDuration = null) |
||
1017 | { |
||
1018 | // validation for constraint: enumeration |
||
1019 | if (!\PayPal\EnumType\ListingDurationCodeType::valueIsValid($listingDuration)) { |
||
1020 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\ListingDurationCodeType', is_array($listingDuration) ? implode(', ', $listingDuration) : var_export($listingDuration, true), implode(', ', \PayPal\EnumType\ListingDurationCodeType::getValidValues())), __LINE__); |
||
1021 | } |
||
1022 | $this->ListingDuration = $listingDuration; |
||
1023 | return $this; |
||
1024 | } |
||
1025 | /** |
||
1026 | * Get ListingEnhancement value |
||
1027 | * @return string[]|null |
||
1028 | */ |
||
1029 | public function getListingEnhancement() |
||
1030 | { |
||
1031 | return $this->ListingEnhancement; |
||
1032 | } |
||
1033 | /** |
||
1034 | * This method is responsible for validating the values passed to the setListingEnhancement method |
||
1035 | * This method is willingly generated in order to preserve the one-line inline validation within the setListingEnhancement method |
||
1036 | * @param array $values |
||
1037 | * @return string A non-empty message if the values does not match the validation rules |
||
1038 | */ |
||
1039 | public static function validateListingEnhancementForArrayConstraintsFromSetListingEnhancement(array $values = array()) |
||
1040 | { |
||
1041 | $message = ''; |
||
1042 | $invalidValues = []; |
||
1043 | foreach ($values as $itemTypeListingEnhancementItem) { |
||
1044 | // validation for constraint: enumeration |
||
1045 | if (!\PayPal\EnumType\ListingEnhancementsCodeType::valueIsValid($itemTypeListingEnhancementItem)) { |
||
1046 | $invalidValues[] = is_object($itemTypeListingEnhancementItem) ? get_class($itemTypeListingEnhancementItem) : sprintf('%s(%s)', gettype($itemTypeListingEnhancementItem), var_export($itemTypeListingEnhancementItem, true)); |
||
1047 | } |
||
1048 | } |
||
1049 | if (!empty($invalidValues)) { |
||
1050 | $message = sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\ListingEnhancementsCodeType', is_array($invalidValues) ? implode(', ', $invalidValues) : var_export($invalidValues, true), implode(', ', \PayPal\EnumType\ListingEnhancementsCodeType::getValidValues())); |
||
1051 | } |
||
1052 | unset($invalidValues); |
||
1053 | return $message; |
||
1054 | } |
||
1055 | /** |
||
1056 | * Set ListingEnhancement value |
||
1057 | * @uses \PayPal\EnumType\ListingEnhancementsCodeType::valueIsValid() |
||
1058 | * @uses \PayPal\EnumType\ListingEnhancementsCodeType::getValidValues() |
||
1059 | * @throws \InvalidArgumentException |
||
1060 | * @param string[] $listingEnhancement |
||
1061 | * @return \PayPal\StructType\ItemType |
||
1062 | */ |
||
1063 | public function setListingEnhancement(array $listingEnhancement = array()) |
||
1064 | { |
||
1065 | // validation for constraint: array |
||
1066 | if ('' !== ($listingEnhancementArrayErrorMessage = self::validateListingEnhancementForArrayConstraintsFromSetListingEnhancement($listingEnhancement))) { |
||
1067 | throw new \InvalidArgumentException($listingEnhancementArrayErrorMessage, __LINE__); |
||
1068 | } |
||
1069 | $this->ListingEnhancement = $listingEnhancement; |
||
1070 | return $this; |
||
1071 | } |
||
1072 | /** |
||
1073 | * Add item to ListingEnhancement value |
||
1074 | * @uses \PayPal\EnumType\ListingEnhancementsCodeType::valueIsValid() |
||
1075 | * @uses \PayPal\EnumType\ListingEnhancementsCodeType::getValidValues() |
||
1076 | * @throws \InvalidArgumentException |
||
1077 | * @param string $item |
||
1078 | * @return \PayPal\StructType\ItemType |
||
1079 | */ |
||
1080 | public function addToListingEnhancement($item) |
||
1081 | { |
||
1082 | // validation for constraint: enumeration |
||
1083 | if (!\PayPal\EnumType\ListingEnhancementsCodeType::valueIsValid($item)) { |
||
1084 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\ListingEnhancementsCodeType', is_array($item) ? implode(', ', $item) : var_export($item, true), implode(', ', \PayPal\EnumType\ListingEnhancementsCodeType::getValidValues())), __LINE__); |
||
1085 | } |
||
1086 | $this->ListingEnhancement[] = $item; |
||
1087 | return $this; |
||
1088 | } |
||
1089 | /** |
||
1090 | * Get ListingType value |
||
1091 | * @return string|null |
||
1092 | */ |
||
1093 | public function getListingType() |
||
1094 | { |
||
1095 | return $this->ListingType; |
||
1096 | } |
||
1097 | /** |
||
1098 | * Set ListingType value |
||
1099 | * @uses \PayPal\EnumType\ListingTypeCodeType::valueIsValid() |
||
1100 | * @uses \PayPal\EnumType\ListingTypeCodeType::getValidValues() |
||
1101 | * @throws \InvalidArgumentException |
||
1102 | * @param string $listingType |
||
1103 | * @return \PayPal\StructType\ItemType |
||
1104 | */ |
||
1105 | public function setListingType($listingType = null) |
||
1106 | { |
||
1107 | // validation for constraint: enumeration |
||
1108 | if (!\PayPal\EnumType\ListingTypeCodeType::valueIsValid($listingType)) { |
||
1109 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\ListingTypeCodeType', is_array($listingType) ? implode(', ', $listingType) : var_export($listingType, true), implode(', ', \PayPal\EnumType\ListingTypeCodeType::getValidValues())), __LINE__); |
||
1110 | } |
||
1111 | $this->ListingType = $listingType; |
||
1112 | return $this; |
||
1113 | } |
||
1114 | /** |
||
1115 | * Get Location value |
||
1116 | * @return string|null |
||
1117 | */ |
||
1118 | public function getLocation() |
||
1119 | { |
||
1120 | return $this->Location; |
||
1121 | } |
||
1122 | /** |
||
1123 | * Set Location value |
||
1124 | * @param string $location |
||
1125 | * @return \PayPal\StructType\ItemType |
||
1126 | */ |
||
1127 | public function setLocation($location = null) |
||
1128 | { |
||
1129 | // validation for constraint: string |
||
1130 | if (!is_null($location) && !is_string($location)) { |
||
1131 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($location, true), gettype($location)), __LINE__); |
||
1132 | } |
||
1133 | $this->Location = $location; |
||
1134 | return $this; |
||
1135 | } |
||
1136 | /** |
||
1137 | * Get PartnerCode value |
||
1138 | * @return string|null |
||
1139 | */ |
||
1140 | public function getPartnerCode() |
||
1141 | { |
||
1142 | return $this->PartnerCode; |
||
1143 | } |
||
1144 | /** |
||
1145 | * Set PartnerCode value |
||
1146 | * @param string $partnerCode |
||
1147 | * @return \PayPal\StructType\ItemType |
||
1148 | */ |
||
1149 | public function setPartnerCode($partnerCode = null) |
||
1150 | { |
||
1151 | // validation for constraint: string |
||
1152 | if (!is_null($partnerCode) && !is_string($partnerCode)) { |
||
1153 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($partnerCode, true), gettype($partnerCode)), __LINE__); |
||
1154 | } |
||
1155 | $this->PartnerCode = $partnerCode; |
||
1156 | return $this; |
||
1157 | } |
||
1158 | /** |
||
1159 | * Get PartnerName value |
||
1160 | * @return string|null |
||
1161 | */ |
||
1162 | public function getPartnerName() |
||
1163 | { |
||
1164 | return $this->PartnerName; |
||
1165 | } |
||
1166 | /** |
||
1167 | * Set PartnerName value |
||
1168 | * @param string $partnerName |
||
1169 | * @return \PayPal\StructType\ItemType |
||
1170 | */ |
||
1171 | public function setPartnerName($partnerName = null) |
||
1172 | { |
||
1173 | // validation for constraint: string |
||
1174 | if (!is_null($partnerName) && !is_string($partnerName)) { |
||
1175 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($partnerName, true), gettype($partnerName)), __LINE__); |
||
1176 | } |
||
1177 | $this->PartnerName = $partnerName; |
||
1178 | return $this; |
||
1179 | } |
||
1180 | /** |
||
1181 | * Get PaymentMethods value |
||
1182 | * @return string[]|null |
||
1183 | */ |
||
1184 | public function getPaymentMethods() |
||
1185 | { |
||
1186 | return $this->PaymentMethods; |
||
1187 | } |
||
1188 | /** |
||
1189 | * This method is responsible for validating the values passed to the setPaymentMethods method |
||
1190 | * This method is willingly generated in order to preserve the one-line inline validation within the setPaymentMethods method |
||
1191 | * @param array $values |
||
1192 | * @return string A non-empty message if the values does not match the validation rules |
||
1193 | */ |
||
1194 | public static function validatePaymentMethodsForArrayConstraintsFromSetPaymentMethods(array $values = array()) |
||
1195 | { |
||
1196 | $message = ''; |
||
1197 | $invalidValues = []; |
||
1198 | foreach ($values as $itemTypePaymentMethodsItem) { |
||
1199 | // validation for constraint: enumeration |
||
1200 | if (!\PayPal\EnumType\BuyerPaymentMethodCodeType::valueIsValid($itemTypePaymentMethodsItem)) { |
||
1201 | $invalidValues[] = is_object($itemTypePaymentMethodsItem) ? get_class($itemTypePaymentMethodsItem) : sprintf('%s(%s)', gettype($itemTypePaymentMethodsItem), var_export($itemTypePaymentMethodsItem, true)); |
||
1202 | } |
||
1203 | } |
||
1204 | if (!empty($invalidValues)) { |
||
1205 | $message = sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\BuyerPaymentMethodCodeType', is_array($invalidValues) ? implode(', ', $invalidValues) : var_export($invalidValues, true), implode(', ', \PayPal\EnumType\BuyerPaymentMethodCodeType::getValidValues())); |
||
1206 | } |
||
1207 | unset($invalidValues); |
||
1208 | return $message; |
||
1209 | } |
||
1210 | /** |
||
1211 | * Set PaymentMethods value |
||
1212 | * @uses \PayPal\EnumType\BuyerPaymentMethodCodeType::valueIsValid() |
||
1213 | * @uses \PayPal\EnumType\BuyerPaymentMethodCodeType::getValidValues() |
||
1214 | * @throws \InvalidArgumentException |
||
1215 | * @param string[] $paymentMethods |
||
1216 | * @return \PayPal\StructType\ItemType |
||
1217 | */ |
||
1218 | public function setPaymentMethods(array $paymentMethods = array()) |
||
1219 | { |
||
1220 | // validation for constraint: array |
||
1221 | if ('' !== ($paymentMethodsArrayErrorMessage = self::validatePaymentMethodsForArrayConstraintsFromSetPaymentMethods($paymentMethods))) { |
||
1222 | throw new \InvalidArgumentException($paymentMethodsArrayErrorMessage, __LINE__); |
||
1223 | } |
||
1224 | $this->PaymentMethods = $paymentMethods; |
||
1225 | return $this; |
||
1226 | } |
||
1227 | /** |
||
1228 | * Add item to PaymentMethods value |
||
1229 | * @uses \PayPal\EnumType\BuyerPaymentMethodCodeType::valueIsValid() |
||
1230 | * @uses \PayPal\EnumType\BuyerPaymentMethodCodeType::getValidValues() |
||
1231 | * @throws \InvalidArgumentException |
||
1232 | * @param string $item |
||
1233 | * @return \PayPal\StructType\ItemType |
||
1234 | */ |
||
1235 | public function addToPaymentMethods($item) |
||
1236 | { |
||
1237 | // validation for constraint: enumeration |
||
1238 | if (!\PayPal\EnumType\BuyerPaymentMethodCodeType::valueIsValid($item)) { |
||
1239 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\BuyerPaymentMethodCodeType', is_array($item) ? implode(', ', $item) : var_export($item, true), implode(', ', \PayPal\EnumType\BuyerPaymentMethodCodeType::getValidValues())), __LINE__); |
||
1240 | } |
||
1241 | $this->PaymentMethods[] = $item; |
||
1242 | return $this; |
||
1243 | } |
||
1244 | /** |
||
1245 | * Get PayPalEmailAddress value |
||
1246 | * @return string|null |
||
1247 | */ |
||
1248 | public function getPayPalEmailAddress() |
||
1249 | { |
||
1250 | return $this->PayPalEmailAddress; |
||
1251 | } |
||
1252 | /** |
||
1253 | * Set PayPalEmailAddress value |
||
1254 | * @param string $payPalEmailAddress |
||
1255 | * @return \PayPal\StructType\ItemType |
||
1256 | */ |
||
1257 | public function setPayPalEmailAddress($payPalEmailAddress = null) |
||
1258 | { |
||
1259 | // validation for constraint: string |
||
1260 | if (!is_null($payPalEmailAddress) && !is_string($payPalEmailAddress)) { |
||
1261 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($payPalEmailAddress, true), gettype($payPalEmailAddress)), __LINE__); |
||
1262 | } |
||
1263 | $this->PayPalEmailAddress = $payPalEmailAddress; |
||
1264 | return $this; |
||
1265 | } |
||
1266 | /** |
||
1267 | * Get PrimaryCategory value |
||
1268 | * @return \PayPal\StructType\CategoryType|null |
||
1269 | */ |
||
1270 | public function getPrimaryCategory() |
||
1271 | { |
||
1272 | return $this->PrimaryCategory; |
||
1273 | } |
||
1274 | /** |
||
1275 | * Set PrimaryCategory value |
||
1276 | * @param \PayPal\StructType\CategoryType $primaryCategory |
||
1277 | * @return \PayPal\StructType\ItemType |
||
1278 | */ |
||
1279 | public function setPrimaryCategory(\PayPal\StructType\CategoryType $primaryCategory = null) |
||
1280 | { |
||
1281 | $this->PrimaryCategory = $primaryCategory; |
||
1282 | return $this; |
||
1283 | } |
||
1284 | /** |
||
1285 | * Get PrivateListing value |
||
1286 | * @return bool|null |
||
1287 | */ |
||
1288 | public function getPrivateListing() |
||
1289 | { |
||
1290 | return $this->PrivateListing; |
||
1291 | } |
||
1292 | /** |
||
1293 | * Set PrivateListing value |
||
1294 | * @param bool $privateListing |
||
1295 | * @return \PayPal\StructType\ItemType |
||
1296 | */ |
||
1297 | public function setPrivateListing($privateListing = null) |
||
1298 | { |
||
1299 | // validation for constraint: boolean |
||
1300 | if (!is_null($privateListing) && !is_bool($privateListing)) { |
||
1301 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($privateListing, true), gettype($privateListing)), __LINE__); |
||
1302 | } |
||
1303 | $this->PrivateListing = $privateListing; |
||
1304 | return $this; |
||
1305 | } |
||
1306 | /** |
||
1307 | * Get Quantity value |
||
1308 | * @return int|null |
||
1309 | */ |
||
1310 | public function getQuantity() |
||
1311 | { |
||
1312 | return $this->Quantity; |
||
1313 | } |
||
1314 | /** |
||
1315 | * Set Quantity value |
||
1316 | * @param int $quantity |
||
1317 | * @return \PayPal\StructType\ItemType |
||
1318 | */ |
||
1319 | public function setQuantity($quantity = null) |
||
1320 | { |
||
1321 | // validation for constraint: int |
||
1322 | if (!is_null($quantity) && !(is_int($quantity) || ctype_digit($quantity))) { |
||
1323 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($quantity, true), gettype($quantity)), __LINE__); |
||
1324 | } |
||
1325 | $this->Quantity = $quantity; |
||
1326 | return $this; |
||
1327 | } |
||
1328 | /** |
||
1329 | * Get RegionID value |
||
1330 | * @return string|null |
||
1331 | */ |
||
1332 | public function getRegionID() |
||
1333 | { |
||
1334 | return $this->RegionID; |
||
1335 | } |
||
1336 | /** |
||
1337 | * Set RegionID value |
||
1338 | * @param string $regionID |
||
1339 | * @return \PayPal\StructType\ItemType |
||
1340 | */ |
||
1341 | public function setRegionID($regionID = null) |
||
1342 | { |
||
1343 | // validation for constraint: string |
||
1344 | if (!is_null($regionID) && !is_string($regionID)) { |
||
1345 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($regionID, true), gettype($regionID)), __LINE__); |
||
1346 | } |
||
1347 | $this->RegionID = $regionID; |
||
1348 | return $this; |
||
1349 | } |
||
1350 | /** |
||
1351 | * Get RelistLink value |
||
1352 | * @return bool|null |
||
1353 | */ |
||
1354 | public function getRelistLink() |
||
1355 | { |
||
1356 | return $this->RelistLink; |
||
1357 | } |
||
1358 | /** |
||
1359 | * Set RelistLink value |
||
1360 | * @param bool $relistLink |
||
1361 | * @return \PayPal\StructType\ItemType |
||
1362 | */ |
||
1363 | public function setRelistLink($relistLink = null) |
||
1364 | { |
||
1365 | // validation for constraint: boolean |
||
1366 | if (!is_null($relistLink) && !is_bool($relistLink)) { |
||
1367 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($relistLink, true), gettype($relistLink)), __LINE__); |
||
1368 | } |
||
1369 | $this->RelistLink = $relistLink; |
||
1370 | return $this; |
||
1371 | } |
||
1372 | /** |
||
1373 | * Get ReservePrice value |
||
1374 | * @return \PayPal\StructType\AmountType|null |
||
1375 | */ |
||
1376 | public function getReservePrice() |
||
1377 | { |
||
1378 | return $this->ReservePrice; |
||
1379 | } |
||
1380 | /** |
||
1381 | * Set ReservePrice value |
||
1382 | * @param \PayPal\StructType\AmountType $reservePrice |
||
1383 | * @return \PayPal\StructType\ItemType |
||
1384 | */ |
||
1385 | public function setReservePrice(\PayPal\StructType\AmountType $reservePrice = null) |
||
1386 | { |
||
1387 | $this->ReservePrice = $reservePrice; |
||
1388 | return $this; |
||
1389 | } |
||
1390 | /** |
||
1391 | * Get ReviseStatus value |
||
1392 | * @return \PayPal\StructType\ReviseStatusType|null |
||
1393 | */ |
||
1394 | public function getReviseStatus() |
||
1395 | { |
||
1396 | return $this->ReviseStatus; |
||
1397 | } |
||
1398 | /** |
||
1399 | * Set ReviseStatus value |
||
1400 | * @param \PayPal\StructType\ReviseStatusType $reviseStatus |
||
1401 | * @return \PayPal\StructType\ItemType |
||
1402 | */ |
||
1403 | public function setReviseStatus(\PayPal\StructType\ReviseStatusType $reviseStatus = null) |
||
1404 | { |
||
1405 | $this->ReviseStatus = $reviseStatus; |
||
1406 | return $this; |
||
1407 | } |
||
1408 | /** |
||
1409 | * Get ScheduleTime value |
||
1410 | * @return string|null |
||
1411 | */ |
||
1412 | public function getScheduleTime() |
||
1413 | { |
||
1414 | return $this->ScheduleTime; |
||
1415 | } |
||
1416 | /** |
||
1417 | * Set ScheduleTime value |
||
1418 | * @param string $scheduleTime |
||
1419 | * @return \PayPal\StructType\ItemType |
||
1420 | */ |
||
1421 | public function setScheduleTime($scheduleTime = null) |
||
1422 | { |
||
1423 | // validation for constraint: string |
||
1424 | if (!is_null($scheduleTime) && !is_string($scheduleTime)) { |
||
1425 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($scheduleTime, true), gettype($scheduleTime)), __LINE__); |
||
1426 | } |
||
1427 | $this->ScheduleTime = $scheduleTime; |
||
1428 | return $this; |
||
1429 | } |
||
1430 | /** |
||
1431 | * Get SecondaryCategory value |
||
1432 | * @return \PayPal\StructType\CategoryType|null |
||
1433 | */ |
||
1434 | public function getSecondaryCategory() |
||
1435 | { |
||
1436 | return $this->SecondaryCategory; |
||
1437 | } |
||
1438 | /** |
||
1439 | * Set SecondaryCategory value |
||
1440 | * @param \PayPal\StructType\CategoryType $secondaryCategory |
||
1441 | * @return \PayPal\StructType\ItemType |
||
1442 | */ |
||
1443 | public function setSecondaryCategory(\PayPal\StructType\CategoryType $secondaryCategory = null) |
||
1447 | } |
||
1448 | /** |
||
1449 | * Get SiteHostedPicture value |
||
1450 | * @return \PayPal\StructType\SiteHostedPictureType|null |
||
1451 | */ |
||
1452 | public function getSiteHostedPicture() |
||
1453 | { |
||
1454 | return $this->SiteHostedPicture; |
||
1455 | } |
||
1456 | /** |
||
1457 | * Set SiteHostedPicture value |
||
1458 | * @param \PayPal\StructType\SiteHostedPictureType $siteHostedPicture |
||
1459 | * @return \PayPal\StructType\ItemType |
||
1460 | */ |
||
1461 | public function setSiteHostedPicture(\PayPal\StructType\SiteHostedPictureType $siteHostedPicture = null) |
||
1462 | { |
||
1463 | $this->SiteHostedPicture = $siteHostedPicture; |
||
1464 | return $this; |
||
1465 | } |
||
1466 | /** |
||
1467 | * Get Seller value |
||
1468 | * @return \PayPal\StructType\UserType|null |
||
1469 | */ |
||
1470 | public function getSeller() |
||
1471 | { |
||
1472 | return $this->Seller; |
||
1473 | } |
||
1474 | /** |
||
1475 | * Set Seller value |
||
1476 | * @param \PayPal\StructType\UserType $seller |
||
1477 | * @return \PayPal\StructType\ItemType |
||
1478 | */ |
||
1479 | public function setSeller(\PayPal\StructType\UserType $seller = null) |
||
1480 | { |
||
1481 | $this->Seller = $seller; |
||
1482 | return $this; |
||
1483 | } |
||
1484 | /** |
||
1485 | * Get SellingStatus value |
||
1486 | * @return \PayPal\StructType\SellingStatusType|null |
||
1487 | */ |
||
1488 | public function getSellingStatus() |
||
1489 | { |
||
1490 | return $this->SellingStatus; |
||
1491 | } |
||
1492 | /** |
||
1493 | * Set SellingStatus value |
||
1494 | * @param \PayPal\StructType\SellingStatusType $sellingStatus |
||
1495 | * @return \PayPal\StructType\ItemType |
||
1496 | */ |
||
1497 | public function setSellingStatus(\PayPal\StructType\SellingStatusType $sellingStatus = null) |
||
1498 | { |
||
1499 | $this->SellingStatus = $sellingStatus; |
||
1500 | return $this; |
||
1501 | } |
||
1502 | /** |
||
1503 | * Get ShippingOption value |
||
1504 | * @return string|null |
||
1505 | */ |
||
1506 | public function getShippingOption() |
||
1507 | { |
||
1508 | return $this->ShippingOption; |
||
1509 | } |
||
1510 | /** |
||
1511 | * Set ShippingOption value |
||
1512 | * @uses \PayPal\EnumType\ShippingOptionCodeType::valueIsValid() |
||
1513 | * @uses \PayPal\EnumType\ShippingOptionCodeType::getValidValues() |
||
1514 | * @throws \InvalidArgumentException |
||
1515 | * @param string $shippingOption |
||
1516 | * @return \PayPal\StructType\ItemType |
||
1517 | */ |
||
1518 | public function setShippingOption($shippingOption = null) |
||
1519 | { |
||
1520 | // validation for constraint: enumeration |
||
1521 | if (!\PayPal\EnumType\ShippingOptionCodeType::valueIsValid($shippingOption)) { |
||
1522 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\ShippingOptionCodeType', is_array($shippingOption) ? implode(', ', $shippingOption) : var_export($shippingOption, true), implode(', ', \PayPal\EnumType\ShippingOptionCodeType::getValidValues())), __LINE__); |
||
1523 | } |
||
1524 | $this->ShippingOption = $shippingOption; |
||
1525 | return $this; |
||
1526 | } |
||
1527 | /** |
||
1528 | * Get ShippingDetails value |
||
1529 | * @return \PayPal\StructType\ShippingDetailsType|null |
||
1530 | */ |
||
1531 | public function getShippingDetails() |
||
1532 | { |
||
1533 | return $this->ShippingDetails; |
||
1534 | } |
||
1535 | /** |
||
1536 | * Set ShippingDetails value |
||
1537 | * @param \PayPal\StructType\ShippingDetailsType $shippingDetails |
||
1538 | * @return \PayPal\StructType\ItemType |
||
1539 | */ |
||
1540 | public function setShippingDetails(\PayPal\StructType\ShippingDetailsType $shippingDetails = null) |
||
1541 | { |
||
1542 | $this->ShippingDetails = $shippingDetails; |
||
1543 | return $this; |
||
1544 | } |
||
1545 | /** |
||
1546 | * Get ShippingRegions value |
||
1547 | * @return string[]|null |
||
1548 | */ |
||
1549 | public function getShippingRegions() |
||
1550 | { |
||
1551 | return $this->ShippingRegions; |
||
1552 | } |
||
1553 | /** |
||
1554 | * This method is responsible for validating the values passed to the setShippingRegions method |
||
1555 | * This method is willingly generated in order to preserve the one-line inline validation within the setShippingRegions method |
||
1556 | * @param array $values |
||
1557 | * @return string A non-empty message if the values does not match the validation rules |
||
1558 | */ |
||
1559 | public static function validateShippingRegionsForArrayConstraintsFromSetShippingRegions(array $values = array()) |
||
1560 | { |
||
1561 | $message = ''; |
||
1562 | $invalidValues = []; |
||
1563 | foreach ($values as $itemTypeShippingRegionsItem) { |
||
1564 | // validation for constraint: enumeration |
||
1565 | if (!\PayPal\EnumType\ShippingRegionCodeType::valueIsValid($itemTypeShippingRegionsItem)) { |
||
1566 | $invalidValues[] = is_object($itemTypeShippingRegionsItem) ? get_class($itemTypeShippingRegionsItem) : sprintf('%s(%s)', gettype($itemTypeShippingRegionsItem), var_export($itemTypeShippingRegionsItem, true)); |
||
1567 | } |
||
1568 | } |
||
1569 | if (!empty($invalidValues)) { |
||
1570 | $message = sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\ShippingRegionCodeType', is_array($invalidValues) ? implode(', ', $invalidValues) : var_export($invalidValues, true), implode(', ', \PayPal\EnumType\ShippingRegionCodeType::getValidValues())); |
||
1571 | } |
||
1572 | unset($invalidValues); |
||
1573 | return $message; |
||
1574 | } |
||
1575 | /** |
||
1576 | * Set ShippingRegions value |
||
1577 | * @uses \PayPal\EnumType\ShippingRegionCodeType::valueIsValid() |
||
1578 | * @uses \PayPal\EnumType\ShippingRegionCodeType::getValidValues() |
||
1579 | * @throws \InvalidArgumentException |
||
1580 | * @param string[] $shippingRegions |
||
1581 | * @return \PayPal\StructType\ItemType |
||
1582 | */ |
||
1583 | public function setShippingRegions(array $shippingRegions = array()) |
||
1584 | { |
||
1585 | // validation for constraint: array |
||
1586 | if ('' !== ($shippingRegionsArrayErrorMessage = self::validateShippingRegionsForArrayConstraintsFromSetShippingRegions($shippingRegions))) { |
||
1587 | throw new \InvalidArgumentException($shippingRegionsArrayErrorMessage, __LINE__); |
||
1588 | } |
||
1589 | $this->ShippingRegions = $shippingRegions; |
||
1590 | return $this; |
||
1591 | } |
||
1592 | /** |
||
1593 | * Add item to ShippingRegions value |
||
1594 | * @uses \PayPal\EnumType\ShippingRegionCodeType::valueIsValid() |
||
1595 | * @uses \PayPal\EnumType\ShippingRegionCodeType::getValidValues() |
||
1596 | * @throws \InvalidArgumentException |
||
1597 | * @param string $item |
||
1598 | * @return \PayPal\StructType\ItemType |
||
1599 | */ |
||
1600 | public function addToShippingRegions($item) |
||
1601 | { |
||
1602 | // validation for constraint: enumeration |
||
1603 | if (!\PayPal\EnumType\ShippingRegionCodeType::valueIsValid($item)) { |
||
1604 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\ShippingRegionCodeType', is_array($item) ? implode(', ', $item) : var_export($item, true), implode(', ', \PayPal\EnumType\ShippingRegionCodeType::getValidValues())), __LINE__); |
||
1605 | } |
||
1606 | $this->ShippingRegions[] = $item; |
||
1607 | return $this; |
||
1608 | } |
||
1609 | /** |
||
1610 | * Get ShippingTerms value |
||
1611 | * @return string|null |
||
1612 | */ |
||
1613 | public function getShippingTerms() |
||
1614 | { |
||
1615 | return $this->ShippingTerms; |
||
1616 | } |
||
1617 | /** |
||
1618 | * Set ShippingTerms value |
||
1619 | * @uses \PayPal\EnumType\ShippingTermsCodeType::valueIsValid() |
||
1620 | * @uses \PayPal\EnumType\ShippingTermsCodeType::getValidValues() |
||
1621 | * @throws \InvalidArgumentException |
||
1622 | * @param string $shippingTerms |
||
1623 | * @return \PayPal\StructType\ItemType |
||
1624 | */ |
||
1625 | public function setShippingTerms($shippingTerms = null) |
||
1626 | { |
||
1627 | // validation for constraint: enumeration |
||
1628 | if (!\PayPal\EnumType\ShippingTermsCodeType::valueIsValid($shippingTerms)) { |
||
1629 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\ShippingTermsCodeType', is_array($shippingTerms) ? implode(', ', $shippingTerms) : var_export($shippingTerms, true), implode(', ', \PayPal\EnumType\ShippingTermsCodeType::getValidValues())), __LINE__); |
||
1630 | } |
||
1631 | $this->ShippingTerms = $shippingTerms; |
||
1632 | return $this; |
||
1633 | } |
||
1634 | /** |
||
1635 | * Get Site value |
||
1636 | * @return string|null |
||
1637 | */ |
||
1638 | public function getSite() |
||
1639 | { |
||
1640 | return $this->Site; |
||
1641 | } |
||
1642 | /** |
||
1643 | * Set Site value |
||
1644 | * @uses \PayPal\EnumType\SiteCodeType::valueIsValid() |
||
1645 | * @uses \PayPal\EnumType\SiteCodeType::getValidValues() |
||
1646 | * @throws \InvalidArgumentException |
||
1647 | * @param string $site |
||
1648 | * @return \PayPal\StructType\ItemType |
||
1649 | */ |
||
1650 | public function setSite($site = null) |
||
1651 | { |
||
1652 | // validation for constraint: enumeration |
||
1653 | if (!\PayPal\EnumType\SiteCodeType::valueIsValid($site)) { |
||
1654 | throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\SiteCodeType', is_array($site) ? implode(', ', $site) : var_export($site, true), implode(', ', \PayPal\EnumType\SiteCodeType::getValidValues())), __LINE__); |
||
1655 | } |
||
1656 | $this->Site = $site; |
||
1657 | return $this; |
||
1658 | } |
||
1659 | /** |
||
1660 | * Get StartPrice value |
||
1661 | * @return \PayPal\StructType\AmountType|null |
||
1662 | */ |
||
1663 | public function getStartPrice() |
||
1664 | { |
||
1665 | return $this->StartPrice; |
||
1666 | } |
||
1667 | /** |
||
1668 | * Set StartPrice value |
||
1669 | * @param \PayPal\StructType\AmountType $startPrice |
||
1670 | * @return \PayPal\StructType\ItemType |
||
1671 | */ |
||
1672 | public function setStartPrice(\PayPal\StructType\AmountType $startPrice = null) |
||
1673 | { |
||
1674 | $this->StartPrice = $startPrice; |
||
1675 | return $this; |
||
1676 | } |
||
1677 | /** |
||
1678 | * Get Storefront value |
||
1679 | * @return \PayPal\StructType\StorefrontType|null |
||
1680 | */ |
||
1681 | public function getStorefront() |
||
1682 | { |
||
1683 | return $this->Storefront; |
||
1684 | } |
||
1685 | /** |
||
1686 | * Set Storefront value |
||
1687 | * @param \PayPal\StructType\StorefrontType $storefront |
||
1688 | * @return \PayPal\StructType\ItemType |
||
1689 | */ |
||
1690 | public function setStorefront(\PayPal\StructType\StorefrontType $storefront = null) |
||
1691 | { |
||
1692 | $this->Storefront = $storefront; |
||
1693 | return $this; |
||
1694 | } |
||
1695 | /** |
||
1696 | * Get SubTitle value |
||
1697 | * @return string|null |
||
1698 | */ |
||
1699 | public function getSubTitle() |
||
1700 | { |
||
1701 | return $this->SubTitle; |
||
1702 | } |
||
1703 | /** |
||
1704 | * Set SubTitle value |
||
1705 | * @param string $subTitle |
||
1706 | * @return \PayPal\StructType\ItemType |
||
1707 | */ |
||
1708 | public function setSubTitle($subTitle = null) |
||
1709 | { |
||
1710 | // validation for constraint: string |
||
1711 | if (!is_null($subTitle) && !is_string($subTitle)) { |
||
1712 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($subTitle, true), gettype($subTitle)), __LINE__); |
||
1713 | } |
||
1714 | $this->SubTitle = $subTitle; |
||
1715 | return $this; |
||
1716 | } |
||
1717 | /** |
||
1718 | * Get TimeLeft value |
||
1719 | * @return string|null |
||
1720 | */ |
||
1721 | public function getTimeLeft() |
||
1722 | { |
||
1723 | return $this->TimeLeft; |
||
1724 | } |
||
1725 | /** |
||
1726 | * Set TimeLeft value |
||
1727 | * @param string $timeLeft |
||
1728 | * @return \PayPal\StructType\ItemType |
||
1729 | */ |
||
1730 | public function setTimeLeft($timeLeft = null) |
||
1731 | { |
||
1732 | // validation for constraint: string |
||
1733 | if (!is_null($timeLeft) && !is_string($timeLeft)) { |
||
1734 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($timeLeft, true), gettype($timeLeft)), __LINE__); |
||
1735 | } |
||
1736 | $this->TimeLeft = $timeLeft; |
||
1737 | return $this; |
||
1738 | } |
||
1739 | /** |
||
1740 | * Get Title value |
||
1741 | * @return string|null |
||
1742 | */ |
||
1743 | public function getTitle() |
||
1744 | { |
||
1745 | return $this->Title; |
||
1746 | } |
||
1747 | /** |
||
1748 | * Set Title value |
||
1749 | * @param string $title |
||
1750 | * @return \PayPal\StructType\ItemType |
||
1751 | */ |
||
1752 | public function setTitle($title = null) |
||
1753 | { |
||
1754 | // validation for constraint: string |
||
1755 | if (!is_null($title) && !is_string($title)) { |
||
1756 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($title, true), gettype($title)), __LINE__); |
||
1757 | } |
||
1758 | $this->Title = $title; |
||
1759 | return $this; |
||
1760 | } |
||
1761 | /** |
||
1762 | * Get UUID value |
||
1763 | * @return string|null |
||
1764 | */ |
||
1765 | public function getUUID() |
||
1766 | { |
||
1767 | return $this->UUID; |
||
1768 | } |
||
1769 | /** |
||
1770 | * Set UUID value |
||
1771 | * @param string $uUID |
||
1772 | * @return \PayPal\StructType\ItemType |
||
1773 | */ |
||
1774 | public function setUUID($uUID = null) |
||
1775 | { |
||
1776 | // validation for constraint: string |
||
1777 | if (!is_null($uUID) && !is_string($uUID)) { |
||
1778 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($uUID, true), gettype($uUID)), __LINE__); |
||
1779 | } |
||
1780 | // validation for constraint: length(36) |
||
1781 | if (!is_null($uUID) && mb_strlen($uUID) !== 36) { |
||
1782 | throw new \InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be equal to 36', mb_strlen($uUID)), __LINE__); |
||
1783 | } |
||
1784 | $this->UUID = $uUID; |
||
1785 | return $this; |
||
1786 | } |
||
1787 | /** |
||
1788 | * Get VATDetails value |
||
1789 | * @return \PayPal\StructType\VATDetailsType|null |
||
1790 | */ |
||
1791 | public function getVATDetails() |
||
1792 | { |
||
1793 | return $this->VATDetails; |
||
1794 | } |
||
1795 | /** |
||
1796 | * Set VATDetails value |
||
1797 | * @param \PayPal\StructType\VATDetailsType $vATDetails |
||
1798 | * @return \PayPal\StructType\ItemType |
||
1799 | */ |
||
1800 | public function setVATDetails(\PayPal\StructType\VATDetailsType $vATDetails = null) |
||
1801 | { |
||
1802 | $this->VATDetails = $vATDetails; |
||
1803 | return $this; |
||
1804 | } |
||
1805 | /** |
||
1806 | * Get VendorHostedPicture value |
||
1807 | * @return \PayPal\StructType\VendorHostedPictureType|null |
||
1808 | */ |
||
1809 | public function getVendorHostedPicture() |
||
1810 | { |
||
1811 | return $this->VendorHostedPicture; |
||
1812 | } |
||
1813 | /** |
||
1814 | * Set VendorHostedPicture value |
||
1815 | * @param \PayPal\StructType\VendorHostedPictureType $vendorHostedPicture |
||
1816 | * @return \PayPal\StructType\ItemType |
||
1817 | */ |
||
1818 | public function setVendorHostedPicture(\PayPal\StructType\VendorHostedPictureType $vendorHostedPicture = null) |
||
1822 | } |
||
1823 | } |
||
1824 |