Subversion Repositories SmartDukaan

Rev

Rev 7473 | Details | Compare with Previous | 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"/>
12245 manish.sha 40
 *         &lt;element name="ConditionNote" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
41
 *         &lt;element name="ConditionId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
42
 *         &lt;element name="ConditionSubtypeId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
43
 *         &lt;element name="ScheduledDeliveryStartDate" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
44
 *         &lt;element name="ScheduledDeliveryEndDate" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
7473 vikram.rag 45
 *       &lt;/sequence>
46
 *     &lt;/restriction>
47
 *   &lt;/complexContent>
48
 * &lt;/complexType>
49
 * </pre>
50
 * 
51
 * 
52
 */
53
@XmlAccessorType(XmlAccessType.FIELD)
54
@XmlType(name = "OrderItem", propOrder = {
55
    "asin",
56
    "sellerSKU",
57
    "orderItemId",
58
    "title",
59
    "quantityOrdered",
60
    "quantityShipped",
61
    "itemPrice",
62
    "shippingPrice",
63
    "giftWrapPrice",
64
    "itemTax",
65
    "shippingTax",
66
    "giftWrapTax",
67
    "shippingDiscount",
68
    "promotionDiscount",
69
    "promotionIds",
70
    "codFee",
71
    "codFeeDiscount",
72
    "giftMessageText",
73
    "giftWrapLevel",
12245 manish.sha 74
    "invoiceData",
75
    "conditionNote",
76
    "conditionId",
77
    "conditionSubtypeId",
78
    "scheduledDeliveryStartDate",
79
    "scheduledDeliveryEndDate"
7473 vikram.rag 80
})
81
public class OrderItem {
82
 
83
    @XmlElement(name = "ASIN", required = true)
12245 manish.sha 84
    private String asin;
7473 vikram.rag 85
    @XmlElement(name = "SellerSKU")
12245 manish.sha 86
    private String sellerSKU;
7473 vikram.rag 87
    @XmlElement(name = "OrderItemId", required = true)
12245 manish.sha 88
    private String orderItemId;
7473 vikram.rag 89
    @XmlElement(name = "Title")
12245 manish.sha 90
    private String title;
7473 vikram.rag 91
    @XmlElement(name = "QuantityOrdered")
12245 manish.sha 92
    private int quantityOrdered;
7473 vikram.rag 93
    @XmlElement(name = "QuantityShipped")
12245 manish.sha 94
    private Integer quantityShipped;
7473 vikram.rag 95
    @XmlElement(name = "ItemPrice")
12245 manish.sha 96
    private Money itemPrice;
7473 vikram.rag 97
    @XmlElement(name = "ShippingPrice")
12245 manish.sha 98
    private Money shippingPrice;
7473 vikram.rag 99
    @XmlElement(name = "GiftWrapPrice")
12245 manish.sha 100
    private Money giftWrapPrice;
7473 vikram.rag 101
    @XmlElement(name = "ItemTax")
12245 manish.sha 102
    private Money itemTax;
7473 vikram.rag 103
    @XmlElement(name = "ShippingTax")
12245 manish.sha 104
    private Money shippingTax;
7473 vikram.rag 105
    @XmlElement(name = "GiftWrapTax")
12245 manish.sha 106
    private Money giftWrapTax;
7473 vikram.rag 107
    @XmlElement(name = "ShippingDiscount")
12245 manish.sha 108
    private Money shippingDiscount;
7473 vikram.rag 109
    @XmlElement(name = "PromotionDiscount")
12245 manish.sha 110
    private Money promotionDiscount;
7473 vikram.rag 111
    @XmlElement(name = "PromotionIds")
12245 manish.sha 112
    private PromotionIdList promotionIds;
7473 vikram.rag 113
    @XmlElement(name = "CODFee")
12245 manish.sha 114
    private Money codFee;
7473 vikram.rag 115
    @XmlElement(name = "CODFeeDiscount")
12245 manish.sha 116
    private Money codFeeDiscount;
7473 vikram.rag 117
    @XmlElement(name = "GiftMessageText")
12245 manish.sha 118
    private String giftMessageText;
7473 vikram.rag 119
    @XmlElement(name = "GiftWrapLevel")
12245 manish.sha 120
    private String giftWrapLevel;
7473 vikram.rag 121
    @XmlElement(name = "InvoiceData")
12245 manish.sha 122
    private InvoiceData invoiceData;
123
    @XmlElement(name="ConditionNote")
124
    private String conditionNote;
125
    @XmlElement(name="ConditionId")
126
    private String conditionId;
127
    @XmlElement(name="ConditionSubtypeId")
128
    private String conditionSubtypeId;
129
    @XmlElement(name="ScheduledDeliveryStartDate")
130
    private String scheduledDeliveryStartDate;
131
    @XmlElement(name="ScheduledDeliveryEndDate")
132
    private String scheduledDeliveryEndDate;
7473 vikram.rag 133
 
134
    /**
135
     * Default constructor
136
     * 
137
     */
138
    public OrderItem() {
139
        super();
140
    }
141
 
142
    /**
143
     * Value constructor
144
     * 
145
     */
12245 manish.sha 146
    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, final String conditionNote, final String conditionId, final String conditionSubtypeId, final String scheduledDeliveryStartDate, final String scheduledDeliveryEndDate) {
7473 vikram.rag 147
        this.asin = asin;
148
        this.sellerSKU = sellerSKU;
149
        this.orderItemId = orderItemId;
150
        this.title = title;
151
        this.quantityOrdered = quantityOrdered;
152
        this.quantityShipped = quantityShipped;
153
        this.itemPrice = itemPrice;
154
        this.shippingPrice = shippingPrice;
155
        this.giftWrapPrice = giftWrapPrice;
156
        this.itemTax = itemTax;
157
        this.shippingTax = shippingTax;
158
        this.giftWrapTax = giftWrapTax;
159
        this.shippingDiscount = shippingDiscount;
160
        this.promotionDiscount = promotionDiscount;
161
        this.promotionIds = promotionIds;
162
        this.codFee = codFee;
163
        this.codFeeDiscount = codFeeDiscount;
164
        this.giftMessageText = giftMessageText;
165
        this.giftWrapLevel = giftWrapLevel;
166
        this.invoiceData = invoiceData;
12245 manish.sha 167
        this.conditionNote = conditionNote;
168
        this.conditionId = conditionId;
169
        this.conditionSubtypeId = conditionSubtypeId;
170
        this.scheduledDeliveryStartDate = scheduledDeliveryStartDate;
171
        this.scheduledDeliveryEndDate = scheduledDeliveryEndDate;
7473 vikram.rag 172
    }
173
 
174
    /**
175
     * Gets the value of the asin property.
176
     * 
177
     * @return
178
     *     possible object is
179
     *     {@link String }
180
     *     
181
     */
182
    public String getASIN() {
183
        return asin;
184
    }
185
 
186
    /**
187
     * Sets the value of the asin property.
188
     * 
189
     * @param value
190
     *     allowed object is
191
     *     {@link String }
192
     *     
193
     */
194
    public void setASIN(String value) {
195
        this.asin = value;
196
    }
197
 
198
    public boolean isSetASIN() {
199
        return (this.asin!= null);
200
    }
201
 
202
    /**
203
     * Gets the value of the sellerSKU property.
204
     * 
205
     * @return
206
     *     possible object is
207
     *     {@link String }
208
     *     
209
     */
210
    public String getSellerSKU() {
211
        return sellerSKU;
212
    }
213
 
214
    /**
215
     * Sets the value of the sellerSKU property.
216
     * 
217
     * @param value
218
     *     allowed object is
219
     *     {@link String }
220
     *     
221
     */
222
    public void setSellerSKU(String value) {
223
        this.sellerSKU = value;
224
    }
225
 
226
    public boolean isSetSellerSKU() {
227
        return (this.sellerSKU!= null);
228
    }
229
 
230
    /**
231
     * Gets the value of the orderItemId property.
232
     * 
233
     * @return
234
     *     possible object is
235
     *     {@link String }
236
     *     
237
     */
238
    public String getOrderItemId() {
239
        return orderItemId;
240
    }
241
 
242
    /**
243
     * Sets the value of the orderItemId property.
244
     * 
245
     * @param value
246
     *     allowed object is
247
     *     {@link String }
248
     *     
249
     */
250
    public void setOrderItemId(String value) {
251
        this.orderItemId = value;
252
    }
253
 
254
    public boolean isSetOrderItemId() {
255
        return (this.orderItemId!= null);
256
    }
257
 
258
    /**
259
     * Gets the value of the title property.
260
     * 
261
     * @return
262
     *     possible object is
263
     *     {@link String }
264
     *     
265
     */
266
    public String getTitle() {
267
        return title;
268
    }
269
 
270
    /**
271
     * Sets the value of the title property.
272
     * 
273
     * @param value
274
     *     allowed object is
275
     *     {@link String }
276
     *     
277
     */
278
    public void setTitle(String value) {
279
        this.title = value;
280
    }
281
 
282
    public boolean isSetTitle() {
283
        return (this.title!= null);
284
    }
285
 
286
    /**
287
     * Gets the value of the quantityOrdered property.
288
     * 
289
     */
290
    public int getQuantityOrdered() {
291
        return quantityOrdered;
292
    }
293
 
294
    /**
295
     * Sets the value of the quantityOrdered property.
296
     * 
297
     */
298
    public void setQuantityOrdered(int value) {
299
        this.quantityOrdered = value;
300
    }
301
 
302
    public boolean isSetQuantityOrdered() {
303
        return true;
304
    }
305
 
306
    /**
307
     * Gets the value of the quantityShipped property.
308
     * 
309
     * @return
310
     *     possible object is
311
     *     {@link Integer }
312
     *     
313
     */
314
    public Integer getQuantityShipped() {
315
        return quantityShipped;
316
    }
317
 
318
    /**
319
     * Sets the value of the quantityShipped property.
320
     * 
321
     * @param value
322
     *     allowed object is
323
     *     {@link Integer }
324
     *     
325
     */
326
    public void setQuantityShipped(Integer value) {
327
        this.quantityShipped = value;
328
    }
329
 
330
    public boolean isSetQuantityShipped() {
331
        return (this.quantityShipped!= null);
332
    }
333
 
334
    /**
335
     * Gets the value of the itemPrice property.
336
     * 
337
     * @return
338
     *     possible object is
339
     *     {@link Money }
340
     *     
341
     */
342
    public Money getItemPrice() {
343
        return itemPrice;
344
    }
345
 
346
    /**
347
     * Sets the value of the itemPrice property.
348
     * 
349
     * @param value
350
     *     allowed object is
351
     *     {@link Money }
352
     *     
353
     */
354
    public void setItemPrice(Money value) {
355
        this.itemPrice = value;
356
    }
357
 
358
    public boolean isSetItemPrice() {
359
        return (this.itemPrice!= null);
360
    }
361
 
362
    /**
363
     * Gets the value of the shippingPrice property.
364
     * 
365
     * @return
366
     *     possible object is
367
     *     {@link Money }
368
     *     
369
     */
370
    public Money getShippingPrice() {
371
        return shippingPrice;
372
    }
373
 
374
    /**
375
     * Sets the value of the shippingPrice property.
376
     * 
377
     * @param value
378
     *     allowed object is
379
     *     {@link Money }
380
     *     
381
     */
382
    public void setShippingPrice(Money value) {
383
        this.shippingPrice = value;
384
    }
385
 
386
    public boolean isSetShippingPrice() {
387
        return (this.shippingPrice!= null);
388
    }
389
 
390
    /**
391
     * Gets the value of the giftWrapPrice property.
392
     * 
393
     * @return
394
     *     possible object is
395
     *     {@link Money }
396
     *     
397
     */
398
    public Money getGiftWrapPrice() {
399
        return giftWrapPrice;
400
    }
401
 
402
    /**
403
     * Sets the value of the giftWrapPrice property.
404
     * 
405
     * @param value
406
     *     allowed object is
407
     *     {@link Money }
408
     *     
409
     */
410
    public void setGiftWrapPrice(Money value) {
411
        this.giftWrapPrice = value;
412
    }
413
 
414
    public boolean isSetGiftWrapPrice() {
415
        return (this.giftWrapPrice!= null);
416
    }
417
 
418
    /**
419
     * Gets the value of the itemTax property.
420
     * 
421
     * @return
422
     *     possible object is
423
     *     {@link Money }
424
     *     
425
     */
426
    public Money getItemTax() {
427
        return itemTax;
428
    }
429
 
430
    /**
431
     * Sets the value of the itemTax property.
432
     * 
433
     * @param value
434
     *     allowed object is
435
     *     {@link Money }
436
     *     
437
     */
438
    public void setItemTax(Money value) {
439
        this.itemTax = value;
440
    }
441
 
442
    public boolean isSetItemTax() {
443
        return (this.itemTax!= null);
444
    }
445
 
446
    /**
447
     * Gets the value of the shippingTax property.
448
     * 
449
     * @return
450
     *     possible object is
451
     *     {@link Money }
452
     *     
453
     */
454
    public Money getShippingTax() {
455
        return shippingTax;
456
    }
457
 
458
    /**
459
     * Sets the value of the shippingTax property.
460
     * 
461
     * @param value
462
     *     allowed object is
463
     *     {@link Money }
464
     *     
465
     */
466
    public void setShippingTax(Money value) {
467
        this.shippingTax = value;
468
    }
469
 
470
    public boolean isSetShippingTax() {
471
        return (this.shippingTax!= null);
472
    }
473
 
474
    /**
475
     * Gets the value of the giftWrapTax property.
476
     * 
477
     * @return
478
     *     possible object is
479
     *     {@link Money }
480
     *     
481
     */
482
    public Money getGiftWrapTax() {
483
        return giftWrapTax;
484
    }
485
 
486
    /**
487
     * Sets the value of the giftWrapTax property.
488
     * 
489
     * @param value
490
     *     allowed object is
491
     *     {@link Money }
492
     *     
493
     */
494
    public void setGiftWrapTax(Money value) {
495
        this.giftWrapTax = value;
496
    }
497
 
498
    public boolean isSetGiftWrapTax() {
499
        return (this.giftWrapTax!= null);
500
    }
501
 
502
    /**
503
     * Gets the value of the shippingDiscount property.
504
     * 
505
     * @return
506
     *     possible object is
507
     *     {@link Money }
508
     *     
509
     */
510
    public Money getShippingDiscount() {
511
        return shippingDiscount;
512
    }
513
 
514
    /**
515
     * Sets the value of the shippingDiscount property.
516
     * 
517
     * @param value
518
     *     allowed object is
519
     *     {@link Money }
520
     *     
521
     */
522
    public void setShippingDiscount(Money value) {
523
        this.shippingDiscount = value;
524
    }
525
 
526
    public boolean isSetShippingDiscount() {
527
        return (this.shippingDiscount!= null);
528
    }
529
 
530
    /**
531
     * Gets the value of the promotionDiscount property.
532
     * 
533
     * @return
534
     *     possible object is
535
     *     {@link Money }
536
     *     
537
     */
538
    public Money getPromotionDiscount() {
539
        return promotionDiscount;
540
    }
541
 
542
    /**
543
     * Sets the value of the promotionDiscount property.
544
     * 
545
     * @param value
546
     *     allowed object is
547
     *     {@link Money }
548
     *     
549
     */
550
    public void setPromotionDiscount(Money value) {
551
        this.promotionDiscount = value;
552
    }
553
 
554
    public boolean isSetPromotionDiscount() {
555
        return (this.promotionDiscount!= null);
556
    }
557
 
558
    /**
559
     * Gets the value of the promotionIds property.
560
     * 
561
     * @return
562
     *     possible object is
563
     *     {@link PromotionIdList }
564
     *     
565
     */
566
    public PromotionIdList getPromotionIds() {
567
        return promotionIds;
568
    }
569
 
570
    /**
571
     * Sets the value of the promotionIds property.
572
     * 
573
     * @param value
574
     *     allowed object is
575
     *     {@link PromotionIdList }
576
     *     
577
     */
578
    public void setPromotionIds(PromotionIdList value) {
579
        this.promotionIds = value;
580
    }
581
 
582
    public boolean isSetPromotionIds() {
583
        return (this.promotionIds!= null);
584
    }
585
 
586
    /**
587
     * Gets the value of the codFee property.
588
     * 
589
     * @return
590
     *     possible object is
591
     *     {@link Money }
592
     *     
593
     */
594
    public Money getCODFee() {
595
        return codFee;
596
    }
597
 
598
    /**
599
     * Sets the value of the codFee property.
600
     * 
601
     * @param value
602
     *     allowed object is
603
     *     {@link Money }
604
     *     
605
     */
606
    public void setCODFee(Money value) {
607
        this.codFee = value;
608
    }
609
 
610
    public boolean isSetCODFee() {
611
        return (this.codFee!= null);
612
    }
613
 
614
    /**
615
     * Gets the value of the codFeeDiscount property.
616
     * 
617
     * @return
618
     *     possible object is
619
     *     {@link Money }
620
     *     
621
     */
622
    public Money getCODFeeDiscount() {
623
        return codFeeDiscount;
624
    }
625
 
626
    /**
627
     * Sets the value of the codFeeDiscount property.
628
     * 
629
     * @param value
630
     *     allowed object is
631
     *     {@link Money }
632
     *     
633
     */
634
    public void setCODFeeDiscount(Money value) {
635
        this.codFeeDiscount = value;
636
    }
637
 
638
    public boolean isSetCODFeeDiscount() {
639
        return (this.codFeeDiscount!= null);
640
    }
641
 
642
    /**
643
     * Gets the value of the giftMessageText property.
644
     * 
645
     * @return
646
     *     possible object is
647
     *     {@link String }
648
     *     
649
     */
650
    public String getGiftMessageText() {
651
        return giftMessageText;
652
    }
653
 
654
    /**
655
     * Sets the value of the giftMessageText property.
656
     * 
657
     * @param value
658
     *     allowed object is
659
     *     {@link String }
660
     *     
661
     */
662
    public void setGiftMessageText(String value) {
663
        this.giftMessageText = value;
664
    }
665
 
666
    public boolean isSetGiftMessageText() {
667
        return (this.giftMessageText!= null);
668
    }
669
 
670
    /**
671
     * Gets the value of the giftWrapLevel property.
672
     * 
673
     * @return
674
     *     possible object is
675
     *     {@link String }
676
     *     
677
     */
678
    public String getGiftWrapLevel() {
679
        return giftWrapLevel;
680
    }
681
 
682
    /**
683
     * Sets the value of the giftWrapLevel property.
684
     * 
685
     * @param value
686
     *     allowed object is
687
     *     {@link String }
688
     *     
689
     */
690
    public void setGiftWrapLevel(String value) {
691
        this.giftWrapLevel = value;
692
    }
693
 
694
    public boolean isSetGiftWrapLevel() {
695
        return (this.giftWrapLevel!= null);
696
    }
697
 
698
    /**
699
     * Gets the value of the invoiceData property.
700
     * 
701
     * @return
702
     *     possible object is
703
     *     {@link InvoiceData }
704
     *     
705
     */
706
    public InvoiceData getInvoiceData() {
707
        return invoiceData;
708
    }
709
 
710
    /**
711
     * Sets the value of the invoiceData property.
712
     * 
713
     * @param value
714
     *     allowed object is
715
     *     {@link InvoiceData }
716
     *     
717
     */
718
    public void setInvoiceData(InvoiceData value) {
719
        this.invoiceData = value;
720
    }
721
 
722
    public boolean isSetInvoiceData() {
723
        return (this.invoiceData!= null);
724
    }
12245 manish.sha 725
 
726
 
727
    /**
728
     * Get the value of ConditionNote.
729
     *
730
     * @return The value of ConditionNote.
731
     */
732
    public String getConditionNote() {
733
        return conditionNote;
734
    }
7473 vikram.rag 735
 
736
    /**
12245 manish.sha 737
     * Set the value of ConditionNote.
738
     *
739
     * @param conditionNote
740
     *            The new value to set.
741
     */
742
    public void setConditionNote(String conditionNote) {
743
        this.conditionNote = conditionNote;
744
    }
745
 
746
    /**
747
     * Check to see if ConditionNote is set.
748
     *
749
     * @return true if ConditionNote is set.
750
     */
751
    public boolean isSetConditionNote() {
752
        return conditionNote != null;
753
    }
754
 
755
    /**
756
     * Get the value of ConditionId.
757
     *
758
     * @return The value of ConditionId.
759
     */
760
    public String getConditionId() {
761
        return conditionId;
762
    }
763
 
764
    /**
765
     * Set the value of ConditionId.
766
     *
767
     * @param conditionId
768
     *            The new value to set.
769
     */
770
    public void setConditionId(String conditionId) {
771
        this.conditionId = conditionId;
772
    }
773
 
774
    /**
775
     * Check to see if ConditionId is set.
776
     *
777
     * @return true if ConditionId is set.
778
     */
779
    public boolean isSetConditionId() {
780
        return conditionId != null;
781
    }
782
 
783
    /**
784
     * Get the value of ConditionSubtypeId.
785
     *
786
     * @return The value of ConditionSubtypeId.
787
     */
788
    public String getConditionSubtypeId() {
789
        return conditionSubtypeId;
790
    }
791
 
792
    /**
793
     * Set the value of ConditionSubtypeId.
794
     *
795
     * @param conditionSubtypeId
796
     *            The new value to set.
797
     */
798
    public void setConditionSubtypeId(String conditionSubtypeId) {
799
        this.conditionSubtypeId = conditionSubtypeId;
800
    }
801
 
802
    /**
803
     * Check to see if ConditionSubtypeId is set.
804
     *
805
     * @return true if ConditionSubtypeId is set.
806
     */
807
    public boolean isSetConditionSubtypeId() {
808
        return conditionSubtypeId != null;
809
    }
810
 
811
    /**
812
     * Get the value of ScheduledDeliveryStartDate.
813
     *
814
     * @return The value of ScheduledDeliveryStartDate.
815
     */
816
    public String getScheduledDeliveryStartDate() {
817
        return scheduledDeliveryStartDate;
818
    }
819
 
820
    /**
821
     * Set the value of ScheduledDeliveryStartDate.
822
     *
823
     * @param scheduledDeliveryStartDate
824
     *            The new value to set.
825
     */
826
    public void setScheduledDeliveryStartDate(String scheduledDeliveryStartDate) {
827
        this.scheduledDeliveryStartDate = scheduledDeliveryStartDate;
828
    }
829
 
830
    /**
831
     * Check to see if ScheduledDeliveryStartDate is set.
832
     *
833
     * @return true if ScheduledDeliveryStartDate is set.
834
     */
835
    public boolean isSetScheduledDeliveryStartDate() {
836
        return scheduledDeliveryStartDate != null;
837
    }
838
 
839
    /**
840
     * Get the value of ScheduledDeliveryEndDate.
841
     *
842
     * @return The value of ScheduledDeliveryEndDate.
843
     */
844
    public String getScheduledDeliveryEndDate() {
845
        return scheduledDeliveryEndDate;
846
    }
847
 
848
    /**
849
     * Set the value of ScheduledDeliveryEndDate.
850
     *
851
     * @param scheduledDeliveryEndDate
852
     *            The new value to set.
853
     */
854
    public void setScheduledDeliveryEndDate(String scheduledDeliveryEndDate) {
855
        this.scheduledDeliveryEndDate = scheduledDeliveryEndDate;
856
    }
857
 
858
    /**
859
     * Check to see if ScheduledDeliveryEndDate is set.
860
     *
861
     * @return true if ScheduledDeliveryEndDate is set.
862
     */
863
    public boolean isSetScheduledDeliveryEndDate() {
864
        return scheduledDeliveryEndDate != null;
865
    }
866
 
867
 
868
 
869
    /**
7473 vikram.rag 870
     * Sets the value of the ASIN property.
871
     * 
872
     * @param value
873
     * @return
874
     *     this instance
875
     */
876
    public OrderItem withASIN(String value) {
877
        setASIN(value);
878
        return this;
879
    }
880
 
881
    /**
882
     * Sets the value of the SellerSKU property.
883
     * 
884
     * @param value
885
     * @return
886
     *     this instance
887
     */
888
    public OrderItem withSellerSKU(String value) {
889
        setSellerSKU(value);
890
        return this;
891
    }
892
 
893
    /**
894
     * Sets the value of the OrderItemId property.
895
     * 
896
     * @param value
897
     * @return
898
     *     this instance
899
     */
900
    public OrderItem withOrderItemId(String value) {
901
        setOrderItemId(value);
902
        return this;
903
    }
904
 
905
    /**
906
     * Sets the value of the Title property.
907
     * 
908
     * @param value
909
     * @return
910
     *     this instance
911
     */
912
    public OrderItem withTitle(String value) {
913
        setTitle(value);
914
        return this;
915
    }
916
 
917
    /**
918
     * Sets the value of the QuantityOrdered property.
919
     * 
920
     * @param value
921
     * @return
922
     *     this instance
923
     */
924
    public OrderItem withQuantityOrdered(int value) {
925
        setQuantityOrdered(value);
926
        return this;
927
    }
928
 
929
    /**
930
     * Sets the value of the QuantityShipped property.
931
     * 
932
     * @param value
933
     * @return
934
     *     this instance
935
     */
936
    public OrderItem withQuantityShipped(Integer value) {
937
        setQuantityShipped(value);
938
        return this;
939
    }
940
 
941
    /**
942
     * Sets the value of the ItemPrice property.
943
     * 
944
     * @param value
945
     * @return
946
     *     this instance
947
     */
948
    public OrderItem withItemPrice(Money value) {
949
        setItemPrice(value);
950
        return this;
951
    }
952
 
953
    /**
954
     * Sets the value of the ShippingPrice property.
955
     * 
956
     * @param value
957
     * @return
958
     *     this instance
959
     */
960
    public OrderItem withShippingPrice(Money value) {
961
        setShippingPrice(value);
962
        return this;
963
    }
964
 
965
    /**
966
     * Sets the value of the GiftWrapPrice property.
967
     * 
968
     * @param value
969
     * @return
970
     *     this instance
971
     */
972
    public OrderItem withGiftWrapPrice(Money value) {
973
        setGiftWrapPrice(value);
974
        return this;
975
    }
976
 
977
    /**
978
     * Sets the value of the ItemTax property.
979
     * 
980
     * @param value
981
     * @return
982
     *     this instance
983
     */
984
    public OrderItem withItemTax(Money value) {
985
        setItemTax(value);
986
        return this;
987
    }
988
 
989
    /**
990
     * Sets the value of the ShippingTax property.
991
     * 
992
     * @param value
993
     * @return
994
     *     this instance
995
     */
996
    public OrderItem withShippingTax(Money value) {
997
        setShippingTax(value);
998
        return this;
999
    }
1000
 
1001
    /**
1002
     * Sets the value of the GiftWrapTax property.
1003
     * 
1004
     * @param value
1005
     * @return
1006
     *     this instance
1007
     */
1008
    public OrderItem withGiftWrapTax(Money value) {
1009
        setGiftWrapTax(value);
1010
        return this;
1011
    }
1012
 
1013
    /**
1014
     * Sets the value of the ShippingDiscount property.
1015
     * 
1016
     * @param value
1017
     * @return
1018
     *     this instance
1019
     */
1020
    public OrderItem withShippingDiscount(Money value) {
1021
        setShippingDiscount(value);
1022
        return this;
1023
    }
1024
 
1025
    /**
1026
     * Sets the value of the PromotionDiscount property.
1027
     * 
1028
     * @param value
1029
     * @return
1030
     *     this instance
1031
     */
1032
    public OrderItem withPromotionDiscount(Money value) {
1033
        setPromotionDiscount(value);
1034
        return this;
1035
    }
1036
 
1037
    /**
1038
     * Sets the value of the PromotionIds property.
1039
     * 
1040
     * @param value
1041
     * @return
1042
     *     this instance
1043
     */
1044
    public OrderItem withPromotionIds(PromotionIdList value) {
1045
        setPromotionIds(value);
1046
        return this;
1047
    }
1048
 
1049
    /**
1050
     * Sets the value of the CODFee property.
1051
     * 
1052
     * @param value
1053
     * @return
1054
     *     this instance
1055
     */
1056
    public OrderItem withCODFee(Money value) {
1057
        setCODFee(value);
1058
        return this;
1059
    }
1060
 
1061
    /**
1062
     * Sets the value of the CODFeeDiscount property.
1063
     * 
1064
     * @param value
1065
     * @return
1066
     *     this instance
1067
     */
1068
    public OrderItem withCODFeeDiscount(Money value) {
1069
        setCODFeeDiscount(value);
1070
        return this;
1071
    }
1072
 
1073
    /**
1074
     * Sets the value of the GiftMessageText property.
1075
     * 
1076
     * @param value
1077
     * @return
1078
     *     this instance
1079
     */
1080
    public OrderItem withGiftMessageText(String value) {
1081
        setGiftMessageText(value);
1082
        return this;
1083
    }
1084
 
1085
    /**
1086
     * Sets the value of the GiftWrapLevel property.
1087
     * 
1088
     * @param value
1089
     * @return
1090
     *     this instance
1091
     */
1092
    public OrderItem withGiftWrapLevel(String value) {
1093
        setGiftWrapLevel(value);
1094
        return this;
1095
    }
1096
 
1097
    /**
1098
     * Sets the value of the InvoiceData property.
1099
     * 
1100
     * @param value
1101
     * @return
1102
     *     this instance
1103
     */
1104
    public OrderItem withInvoiceData(InvoiceData value) {
1105
        setInvoiceData(value);
1106
        return this;
1107
    }
1108
 
1109
    /**
12245 manish.sha 1110
     * Set the value of ConditionNote, return this.
1111
     *
1112
     * @param conditionNote
1113
     *             The new value to set.
1114
     *
1115
     * @return This instance.
1116
     */
1117
    public OrderItem withConditionNote(String conditionNote) {
1118
        this.conditionNote = conditionNote;
1119
        return this;
1120
    }
1121
 
1122
    /**
1123
     * Set the value of ConditionId, return this.
1124
     *
1125
     * @param conditionId
1126
     *             The new value to set.
1127
     *
1128
     * @return This instance.
1129
     */
1130
    public OrderItem withConditionId(String conditionId) {
1131
        this.conditionId = conditionId;
1132
        return this;
1133
    }
1134
 
1135
    /**
1136
     * Set the value of ConditionSubtypeId, return this.
1137
     *
1138
     * @param conditionSubtypeId
1139
     *             The new value to set.
1140
     *
1141
     * @return This instance.
1142
     */
1143
    public OrderItem withConditionSubtypeId(String conditionSubtypeId) {
1144
        this.conditionSubtypeId = conditionSubtypeId;
1145
        return this;
1146
    }
1147
 
1148
 
1149
    /**
1150
     * Set the value of ScheduledDeliveryStartDate, return this.
1151
     *
1152
     * @param scheduledDeliveryStartDate
1153
     *             The new value to set.
1154
     *
1155
     * @return This instance.
1156
     */
1157
    public OrderItem withScheduledDeliveryStartDate(String scheduledDeliveryStartDate) {
1158
        this.scheduledDeliveryStartDate = scheduledDeliveryStartDate;
1159
        return this;
1160
    }
1161
 
1162
    /**
1163
     * Set the value of ScheduledDeliveryEndDate, return this.
1164
     *
1165
     * @param scheduledDeliveryEndDate
1166
     *             The new value to set.
1167
     *
1168
     * @return This instance.
1169
     */
1170
    public OrderItem withScheduledDeliveryEndDate(String scheduledDeliveryEndDate) {
1171
        this.scheduledDeliveryEndDate = scheduledDeliveryEndDate;
1172
        return this;
1173
    }
1174
 
1175
    /**
7473 vikram.rag 1176
     * 
1177
     * XML fragment representation of this object
1178
     * 
1179
     * @return XML fragment for this object. Name for outer
1180
     * tag expected to be set by calling method. This fragment
1181
     * returns inner properties representation only
1182
     */
1183
    public String toXMLFragment() {
1184
        StringBuffer xml = new StringBuffer();
1185
        if (isSetASIN()) {
1186
            xml.append("<ASIN>");
1187
            xml.append(escapeXML(getASIN()));
1188
            xml.append("</ASIN>");
1189
        }
1190
        if (isSetSellerSKU()) {
1191
            xml.append("<SellerSKU>");
1192
            xml.append(escapeXML(getSellerSKU()));
1193
            xml.append("</SellerSKU>");
1194
        }
1195
        if (isSetOrderItemId()) {
1196
            xml.append("<OrderItemId>");
1197
            xml.append(escapeXML(getOrderItemId()));
1198
            xml.append("</OrderItemId>");
1199
        }
1200
        if (isSetTitle()) {
1201
            xml.append("<Title>");
1202
            xml.append(escapeXML(getTitle()));
1203
            xml.append("</Title>");
1204
        }
1205
        if (isSetQuantityOrdered()) {
1206
            xml.append("<QuantityOrdered>");
1207
            xml.append(getQuantityOrdered() + "");
1208
            xml.append("</QuantityOrdered>");
1209
        }
1210
        if (isSetQuantityShipped()) {
1211
            xml.append("<QuantityShipped>");
1212
            xml.append(getQuantityShipped() + "");
1213
            xml.append("</QuantityShipped>");
1214
        }
1215
        if (isSetItemPrice()) {
1216
            Money  itemPrice = getItemPrice();
1217
            xml.append("<ItemPrice>");
1218
            xml.append(itemPrice.toXMLFragment());
1219
            xml.append("</ItemPrice>");
1220
        } 
1221
        if (isSetShippingPrice()) {
1222
            Money  shippingPrice = getShippingPrice();
1223
            xml.append("<ShippingPrice>");
1224
            xml.append(shippingPrice.toXMLFragment());
1225
            xml.append("</ShippingPrice>");
1226
        } 
1227
        if (isSetGiftWrapPrice()) {
1228
            Money  giftWrapPrice = getGiftWrapPrice();
1229
            xml.append("<GiftWrapPrice>");
1230
            xml.append(giftWrapPrice.toXMLFragment());
1231
            xml.append("</GiftWrapPrice>");
1232
        } 
1233
        if (isSetItemTax()) {
1234
            Money  itemTax = getItemTax();
1235
            xml.append("<ItemTax>");
1236
            xml.append(itemTax.toXMLFragment());
1237
            xml.append("</ItemTax>");
1238
        } 
1239
        if (isSetShippingTax()) {
1240
            Money  shippingTax = getShippingTax();
1241
            xml.append("<ShippingTax>");
1242
            xml.append(shippingTax.toXMLFragment());
1243
            xml.append("</ShippingTax>");
1244
        } 
1245
        if (isSetGiftWrapTax()) {
1246
            Money  giftWrapTax = getGiftWrapTax();
1247
            xml.append("<GiftWrapTax>");
1248
            xml.append(giftWrapTax.toXMLFragment());
1249
            xml.append("</GiftWrapTax>");
1250
        } 
1251
        if (isSetShippingDiscount()) {
1252
            Money  shippingDiscount = getShippingDiscount();
1253
            xml.append("<ShippingDiscount>");
1254
            xml.append(shippingDiscount.toXMLFragment());
1255
            xml.append("</ShippingDiscount>");
1256
        } 
1257
        if (isSetPromotionDiscount()) {
1258
            Money  promotionDiscount = getPromotionDiscount();
1259
            xml.append("<PromotionDiscount>");
1260
            xml.append(promotionDiscount.toXMLFragment());
1261
            xml.append("</PromotionDiscount>");
1262
        } 
1263
        if (isSetPromotionIds()) {
1264
            PromotionIdList  promotionIds = getPromotionIds();
1265
            xml.append("<PromotionIds>");
1266
            xml.append(promotionIds.toXMLFragment());
1267
            xml.append("</PromotionIds>");
1268
        } 
1269
        if (isSetCODFee()) {
1270
            Money  CODFee = getCODFee();
1271
            xml.append("<CODFee>");
1272
            xml.append(CODFee.toXMLFragment());
1273
            xml.append("</CODFee>");
1274
        } 
1275
        if (isSetCODFeeDiscount()) {
1276
            Money  CODFeeDiscount = getCODFeeDiscount();
1277
            xml.append("<CODFeeDiscount>");
1278
            xml.append(CODFeeDiscount.toXMLFragment());
1279
            xml.append("</CODFeeDiscount>");
1280
        } 
1281
        if (isSetGiftMessageText()) {
1282
            xml.append("<GiftMessageText>");
1283
            xml.append(escapeXML(getGiftMessageText()));
1284
            xml.append("</GiftMessageText>");
1285
        }
1286
        if (isSetGiftWrapLevel()) {
1287
            xml.append("<GiftWrapLevel>");
1288
            xml.append(escapeXML(getGiftWrapLevel()));
1289
            xml.append("</GiftWrapLevel>");
1290
        }
1291
        if (isSetInvoiceData()) {
1292
            InvoiceData  invoiceData = getInvoiceData();
1293
            xml.append("<InvoiceData>");
1294
            xml.append(invoiceData.toXMLFragment());
1295
            xml.append("</InvoiceData>");
12245 manish.sha 1296
        }
1297
        if (isSetConditionNote()) {
1298
            xml.append("<ConditionNote>");
1299
            xml.append(escapeXML(getConditionNote()));
1300
            xml.append("</ConditionNote>");
1301
        }
1302
        if (isSetConditionId()) {
1303
            xml.append("<ConditionId>");
1304
            xml.append(escapeXML(getConditionId()));
1305
            xml.append("</ConditionId>");
1306
        }
1307
        if (isSetConditionSubtypeId()) {
1308
            xml.append("<ConditionSubtypeId>");
1309
            xml.append(escapeXML(getConditionSubtypeId()));
1310
            xml.append("</ConditionSubtypeId>");
1311
        }
1312
        if (isSetScheduledDeliveryStartDate()) {
1313
            xml.append("<ScheduledDeliveryStartDate>");
1314
            xml.append(escapeXML(getScheduledDeliveryStartDate()));
1315
            xml.append("</ScheduledDeliveryStartDate>");
1316
        }
1317
        if (isSetScheduledDeliveryEndDate()) {
1318
            xml.append("<ScheduledDeliveryEndDate>");
1319
            xml.append(escapeXML(getScheduledDeliveryEndDate()));
1320
            xml.append("</ScheduledDeliveryEndDate>");
1321
        }
7473 vikram.rag 1322
        return xml.toString();
1323
    }
1324
 
1325
    /**
1326
     * 
1327
     * Escape XML special characters
1328
     */
1329
    private String escapeXML(String string) {
1330
        if (string == null)
1331
            return "null";
1332
        StringBuffer sb = new StringBuffer();
1333
        int length = string.length();
1334
        for (int i = 0; i < length; ++i) {
1335
            char c = string.charAt(i);
1336
            switch (c) {
1337
            case '&':
1338
                sb.append("&amp;");
1339
                break;
1340
            case '<':
1341
                sb.append("&lt;");
1342
                break;
1343
            case '>':
1344
                sb.append("&gt;");
1345
                break;
1346
            case '\'':
1347
                sb.append("&#039;");
1348
                break;
1349
            case '"':
1350
                sb.append("&quot;");
1351
                break;
1352
            default:
1353
                sb.append(c);
1354
            }
1355
        }
1356
        return sb.toString();
1357
    }
1358
 
1359
 
1360
 
1361
    /**
1362
     *
1363
     * JSON fragment representation of this object
1364
     *
1365
     * @return JSON fragment for this object. Name for outer
1366
     * object expected to be set by calling method. This fragment
1367
     * returns inner properties representation only
1368
     *
1369
     */
1370
    protected String toJSONFragment() {
1371
        StringBuffer json = new StringBuffer();
1372
        boolean first = true;
1373
        if (isSetASIN()) {
1374
            if (!first) json.append(", ");
1375
            json.append(quoteJSON("ASIN"));
1376
            json.append(" : ");
1377
            json.append(quoteJSON(getASIN()));
1378
            first = false;
1379
        }
1380
        if (isSetSellerSKU()) {
1381
            if (!first) json.append(", ");
1382
            json.append(quoteJSON("SellerSKU"));
1383
            json.append(" : ");
1384
            json.append(quoteJSON(getSellerSKU()));
1385
            first = false;
1386
        }
1387
        if (isSetOrderItemId()) {
1388
            if (!first) json.append(", ");
1389
            json.append(quoteJSON("OrderItemId"));
1390
            json.append(" : ");
1391
            json.append(quoteJSON(getOrderItemId()));
1392
            first = false;
1393
        }
1394
        if (isSetTitle()) {
1395
            if (!first) json.append(", ");
1396
            json.append(quoteJSON("Title"));
1397
            json.append(" : ");
1398
            json.append(quoteJSON(getTitle()));
1399
            first = false;
1400
        }
1401
        if (isSetQuantityOrdered()) {
1402
            if (!first) json.append(", ");
1403
            json.append(quoteJSON("QuantityOrdered"));
1404
            json.append(" : ");
1405
            json.append(quoteJSON(getQuantityOrdered() + ""));
1406
            first = false;
1407
        }
1408
        if (isSetQuantityShipped()) {
1409
            if (!first) json.append(", ");
1410
            json.append(quoteJSON("QuantityShipped"));
1411
            json.append(" : ");
1412
            json.append(quoteJSON(getQuantityShipped() + ""));
1413
            first = false;
1414
        }
1415
        if (isSetItemPrice()) {
1416
            if (!first) json.append(", ");
1417
            json.append("\"ItemPrice\" : {");
1418
            Money  itemPrice = getItemPrice();
1419
 
1420
 
1421
            json.append(itemPrice.toJSONFragment());
1422
            json.append("}");
1423
            first = false;
1424
        }
1425
        if (isSetShippingPrice()) {
1426
            if (!first) json.append(", ");
1427
            json.append("\"ShippingPrice\" : {");
1428
            Money  shippingPrice = getShippingPrice();
1429
 
1430
 
1431
            json.append(shippingPrice.toJSONFragment());
1432
            json.append("}");
1433
            first = false;
1434
        }
1435
        if (isSetGiftWrapPrice()) {
1436
            if (!first) json.append(", ");
1437
            json.append("\"GiftWrapPrice\" : {");
1438
            Money  giftWrapPrice = getGiftWrapPrice();
1439
 
1440
 
1441
            json.append(giftWrapPrice.toJSONFragment());
1442
            json.append("}");
1443
            first = false;
1444
        }
1445
        if (isSetItemTax()) {
1446
            if (!first) json.append(", ");
1447
            json.append("\"ItemTax\" : {");
1448
            Money  itemTax = getItemTax();
1449
 
1450
 
1451
            json.append(itemTax.toJSONFragment());
1452
            json.append("}");
1453
            first = false;
1454
        }
1455
        if (isSetShippingTax()) {
1456
            if (!first) json.append(", ");
1457
            json.append("\"ShippingTax\" : {");
1458
            Money  shippingTax = getShippingTax();
1459
 
1460
 
1461
            json.append(shippingTax.toJSONFragment());
1462
            json.append("}");
1463
            first = false;
1464
        }
1465
        if (isSetGiftWrapTax()) {
1466
            if (!first) json.append(", ");
1467
            json.append("\"GiftWrapTax\" : {");
1468
            Money  giftWrapTax = getGiftWrapTax();
1469
 
1470
 
1471
            json.append(giftWrapTax.toJSONFragment());
1472
            json.append("}");
1473
            first = false;
1474
        }
1475
        if (isSetShippingDiscount()) {
1476
            if (!first) json.append(", ");
1477
            json.append("\"ShippingDiscount\" : {");
1478
            Money  shippingDiscount = getShippingDiscount();
1479
 
1480
 
1481
            json.append(shippingDiscount.toJSONFragment());
1482
            json.append("}");
1483
            first = false;
1484
        }
1485
        if (isSetPromotionDiscount()) {
1486
            if (!first) json.append(", ");
1487
            json.append("\"PromotionDiscount\" : {");
1488
            Money  promotionDiscount = getPromotionDiscount();
1489
 
1490
 
1491
            json.append(promotionDiscount.toJSONFragment());
1492
            json.append("}");
1493
            first = false;
1494
        }
1495
        if (isSetPromotionIds()) {
1496
            if (!first) json.append(", ");
1497
            json.append("\"PromotionIds\" : {");
1498
            PromotionIdList  promotionIds = getPromotionIds();
1499
 
1500
 
1501
            json.append(promotionIds.toJSONFragment());
1502
            json.append("}");
1503
            first = false;
1504
        }
1505
        if (isSetCODFee()) {
1506
            if (!first) json.append(", ");
1507
            json.append("\"CODFee\" : {");
1508
            Money  CODFee = getCODFee();
1509
 
1510
 
1511
            json.append(CODFee.toJSONFragment());
1512
            json.append("}");
1513
            first = false;
1514
        }
1515
        if (isSetCODFeeDiscount()) {
1516
            if (!first) json.append(", ");
1517
            json.append("\"CODFeeDiscount\" : {");
1518
            Money  CODFeeDiscount = getCODFeeDiscount();
1519
 
1520
 
1521
            json.append(CODFeeDiscount.toJSONFragment());
1522
            json.append("}");
1523
            first = false;
1524
        }
1525
        if (isSetGiftMessageText()) {
1526
            if (!first) json.append(", ");
1527
            json.append(quoteJSON("GiftMessageText"));
1528
            json.append(" : ");
1529
            json.append(quoteJSON(getGiftMessageText()));
1530
            first = false;
1531
        }
1532
        if (isSetGiftWrapLevel()) {
1533
            if (!first) json.append(", ");
1534
            json.append(quoteJSON("GiftWrapLevel"));
1535
            json.append(" : ");
1536
            json.append(quoteJSON(getGiftWrapLevel()));
1537
            first = false;
1538
        }
1539
        if (isSetInvoiceData()) {
1540
            if (!first) json.append(", ");
1541
            json.append("\"InvoiceData\" : {");
1542
            InvoiceData  invoiceData = getInvoiceData();
1543
 
1544
 
1545
            json.append(invoiceData.toJSONFragment());
1546
            json.append("}");
1547
            first = false;
1548
        }
12245 manish.sha 1549
        if (isSetConditionNote()) {
1550
            if (!first) json.append(", ");
1551
            json.append(quoteJSON("ConditionNote"));
1552
            json.append(" : ");
1553
            json.append(quoteJSON(getConditionNote()));
1554
            first = false;
1555
        }
1556
        if (isSetConditionId()) {
1557
            if (!first) json.append(", ");
1558
            json.append(quoteJSON("ConditionId"));
1559
            json.append(" : ");
1560
            json.append(quoteJSON(getConditionId()));
1561
            first = false;
1562
        }
1563
        if (isSetConditionSubtypeId()) {
1564
            if (!first) json.append(", ");
1565
            json.append(quoteJSON("ConditionSubtypeId"));
1566
            json.append(" : ");
1567
            json.append(quoteJSON(getConditionSubtypeId()));
1568
            first = false;
1569
        }
1570
        if (isSetScheduledDeliveryStartDate()) {
1571
            if (!first) json.append(", ");
1572
            json.append(quoteJSON("ScheduledDeliveryStartDate"));
1573
            json.append(" : ");
1574
            json.append(quoteJSON(getScheduledDeliveryStartDate()));
1575
            first = false;
1576
        }
1577
        if (isSetScheduledDeliveryEndDate()) {
1578
            if (!first) json.append(", ");
1579
            json.append(quoteJSON("ScheduledDeliveryEndDate"));
1580
            json.append(" : ");
1581
            json.append(quoteJSON(getScheduledDeliveryEndDate()));
1582
            first = false;
1583
        }
7473 vikram.rag 1584
        return json.toString();
1585
    }
1586
 
1587
    /**
1588
     *
1589
     * Quote JSON string
1590
     */
1591
    private String quoteJSON(String string) {
1592
        if (string == null)
1593
            return "null";
1594
        StringBuffer sb = new StringBuffer();
1595
        sb.append("\"");
1596
        int length = string.length();
1597
        for (int i = 0; i < length; ++i) {
1598
            char c = string.charAt(i);
1599
            switch (c) {
1600
            case '"':
1601
                sb.append("\\\"");
1602
                break;
1603
            case '\\':
1604
                sb.append("\\\\");
1605
                break;
1606
            case '/':
1607
                sb.append("\\/");
1608
                break;
1609
            case '\b':
1610
                sb.append("\\b");
1611
                break;
1612
            case '\f':
1613
                sb.append("\\f");
1614
                break;
1615
            case '\n':
1616
                sb.append("\\n");
1617
                break;
1618
            case '\r':
1619
                sb.append("\\r");
1620
                break;
1621
            case '\t':
1622
                sb.append("\\t");
1623
                break;
1624
            default:
1625
                if (c <  ' ') {
1626
                    sb.append("\\u" + String.format("%03x", Integer.valueOf(c)));
1627
                } else {
1628
                sb.append(c);
1629
            }
1630
        }
1631
        }
1632
        sb.append("\"");
1633
        return sb.toString();
1634
    }
1635
 
1636
 
1637
}