-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCheckoutSessionItemsDto.java
More file actions
92 lines (76 loc) · 1.88 KB
/
CheckoutSessionItemsDto.java
File metadata and controls
92 lines (76 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// This file was generated by liblab | https://liblab.com/
package com.asaas.apisdk.models;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
import lombok.ToString;
import lombok.With;
import lombok.extern.jackson.Jacksonized;
import org.openapitools.jackson.nullable.JsonNullable;
/**
* List of items at checkout
*/
@Data
@Builder
@With
@ToString
@EqualsAndHashCode
@Jacksonized
public class CheckoutSessionItemsDto {
/**
* Item image in Base64
*/
@NonNull
private String imageBase64;
/**
* Item name
*/
@NonNull
private String name;
/**
* Item Quantity
*/
@NonNull
private Long quantity;
/**
* Item value
*/
@NonNull
private Double value;
/**
* Item unique identifier in your system
*/
@JsonProperty("externalReference")
private JsonNullable<String> externalReference;
/**
* Item Description
*/
@JsonProperty("description")
private JsonNullable<String> description;
@JsonIgnore
public String getExternalReference() {
return externalReference.orElse(null);
}
@JsonIgnore
public String getDescription() {
return description.orElse(null);
}
// Overwrite lombok builder methods
public static class CheckoutSessionItemsDtoBuilder {
private JsonNullable<String> externalReference = JsonNullable.undefined();
@JsonProperty("externalReference")
public CheckoutSessionItemsDtoBuilder externalReference(String value) {
this.externalReference = JsonNullable.of(value);
return this;
}
private JsonNullable<String> description = JsonNullable.undefined();
@JsonProperty("description")
public CheckoutSessionItemsDtoBuilder description(String value) {
this.description = JsonNullable.of(value);
return this;
}
}
}