Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
7473 vikram.rag 1
 
2
package com.amazonservices.mws.orders.model;
3
 
4
import javax.xml.bind.annotation.XmlAccessType;
5
import javax.xml.bind.annotation.XmlAccessorType;
6
import javax.xml.bind.annotation.XmlElement;
7
import javax.xml.bind.annotation.XmlType;
8
 
9
 
10
/**
11
 * <p>Java class for OrderItem complex type.
12
 * 
13
 * <p>The following schema fragment specifies the expected content contained within this class.
14
 * 
15
 * <pre>
16
 * &lt;complexType name="OrderItem">
17
 *   &lt;complexContent>
18
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
19
 *       &lt;sequence>
20
 *         &lt;element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string"/>
21
 *         &lt;element name="SellerSKU" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
22
 *         &lt;element name="OrderItemId" type="{http://www.w3.org/2001/XMLSchema}string"/>
23
 *         &lt;element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
24
 *         &lt;element name="QuantityOrdered" type="{http://www.w3.org/2001/XMLSchema}int"/>
25
 *         &lt;element name="QuantityShipped" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
26
 *         &lt;element name="ItemPrice" type="{https://mws.amazonservices.com/Orders/2011-01-01}Money" minOccurs="0"/>
27
 *         &lt;element name="ShippingPrice" type="{https://mws.amazonservices.com/Orders/2011-01-01}Money" minOccurs="0"/>
28
 *         &lt;element name="GiftWrapPrice" type="{https://mws.amazonservices.com/Orders/2011-01-01}Money" minOccurs="0"/>
29
 *         &lt;element name="ItemTax" type="{https://mws.amazonservices.com/Orders/2011-01-01}Money" minOccurs="0"/>
30
 *         &lt;element name="ShippingTax" type="{https://mws.amazonservices.com/Orders/2011-01-01}Money" minOccurs="0"/>
31
 *         &lt;element name="GiftWrapTax" type="{https://mws.amazonservices.com/Orders/2011-01-01}Money" minOccurs="0"/>
32
 *         &lt;element name="ShippingDiscount" type="{https://mws.amazonservices.com/Orders/2011-01-01}Money" minOccurs="0"/>
33
 *         &lt;element name="PromotionDiscount" type="{https://mws.amazonservices.com/Orders/2011-01-01}Money" minOccurs="0"/>
34
 *         &lt;element name="PromotionIds" type="{https://mws.amazonservices.com/Orders/2011-01-01}PromotionIdList" minOccurs="0"/>
35
 *         &lt;element name="CODFee" type="{https://mws.amazonservices.com/Orders/2011-01-01}Money" minOccurs="0"/>
36
 *         &lt;element name="CODFeeDiscount" type="{https://mws.amazonservices.com/Orders/2011-01-01}Money" minOccurs="0"/>
37
 *         &lt;element name="GiftMessageText" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
38
 *         &lt;element name="GiftWrapLevel" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
39
 *         &lt;element name="InvoiceData" type="{https://mws.amazonservices.com/Orders/2011-01-01}InvoiceData" minOccurs="0"/>
40
 *       &lt;/sequence>
41
 *     &lt;/restriction>
42
 *   &lt;/complexContent>
43
 * &lt;/complexType>
44
 * </pre>
45
 * 
46
 * 
47
 */
48
@XmlAccessorType(XmlAccessType.FIELD)
49
@XmlType(name = "OrderItem", propOrder = {
50
    "asin",
51
    "sellerSKU",
52
    "orderItemId",
53
    "title",
54
    "quantityOrdered",
55
    "quantityShipped",
56
    "itemPrice",
57
    "shippingPrice",
58
    "giftWrapPrice",
59
    "itemTax",
60
    "shippingTax",
61
    "giftWrapTax",
62
    "shippingDiscount",
63
    "promotionDiscount",
64
    "promotionIds",
65
    "codFee",
66
    "codFeeDiscount",
67
    "giftMessageText",
68
    "giftWrapLevel",
69
    "invoiceData"
70
})
71
public class OrderItem {
72
 
73
    @XmlElement(name = "ASIN", required = true)
74
    protected String asin;
75
    @XmlElement(name = "SellerSKU")
76
    protected String sellerSKU;
77
    @XmlElement(name = "OrderItemId", required = true)
78
    protected String orderItemId;
79
    @XmlElement(name = "Title")
80
    protected String title;
81
    @XmlElement(name = "QuantityOrdered")
82
    protected int quantityOrdered;
83
    @XmlElement(name = "QuantityShipped")
84
    protected Integer quantityShipped;
85
    @XmlElement(name = "ItemPrice")
86
    protected Money itemPrice;
87
    @XmlElement(name = "ShippingPrice")
88
    protected Money shippingPrice;
89
    @XmlElement(name = "GiftWrapPrice")
90
    protected Money giftWrapPrice;
91
    @XmlElement(name = "ItemTax")
92
    protected Money itemTax;
93
    @XmlElement(name = "ShippingTax")
94
    protected Money shippingTax;
95
    @XmlElement(name = "GiftWrapTax")
96
    protected Money giftWrapTax;
97
    @XmlElement(name = "ShippingDiscount")
98
    protected Money shippingDiscount;
99
    @XmlElement(name = "PromotionDiscount")
100
    protected Money promotionDiscount;
101
    @XmlElement(name = "PromotionIds")
102
    protected PromotionIdList promotionIds;
103
    @XmlElement(name = "CODFee")
104
    protected Money codFee;
105
    @XmlElement(name = "CODFeeDiscount")
106
    protected Money codFeeDiscount;
107
    @XmlElement(name = "GiftMessageText")
108
    protected String giftMessageText;
109
    @XmlElement(name = "GiftWrapLevel")
110
    protected String giftWrapLevel;
111
    @XmlElement(name = "InvoiceData")
112
    protected InvoiceData invoiceData;
113
 
114
    /**
115
     * Default constructor
116
     * 
117
     */
118
    public OrderItem() {
119
        super();
120
    }
121
 
122
    /**
123
     * Value constructor
124
     * 
125
     */
126
    public OrderItem(final String asin, final String sellerSKU, final String orderItemId, final String title, final int quantityOrdered, final Integer quantityShipped, final Money itemPrice, final Money shippingPrice, final Money giftWrapPrice, final Money itemTax, final Money shippingTax, final Money giftWrapTax, final Money shippingDiscount, final Money promotionDiscount, final PromotionIdList promotionIds, final Money codFee, final Money codFeeDiscount, final String giftMessageText, final String giftWrapLevel, final InvoiceData invoiceData) {
127
        this.asin = asin;
128
        this.sellerSKU = sellerSKU;
129
        this.orderItemId = orderItemId;
130
        this.title = title;
131
        this.quantityOrdered = quantityOrdered;
132
        this.quantityShipped = quantityShipped;
133
        this.itemPrice = itemPrice;
134
        this.shippingPrice = shippingPrice;
135
        this.giftWrapPrice = giftWrapPrice;
136
        this.itemTax = itemTax;
137
        this.shippingTax = shippingTax;
138
        this.giftWrapTax = giftWrapTax;
139
        this.shippingDiscount = shippingDiscount;
140
        this.promotionDiscount = promotionDiscount;
141
        this.promotionIds = promotionIds;
142
        this.codFee = codFee;
143
        this.codFeeDiscount = codFeeDiscount;
144
        this.giftMessageText = giftMessageText;
145
        this.giftWrapLevel = giftWrapLevel;
146
        this.invoiceData = invoiceData;
147
    }
148
 
149
    /**
150
     * Gets the value of the asin property.
151
     * 
152
     * @return
153
     *     possible object is
154
     *     {@link String }
155
     *     
156
     */
157
    public String getASIN() {
158
        return asin;
159
    }
160
 
161
    /**
162
     * Sets the value of the asin property.
163
     * 
164
     * @param value
165
     *     allowed object is
166
     *     {@link String }
167
     *     
168
     */
169
    public void setASIN(String value) {
170
        this.asin = value;
171
    }
172
 
173
    public boolean isSetASIN() {
174
        return (this.asin!= null);
175
    }
176
 
177
    /**
178
     * Gets the value of the sellerSKU property.
179
     * 
180
     * @return
181
     *     possible object is
182
     *     {@link String }
183
     *     
184
     */
185
    public String getSellerSKU() {
186
        return sellerSKU;
187
    }
188
 
189
    /**
190
     * Sets the value of the sellerSKU property.
191
     * 
192
     * @param value
193
     *     allowed object is
194
     *     {@link String }
195
     *     
196
     */
197
    public void setSellerSKU(String value) {
198
        this.sellerSKU = value;
199
    }
200
 
201
    public boolean isSetSellerSKU() {
202
        return (this.sellerSKU!= null);
203
    }
204
 
205
    /**
206
     * Gets the value of the orderItemId property.
207
     * 
208
     * @return
209
     *     possible object is
210
     *     {@link String }
211
     *     
212
     */
213
    public String getOrderItemId() {
214
        return orderItemId;
215
    }
216
 
217
    /**
218
     * Sets the value of the orderItemId property.
219
     * 
220
     * @param value
221
     *     allowed object is
222
     *     {@link String }
223
     *     
224
     */
225
    public void setOrderItemId(String value) {
226
        this.orderItemId = value;
227
    }
228
 
229
    public boolean isSetOrderItemId() {
230
        return (this.orderItemId!= null);
231
    }
232
 
233
    /**
234
     * Gets the value of the title property.
235
     * 
236
     * @return
237
     *     possible object is
238
     *     {@link String }
239
     *     
240
     */
241
    public String getTitle() {
242
        return title;
243
    }
244
 
245
    /**
246
     * Sets the value of the title property.
247
     * 
248
     * @param value
249
     *     allowed object is
250
     *     {@link String }
251
     *     
252
     */
253
    public void setTitle(String value) {
254
        this.title = value;
255
    }
256
 
257
    public boolean isSetTitle() {
258
        return (this.title!= null);
259
    }
260
 
261
    /**
262
     * Gets the value of the quantityOrdered property.
263
     * 
264
     */
265
    public int getQuantityOrdered() {
266
        return quantityOrdered;
267
    }
268
 
269
    /**
270
     * Sets the value of the quantityOrdered property.
271
     * 
272
     */
273
    public void setQuantityOrdered(int value) {
274
        this.quantityOrdered = value;
275
    }
276
 
277
    public boolean isSetQuantityOrdered() {
278
        return true;
279
    }
280
 
281
    /**
282
     * Gets the value of the quantityShipped property.
283
     * 
284
     * @return
285
     *     possible object is
286
     *     {@link Integer }
287
     *     
288
     */
289
    public Integer getQuantityShipped() {
290
        return quantityShipped;
291
    }
292
 
293
    /**
294
     * Sets the value of the quantityShipped property.
295
     * 
296
     * @param value
297
     *     allowed object is
298
     *     {@link Integer }
299
     *     
300
     */
301
    public void setQuantityShipped(Integer value) {
302
        this.quantityShipped = value;
303
    }
304
 
305
    public boolean isSetQuantityShipped() {
306
        return (this.quantityShipped!= null);
307
    }
308
 
309
    /**
310
     * Gets the value of the itemPrice property.
311
     * 
312
     * @return
313
     *     possible object is
314
     *     {@link Money }
315
     *     
316
     */
317
    public Money getItemPrice() {
318
        return itemPrice;
319
    }
320
 
321
    /**
322
     * Sets the value of the itemPrice property.
323
     * 
324
     * @param value
325
     *     allowed object is
326
     *     {@link Money }
327
     *     
328
     */
329
    public void setItemPrice(Money value) {
330
        this.itemPrice = value;
331
    }
332
 
333
    public boolean isSetItemPrice() {
334
        return (this.itemPrice!= null);
335
    }
336
 
337
    /**
338
     * Gets the value of the shippingPrice property.
339
     * 
340
     * @return
341
     *     possible object is
342
     *     {@link Money }
343
     *     
344
     */
345
    public Money getShippingPrice() {
346
        return shippingPrice;
347
    }
348
 
349
    /**
350
     * Sets the value of the shippingPrice property.
351
     * 
352
     * @param value
353
     *     allowed object is
354
     *     {@link Money }
355
     *     
356
     */
357
    public void setShippingPrice(Money value) {
358
        this.shippingPrice = value;
359
    }
360
 
361
    public boolean isSetShippingPrice() {
362
        return (this.shippingPrice!= null);
363
    }
364
 
365
    /**
366
     * Gets the value of the giftWrapPrice property.
367
     * 
368
     * @return
369
     *     possible object is
370
     *     {@link Money }
371
     *     
372
     */
373
    public Money getGiftWrapPrice() {
374
        return giftWrapPrice;
375
    }
376
 
377
    /**
378
     * Sets the value of the giftWrapPrice property.
379
     * 
380
     * @param value
381
     *     allowed object is
382
     *     {@link Money }
383
     *     
384
     */
385
    public void setGiftWrapPrice(Money value) {
386
        this.giftWrapPrice = value;
387
    }
388
 
389
    public boolean isSetGiftWrapPrice() {
390
        return (this.giftWrapPrice!= null);
391
    }
392
 
393
    /**
394
     * Gets the value of the itemTax property.
395
     * 
396
     * @return
397
     *     possible object is
398
     *     {@link Money }
399
     *     
400
     */
401
    public Money getItemTax() {
402
        return itemTax;
403
    }
404
 
405
    /**
406
     * Sets the value of the itemTax property.
407
     * 
408
     * @param value
409
     *     allowed object is
410
     *     {@link Money }
411
     *     
412
     */
413
    public void setItemTax(Money value) {
414
        this.itemTax = value;
415
    }
416
 
417
    public boolean isSetItemTax() {
418
        return (this.itemTax!= null);
419
    }
420
 
421
    /**
422
     * Gets the value of the shippingTax property.
423
     * 
424
     * @return
425
     *     possible object is
426
     *     {@link Money }
427
     *     
428
     */
429
    public Money getShippingTax() {
430
        return shippingTax;
431
    }
432
 
433
    /**
434
     * Sets the value of the shippingTax property.
435
     * 
436
     * @param value
437
     *     allowed object is
438
     *     {@link Money }
439
     *     
440
     */
441
    public void setShippingTax(Money value) {
442
        this.shippingTax = value;
443
    }
444
 
445
    public boolean isSetShippingTax() {
446
        return (this.shippingTax!= null);
447
    }
448
 
449
    /**
450
     * Gets the value of the giftWrapTax property.
451
     * 
452
     * @return
453
     *     possible object is
454
     *     {@link Money }
455
     *     
456
     */
457
    public Money getGiftWrapTax() {
458
        return giftWrapTax;
459
    }
460
 
461
    /**
462
     * Sets the value of the giftWrapTax property.
463
     * 
464
     * @param value
465
     *     allowed object is
466
     *     {@link Money }
467
     *     
468
     */
469
    public void setGiftWrapTax(Money value) {
470
        this.giftWrapTax = value;
471
    }
472
 
473
    public boolean isSetGiftWrapTax() {
474
        return (this.giftWrapTax!= null);
475
    }
476
 
477
    /**
478
     * Gets the value of the shippingDiscount property.
479
     * 
480
     * @return
481
     *     possible object is
482
     *     {@link Money }
483
     *     
484
     */
485
    public Money getShippingDiscount() {
486
        return shippingDiscount;
487
    }
488
 
489
    /**
490
     * Sets the value of the shippingDiscount property.
491
     * 
492
     * @param value
493
     *     allowed object is
494
     *     {@link Money }
495
     *     
496
     */
497
    public void setShippingDiscount(Money value) {
498
        this.shippingDiscount = value;
499
    }
500
 
501
    public boolean isSetShippingDiscount() {
502
        return (this.shippingDiscount!= null);
503
    }
504
 
505
    /**
506
     * Gets the value of the promotionDiscount property.
507
     * 
508
     * @return
509
     *     possible object is
510
     *     {@link Money }
511
     *     
512
     */
513
    public Money getPromotionDiscount() {
514
        return promotionDiscount;
515
    }
516
 
517
    /**
518
     * Sets the value of the promotionDiscount property.
519
     * 
520
     * @param value
521
     *     allowed object is
522
     *     {@link Money }
523
     *     
524
     */
525
    public void setPromotionDiscount(Money value) {
526
        this.promotionDiscount = value;
527
    }
528
 
529
    public boolean isSetPromotionDiscount() {
530
        return (this.promotionDiscount!= null);
531
    }
532
 
533
    /**
534
     * Gets the value of the promotionIds property.
535
     * 
536
     * @return
537
     *     possible object is
538
     *     {@link PromotionIdList }
539
     *     
540
     */
541
    public PromotionIdList getPromotionIds() {
542
        return promotionIds;
543
    }
544
 
545
    /**
546
     * Sets the value of the promotionIds property.
547
     * 
548
     * @param value
549
     *     allowed object is
550
     *     {@link PromotionIdList }
551
     *     
552
     */
553
    public void setPromotionIds(PromotionIdList value) {
554
        this.promotionIds = value;
555
    }
556
 
557
    public boolean isSetPromotionIds() {
558
        return (this.promotionIds!= null);
559
    }
560
 
561
    /**
562
     * Gets the value of the codFee property.
563
     * 
564
     * @return
565
     *     possible object is
566
     *     {@link Money }
567
     *     
568
     */
569
    public Money getCODFee() {
570
        return codFee;
571
    }
572
 
573
    /**
574
     * Sets the value of the codFee property.
575
     * 
576
     * @param value
577
     *     allowed object is
578
     *     {@link Money }
579
     *     
580
     */
581
    public void setCODFee(Money value) {
582
        this.codFee = value;
583
    }
584
 
585
    public boolean isSetCODFee() {
586
        return (this.codFee!= null);
587
    }
588
 
589
    /**
590
     * Gets the value of the codFeeDiscount property.
591
     * 
592
     * @return
593
     *     possible object is
594
     *     {@link Money }
595
     *     
596
     */
597
    public Money getCODFeeDiscount() {
598
        return codFeeDiscount;
599
    }
600
 
601
    /**
602
     * Sets the value of the codFeeDiscount property.
603
     * 
604
     * @param value
605
     *     allowed object is
606
     *     {@link Money }
607
     *     
608
     */
609
    public void setCODFeeDiscount(Money value) {
610
        this.codFeeDiscount = value;
611
    }
612
 
613
    public boolean isSetCODFeeDiscount() {
614
        return (this.codFeeDiscount!= null);
615
    }
616
 
617
    /**
618
     * Gets the value of the giftMessageText property.
619
     * 
620
     * @return
621
     *     possible object is
622
     *     {@link String }
623
     *     
624
     */
625
    public String getGiftMessageText() {
626
        return giftMessageText;
627
    }
628
 
629
    /**
630
     * Sets the value of the giftMessageText property.
631
     * 
632
     * @param value
633
     *     allowed object is
634
     *     {@link String }
635
     *     
636
     */
637
    public void setGiftMessageText(String value) {
638
        this.giftMessageText = value;
639
    }
640
 
641
    public boolean isSetGiftMessageText() {
642
        return (this.giftMessageText!= null);
643
    }
644
 
645
    /**
646
     * Gets the value of the giftWrapLevel property.
647
     * 
648
     * @return
649
     *     possible object is
650
     *     {@link String }
651
     *     
652
     */
653
    public String getGiftWrapLevel() {
654
        return giftWrapLevel;
655
    }
656
 
657
    /**
658
     * Sets the value of the giftWrapLevel property.
659
     * 
660
     * @param value
661
     *     allowed object is
662
     *     {@link String }
663
     *     
664
     */
665
    public void setGiftWrapLevel(String value) {
666
        this.giftWrapLevel = value;
667
    }
668
 
669
    public boolean isSetGiftWrapLevel() {
670
        return (this.giftWrapLevel!= null);
671
    }
672
 
673
    /**
674
     * Gets the value of the invoiceData property.
675
     * 
676
     * @return
677
     *     possible object is
678
     *     {@link InvoiceData }
679
     *     
680
     */
681
    public InvoiceData getInvoiceData() {
682
        return invoiceData;
683
    }
684
 
685
    /**
686
     * Sets the value of the invoiceData property.
687
     * 
688
     * @param value
689
     *     allowed object is
690
     *     {@link InvoiceData }
691
     *     
692
     */
693
    public void setInvoiceData(InvoiceData value) {
694
        this.invoiceData = value;
695
    }
696
 
697
    public boolean isSetInvoiceData() {
698
        return (this.invoiceData!= null);
699
    }
700
 
701
    /**
702
     * Sets the value of the ASIN property.
703
     * 
704
     * @param value
705
     * @return
706
     *     this instance
707
     */
708
    public OrderItem withASIN(String value) {
709
        setASIN(value);
710
        return this;
711
    }
712
 
713
    /**
714
     * Sets the value of the SellerSKU property.
715
     * 
716
     * @param value
717
     * @return
718
     *     this instance
719
     */
720
    public OrderItem withSellerSKU(String value) {
721
        setSellerSKU(value);
722
        return this;
723
    }
724
 
725
    /**
726
     * Sets the value of the OrderItemId property.
727
     * 
728
     * @param value
729
     * @return
730
     *     this instance
731
     */
732
    public OrderItem withOrderItemId(String value) {
733
        setOrderItemId(value);
734
        return this;
735
    }
736
 
737
    /**
738
     * Sets the value of the Title property.
739
     * 
740
     * @param value
741
     * @return
742
     *     this instance
743
     */
744
    public OrderItem withTitle(String value) {
745
        setTitle(value);
746
        return this;
747
    }
748
 
749
    /**
750
     * Sets the value of the QuantityOrdered property.
751
     * 
752
     * @param value
753
     * @return
754
     *     this instance
755
     */
756
    public OrderItem withQuantityOrdered(int value) {
757
        setQuantityOrdered(value);
758
        return this;
759
    }
760
 
761
    /**
762
     * Sets the value of the QuantityShipped property.
763
     * 
764
     * @param value
765
     * @return
766
     *     this instance
767
     */
768
    public OrderItem withQuantityShipped(Integer value) {
769
        setQuantityShipped(value);
770
        return this;
771
    }
772
 
773
    /**
774
     * Sets the value of the ItemPrice property.
775
     * 
776
     * @param value
777
     * @return
778
     *     this instance
779
     */
780
    public OrderItem withItemPrice(Money value) {
781
        setItemPrice(value);
782
        return this;
783
    }
784
 
785
    /**
786
     * Sets the value of the ShippingPrice property.
787
     * 
788
     * @param value
789
     * @return
790
     *     this instance
791
     */
792
    public OrderItem withShippingPrice(Money value) {
793
        setShippingPrice(value);
794
        return this;
795
    }
796
 
797
    /**
798
     * Sets the value of the GiftWrapPrice property.
799
     * 
800
     * @param value
801
     * @return
802
     *     this instance
803
     */
804
    public OrderItem withGiftWrapPrice(Money value) {
805
        setGiftWrapPrice(value);
806
        return this;
807
    }
808
 
809
    /**
810
     * Sets the value of the ItemTax property.
811
     * 
812
     * @param value
813
     * @return
814
     *     this instance
815
     */
816
    public OrderItem withItemTax(Money value) {
817
        setItemTax(value);
818
        return this;
819
    }
820
 
821
    /**
822
     * Sets the value of the ShippingTax property.
823
     * 
824
     * @param value
825
     * @return
826
     *     this instance
827
     */
828
    public OrderItem withShippingTax(Money value) {
829
        setShippingTax(value);
830
        return this;
831
    }
832
 
833
    /**
834
     * Sets the value of the GiftWrapTax property.
835
     * 
836
     * @param value
837
     * @return
838
     *     this instance
839
     */
840
    public OrderItem withGiftWrapTax(Money value) {
841
        setGiftWrapTax(value);
842
        return this;
843
    }
844
 
845
    /**
846
     * Sets the value of the ShippingDiscount property.
847
     * 
848
     * @param value
849
     * @return
850
     *     this instance
851
     */
852
    public OrderItem withShippingDiscount(Money value) {
853
        setShippingDiscount(value);
854
        return this;
855
    }
856
 
857
    /**
858
     * Sets the value of the PromotionDiscount property.
859
     * 
860
     * @param value
861
     * @return
862
     *     this instance
863
     */
864
    public OrderItem withPromotionDiscount(Money value) {
865
        setPromotionDiscount(value);
866
        return this;
867
    }
868
 
869
    /**
870
     * Sets the value of the PromotionIds property.
871
     * 
872
     * @param value
873
     * @return
874
     *     this instance
875
     */
876
    public OrderItem withPromotionIds(PromotionIdList value) {
877
        setPromotionIds(value);
878
        return this;
879
    }
880
 
881
    /**
882
     * Sets the value of the CODFee property.
883
     * 
884
     * @param value
885
     * @return
886
     *     this instance
887
     */
888
    public OrderItem withCODFee(Money value) {
889
        setCODFee(value);
890
        return this;
891
    }
892
 
893
    /**
894
     * Sets the value of the CODFeeDiscount property.
895
     * 
896
     * @param value
897
     * @return
898
     *     this instance
899
     */
900
    public OrderItem withCODFeeDiscount(Money value) {
901
        setCODFeeDiscount(value);
902
        return this;
903
    }
904
 
905
    /**
906
     * Sets the value of the GiftMessageText property.
907
     * 
908
     * @param value
909
     * @return
910
     *     this instance
911
     */
912
    public OrderItem withGiftMessageText(String value) {
913
        setGiftMessageText(value);
914
        return this;
915
    }
916
 
917
    /**
918
     * Sets the value of the GiftWrapLevel property.
919
     * 
920
     * @param value
921
     * @return
922
     *     this instance
923
     */
924
    public OrderItem withGiftWrapLevel(String value) {
925
        setGiftWrapLevel(value);
926
        return this;
927
    }
928
 
929
    /**
930
     * Sets the value of the InvoiceData property.
931
     * 
932
     * @param value
933
     * @return
934
     *     this instance
935
     */
936
    public OrderItem withInvoiceData(InvoiceData value) {
937
        setInvoiceData(value);
938
        return this;
939
    }
940
 
941
 
942
 
943
    /**
944
     * 
945
     * XML fragment representation of this object
946
     * 
947
     * @return XML fragment for this object. Name for outer
948
     * tag expected to be set by calling method. This fragment
949
     * returns inner properties representation only
950
     */
951
    public String toXMLFragment() {
952
        StringBuffer xml = new StringBuffer();
953
        if (isSetASIN()) {
954
            xml.append("<ASIN>");
955
            xml.append(escapeXML(getASIN()));
956
            xml.append("</ASIN>");
957
        }
958
        if (isSetSellerSKU()) {
959
            xml.append("<SellerSKU>");
960
            xml.append(escapeXML(getSellerSKU()));
961
            xml.append("</SellerSKU>");
962
        }
963
        if (isSetOrderItemId()) {
964
            xml.append("<OrderItemId>");
965
            xml.append(escapeXML(getOrderItemId()));
966
            xml.append("</OrderItemId>");
967
        }
968
        if (isSetTitle()) {
969
            xml.append("<Title>");
970
            xml.append(escapeXML(getTitle()));
971
            xml.append("</Title>");
972
        }
973
        if (isSetQuantityOrdered()) {
974
            xml.append("<QuantityOrdered>");
975
            xml.append(getQuantityOrdered() + "");
976
            xml.append("</QuantityOrdered>");
977
        }
978
        if (isSetQuantityShipped()) {
979
            xml.append("<QuantityShipped>");
980
            xml.append(getQuantityShipped() + "");
981
            xml.append("</QuantityShipped>");
982
        }
983
        if (isSetItemPrice()) {
984
            Money  itemPrice = getItemPrice();
985
            xml.append("<ItemPrice>");
986
            xml.append(itemPrice.toXMLFragment());
987
            xml.append("</ItemPrice>");
988
        } 
989
        if (isSetShippingPrice()) {
990
            Money  shippingPrice = getShippingPrice();
991
            xml.append("<ShippingPrice>");
992
            xml.append(shippingPrice.toXMLFragment());
993
            xml.append("</ShippingPrice>");
994
        } 
995
        if (isSetGiftWrapPrice()) {
996
            Money  giftWrapPrice = getGiftWrapPrice();
997
            xml.append("<GiftWrapPrice>");
998
            xml.append(giftWrapPrice.toXMLFragment());
999
            xml.append("</GiftWrapPrice>");
1000
        } 
1001
        if (isSetItemTax()) {
1002
            Money  itemTax = getItemTax();
1003
            xml.append("<ItemTax>");
1004
            xml.append(itemTax.toXMLFragment());
1005
            xml.append("</ItemTax>");
1006
        } 
1007
        if (isSetShippingTax()) {
1008
            Money  shippingTax = getShippingTax();
1009
            xml.append("<ShippingTax>");
1010
            xml.append(shippingTax.toXMLFragment());
1011
            xml.append("</ShippingTax>");
1012
        } 
1013
        if (isSetGiftWrapTax()) {
1014
            Money  giftWrapTax = getGiftWrapTax();
1015
            xml.append("<GiftWrapTax>");
1016
            xml.append(giftWrapTax.toXMLFragment());
1017
            xml.append("</GiftWrapTax>");
1018
        } 
1019
        if (isSetShippingDiscount()) {
1020
            Money  shippingDiscount = getShippingDiscount();
1021
            xml.append("<ShippingDiscount>");
1022
            xml.append(shippingDiscount.toXMLFragment());
1023
            xml.append("</ShippingDiscount>");
1024
        } 
1025
        if (isSetPromotionDiscount()) {
1026
            Money  promotionDiscount = getPromotionDiscount();
1027
            xml.append("<PromotionDiscount>");
1028
            xml.append(promotionDiscount.toXMLFragment());
1029
            xml.append("</PromotionDiscount>");
1030
        } 
1031
        if (isSetPromotionIds()) {
1032
            PromotionIdList  promotionIds = getPromotionIds();
1033
            xml.append("<PromotionIds>");
1034
            xml.append(promotionIds.toXMLFragment());
1035
            xml.append("</PromotionIds>");
1036
        } 
1037
        if (isSetCODFee()) {
1038
            Money  CODFee = getCODFee();
1039
            xml.append("<CODFee>");
1040
            xml.append(CODFee.toXMLFragment());
1041
            xml.append("</CODFee>");
1042
        } 
1043
        if (isSetCODFeeDiscount()) {
1044
            Money  CODFeeDiscount = getCODFeeDiscount();
1045
            xml.append("<CODFeeDiscount>");
1046
            xml.append(CODFeeDiscount.toXMLFragment());
1047
            xml.append("</CODFeeDiscount>");
1048
        } 
1049
        if (isSetGiftMessageText()) {
1050
            xml.append("<GiftMessageText>");
1051
            xml.append(escapeXML(getGiftMessageText()));
1052
            xml.append("</GiftMessageText>");
1053
        }
1054
        if (isSetGiftWrapLevel()) {
1055
            xml.append("<GiftWrapLevel>");
1056
            xml.append(escapeXML(getGiftWrapLevel()));
1057
            xml.append("</GiftWrapLevel>");
1058
        }
1059
        if (isSetInvoiceData()) {
1060
            InvoiceData  invoiceData = getInvoiceData();
1061
            xml.append("<InvoiceData>");
1062
            xml.append(invoiceData.toXMLFragment());
1063
            xml.append("</InvoiceData>");
1064
        } 
1065
        return xml.toString();
1066
    }
1067
 
1068
    /**
1069
     * 
1070
     * Escape XML special characters
1071
     */
1072
    private String escapeXML(String string) {
1073
        if (string == null)
1074
            return "null";
1075
        StringBuffer sb = new StringBuffer();
1076
        int length = string.length();
1077
        for (int i = 0; i < length; ++i) {
1078
            char c = string.charAt(i);
1079
            switch (c) {
1080
            case '&':
1081
                sb.append("&amp;");
1082
                break;
1083
            case '<':
1084
                sb.append("&lt;");
1085
                break;
1086
            case '>':
1087
                sb.append("&gt;");
1088
                break;
1089
            case '\'':
1090
                sb.append("&#039;");
1091
                break;
1092
            case '"':
1093
                sb.append("&quot;");
1094
                break;
1095
            default:
1096
                sb.append(c);
1097
            }
1098
        }
1099
        return sb.toString();
1100
    }
1101
 
1102
 
1103
 
1104
    /**
1105
     *
1106
     * JSON fragment representation of this object
1107
     *
1108
     * @return JSON fragment for this object. Name for outer
1109
     * object expected to be set by calling method. This fragment
1110
     * returns inner properties representation only
1111
     *
1112
     */
1113
    protected String toJSONFragment() {
1114
        StringBuffer json = new StringBuffer();
1115
        boolean first = true;
1116
        if (isSetASIN()) {
1117
            if (!first) json.append(", ");
1118
            json.append(quoteJSON("ASIN"));
1119
            json.append(" : ");
1120
            json.append(quoteJSON(getASIN()));
1121
            first = false;
1122
        }
1123
        if (isSetSellerSKU()) {
1124
            if (!first) json.append(", ");
1125
            json.append(quoteJSON("SellerSKU"));
1126
            json.append(" : ");
1127
            json.append(quoteJSON(getSellerSKU()));
1128
            first = false;
1129
        }
1130
        if (isSetOrderItemId()) {
1131
            if (!first) json.append(", ");
1132
            json.append(quoteJSON("OrderItemId"));
1133
            json.append(" : ");
1134
            json.append(quoteJSON(getOrderItemId()));
1135
            first = false;
1136
        }
1137
        if (isSetTitle()) {
1138
            if (!first) json.append(", ");
1139
            json.append(quoteJSON("Title"));
1140
            json.append(" : ");
1141
            json.append(quoteJSON(getTitle()));
1142
            first = false;
1143
        }
1144
        if (isSetQuantityOrdered()) {
1145
            if (!first) json.append(", ");
1146
            json.append(quoteJSON("QuantityOrdered"));
1147
            json.append(" : ");
1148
            json.append(quoteJSON(getQuantityOrdered() + ""));
1149
            first = false;
1150
        }
1151
        if (isSetQuantityShipped()) {
1152
            if (!first) json.append(", ");
1153
            json.append(quoteJSON("QuantityShipped"));
1154
            json.append(" : ");
1155
            json.append(quoteJSON(getQuantityShipped() + ""));
1156
            first = false;
1157
        }
1158
        if (isSetItemPrice()) {
1159
            if (!first) json.append(", ");
1160
            json.append("\"ItemPrice\" : {");
1161
            Money  itemPrice = getItemPrice();
1162
 
1163
 
1164
            json.append(itemPrice.toJSONFragment());
1165
            json.append("}");
1166
            first = false;
1167
        }
1168
        if (isSetShippingPrice()) {
1169
            if (!first) json.append(", ");
1170
            json.append("\"ShippingPrice\" : {");
1171
            Money  shippingPrice = getShippingPrice();
1172
 
1173
 
1174
            json.append(shippingPrice.toJSONFragment());
1175
            json.append("}");
1176
            first = false;
1177
        }
1178
        if (isSetGiftWrapPrice()) {
1179
            if (!first) json.append(", ");
1180
            json.append("\"GiftWrapPrice\" : {");
1181
            Money  giftWrapPrice = getGiftWrapPrice();
1182
 
1183
 
1184
            json.append(giftWrapPrice.toJSONFragment());
1185
            json.append("}");
1186
            first = false;
1187
        }
1188
        if (isSetItemTax()) {
1189
            if (!first) json.append(", ");
1190
            json.append("\"ItemTax\" : {");
1191
            Money  itemTax = getItemTax();
1192
 
1193
 
1194
            json.append(itemTax.toJSONFragment());
1195
            json.append("}");
1196
            first = false;
1197
        }
1198
        if (isSetShippingTax()) {
1199
            if (!first) json.append(", ");
1200
            json.append("\"ShippingTax\" : {");
1201
            Money  shippingTax = getShippingTax();
1202
 
1203
 
1204
            json.append(shippingTax.toJSONFragment());
1205
            json.append("}");
1206
            first = false;
1207
        }
1208
        if (isSetGiftWrapTax()) {
1209
            if (!first) json.append(", ");
1210
            json.append("\"GiftWrapTax\" : {");
1211
            Money  giftWrapTax = getGiftWrapTax();
1212
 
1213
 
1214
            json.append(giftWrapTax.toJSONFragment());
1215
            json.append("}");
1216
            first = false;
1217
        }
1218
        if (isSetShippingDiscount()) {
1219
            if (!first) json.append(", ");
1220
            json.append("\"ShippingDiscount\" : {");
1221
            Money  shippingDiscount = getShippingDiscount();
1222
 
1223
 
1224
            json.append(shippingDiscount.toJSONFragment());
1225
            json.append("}");
1226
            first = false;
1227
        }
1228
        if (isSetPromotionDiscount()) {
1229
            if (!first) json.append(", ");
1230
            json.append("\"PromotionDiscount\" : {");
1231
            Money  promotionDiscount = getPromotionDiscount();
1232
 
1233
 
1234
            json.append(promotionDiscount.toJSONFragment());
1235
            json.append("}");
1236
            first = false;
1237
        }
1238
        if (isSetPromotionIds()) {
1239
            if (!first) json.append(", ");
1240
            json.append("\"PromotionIds\" : {");
1241
            PromotionIdList  promotionIds = getPromotionIds();
1242
 
1243
 
1244
            json.append(promotionIds.toJSONFragment());
1245
            json.append("}");
1246
            first = false;
1247
        }
1248
        if (isSetCODFee()) {
1249
            if (!first) json.append(", ");
1250
            json.append("\"CODFee\" : {");
1251
            Money  CODFee = getCODFee();
1252
 
1253
 
1254
            json.append(CODFee.toJSONFragment());
1255
            json.append("}");
1256
            first = false;
1257
        }
1258
        if (isSetCODFeeDiscount()) {
1259
            if (!first) json.append(", ");
1260
            json.append("\"CODFeeDiscount\" : {");
1261
            Money  CODFeeDiscount = getCODFeeDiscount();
1262
 
1263
 
1264
            json.append(CODFeeDiscount.toJSONFragment());
1265
            json.append("}");
1266
            first = false;
1267
        }
1268
        if (isSetGiftMessageText()) {
1269
            if (!first) json.append(", ");
1270
            json.append(quoteJSON("GiftMessageText"));
1271
            json.append(" : ");
1272
            json.append(quoteJSON(getGiftMessageText()));
1273
            first = false;
1274
        }
1275
        if (isSetGiftWrapLevel()) {
1276
            if (!first) json.append(", ");
1277
            json.append(quoteJSON("GiftWrapLevel"));
1278
            json.append(" : ");
1279
            json.append(quoteJSON(getGiftWrapLevel()));
1280
            first = false;
1281
        }
1282
        if (isSetInvoiceData()) {
1283
            if (!first) json.append(", ");
1284
            json.append("\"InvoiceData\" : {");
1285
            InvoiceData  invoiceData = getInvoiceData();
1286
 
1287
 
1288
            json.append(invoiceData.toJSONFragment());
1289
            json.append("}");
1290
            first = false;
1291
        }
1292
        return json.toString();
1293
    }
1294
 
1295
    /**
1296
     *
1297
     * Quote JSON string
1298
     */
1299
    private String quoteJSON(String string) {
1300
        if (string == null)
1301
            return "null";
1302
        StringBuffer sb = new StringBuffer();
1303
        sb.append("\"");
1304
        int length = string.length();
1305
        for (int i = 0; i < length; ++i) {
1306
            char c = string.charAt(i);
1307
            switch (c) {
1308
            case '"':
1309
                sb.append("\\\"");
1310
                break;
1311
            case '\\':
1312
                sb.append("\\\\");
1313
                break;
1314
            case '/':
1315
                sb.append("\\/");
1316
                break;
1317
            case '\b':
1318
                sb.append("\\b");
1319
                break;
1320
            case '\f':
1321
                sb.append("\\f");
1322
                break;
1323
            case '\n':
1324
                sb.append("\\n");
1325
                break;
1326
            case '\r':
1327
                sb.append("\\r");
1328
                break;
1329
            case '\t':
1330
                sb.append("\\t");
1331
                break;
1332
            default:
1333
                if (c <  ' ') {
1334
                    sb.append("\\u" + String.format("%03x", Integer.valueOf(c)));
1335
                } else {
1336
                sb.append(c);
1337
            }
1338
        }
1339
        }
1340
        sb.append("\"");
1341
        return sb.toString();
1342
    }
1343
 
1344
 
1345
}