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.XmlSchemaType;
8
import javax.xml.bind.annotation.XmlType;
9
import javax.xml.datatype.XMLGregorianCalendar;
10
 
11
 
12
/**
13
 * <p>Java class for Order complex type.
14
 * 
15
 * <p>The following schema fragment specifies the expected content contained within this class.
16
 * 
17
 * <pre>
18
 * &lt;complexType name="Order">
19
 *   &lt;complexContent>
20
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
21
 *       &lt;sequence>
22
 *         &lt;element name="AmazonOrderId" type="{http://www.w3.org/2001/XMLSchema}string"/>
23
 *         &lt;element name="SellerOrderId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
24
 *         &lt;element name="PurchaseDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
25
 *         &lt;element name="LastUpdateDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
26
 *         &lt;element name="OrderStatus" type="{https://mws.amazonservices.com/Orders/2011-01-01}OrderStatusEnum"/>
27
 *         &lt;element name="FulfillmentChannel" type="{https://mws.amazonservices.com/Orders/2011-01-01}FulfillmentChannelEnum" minOccurs="0"/>
28
 *         &lt;element name="SalesChannel" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
29
 *         &lt;element name="OrderChannel" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
30
 *         &lt;element name="ShipServiceLevel" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
31
 *         &lt;element name="ShippingAddress" type="{https://mws.amazonservices.com/Orders/2011-01-01}Address" minOccurs="0"/>
32
 *         &lt;element name="OrderTotal" type="{https://mws.amazonservices.com/Orders/2011-01-01}Money" minOccurs="0"/>
33
 *         &lt;element name="NumberOfItemsShipped" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
34
 *         &lt;element name="NumberOfItemsUnshipped" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
35
 *         &lt;element name="PaymentExecutionDetail" type="{https://mws.amazonservices.com/Orders/2011-01-01}PaymentExecutionDetailItemList" minOccurs="0"/>
36
 *         &lt;element name="PaymentMethod" type="{https://mws.amazonservices.com/Orders/2011-01-01}PaymentMethodEnum" minOccurs="0"/>
37
 *         &lt;element name="MarketplaceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
38
 *         &lt;element name="BuyerEmail" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
39
 *         &lt;element name="BuyerName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
40
 *         &lt;element name="ShipmentServiceLevelCategory" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
41
 *         &lt;element name="ShippedByAmazonTFM" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
42
 *         &lt;element name="TFMShipmentStatus" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
12245 manish.sha 43
 *         &lt;element name="CbaDisplayableShippingLabel" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
44
 *         &lt;element name="OrderType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
45
 *         &lt;element name="EarliestShipDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/&gt;
46
 *         &lt;element name="LatestShipDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/&gt;
47
 *         &lt;element name="EarliestDeliveryDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/&gt;
48
 *         &lt;element name="LatestDeliveryDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/&gt;   
7473 vikram.rag 49
 *       &lt;/sequence>
50
 *     &lt;/restriction>
51
 *   &lt;/complexContent>
52
 * &lt;/complexType>
53
 * </pre>
54
 * 
55
 * 
56
 */
57
@XmlAccessorType(XmlAccessType.FIELD)
58
@XmlType(name = "Order", propOrder = {
59
    "amazonOrderId",
60
    "sellerOrderId",
61
    "purchaseDate",
62
    "lastUpdateDate",
63
    "orderStatus",
64
    "fulfillmentChannel",
65
    "salesChannel",
66
    "orderChannel",
67
    "shipServiceLevel",
68
    "shippingAddress",
69
    "orderTotal",
70
    "numberOfItemsShipped",
71
    "numberOfItemsUnshipped",
72
    "paymentExecutionDetail",
73
    "paymentMethod",
74
    "marketplaceId",
75
    "buyerEmail",
76
    "buyerName",
77
    "shipmentServiceLevelCategory",
78
    "shippedByAmazonTFM",
12245 manish.sha 79
    "tfmShipmentStatus",
80
    "cbaDisplayableShippingLabel",
81
    "orderType",
82
    "earliestShipDate",
83
    "latestShipDate",
84
    "earliestDeliveryDate",
85
    "latestDeliveryDate"
7473 vikram.rag 86
})
87
public class Order {
88
 
89
    @XmlElement(name = "AmazonOrderId", required = true)
12245 manish.sha 90
    private String amazonOrderId;
7473 vikram.rag 91
    @XmlElement(name = "SellerOrderId")
12245 manish.sha 92
    private String sellerOrderId;
7473 vikram.rag 93
    @XmlElement(name = "PurchaseDate", required = true)
94
    @XmlSchemaType(name = "dateTime")
12245 manish.sha 95
    private XMLGregorianCalendar purchaseDate;
7473 vikram.rag 96
    @XmlElement(name = "LastUpdateDate", required = true)
97
    @XmlSchemaType(name = "dateTime")
12245 manish.sha 98
    private XMLGregorianCalendar lastUpdateDate;
7473 vikram.rag 99
    @XmlElement(name = "OrderStatus", required = true)
12245 manish.sha 100
    private OrderStatusEnum orderStatus;
7473 vikram.rag 101
    @XmlElement(name = "FulfillmentChannel")
12245 manish.sha 102
    private FulfillmentChannelEnum fulfillmentChannel;
7473 vikram.rag 103
    @XmlElement(name = "SalesChannel")
12245 manish.sha 104
    private String salesChannel;
7473 vikram.rag 105
    @XmlElement(name = "OrderChannel")
12245 manish.sha 106
    private String orderChannel;
7473 vikram.rag 107
    @XmlElement(name = "ShipServiceLevel")
12245 manish.sha 108
    private String shipServiceLevel;
7473 vikram.rag 109
    @XmlElement(name = "ShippingAddress")
12245 manish.sha 110
    private Address shippingAddress;
7473 vikram.rag 111
    @XmlElement(name = "OrderTotal")
12245 manish.sha 112
    private Money orderTotal;
7473 vikram.rag 113
    @XmlElement(name = "NumberOfItemsShipped")
12245 manish.sha 114
    private Integer numberOfItemsShipped;
7473 vikram.rag 115
    @XmlElement(name = "NumberOfItemsUnshipped")
12245 manish.sha 116
    private Integer numberOfItemsUnshipped;
7473 vikram.rag 117
    @XmlElement(name = "PaymentExecutionDetail")
12245 manish.sha 118
    private PaymentExecutionDetailItemList paymentExecutionDetail;
7473 vikram.rag 119
    @XmlElement(name = "PaymentMethod")
12245 manish.sha 120
    private PaymentMethodEnum paymentMethod;
7473 vikram.rag 121
    @XmlElement(name = "MarketplaceId")
12245 manish.sha 122
    private String marketplaceId;
7473 vikram.rag 123
    @XmlElement(name = "BuyerEmail")
12245 manish.sha 124
    private String buyerEmail;
7473 vikram.rag 125
    @XmlElement(name = "BuyerName")
12245 manish.sha 126
    private String buyerName;
7473 vikram.rag 127
    @XmlElement(name = "ShipmentServiceLevelCategory")
12245 manish.sha 128
    private String shipmentServiceLevelCategory;
7473 vikram.rag 129
    @XmlElement(name = "ShippedByAmazonTFM")
12245 manish.sha 130
    private Boolean shippedByAmazonTFM;
7473 vikram.rag 131
    @XmlElement(name = "TFMShipmentStatus")
12245 manish.sha 132
    private String tfmShipmentStatus;
133
    @XmlElement(name="CbaDisplayableShippingLabel")
134
    private String cbaDisplayableShippingLabel;
135
    @XmlElement(name="OrderType")
136
    private String orderType;
137
    @XmlElement(name="EarliestShipDate")
138
    private XMLGregorianCalendar earliestShipDate;
139
    @XmlElement(name="LatestShipDate")
140
    private XMLGregorianCalendar latestShipDate;
141
    @XmlElement(name="EarliestDeliveryDate")
142
    private XMLGregorianCalendar earliestDeliveryDate;
143
    @XmlElement(name="LatestDeliveryDate")
144
    private XMLGregorianCalendar latestDeliveryDate;
7473 vikram.rag 145
 
146
    /**
147
     * Default constructor
148
     * 
149
     */
150
    public Order() {
151
        super();
152
    }
153
 
154
    /**
155
     * Value constructor
156
     * 
157
     */
12245 manish.sha 158
    public Order(final String amazonOrderId, final String sellerOrderId, final XMLGregorianCalendar purchaseDate, final XMLGregorianCalendar lastUpdateDate, final OrderStatusEnum orderStatus, final FulfillmentChannelEnum fulfillmentChannel, final String salesChannel, final String orderChannel, final String shipServiceLevel, final Address shippingAddress, final Money orderTotal, final Integer numberOfItemsShipped, final Integer numberOfItemsUnshipped, final PaymentExecutionDetailItemList paymentExecutionDetail, final PaymentMethodEnum paymentMethod, final String marketplaceId, final String buyerEmail, final String buyerName, final String shipmentServiceLevelCategory, final Boolean shippedByAmazonTFM, final String tfmShipmentStatus, final String cbaDisplayableShippingLabel,final String orderType, final XMLGregorianCalendar earliestShipDate, final XMLGregorianCalendar latestShipDate, final XMLGregorianCalendar earliestDeliveryDate,final XMLGregorianCalendar latestDeliveryDate) {
7473 vikram.rag 159
        this.amazonOrderId = amazonOrderId;
160
        this.sellerOrderId = sellerOrderId;
161
        this.purchaseDate = purchaseDate;
162
        this.lastUpdateDate = lastUpdateDate;
163
        this.orderStatus = orderStatus;
164
        this.fulfillmentChannel = fulfillmentChannel;
165
        this.salesChannel = salesChannel;
166
        this.orderChannel = orderChannel;
167
        this.shipServiceLevel = shipServiceLevel;
168
        this.shippingAddress = shippingAddress;
169
        this.orderTotal = orderTotal;
170
        this.numberOfItemsShipped = numberOfItemsShipped;
171
        this.numberOfItemsUnshipped = numberOfItemsUnshipped;
172
        this.paymentExecutionDetail = paymentExecutionDetail;
173
        this.paymentMethod = paymentMethod;
174
        this.marketplaceId = marketplaceId;
175
        this.buyerEmail = buyerEmail;
176
        this.buyerName = buyerName;
177
        this.shipmentServiceLevelCategory = shipmentServiceLevelCategory;
178
        this.shippedByAmazonTFM = shippedByAmazonTFM;
179
        this.tfmShipmentStatus = tfmShipmentStatus;
12245 manish.sha 180
        this.cbaDisplayableShippingLabel = cbaDisplayableShippingLabel;
181
        this.orderType = orderType;
182
        this.earliestShipDate = earliestShipDate;
183
        this.latestShipDate = latestShipDate;
184
        this.earliestDeliveryDate = earliestDeliveryDate;
185
        this.latestDeliveryDate = latestDeliveryDate;
7473 vikram.rag 186
    }
187
 
188
    /**
189
     * Gets the value of the amazonOrderId property.
190
     * 
191
     * @return
192
     *     possible object is
193
     *     {@link String }
194
     *     
195
     */
196
    public String getAmazonOrderId() {
197
        return amazonOrderId;
198
    }
199
 
200
    /**
201
     * Sets the value of the amazonOrderId property.
202
     * 
203
     * @param value
204
     *     allowed object is
205
     *     {@link String }
206
     *     
207
     */
208
    public void setAmazonOrderId(String value) {
209
        this.amazonOrderId = value;
210
    }
211
 
212
    public boolean isSetAmazonOrderId() {
213
        return (this.amazonOrderId!= null);
214
    }
215
 
216
    /**
217
     * Gets the value of the sellerOrderId property.
218
     * 
219
     * @return
220
     *     possible object is
221
     *     {@link String }
222
     *     
223
     */
224
    public String getSellerOrderId() {
225
        return sellerOrderId;
226
    }
227
 
228
    /**
229
     * Sets the value of the sellerOrderId property.
230
     * 
231
     * @param value
232
     *     allowed object is
233
     *     {@link String }
234
     *     
235
     */
236
    public void setSellerOrderId(String value) {
237
        this.sellerOrderId = value;
238
    }
239
 
240
    public boolean isSetSellerOrderId() {
241
        return (this.sellerOrderId!= null);
242
    }
243
 
244
    /**
245
     * Gets the value of the purchaseDate property.
246
     * 
247
     * @return
248
     *     possible object is
249
     *     {@link XMLGregorianCalendar }
250
     *     
251
     */
252
    public XMLGregorianCalendar getPurchaseDate() {
253
        return purchaseDate;
254
    }
255
 
256
    /**
257
     * Sets the value of the purchaseDate property.
258
     * 
259
     * @param value
260
     *     allowed object is
261
     *     {@link XMLGregorianCalendar }
262
     *     
263
     */
264
    public void setPurchaseDate(XMLGregorianCalendar value) {
265
        this.purchaseDate = value;
266
    }
267
 
268
    public boolean isSetPurchaseDate() {
269
        return (this.purchaseDate!= null);
270
    }
271
 
272
    /**
273
     * Gets the value of the lastUpdateDate property.
274
     * 
275
     * @return
276
     *     possible object is
277
     *     {@link XMLGregorianCalendar }
278
     *     
279
     */
280
    public XMLGregorianCalendar getLastUpdateDate() {
281
        return lastUpdateDate;
282
    }
283
 
284
    /**
285
     * Sets the value of the lastUpdateDate property.
286
     * 
287
     * @param value
288
     *     allowed object is
289
     *     {@link XMLGregorianCalendar }
290
     *     
291
     */
292
    public void setLastUpdateDate(XMLGregorianCalendar value) {
293
        this.lastUpdateDate = value;
294
    }
295
 
296
    public boolean isSetLastUpdateDate() {
297
        return (this.lastUpdateDate!= null);
298
    }
299
 
300
    /**
301
     * Gets the value of the orderStatus property.
302
     * 
303
     * @return
304
     *     possible object is
305
     *     {@link OrderStatusEnum }
306
     *     
307
     */
308
    public OrderStatusEnum getOrderStatus() {
309
        return orderStatus;
310
    }
311
 
312
    /**
313
     * Sets the value of the orderStatus property.
314
     * 
315
     * @param value
316
     *     allowed object is
317
     *     {@link OrderStatusEnum }
318
     *     
319
     */
320
    public void setOrderStatus(OrderStatusEnum value) {
321
        this.orderStatus = value;
322
    }
323
 
324
    public boolean isSetOrderStatus() {
325
        return (this.orderStatus!= null);
326
    }
327
 
328
    /**
329
     * Gets the value of the fulfillmentChannel property.
330
     * 
331
     * @return
332
     *     possible object is
333
     *     {@link FulfillmentChannelEnum }
334
     *     
335
     */
336
    public FulfillmentChannelEnum getFulfillmentChannel() {
337
        return fulfillmentChannel;
338
    }
339
 
340
    /**
341
     * Sets the value of the fulfillmentChannel property.
342
     * 
343
     * @param value
344
     *     allowed object is
345
     *     {@link FulfillmentChannelEnum }
346
     *     
347
     */
348
    public void setFulfillmentChannel(FulfillmentChannelEnum value) {
349
        this.fulfillmentChannel = value;
350
    }
351
 
352
    public boolean isSetFulfillmentChannel() {
353
        return (this.fulfillmentChannel!= null);
354
    }
355
 
356
    /**
357
     * Gets the value of the salesChannel property.
358
     * 
359
     * @return
360
     *     possible object is
361
     *     {@link String }
362
     *     
363
     */
364
    public String getSalesChannel() {
365
        return salesChannel;
366
    }
367
 
368
    /**
369
     * Sets the value of the salesChannel property.
370
     * 
371
     * @param value
372
     *     allowed object is
373
     *     {@link String }
374
     *     
375
     */
376
    public void setSalesChannel(String value) {
377
        this.salesChannel = value;
378
    }
379
 
380
    public boolean isSetSalesChannel() {
381
        return (this.salesChannel!= null);
382
    }
383
 
384
    /**
385
     * Gets the value of the orderChannel property.
386
     * 
387
     * @return
388
     *     possible object is
389
     *     {@link String }
390
     *     
391
     */
392
    public String getOrderChannel() {
393
        return orderChannel;
394
    }
395
 
396
    /**
397
     * Sets the value of the orderChannel property.
398
     * 
399
     * @param value
400
     *     allowed object is
401
     *     {@link String }
402
     *     
403
     */
404
    public void setOrderChannel(String value) {
405
        this.orderChannel = value;
406
    }
407
 
408
    public boolean isSetOrderChannel() {
409
        return (this.orderChannel!= null);
410
    }
411
 
412
    /**
413
     * Gets the value of the shipServiceLevel property.
414
     * 
415
     * @return
416
     *     possible object is
417
     *     {@link String }
418
     *     
419
     */
420
    public String getShipServiceLevel() {
421
        return shipServiceLevel;
422
    }
423
 
424
    /**
425
     * Sets the value of the shipServiceLevel property.
426
     * 
427
     * @param value
428
     *     allowed object is
429
     *     {@link String }
430
     *     
431
     */
432
    public void setShipServiceLevel(String value) {
433
        this.shipServiceLevel = value;
434
    }
435
 
436
    public boolean isSetShipServiceLevel() {
437
        return (this.shipServiceLevel!= null);
438
    }
439
 
440
    /**
441
     * Gets the value of the shippingAddress property.
442
     * 
443
     * @return
444
     *     possible object is
445
     *     {@link Address }
446
     *     
447
     */
448
    public Address getShippingAddress() {
449
        return shippingAddress;
450
    }
451
 
452
    /**
453
     * Sets the value of the shippingAddress property.
454
     * 
455
     * @param value
456
     *     allowed object is
457
     *     {@link Address }
458
     *     
459
     */
460
    public void setShippingAddress(Address value) {
461
        this.shippingAddress = value;
462
    }
463
 
464
    public boolean isSetShippingAddress() {
465
        return (this.shippingAddress!= null);
466
    }
467
 
468
    /**
469
     * Gets the value of the orderTotal property.
470
     * 
471
     * @return
472
     *     possible object is
473
     *     {@link Money }
474
     *     
475
     */
476
    public Money getOrderTotal() {
477
        return orderTotal;
478
    }
479
 
480
    /**
481
     * Sets the value of the orderTotal property.
482
     * 
483
     * @param value
484
     *     allowed object is
485
     *     {@link Money }
486
     *     
487
     */
488
    public void setOrderTotal(Money value) {
489
        this.orderTotal = value;
490
    }
491
 
492
    public boolean isSetOrderTotal() {
493
        return (this.orderTotal!= null);
494
    }
495
 
496
    /**
497
     * Gets the value of the numberOfItemsShipped property.
498
     * 
499
     * @return
500
     *     possible object is
501
     *     {@link Integer }
502
     *     
503
     */
504
    public Integer getNumberOfItemsShipped() {
505
        return numberOfItemsShipped;
506
    }
507
 
508
    /**
509
     * Sets the value of the numberOfItemsShipped property.
510
     * 
511
     * @param value
512
     *     allowed object is
513
     *     {@link Integer }
514
     *     
515
     */
516
    public void setNumberOfItemsShipped(Integer value) {
517
        this.numberOfItemsShipped = value;
518
    }
519
 
520
    public boolean isSetNumberOfItemsShipped() {
521
        return (this.numberOfItemsShipped!= null);
522
    }
523
 
524
    /**
525
     * Gets the value of the numberOfItemsUnshipped property.
526
     * 
527
     * @return
528
     *     possible object is
529
     *     {@link Integer }
530
     *     
531
     */
532
    public Integer getNumberOfItemsUnshipped() {
533
        return numberOfItemsUnshipped;
534
    }
535
 
536
    /**
537
     * Sets the value of the numberOfItemsUnshipped property.
538
     * 
539
     * @param value
540
     *     allowed object is
541
     *     {@link Integer }
542
     *     
543
     */
544
    public void setNumberOfItemsUnshipped(Integer value) {
545
        this.numberOfItemsUnshipped = value;
546
    }
547
 
548
    public boolean isSetNumberOfItemsUnshipped() {
549
        return (this.numberOfItemsUnshipped!= null);
550
    }
551
 
552
    /**
553
     * Gets the value of the paymentExecutionDetail property.
554
     * 
555
     * @return
556
     *     possible object is
557
     *     {@link PaymentExecutionDetailItemList }
558
     *     
559
     */
560
    public PaymentExecutionDetailItemList getPaymentExecutionDetail() {
561
        return paymentExecutionDetail;
562
    }
563
 
564
    /**
565
     * Sets the value of the paymentExecutionDetail property.
566
     * 
567
     * @param value
568
     *     allowed object is
569
     *     {@link PaymentExecutionDetailItemList }
570
     *     
571
     */
572
    public void setPaymentExecutionDetail(PaymentExecutionDetailItemList value) {
573
        this.paymentExecutionDetail = value;
574
    }
575
 
576
    public boolean isSetPaymentExecutionDetail() {
577
        return (this.paymentExecutionDetail!= null);
578
    }
579
 
580
    /**
581
     * Gets the value of the paymentMethod property.
582
     * 
583
     * @return
584
     *     possible object is
585
     *     {@link PaymentMethodEnum }
586
     *     
587
     */
588
    public PaymentMethodEnum getPaymentMethod() {
589
        return paymentMethod;
590
    }
591
 
592
    /**
593
     * Sets the value of the paymentMethod property.
594
     * 
595
     * @param value
596
     *     allowed object is
597
     *     {@link PaymentMethodEnum }
598
     *     
599
     */
600
    public void setPaymentMethod(PaymentMethodEnum value) {
601
        this.paymentMethod = value;
602
    }
603
 
604
    public boolean isSetPaymentMethod() {
605
        return (this.paymentMethod!= null);
606
    }
607
 
608
    /**
609
     * Gets the value of the marketplaceId property.
610
     * 
611
     * @return
612
     *     possible object is
613
     *     {@link String }
614
     *     
615
     */
616
    public String getMarketplaceId() {
617
        return marketplaceId;
618
    }
619
 
620
    /**
621
     * Sets the value of the marketplaceId property.
622
     * 
623
     * @param value
624
     *     allowed object is
625
     *     {@link String }
626
     *     
627
     */
628
    public void setMarketplaceId(String value) {
629
        this.marketplaceId = value;
630
    }
631
 
632
    public boolean isSetMarketplaceId() {
633
        return (this.marketplaceId!= null);
634
    }
635
 
636
    /**
637
     * Gets the value of the buyerEmail property.
638
     * 
639
     * @return
640
     *     possible object is
641
     *     {@link String }
642
     *     
643
     */
644
    public String getBuyerEmail() {
645
        return buyerEmail;
646
    }
647
 
648
    /**
649
     * Sets the value of the buyerEmail property.
650
     * 
651
     * @param value
652
     *     allowed object is
653
     *     {@link String }
654
     *     
655
     */
656
    public void setBuyerEmail(String value) {
657
        this.buyerEmail = value;
658
    }
659
 
660
    public boolean isSetBuyerEmail() {
661
        return (this.buyerEmail!= null);
662
    }
663
 
664
    /**
665
     * Gets the value of the buyerName property.
666
     * 
667
     * @return
668
     *     possible object is
669
     *     {@link String }
670
     *     
671
     */
672
    public String getBuyerName() {
673
        return buyerName;
674
    }
675
 
676
    /**
677
     * Sets the value of the buyerName property.
678
     * 
679
     * @param value
680
     *     allowed object is
681
     *     {@link String }
682
     *     
683
     */
684
    public void setBuyerName(String value) {
685
        this.buyerName = value;
686
    }
687
 
688
    public boolean isSetBuyerName() {
689
        return (this.buyerName!= null);
690
    }
691
 
692
    /**
693
     * Gets the value of the shipmentServiceLevelCategory property.
694
     * 
695
     * @return
696
     *     possible object is
697
     *     {@link String }
698
     *     
699
     */
700
    public String getShipmentServiceLevelCategory() {
701
        return shipmentServiceLevelCategory;
702
    }
703
 
704
    /**
705
     * Sets the value of the shipmentServiceLevelCategory property.
706
     * 
707
     * @param value
708
     *     allowed object is
709
     *     {@link String }
710
     *     
711
     */
712
    public void setShipmentServiceLevelCategory(String value) {
713
        this.shipmentServiceLevelCategory = value;
714
    }
715
 
716
    public boolean isSetShipmentServiceLevelCategory() {
717
        return (this.shipmentServiceLevelCategory!= null);
718
    }
719
 
720
    /**
721
     * Gets the value of the shippedByAmazonTFM property.
722
     * 
723
     * @return
724
     *     possible object is
725
     *     {@link Boolean }
726
     *     
727
     */
728
    public Boolean isShippedByAmazonTFM() {
729
        return shippedByAmazonTFM;
730
    }
731
 
732
    /**
733
     * Sets the value of the shippedByAmazonTFM property.
734
     * 
735
     * @param value
736
     *     allowed object is
737
     *     {@link Boolean }
738
     *     
739
     */
740
    public void setShippedByAmazonTFM(Boolean value) {
741
        this.shippedByAmazonTFM = value;
742
    }
743
 
744
    public boolean isSetShippedByAmazonTFM() {
745
        return (this.shippedByAmazonTFM!= null);
746
    }
747
 
748
    /**
749
     * Gets the value of the tfmShipmentStatus property.
750
     * 
751
     * @return
752
     *     possible object is
753
     *     {@link String }
754
     *     
755
     */
756
    public String getTFMShipmentStatus() {
757
        return tfmShipmentStatus;
758
    }
759
 
760
    /**
761
     * Sets the value of the tfmShipmentStatus property.
762
     * 
763
     * @param value
764
     *     allowed object is
765
     *     {@link String }
766
     *     
767
     */
768
    public void setTFMShipmentStatus(String value) {
769
        this.tfmShipmentStatus = value;
770
    }
771
 
772
    public boolean isSetTFMShipmentStatus() {
773
        return (this.tfmShipmentStatus!= null);
774
    }
775
 
776
    /**
12245 manish.sha 777
     * Get the value of CbaDisplayableShippingLabel.
778
     *
779
     * @return The value of CbaDisplayableShippingLabel.
780
     */
781
    public String getCbaDisplayableShippingLabel() {
782
        return cbaDisplayableShippingLabel;
783
    }
784
 
785
    /**
786
     * Set the value of CbaDisplayableShippingLabel.
787
     *
788
     * @param cbaDisplayableShippingLabel
789
     *            The new value to set.
790
     */
791
    public void setCbaDisplayableShippingLabel(String cbaDisplayableShippingLabel) {
792
        this.cbaDisplayableShippingLabel = cbaDisplayableShippingLabel;
793
    }
794
 
795
    /**
796
     * Check to see if CbaDisplayableShippingLabel is set.
797
     *
798
     * @return true if CbaDisplayableShippingLabel is set.
799
     */
800
    public boolean isSetCbaDisplayableShippingLabel() {
801
        return cbaDisplayableShippingLabel != null;
802
    }
803
 
804
    /**
805
     * Get the value of OrderType.
806
     *
807
     * @return The value of OrderType.
808
     */
809
    public String getOrderType() {
810
        return orderType;
811
    }
812
 
813
    /**
814
     * Set the value of OrderType.
815
     *
816
     * @param orderType
817
     *            The new value to set.
818
     */
819
    public void setOrderType(String orderType) {
820
        this.orderType = orderType;
821
    }
822
 
823
    /**
824
     * Check to see if OrderType is set.
825
     *
826
     * @return true if OrderType is set.
827
     */
828
    public boolean isSetOrderType() {
829
        return orderType != null;
830
    }
831
 
832
    /**
833
     * Get the value of EarliestShipDate.
834
     *
835
     * @return The value of EarliestShipDate.
836
     */
837
    public XMLGregorianCalendar getEarliestShipDate() {
838
        return earliestShipDate;
839
    }
840
 
841
    /**
842
     * Set the value of EarliestShipDate.
843
     *
844
     * @param earliestShipDate
845
     *            The new value to set.
846
     */
847
    public void setEarliestShipDate(XMLGregorianCalendar earliestShipDate) {
848
        this.earliestShipDate = earliestShipDate;
849
    }
850
 
851
    /**
852
     * Check to see if EarliestShipDate is set.
853
     *
854
     * @return true if EarliestShipDate is set.
855
     */
856
    public boolean isSetEarliestShipDate() {
857
        return earliestShipDate != null;
858
    }
859
 
860
    /**
861
     * Get the value of LatestShipDate.
862
     *
863
     * @return The value of LatestShipDate.
864
     */
865
    public XMLGregorianCalendar getLatestShipDate() {
866
        return latestShipDate;
867
    }
868
 
869
    /**
870
     * Set the value of LatestShipDate.
871
     *
872
     * @param latestShipDate
873
     *            The new value to set.
874
     */
875
    public void setLatestShipDate(XMLGregorianCalendar latestShipDate) {
876
        this.latestShipDate = latestShipDate;
877
    }
878
 
879
    /**
880
     * Check to see if LatestShipDate is set.
881
     *
882
     * @return true if LatestShipDate is set.
883
     */
884
    public boolean isSetLatestShipDate() {
885
        return latestShipDate != null;
886
    }
887
 
888
    /**
889
     * Get the value of EarliestDeliveryDate.
890
     *
891
     * @return The value of EarliestDeliveryDate.
892
     */
893
    public XMLGregorianCalendar getEarliestDeliveryDate() {
894
        return earliestDeliveryDate;
895
    }
896
 
897
    /**
898
     * Set the value of EarliestDeliveryDate.
899
     *
900
     * @param earliestDeliveryDate
901
     *            The new value to set.
902
     */
903
    public void setEarliestDeliveryDate(XMLGregorianCalendar earliestDeliveryDate) {
904
        this.earliestDeliveryDate = earliestDeliveryDate;
905
    }
906
 
907
    /**
908
     * Check to see if EarliestDeliveryDate is set.
909
     *
910
     * @return true if EarliestDeliveryDate is set.
911
     */
912
    public boolean isSetEarliestDeliveryDate() {
913
        return earliestDeliveryDate != null;
914
    }
915
 
916
    /**
917
     * Get the value of LatestDeliveryDate.
918
     *
919
     * @return The value of LatestDeliveryDate.
920
     */
921
    public XMLGregorianCalendar getLatestDeliveryDate() {
922
        return latestDeliveryDate;
923
    }
924
 
925
    /**
926
     * Set the value of LatestDeliveryDate.
927
     *
928
     * @param latestDeliveryDate
929
     *            The new value to set.
930
     */
931
    public void setLatestDeliveryDate(XMLGregorianCalendar latestDeliveryDate) {
932
        this.latestDeliveryDate = latestDeliveryDate;
933
    }
934
 
935
    /**
936
     * Check to see if LatestDeliveryDate is set.
937
     *
938
     * @return true if LatestDeliveryDate is set.
939
     */
940
    public boolean isSetLatestDeliveryDate() {
941
        return latestDeliveryDate != null;
942
    }
943
 
944
    /**
7473 vikram.rag 945
     * Sets the value of the AmazonOrderId property.
946
     * 
947
     * @param value
948
     * @return
949
     *     this instance
950
     */
951
    public Order withAmazonOrderId(String value) {
952
        setAmazonOrderId(value);
953
        return this;
954
    }
955
 
956
    /**
957
     * Sets the value of the SellerOrderId property.
958
     * 
959
     * @param value
960
     * @return
961
     *     this instance
962
     */
963
    public Order withSellerOrderId(String value) {
964
        setSellerOrderId(value);
965
        return this;
966
    }
967
 
968
    /**
969
     * Sets the value of the PurchaseDate property.
970
     * 
971
     * @param value
972
     * @return
973
     *     this instance
974
     */
975
    public Order withPurchaseDate(XMLGregorianCalendar value) {
976
        setPurchaseDate(value);
977
        return this;
978
    }
979
 
980
    /**
981
     * Sets the value of the LastUpdateDate property.
982
     * 
983
     * @param value
984
     * @return
985
     *     this instance
986
     */
987
    public Order withLastUpdateDate(XMLGregorianCalendar value) {
988
        setLastUpdateDate(value);
989
        return this;
990
    }
991
 
992
    /**
993
     * Sets the value of the OrderStatus property.
994
     * 
995
     * @param value
996
     * @return
997
     *     this instance
998
     */
999
    public Order withOrderStatus(OrderStatusEnum value) {
1000
        setOrderStatus(value);
1001
        return this;
1002
    }
1003
 
1004
    /**
1005
     * Sets the value of the FulfillmentChannel property.
1006
     * 
1007
     * @param value
1008
     * @return
1009
     *     this instance
1010
     */
1011
    public Order withFulfillmentChannel(FulfillmentChannelEnum value) {
1012
        setFulfillmentChannel(value);
1013
        return this;
1014
    }
1015
 
1016
    /**
1017
     * Sets the value of the SalesChannel property.
1018
     * 
1019
     * @param value
1020
     * @return
1021
     *     this instance
1022
     */
1023
    public Order withSalesChannel(String value) {
1024
        setSalesChannel(value);
1025
        return this;
1026
    }
1027
 
1028
    /**
1029
     * Sets the value of the OrderChannel property.
1030
     * 
1031
     * @param value
1032
     * @return
1033
     *     this instance
1034
     */
1035
    public Order withOrderChannel(String value) {
1036
        setOrderChannel(value);
1037
        return this;
1038
    }
1039
 
1040
    /**
1041
     * Sets the value of the ShipServiceLevel property.
1042
     * 
1043
     * @param value
1044
     * @return
1045
     *     this instance
1046
     */
1047
    public Order withShipServiceLevel(String value) {
1048
        setShipServiceLevel(value);
1049
        return this;
1050
    }
1051
 
1052
    /**
1053
     * Sets the value of the ShippingAddress property.
1054
     * 
1055
     * @param value
1056
     * @return
1057
     *     this instance
1058
     */
1059
    public Order withShippingAddress(Address value) {
1060
        setShippingAddress(value);
1061
        return this;
1062
    }
1063
 
1064
    /**
1065
     * Sets the value of the OrderTotal property.
1066
     * 
1067
     * @param value
1068
     * @return
1069
     *     this instance
1070
     */
1071
    public Order withOrderTotal(Money value) {
1072
        setOrderTotal(value);
1073
        return this;
1074
    }
1075
 
1076
    /**
1077
     * Sets the value of the NumberOfItemsShipped property.
1078
     * 
1079
     * @param value
1080
     * @return
1081
     *     this instance
1082
     */
1083
    public Order withNumberOfItemsShipped(Integer value) {
1084
        setNumberOfItemsShipped(value);
1085
        return this;
1086
    }
1087
 
1088
    /**
1089
     * Sets the value of the NumberOfItemsUnshipped property.
1090
     * 
1091
     * @param value
1092
     * @return
1093
     *     this instance
1094
     */
1095
    public Order withNumberOfItemsUnshipped(Integer value) {
1096
        setNumberOfItemsUnshipped(value);
1097
        return this;
1098
    }
1099
 
1100
    /**
1101
     * Sets the value of the PaymentExecutionDetail property.
1102
     * 
1103
     * @param value
1104
     * @return
1105
     *     this instance
1106
     */
1107
    public Order withPaymentExecutionDetail(PaymentExecutionDetailItemList value) {
1108
        setPaymentExecutionDetail(value);
1109
        return this;
1110
    }
1111
 
1112
    /**
1113
     * Sets the value of the PaymentMethod property.
1114
     * 
1115
     * @param value
1116
     * @return
1117
     *     this instance
1118
     */
1119
    public Order withPaymentMethod(PaymentMethodEnum value) {
1120
        setPaymentMethod(value);
1121
        return this;
1122
    }
1123
 
1124
    /**
1125
     * Sets the value of the MarketplaceId property.
1126
     * 
1127
     * @param value
1128
     * @return
1129
     *     this instance
1130
     */
1131
    public Order withMarketplaceId(String value) {
1132
        setMarketplaceId(value);
1133
        return this;
1134
    }
1135
 
1136
    /**
1137
     * Sets the value of the BuyerEmail property.
1138
     * 
1139
     * @param value
1140
     * @return
1141
     *     this instance
1142
     */
1143
    public Order withBuyerEmail(String value) {
1144
        setBuyerEmail(value);
1145
        return this;
1146
    }
1147
 
1148
    /**
1149
     * Sets the value of the BuyerName property.
1150
     * 
1151
     * @param value
1152
     * @return
1153
     *     this instance
1154
     */
1155
    public Order withBuyerName(String value) {
1156
        setBuyerName(value);
1157
        return this;
1158
    }
1159
 
1160
    /**
1161
     * Sets the value of the ShipmentServiceLevelCategory property.
1162
     * 
1163
     * @param value
1164
     * @return
1165
     *     this instance
1166
     */
1167
    public Order withShipmentServiceLevelCategory(String value) {
1168
        setShipmentServiceLevelCategory(value);
1169
        return this;
1170
    }
1171
 
1172
    /**
1173
     * Sets the value of the ShippedByAmazonTFM property.
1174
     * 
1175
     * @param value
1176
     * @return
1177
     *     this instance
1178
     */
1179
    public Order withShippedByAmazonTFM(Boolean value) {
1180
        setShippedByAmazonTFM(value);
1181
        return this;
1182
    }
1183
 
1184
    /**
1185
     * Sets the value of the TFMShipmentStatus property.
1186
     * 
1187
     * @param value
1188
     * @return
1189
     *     this instance
1190
     */
1191
    public Order withTFMShipmentStatus(String value) {
1192
        setTFMShipmentStatus(value);
1193
        return this;
1194
    }
1195
 
12245 manish.sha 1196
    /**
1197
     * Set the value of CbaDisplayableShippingLabel, return this.
1198
     *
1199
     * @param cbaDisplayableShippingLabel
1200
     *             The new value to set.
1201
     *
1202
     * @return This instance.
1203
     */
1204
    public Order withCbaDisplayableShippingLabel(String cbaDisplayableShippingLabel) {
1205
        this.cbaDisplayableShippingLabel = cbaDisplayableShippingLabel;
1206
        return this;
1207
    }
7473 vikram.rag 1208
 
1209
    /**
12245 manish.sha 1210
     * Set the value of OrderType, return this.
1211
     *
1212
     * @param orderType
1213
     *             The new value to set.
1214
     *
1215
     * @return This instance.
1216
     */
1217
    public Order withOrderType(String orderType) {
1218
        this.orderType = orderType;
1219
        return this;
1220
    }
1221
 
1222
    /**
1223
     * Set the value of EarliestShipDate, return this.
1224
     *
1225
     * @param earliestShipDate
1226
     *             The new value to set.
1227
     *
1228
     * @return This instance.
1229
     */
1230
    public Order withEarliestShipDate(XMLGregorianCalendar earliestShipDate) {
1231
        this.earliestShipDate = earliestShipDate;
1232
        return this;
1233
    }
1234
 
1235
    /**
1236
     * Set the value of LatestShipDate, return this.
1237
     *
1238
     * @param latestShipDate
1239
     *             The new value to set.
1240
     *
1241
     * @return This instance.
1242
     */
1243
    public Order withLatestShipDate(XMLGregorianCalendar latestShipDate) {
1244
        this.latestShipDate = latestShipDate;
1245
        return this;
1246
    }
1247
 
1248
    /**
1249
     * Set the value of EarliestDeliveryDate, return this.
1250
     *
1251
     * @param earliestDeliveryDate
1252
     *             The new value to set.
1253
     *
1254
     * @return This instance.
1255
     */
1256
    public Order withEarliestDeliveryDate(XMLGregorianCalendar earliestDeliveryDate) {
1257
        this.earliestDeliveryDate = earliestDeliveryDate;
1258
        return this;
1259
    }
1260
 
1261
    /**
1262
     * Set the value of LatestDeliveryDate, return this.
1263
     *
1264
     * @param latestDeliveryDate
1265
     *             The new value to set.
1266
     *
1267
     * @return This instance.
1268
     */
1269
    public Order withLatestDeliveryDate(XMLGregorianCalendar latestDeliveryDate) {
1270
        this.latestDeliveryDate = latestDeliveryDate;
1271
        return this;
1272
    }
1273
 
1274
    /**
7473 vikram.rag 1275
     * 
1276
     * XML fragment representation of this object
1277
     * 
1278
     * @return XML fragment for this object. Name for outer
1279
     * tag expected to be set by calling method. This fragment
1280
     * returns inner properties representation only
1281
     */
1282
    public String toXMLFragment() {
1283
        StringBuffer xml = new StringBuffer();
1284
        if (isSetAmazonOrderId()) {
1285
            xml.append("<AmazonOrderId>");
1286
            xml.append(escapeXML(getAmazonOrderId()));
1287
            xml.append("</AmazonOrderId>");
1288
        }
1289
        if (isSetSellerOrderId()) {
1290
            xml.append("<SellerOrderId>");
1291
            xml.append(escapeXML(getSellerOrderId()));
1292
            xml.append("</SellerOrderId>");
1293
        }
1294
        if (isSetPurchaseDate()) {
1295
            xml.append("<PurchaseDate>");
1296
            xml.append(getPurchaseDate() + "");
1297
            xml.append("</PurchaseDate>");
1298
        }
1299
        if (isSetLastUpdateDate()) {
1300
            xml.append("<LastUpdateDate>");
1301
            xml.append(getLastUpdateDate() + "");
1302
            xml.append("</LastUpdateDate>");
1303
        }
1304
        if (isSetOrderStatus()) {
1305
            xml.append("<OrderStatus>");
1306
            xml.append(getOrderStatus().value());
1307
            xml.append("</OrderStatus>");
1308
        }
1309
        if (isSetFulfillmentChannel()) {
1310
            xml.append("<FulfillmentChannel>");
1311
            xml.append(getFulfillmentChannel().value());
1312
            xml.append("</FulfillmentChannel>");
1313
        }
1314
        if (isSetSalesChannel()) {
1315
            xml.append("<SalesChannel>");
1316
            xml.append(escapeXML(getSalesChannel()));
1317
            xml.append("</SalesChannel>");
1318
        }
1319
        if (isSetOrderChannel()) {
1320
            xml.append("<OrderChannel>");
1321
            xml.append(escapeXML(getOrderChannel()));
1322
            xml.append("</OrderChannel>");
1323
        }
1324
        if (isSetShipServiceLevel()) {
1325
            xml.append("<ShipServiceLevel>");
1326
            xml.append(escapeXML(getShipServiceLevel()));
1327
            xml.append("</ShipServiceLevel>");
1328
        }
1329
        if (isSetShippingAddress()) {
1330
            Address  shippingAddress = getShippingAddress();
1331
            xml.append("<ShippingAddress>");
1332
            xml.append(shippingAddress.toXMLFragment());
1333
            xml.append("</ShippingAddress>");
1334
        } 
1335
        if (isSetOrderTotal()) {
1336
            Money  orderTotal = getOrderTotal();
1337
            xml.append("<OrderTotal>");
1338
            xml.append(orderTotal.toXMLFragment());
1339
            xml.append("</OrderTotal>");
1340
        } 
1341
        if (isSetNumberOfItemsShipped()) {
1342
            xml.append("<NumberOfItemsShipped>");
1343
            xml.append(getNumberOfItemsShipped() + "");
1344
            xml.append("</NumberOfItemsShipped>");
1345
        }
1346
        if (isSetNumberOfItemsUnshipped()) {
1347
            xml.append("<NumberOfItemsUnshipped>");
1348
            xml.append(getNumberOfItemsUnshipped() + "");
1349
            xml.append("</NumberOfItemsUnshipped>");
1350
        }
1351
        if (isSetPaymentExecutionDetail()) {
1352
            PaymentExecutionDetailItemList  paymentExecutionDetail = getPaymentExecutionDetail();
1353
            xml.append("<PaymentExecutionDetail>");
1354
            xml.append(paymentExecutionDetail.toXMLFragment());
1355
            xml.append("</PaymentExecutionDetail>");
1356
        } 
1357
        if (isSetPaymentMethod()) {
1358
            xml.append("<PaymentMethod>");
1359
            xml.append(getPaymentMethod().value());
1360
            xml.append("</PaymentMethod>");
1361
        }
1362
        if (isSetMarketplaceId()) {
1363
            xml.append("<MarketplaceId>");
1364
            xml.append(escapeXML(getMarketplaceId()));
1365
            xml.append("</MarketplaceId>");
1366
        }
1367
        if (isSetBuyerEmail()) {
1368
            xml.append("<BuyerEmail>");
1369
            xml.append(escapeXML(getBuyerEmail()));
1370
            xml.append("</BuyerEmail>");
1371
        }
1372
        if (isSetBuyerName()) {
1373
            xml.append("<BuyerName>");
1374
            xml.append(escapeXML(getBuyerName()));
1375
            xml.append("</BuyerName>");
1376
        }
1377
        if (isSetShipmentServiceLevelCategory()) {
1378
            xml.append("<ShipmentServiceLevelCategory>");
1379
            xml.append(escapeXML(getShipmentServiceLevelCategory()));
1380
            xml.append("</ShipmentServiceLevelCategory>");
1381
        }
1382
        if (isSetShippedByAmazonTFM()) {
1383
            xml.append("<ShippedByAmazonTFM>");
1384
            xml.append(isShippedByAmazonTFM() + "");
1385
            xml.append("</ShippedByAmazonTFM>");
1386
        }
1387
        if (isSetTFMShipmentStatus()) {
1388
            xml.append("<TFMShipmentStatus>");
1389
            xml.append(escapeXML(getTFMShipmentStatus()));
1390
            xml.append("</TFMShipmentStatus>");
1391
        }
12245 manish.sha 1392
 
1393
        if (isSetCbaDisplayableShippingLabel()) {
1394
        	xml.append("<CbaDisplayableShippingLabel>");
1395
            xml.append(escapeXML(getCbaDisplayableShippingLabel()));
1396
            xml.append("</CbaDisplayableShippingLabel>");
1397
        }
1398
 
1399
        if (isSetOrderType()) {
1400
        	xml.append("<OrderType>");
1401
            xml.append(escapeXML(getOrderType()));
1402
            xml.append("</OrderType>");
1403
        }
1404
 
1405
        if (isSetEarliestShipDate()) {
1406
            xml.append("<EarliestShipDate>");
1407
            xml.append(getEarliestShipDate() + "");
1408
            xml.append("</EarliestShipDate>");
1409
        }
1410
 
1411
        if (isSetLatestShipDate()) {
1412
            xml.append("<LatestShipDate>");
1413
            xml.append(getLatestShipDate() + "");
1414
            xml.append("</LatestShipDate>");
1415
        }
1416
 
1417
        if (isSetEarliestDeliveryDate()) {
1418
            xml.append("<EarliestDeliveryDate>");
1419
            xml.append(getEarliestDeliveryDate() + "");
1420
            xml.append("</EarliestDeliveryDate>");
1421
        }
1422
 
1423
        if (isSetLatestDeliveryDate()) {
1424
            xml.append("<LatestDeliveryDate>");
1425
            xml.append(getLatestDeliveryDate() + "");
1426
            xml.append("</LatestDeliveryDate>");
1427
        }
7473 vikram.rag 1428
        return xml.toString();
1429
    }
1430
 
1431
    /**
1432
     * 
1433
     * Escape XML special characters
1434
     */
1435
    private String escapeXML(String string) {
1436
        if (string == null)
1437
            return "null";
1438
        StringBuffer sb = new StringBuffer();
1439
        int length = string.length();
1440
        for (int i = 0; i < length; ++i) {
1441
            char c = string.charAt(i);
1442
            switch (c) {
1443
            case '&':
1444
                sb.append("&amp;");
1445
                break;
1446
            case '<':
1447
                sb.append("&lt;");
1448
                break;
1449
            case '>':
1450
                sb.append("&gt;");
1451
                break;
1452
            case '\'':
1453
                sb.append("&#039;");
1454
                break;
1455
            case '"':
1456
                sb.append("&quot;");
1457
                break;
1458
            default:
1459
                sb.append(c);
1460
            }
1461
        }
1462
        return sb.toString();
1463
    }
1464
 
1465
 
1466
 
1467
    /**
1468
     *
1469
     * JSON fragment representation of this object
1470
     *
1471
     * @return JSON fragment for this object. Name for outer
1472
     * object expected to be set by calling method. This fragment
1473
     * returns inner properties representation only
1474
     *
1475
     */
1476
    protected String toJSONFragment() {
1477
        StringBuffer json = new StringBuffer();
1478
        boolean first = true;
1479
        if (isSetAmazonOrderId()) {
1480
            if (!first) json.append(", ");
1481
            json.append(quoteJSON("AmazonOrderId"));
1482
            json.append(" : ");
1483
            json.append(quoteJSON(getAmazonOrderId()));
1484
            first = false;
1485
        }
1486
        if (isSetSellerOrderId()) {
1487
            if (!first) json.append(", ");
1488
            json.append(quoteJSON("SellerOrderId"));
1489
            json.append(" : ");
1490
            json.append(quoteJSON(getSellerOrderId()));
1491
            first = false;
1492
        }
1493
        if (isSetPurchaseDate()) {
1494
            if (!first) json.append(", ");
1495
            json.append(quoteJSON("PurchaseDate"));
1496
            json.append(" : ");
1497
            json.append(quoteJSON(getPurchaseDate() + ""));
1498
            first = false;
1499
        }
1500
        if (isSetLastUpdateDate()) {
1501
            if (!first) json.append(", ");
1502
            json.append(quoteJSON("LastUpdateDate"));
1503
            json.append(" : ");
1504
            json.append(quoteJSON(getLastUpdateDate() + ""));
1505
            first = false;
1506
        }
1507
        if (isSetOrderStatus()) {
1508
            if (!first) json.append(", ");
1509
            json.append(quoteJSON("OrderStatus"));
1510
            json.append(" : ");
1511
            json.append(quoteJSON(getOrderStatus().value()));
1512
            first = false;
1513
        }
1514
        if (isSetFulfillmentChannel()) {
1515
            if (!first) json.append(", ");
1516
            json.append(quoteJSON("FulfillmentChannel"));
1517
            json.append(" : ");
1518
            json.append(quoteJSON(getFulfillmentChannel().value()));
1519
            first = false;
1520
        }
1521
        if (isSetSalesChannel()) {
1522
            if (!first) json.append(", ");
1523
            json.append(quoteJSON("SalesChannel"));
1524
            json.append(" : ");
1525
            json.append(quoteJSON(getSalesChannel()));
1526
            first = false;
1527
        }
1528
        if (isSetOrderChannel()) {
1529
            if (!first) json.append(", ");
1530
            json.append(quoteJSON("OrderChannel"));
1531
            json.append(" : ");
1532
            json.append(quoteJSON(getOrderChannel()));
1533
            first = false;
1534
        }
1535
        if (isSetShipServiceLevel()) {
1536
            if (!first) json.append(", ");
1537
            json.append(quoteJSON("ShipServiceLevel"));
1538
            json.append(" : ");
1539
            json.append(quoteJSON(getShipServiceLevel()));
1540
            first = false;
1541
        }
1542
        if (isSetShippingAddress()) {
1543
            if (!first) json.append(", ");
1544
            json.append("\"ShippingAddress\" : {");
1545
            Address  shippingAddress = getShippingAddress();
1546
 
1547
 
1548
            json.append(shippingAddress.toJSONFragment());
1549
            json.append("}");
1550
            first = false;
1551
        }
1552
        if (isSetOrderTotal()) {
1553
            if (!first) json.append(", ");
1554
            json.append("\"OrderTotal\" : {");
1555
            Money  orderTotal = getOrderTotal();
1556
 
1557
 
1558
            json.append(orderTotal.toJSONFragment());
1559
            json.append("}");
1560
            first = false;
1561
        }
1562
        if (isSetNumberOfItemsShipped()) {
1563
            if (!first) json.append(", ");
1564
            json.append(quoteJSON("NumberOfItemsShipped"));
1565
            json.append(" : ");
1566
            json.append(quoteJSON(getNumberOfItemsShipped() + ""));
1567
            first = false;
1568
        }
1569
        if (isSetNumberOfItemsUnshipped()) {
1570
            if (!first) json.append(", ");
1571
            json.append(quoteJSON("NumberOfItemsUnshipped"));
1572
            json.append(" : ");
1573
            json.append(quoteJSON(getNumberOfItemsUnshipped() + ""));
1574
            first = false;
1575
        }
1576
        if (isSetPaymentExecutionDetail()) {
1577
            if (!first) json.append(", ");
1578
            json.append("\"PaymentExecutionDetail\" : {");
1579
            PaymentExecutionDetailItemList  paymentExecutionDetail = getPaymentExecutionDetail();
1580
 
1581
 
1582
            json.append(paymentExecutionDetail.toJSONFragment());
1583
            json.append("}");
1584
            first = false;
1585
        }
1586
        if (isSetPaymentMethod()) {
1587
            if (!first) json.append(", ");
1588
            json.append(quoteJSON("PaymentMethod"));
1589
            json.append(" : ");
1590
            json.append(quoteJSON(getPaymentMethod().value()));
1591
            first = false;
1592
        }
1593
        if (isSetMarketplaceId()) {
1594
            if (!first) json.append(", ");
1595
            json.append(quoteJSON("MarketplaceId"));
1596
            json.append(" : ");
1597
            json.append(quoteJSON(getMarketplaceId()));
1598
            first = false;
1599
        }
1600
        if (isSetBuyerEmail()) {
1601
            if (!first) json.append(", ");
1602
            json.append(quoteJSON("BuyerEmail"));
1603
            json.append(" : ");
1604
            json.append(quoteJSON(getBuyerEmail()));
1605
            first = false;
1606
        }
1607
        if (isSetBuyerName()) {
1608
            if (!first) json.append(", ");
1609
            json.append(quoteJSON("BuyerName"));
1610
            json.append(" : ");
1611
            json.append(quoteJSON(getBuyerName()));
1612
            first = false;
1613
        }
1614
        if (isSetShipmentServiceLevelCategory()) {
1615
            if (!first) json.append(", ");
1616
            json.append(quoteJSON("ShipmentServiceLevelCategory"));
1617
            json.append(" : ");
1618
            json.append(quoteJSON(getShipmentServiceLevelCategory()));
1619
            first = false;
1620
        }
1621
        if (isSetShippedByAmazonTFM()) {
1622
            if (!first) json.append(", ");
1623
            json.append(quoteJSON("ShippedByAmazonTFM"));
1624
            json.append(" : ");
1625
            json.append(quoteJSON(isShippedByAmazonTFM() + ""));
1626
            first = false;
1627
        }
1628
        if (isSetTFMShipmentStatus()) {
1629
            if (!first) json.append(", ");
1630
            json.append(quoteJSON("TFMShipmentStatus"));
1631
            json.append(" : ");
1632
            json.append(quoteJSON(getTFMShipmentStatus()));
1633
            first = false;
1634
        }
12245 manish.sha 1635
        if (isSetCbaDisplayableShippingLabel()) {
1636
            if (!first) json.append(", ");
1637
            json.append(quoteJSON("CbaDisplayableShippingLabel"));
1638
            json.append(" : ");
1639
            json.append(quoteJSON(getCbaDisplayableShippingLabel()));
1640
            first = false;
1641
        }
1642
        if (isSetOrderType()) {
1643
            if (!first) json.append(", ");
1644
            json.append(quoteJSON("OrderType"));
1645
            json.append(" : ");
1646
            json.append(quoteJSON(getOrderType()));
1647
            first = false;
1648
        }
1649
        if (isSetOrderType()) {
1650
            if (!first) json.append(", ");
1651
            json.append(quoteJSON("OrderType"));
1652
            json.append(" : ");
1653
            json.append(quoteJSON(getOrderType()));
1654
            first = false;
1655
        }
1656
        if (isSetEarliestShipDate()) {
1657
            if (!first) json.append(", ");
1658
            json.append(quoteJSON("EarliestShipDate"));
1659
            json.append(" : ");
1660
            json.append(quoteJSON(getEarliestShipDate()+""));
1661
            first = false;
1662
        }
1663
        if (isSetLatestShipDate()) {
1664
            if (!first) json.append(", ");
1665
            json.append(quoteJSON("LatestShipDate"));
1666
            json.append(" : ");
1667
            json.append(quoteJSON(getLatestShipDate()+""));
1668
            first = false;
1669
        }
1670
        if (isSetEarliestDeliveryDate()) {
1671
            if (!first) json.append(", ");
1672
            json.append(quoteJSON("EarliestDeliveryDate"));
1673
            json.append(" : ");
1674
            json.append(quoteJSON(getEarliestDeliveryDate()+""));
1675
            first = false;
1676
        }
1677
        if (isSetLatestDeliveryDate()) {
1678
            if (!first) json.append(", ");
1679
            json.append(quoteJSON("LatestDeliveryDate"));
1680
            json.append(" : ");
1681
            json.append(quoteJSON(getLatestDeliveryDate()+""));
1682
            first = false;
1683
        }
7473 vikram.rag 1684
        return json.toString();
1685
    }
1686
 
1687
    /**
1688
     *
1689
     * Quote JSON string
1690
     */
1691
    private String quoteJSON(String string) {
1692
        if (string == null)
1693
            return "null";
1694
        StringBuffer sb = new StringBuffer();
1695
        sb.append("\"");
1696
        int length = string.length();
1697
        for (int i = 0; i < length; ++i) {
1698
            char c = string.charAt(i);
1699
            switch (c) {
1700
            case '"':
1701
                sb.append("\\\"");
1702
                break;
1703
            case '\\':
1704
                sb.append("\\\\");
1705
                break;
1706
            case '/':
1707
                sb.append("\\/");
1708
                break;
1709
            case '\b':
1710
                sb.append("\\b");
1711
                break;
1712
            case '\f':
1713
                sb.append("\\f");
1714
                break;
1715
            case '\n':
1716
                sb.append("\\n");
1717
                break;
1718
            case '\r':
1719
                sb.append("\\r");
1720
                break;
1721
            case '\t':
1722
                sb.append("\\t");
1723
                break;
1724
            default:
1725
                if (c <  ' ') {
1726
                    sb.append("\\u" + String.format("%03x", Integer.valueOf(c)));
1727
                } else {
1728
                sb.append(c);
1729
            }
1730
        }
1731
        }
1732
        sb.append("\"");
1733
        return sb.toString();
1734
    }
1735
 
1736
 
1737
}