• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Adyen / adyen-java-api-library / #3286

24 May 2024 12:08PM UTC coverage: 12.05%. First build
#3286

push

web-flow
Merge 8e2ea04f7 into 67f331171

10 of 150 new or added lines in 13 files covered. (6.67%)

12475 of 103524 relevant lines covered (12.05%)

0.12 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

16.78
/src/main/java/com/adyen/model/checkout/LineItem.java
1
/*
2
 * Adyen Checkout API
3
 *
4
 * The version of the OpenAPI document: 71
5
 * 
6
 *
7
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
 * https://openapi-generator.tech
9
 * Do not edit the class manually.
10
 */
11

12

13
package com.adyen.model.checkout;
14

15
import java.util.Objects;
16
import java.util.Arrays;
17
import java.util.Map;
18
import java.util.HashMap;
19
import com.fasterxml.jackson.annotation.JsonInclude;
20
import com.fasterxml.jackson.annotation.JsonProperty;
21
import com.fasterxml.jackson.annotation.JsonCreator;
22
import com.fasterxml.jackson.annotation.JsonTypeName;
23
import com.fasterxml.jackson.annotation.JsonValue;
24
import io.swagger.annotations.ApiModel;
25
import io.swagger.annotations.ApiModelProperty;
26
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
27
import com.fasterxml.jackson.core.JsonProcessingException;
28

29

30
/**
31
 * LineItem
32
 */
33
@JsonPropertyOrder({
34
  LineItem.JSON_PROPERTY_AMOUNT_EXCLUDING_TAX,
35
  LineItem.JSON_PROPERTY_AMOUNT_INCLUDING_TAX,
36
  LineItem.JSON_PROPERTY_BRAND,
37
  LineItem.JSON_PROPERTY_COLOR,
38
  LineItem.JSON_PROPERTY_DESCRIPTION,
39
  LineItem.JSON_PROPERTY_ID,
40
  LineItem.JSON_PROPERTY_IMAGE_URL,
41
  LineItem.JSON_PROPERTY_ITEM_CATEGORY,
42
  LineItem.JSON_PROPERTY_MANUFACTURER,
43
  LineItem.JSON_PROPERTY_MARKETPLACE_SELLER_ID,
44
  LineItem.JSON_PROPERTY_PRODUCT_URL,
45
  LineItem.JSON_PROPERTY_QUANTITY,
46
  LineItem.JSON_PROPERTY_RECEIVER_EMAIL,
47
  LineItem.JSON_PROPERTY_SIZE,
48
  LineItem.JSON_PROPERTY_SKU,
49
  LineItem.JSON_PROPERTY_TAX_AMOUNT,
50
  LineItem.JSON_PROPERTY_TAX_PERCENTAGE,
51
  LineItem.JSON_PROPERTY_UPC
52
})
53

54
public class LineItem {
55
  public static final String JSON_PROPERTY_AMOUNT_EXCLUDING_TAX = "amountExcludingTax";
56
  private Long amountExcludingTax;
57

58
  public static final String JSON_PROPERTY_AMOUNT_INCLUDING_TAX = "amountIncludingTax";
59
  private Long amountIncludingTax;
60

61
  public static final String JSON_PROPERTY_BRAND = "brand";
62
  private String brand;
63

64
  public static final String JSON_PROPERTY_COLOR = "color";
65
  private String color;
66

67
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
68
  private String description;
69

70
  public static final String JSON_PROPERTY_ID = "id";
71
  private String id;
72

73
  public static final String JSON_PROPERTY_IMAGE_URL = "imageUrl";
74
  private String imageUrl;
75

76
  public static final String JSON_PROPERTY_ITEM_CATEGORY = "itemCategory";
77
  private String itemCategory;
78

79
  public static final String JSON_PROPERTY_MANUFACTURER = "manufacturer";
80
  private String manufacturer;
81

82
  public static final String JSON_PROPERTY_MARKETPLACE_SELLER_ID = "marketplaceSellerId";
83
  private String marketplaceSellerId;
84

85
  public static final String JSON_PROPERTY_PRODUCT_URL = "productUrl";
86
  private String productUrl;
87

88
  public static final String JSON_PROPERTY_QUANTITY = "quantity";
89
  private Long quantity;
90

91
  public static final String JSON_PROPERTY_RECEIVER_EMAIL = "receiverEmail";
92
  private String receiverEmail;
93

94
  public static final String JSON_PROPERTY_SIZE = "size";
95
  private String size;
96

97
  public static final String JSON_PROPERTY_SKU = "sku";
98
  private String sku;
99

100
  public static final String JSON_PROPERTY_TAX_AMOUNT = "taxAmount";
101
  private Long taxAmount;
102

103
  public static final String JSON_PROPERTY_TAX_PERCENTAGE = "taxPercentage";
104
  private Long taxPercentage;
105

106
  public static final String JSON_PROPERTY_UPC = "upc";
107
  private String upc;
108

109
  public LineItem() { 
1✔
110
  }
1✔
111

112
  public LineItem amountExcludingTax(Long amountExcludingTax) {
113
    this.amountExcludingTax = amountExcludingTax;
×
114
    return this;
×
115
  }
116

117
   /**
118
   * Item amount excluding the tax, in minor units.
119
   * @return amountExcludingTax
120
  **/
121
  @ApiModelProperty(value = "Item amount excluding the tax, in minor units.")
122
  @JsonProperty(JSON_PROPERTY_AMOUNT_EXCLUDING_TAX)
123
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
124

125
  public Long getAmountExcludingTax() {
126
    return amountExcludingTax;
1✔
127
  }
128

129

130
 /**
131
  * Item amount excluding the tax, in minor units.
132
  *
133
  * @param amountExcludingTax
134
  */ 
135
  @JsonProperty(JSON_PROPERTY_AMOUNT_EXCLUDING_TAX)
136
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
137
  public void setAmountExcludingTax(Long amountExcludingTax) {
138
    this.amountExcludingTax = amountExcludingTax;
×
139
  }
×
140

141

142
  public LineItem amountIncludingTax(Long amountIncludingTax) {
143
    this.amountIncludingTax = amountIncludingTax;
×
144
    return this;
×
145
  }
146

147
   /**
148
   * Item amount including the tax, in minor units.
149
   * @return amountIncludingTax
150
  **/
151
  @ApiModelProperty(value = "Item amount including the tax, in minor units.")
152
  @JsonProperty(JSON_PROPERTY_AMOUNT_INCLUDING_TAX)
153
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
154

155
  public Long getAmountIncludingTax() {
156
    return amountIncludingTax;
1✔
157
  }
158

159

160
 /**
161
  * Item amount including the tax, in minor units.
162
  *
163
  * @param amountIncludingTax
164
  */ 
165
  @JsonProperty(JSON_PROPERTY_AMOUNT_INCLUDING_TAX)
166
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
167
  public void setAmountIncludingTax(Long amountIncludingTax) {
168
    this.amountIncludingTax = amountIncludingTax;
×
169
  }
×
170

171

172
  public LineItem brand(String brand) {
173
    this.brand = brand;
×
174
    return this;
×
175
  }
176

177
   /**
178
   * Brand of the item.
179
   * @return brand
180
  **/
181
  @ApiModelProperty(value = "Brand of the item.")
182
  @JsonProperty(JSON_PROPERTY_BRAND)
183
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
184

185
  public String getBrand() {
186
    return brand;
1✔
187
  }
188

189

190
 /**
191
  * Brand of the item.
192
  *
193
  * @param brand
194
  */ 
195
  @JsonProperty(JSON_PROPERTY_BRAND)
196
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
197
  public void setBrand(String brand) {
198
    this.brand = brand;
1✔
199
  }
1✔
200

201

202
  public LineItem color(String color) {
203
    this.color = color;
×
204
    return this;
×
205
  }
206

207
   /**
208
   * Color of the item.
209
   * @return color
210
  **/
211
  @ApiModelProperty(value = "Color of the item.")
212
  @JsonProperty(JSON_PROPERTY_COLOR)
213
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
214

215
  public String getColor() {
216
    return color;
1✔
217
  }
218

219

220
 /**
221
  * Color of the item.
222
  *
223
  * @param color
224
  */ 
225
  @JsonProperty(JSON_PROPERTY_COLOR)
226
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
227
  public void setColor(String color) {
228
    this.color = color;
1✔
229
  }
1✔
230

231

232
  public LineItem description(String description) {
233
    this.description = description;
×
234
    return this;
×
235
  }
236

237
   /**
238
   * Description of the line item.
239
   * @return description
240
  **/
241
  @ApiModelProperty(value = "Description of the line item.")
242
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
243
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
244

245
  public String getDescription() {
246
    return description;
1✔
247
  }
248

249

250
 /**
251
  * Description of the line item.
252
  *
253
  * @param description
254
  */ 
255
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
256
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
257
  public void setDescription(String description) {
258
    this.description = description;
×
259
  }
×
260

261

262
  public LineItem id(String id) {
263
    this.id = id;
×
264
    return this;
×
265
  }
266

267
   /**
268
   * ID of the line item.
269
   * @return id
270
  **/
271
  @ApiModelProperty(value = "ID of the line item.")
272
  @JsonProperty(JSON_PROPERTY_ID)
273
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
274

275
  public String getId() {
276
    return id;
1✔
277
  }
278

279

280
 /**
281
  * ID of the line item.
282
  *
283
  * @param id
284
  */ 
285
  @JsonProperty(JSON_PROPERTY_ID)
286
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
287
  public void setId(String id) {
288
    this.id = id;
×
289
  }
×
290

291

292
  public LineItem imageUrl(String imageUrl) {
293
    this.imageUrl = imageUrl;
×
294
    return this;
×
295
  }
296

297
   /**
298
   * Link to the picture of the purchased item.
299
   * @return imageUrl
300
  **/
301
  @ApiModelProperty(value = "Link to the picture of the purchased item.")
302
  @JsonProperty(JSON_PROPERTY_IMAGE_URL)
303
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
304

305
  public String getImageUrl() {
306
    return imageUrl;
1✔
307
  }
308

309

310
 /**
311
  * Link to the picture of the purchased item.
312
  *
313
  * @param imageUrl
314
  */ 
315
  @JsonProperty(JSON_PROPERTY_IMAGE_URL)
316
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
317
  public void setImageUrl(String imageUrl) {
318
    this.imageUrl = imageUrl;
×
319
  }
×
320

321

322
  public LineItem itemCategory(String itemCategory) {
323
    this.itemCategory = itemCategory;
×
324
    return this;
×
325
  }
326

327
   /**
328
   * Item category, used by the payment methods PayPal and Ratepay.
329
   * @return itemCategory
330
  **/
331
  @ApiModelProperty(value = "Item category, used by the payment methods PayPal and Ratepay.")
332
  @JsonProperty(JSON_PROPERTY_ITEM_CATEGORY)
333
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
334

335
  public String getItemCategory() {
336
    return itemCategory;
1✔
337
  }
338

339

340
 /**
341
  * Item category, used by the payment methods PayPal and Ratepay.
342
  *
343
  * @param itemCategory
344
  */ 
345
  @JsonProperty(JSON_PROPERTY_ITEM_CATEGORY)
346
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
347
  public void setItemCategory(String itemCategory) {
348
    this.itemCategory = itemCategory;
×
349
  }
×
350

351

352
  public LineItem manufacturer(String manufacturer) {
353
    this.manufacturer = manufacturer;
×
354
    return this;
×
355
  }
356

357
   /**
358
   * Manufacturer of the item.
359
   * @return manufacturer
360
  **/
361
  @ApiModelProperty(value = "Manufacturer of the item.")
362
  @JsonProperty(JSON_PROPERTY_MANUFACTURER)
363
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
364

365
  public String getManufacturer() {
366
    return manufacturer;
1✔
367
  }
368

369

370
 /**
371
  * Manufacturer of the item.
372
  *
373
  * @param manufacturer
374
  */ 
375
  @JsonProperty(JSON_PROPERTY_MANUFACTURER)
376
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
377
  public void setManufacturer(String manufacturer) {
378
    this.manufacturer = manufacturer;
×
379
  }
×
380

381

382
  public LineItem marketplaceSellerId(String marketplaceSellerId) {
NEW
383
    this.marketplaceSellerId = marketplaceSellerId;
×
NEW
384
    return this;
×
385
  }
386

387
   /**
388
   * Marketplace seller id.
389
   * @return marketplaceSellerId
390
  **/
391
  @ApiModelProperty(value = "Marketplace seller id.")
392
  @JsonProperty(JSON_PROPERTY_MARKETPLACE_SELLER_ID)
393
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
394

395
  public String getMarketplaceSellerId() {
396
    return marketplaceSellerId;
1✔
397
  }
398

399

400
 /**
401
  * Marketplace seller id.
402
  *
403
  * @param marketplaceSellerId
404
  */ 
405
  @JsonProperty(JSON_PROPERTY_MARKETPLACE_SELLER_ID)
406
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
407
  public void setMarketplaceSellerId(String marketplaceSellerId) {
NEW
408
    this.marketplaceSellerId = marketplaceSellerId;
×
NEW
409
  }
×
410

411

412
  public LineItem productUrl(String productUrl) {
413
    this.productUrl = productUrl;
×
414
    return this;
×
415
  }
416

417
   /**
418
   * Link to the purchased item.
419
   * @return productUrl
420
  **/
421
  @ApiModelProperty(value = "Link to the purchased item.")
422
  @JsonProperty(JSON_PROPERTY_PRODUCT_URL)
423
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
424

425
  public String getProductUrl() {
426
    return productUrl;
1✔
427
  }
428

429

430
 /**
431
  * Link to the purchased item.
432
  *
433
  * @param productUrl
434
  */ 
435
  @JsonProperty(JSON_PROPERTY_PRODUCT_URL)
436
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
437
  public void setProductUrl(String productUrl) {
438
    this.productUrl = productUrl;
×
439
  }
×
440

441

442
  public LineItem quantity(Long quantity) {
443
    this.quantity = quantity;
×
444
    return this;
×
445
  }
446

447
   /**
448
   * Number of items.
449
   * @return quantity
450
  **/
451
  @ApiModelProperty(value = "Number of items.")
452
  @JsonProperty(JSON_PROPERTY_QUANTITY)
453
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
454

455
  public Long getQuantity() {
456
    return quantity;
1✔
457
  }
458

459

460
 /**
461
  * Number of items.
462
  *
463
  * @param quantity
464
  */ 
465
  @JsonProperty(JSON_PROPERTY_QUANTITY)
466
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
467
  public void setQuantity(Long quantity) {
468
    this.quantity = quantity;
×
469
  }
×
470

471

472
  public LineItem receiverEmail(String receiverEmail) {
473
    this.receiverEmail = receiverEmail;
×
474
    return this;
×
475
  }
476

477
   /**
478
   * Email associated with the given product in the basket (usually in electronic gift cards).
479
   * @return receiverEmail
480
  **/
481
  @ApiModelProperty(value = "Email associated with the given product in the basket (usually in electronic gift cards).")
482
  @JsonProperty(JSON_PROPERTY_RECEIVER_EMAIL)
483
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
484

485
  public String getReceiverEmail() {
486
    return receiverEmail;
1✔
487
  }
488

489

490
 /**
491
  * Email associated with the given product in the basket (usually in electronic gift cards).
492
  *
493
  * @param receiverEmail
494
  */ 
495
  @JsonProperty(JSON_PROPERTY_RECEIVER_EMAIL)
496
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
497
  public void setReceiverEmail(String receiverEmail) {
498
    this.receiverEmail = receiverEmail;
×
499
  }
×
500

501

502
  public LineItem size(String size) {
503
    this.size = size;
×
504
    return this;
×
505
  }
506

507
   /**
508
   * Size of the item.
509
   * @return size
510
  **/
511
  @ApiModelProperty(value = "Size of the item.")
512
  @JsonProperty(JSON_PROPERTY_SIZE)
513
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
514

515
  public String getSize() {
516
    return size;
1✔
517
  }
518

519

520
 /**
521
  * Size of the item.
522
  *
523
  * @param size
524
  */ 
525
  @JsonProperty(JSON_PROPERTY_SIZE)
526
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
527
  public void setSize(String size) {
528
    this.size = size;
×
529
  }
×
530

531

532
  public LineItem sku(String sku) {
533
    this.sku = sku;
×
534
    return this;
×
535
  }
536

537
   /**
538
   * Stock keeping unit.
539
   * @return sku
540
  **/
541
  @ApiModelProperty(value = "Stock keeping unit.")
542
  @JsonProperty(JSON_PROPERTY_SKU)
543
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
544

545
  public String getSku() {
546
    return sku;
1✔
547
  }
548

549

550
 /**
551
  * Stock keeping unit.
552
  *
553
  * @param sku
554
  */ 
555
  @JsonProperty(JSON_PROPERTY_SKU)
556
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
557
  public void setSku(String sku) {
558
    this.sku = sku;
×
559
  }
×
560

561

562
  public LineItem taxAmount(Long taxAmount) {
563
    this.taxAmount = taxAmount;
×
564
    return this;
×
565
  }
566

567
   /**
568
   * Tax amount, in minor units.
569
   * @return taxAmount
570
  **/
571
  @ApiModelProperty(value = "Tax amount, in minor units.")
572
  @JsonProperty(JSON_PROPERTY_TAX_AMOUNT)
573
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
574

575
  public Long getTaxAmount() {
576
    return taxAmount;
1✔
577
  }
578

579

580
 /**
581
  * Tax amount, in minor units.
582
  *
583
  * @param taxAmount
584
  */ 
585
  @JsonProperty(JSON_PROPERTY_TAX_AMOUNT)
586
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
587
  public void setTaxAmount(Long taxAmount) {
588
    this.taxAmount = taxAmount;
×
589
  }
×
590

591

592
  public LineItem taxPercentage(Long taxPercentage) {
593
    this.taxPercentage = taxPercentage;
×
594
    return this;
×
595
  }
596

597
   /**
598
   * Tax percentage, in minor units.
599
   * @return taxPercentage
600
  **/
601
  @ApiModelProperty(value = "Tax percentage, in minor units.")
602
  @JsonProperty(JSON_PROPERTY_TAX_PERCENTAGE)
603
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
604

605
  public Long getTaxPercentage() {
606
    return taxPercentage;
1✔
607
  }
608

609

610
 /**
611
  * Tax percentage, in minor units.
612
  *
613
  * @param taxPercentage
614
  */ 
615
  @JsonProperty(JSON_PROPERTY_TAX_PERCENTAGE)
616
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
617
  public void setTaxPercentage(Long taxPercentage) {
618
    this.taxPercentage = taxPercentage;
×
619
  }
×
620

621

622
  public LineItem upc(String upc) {
623
    this.upc = upc;
×
624
    return this;
×
625
  }
626

627
   /**
628
   * Universal Product Code.
629
   * @return upc
630
  **/
631
  @ApiModelProperty(value = "Universal Product Code.")
632
  @JsonProperty(JSON_PROPERTY_UPC)
633
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
634

635
  public String getUpc() {
636
    return upc;
1✔
637
  }
638

639

640
 /**
641
  * Universal Product Code.
642
  *
643
  * @param upc
644
  */ 
645
  @JsonProperty(JSON_PROPERTY_UPC)
646
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
647
  public void setUpc(String upc) {
648
    this.upc = upc;
×
649
  }
×
650

651

652
  /**
653
   * Return true if this LineItem object is equal to o.
654
   */
655
  @Override
656
  public boolean equals(Object o) {
657
    if (this == o) {
×
658
      return true;
×
659
    }
660
    if (o == null || getClass() != o.getClass()) {
×
661
      return false;
×
662
    }
663
    LineItem lineItem = (LineItem) o;
×
664
    return Objects.equals(this.amountExcludingTax, lineItem.amountExcludingTax) &&
×
665
        Objects.equals(this.amountIncludingTax, lineItem.amountIncludingTax) &&
×
666
        Objects.equals(this.brand, lineItem.brand) &&
×
667
        Objects.equals(this.color, lineItem.color) &&
×
668
        Objects.equals(this.description, lineItem.description) &&
×
669
        Objects.equals(this.id, lineItem.id) &&
×
670
        Objects.equals(this.imageUrl, lineItem.imageUrl) &&
×
671
        Objects.equals(this.itemCategory, lineItem.itemCategory) &&
×
672
        Objects.equals(this.manufacturer, lineItem.manufacturer) &&
×
NEW
673
        Objects.equals(this.marketplaceSellerId, lineItem.marketplaceSellerId) &&
×
674
        Objects.equals(this.productUrl, lineItem.productUrl) &&
×
675
        Objects.equals(this.quantity, lineItem.quantity) &&
×
676
        Objects.equals(this.receiverEmail, lineItem.receiverEmail) &&
×
677
        Objects.equals(this.size, lineItem.size) &&
×
678
        Objects.equals(this.sku, lineItem.sku) &&
×
679
        Objects.equals(this.taxAmount, lineItem.taxAmount) &&
×
680
        Objects.equals(this.taxPercentage, lineItem.taxPercentage) &&
×
681
        Objects.equals(this.upc, lineItem.upc);
×
682
  }
683

684
  @Override
685
  public int hashCode() {
NEW
686
    return Objects.hash(amountExcludingTax, amountIncludingTax, brand, color, description, id, imageUrl, itemCategory, manufacturer, marketplaceSellerId, productUrl, quantity, receiverEmail, size, sku, taxAmount, taxPercentage, upc);
×
687
  }
688

689
  @Override
690
  public String toString() {
691
    StringBuilder sb = new StringBuilder();
×
692
    sb.append("class LineItem {\n");
×
693
    sb.append("    amountExcludingTax: ").append(toIndentedString(amountExcludingTax)).append("\n");
×
694
    sb.append("    amountIncludingTax: ").append(toIndentedString(amountIncludingTax)).append("\n");
×
695
    sb.append("    brand: ").append(toIndentedString(brand)).append("\n");
×
696
    sb.append("    color: ").append(toIndentedString(color)).append("\n");
×
697
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
698
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
×
699
    sb.append("    imageUrl: ").append(toIndentedString(imageUrl)).append("\n");
×
700
    sb.append("    itemCategory: ").append(toIndentedString(itemCategory)).append("\n");
×
701
    sb.append("    manufacturer: ").append(toIndentedString(manufacturer)).append("\n");
×
NEW
702
    sb.append("    marketplaceSellerId: ").append(toIndentedString(marketplaceSellerId)).append("\n");
×
703
    sb.append("    productUrl: ").append(toIndentedString(productUrl)).append("\n");
×
704
    sb.append("    quantity: ").append(toIndentedString(quantity)).append("\n");
×
705
    sb.append("    receiverEmail: ").append(toIndentedString(receiverEmail)).append("\n");
×
706
    sb.append("    size: ").append(toIndentedString(size)).append("\n");
×
707
    sb.append("    sku: ").append(toIndentedString(sku)).append("\n");
×
708
    sb.append("    taxAmount: ").append(toIndentedString(taxAmount)).append("\n");
×
709
    sb.append("    taxPercentage: ").append(toIndentedString(taxPercentage)).append("\n");
×
710
    sb.append("    upc: ").append(toIndentedString(upc)).append("\n");
×
711
    sb.append("}");
×
712
    return sb.toString();
×
713
  }
714

715
  /**
716
   * Convert the given object to string with each line indented by 4 spaces
717
   * (except the first line).
718
   */
719
  private String toIndentedString(Object o) {
720
    if (o == null) {
×
721
      return "null";
×
722
    }
723
    return o.toString().replace("\n", "\n    ");
×
724
  }
725

726
/**
727
   * Create an instance of LineItem given an JSON string
728
   *
729
   * @param jsonString JSON string
730
   * @return An instance of LineItem
731
   * @throws JsonProcessingException if the JSON string is invalid with respect to LineItem
732
   */
733
  public static LineItem fromJson(String jsonString) throws JsonProcessingException {
734
    return JSON.getMapper().readValue(jsonString, LineItem.class);
×
735
  }
736
/**
737
  * Convert an instance of LineItem to an JSON string
738
  *
739
  * @return JSON string
740
  */
741
  public String toJson() throws JsonProcessingException {
742
    return JSON.getMapper().writeValueAsString(this);
×
743
  }
744
}
745

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc