Subversion Repositories SmartDukaan

Rev

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

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