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

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

20 Jun 2024 12:54PM UTC coverage: 11.944%. First build
#3331

push

web-flow
Merge 311e2b915 into ac91e3ca5

12 of 622 new or added lines in 65 files covered. (1.93%)

12497 of 104632 relevant lines covered (11.94%)

0.12 hits per line

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

17.46
/src/main/java/com/adyen/model/checkout/AmazonPayDetails.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
 * AmazonPayDetails
32
 */
33
@JsonPropertyOrder({
34
  AmazonPayDetails.JSON_PROPERTY_AMAZON_PAY_TOKEN,
35
  AmazonPayDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID,
36
  AmazonPayDetails.JSON_PROPERTY_CHECKOUT_SESSION_ID,
37
  AmazonPayDetails.JSON_PROPERTY_SUBTYPE,
38
  AmazonPayDetails.JSON_PROPERTY_TYPE
39
})
40

41
public class AmazonPayDetails {
42
  public static final String JSON_PROPERTY_AMAZON_PAY_TOKEN = "amazonPayToken";
43
  private String amazonPayToken;
44

45
  public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId";
46
  private String checkoutAttemptId;
47

48
  public static final String JSON_PROPERTY_CHECKOUT_SESSION_ID = "checkoutSessionId";
49
  private String checkoutSessionId;
50

51
  public static final String JSON_PROPERTY_SUBTYPE = "subtype";
52
  private String subtype;
53

54
  /**
55
   * **amazonpay**
56
   */
57
  public enum TypeEnum {
1✔
58
    AMAZONPAY("amazonpay");
1✔
59

60
    private String value;
61

62
    TypeEnum(String value) {
1✔
63
      this.value = value;
1✔
64
    }
1✔
65

66
    @JsonValue
67
    public String getValue() {
68
      return value;
1✔
69
    }
70

71
    @Override
72
    public String toString() {
73
      return String.valueOf(value);
×
74
    }
75

76
    @JsonCreator
77
    public static TypeEnum fromValue(String value) {
78
      for (TypeEnum b : TypeEnum.values()) {
1✔
79
        if (b.value.equals(value)) {
1✔
80
          return b;
×
81
        }
82
      }
83
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
1✔
84
    }
85
  }
86

87
  public static final String JSON_PROPERTY_TYPE = "type";
88
  private TypeEnum type;
89

90
  public AmazonPayDetails() { 
1✔
91
  }
1✔
92

93
  public AmazonPayDetails amazonPayToken(String amazonPayToken) {
94
    this.amazonPayToken = amazonPayToken;
×
95
    return this;
×
96
  }
97

98
   /**
99
   * This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. This token is used for API only integration specifically.
100
   * @return amazonPayToken
101
  **/
102
  @ApiModelProperty(value = "This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. This token is used for API only integration specifically.")
103
  @JsonProperty(JSON_PROPERTY_AMAZON_PAY_TOKEN)
104
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
105

106
  public String getAmazonPayToken() {
107
    return amazonPayToken;
×
108
  }
109

110

111
 /**
112
  * This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. This token is used for API only integration specifically.
113
  *
114
  * @param amazonPayToken
115
  */ 
116
  @JsonProperty(JSON_PROPERTY_AMAZON_PAY_TOKEN)
117
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
118
  public void setAmazonPayToken(String amazonPayToken) {
119
    this.amazonPayToken = amazonPayToken;
×
120
  }
×
121

122

123
  public AmazonPayDetails checkoutAttemptId(String checkoutAttemptId) {
124
    this.checkoutAttemptId = checkoutAttemptId;
×
125
    return this;
×
126
  }
127

128
   /**
129
   * The checkout attempt identifier.
130
   * @return checkoutAttemptId
131
  **/
132
  @ApiModelProperty(value = "The checkout attempt identifier.")
133
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
134
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
135

136
  public String getCheckoutAttemptId() {
137
    return checkoutAttemptId;
×
138
  }
139

140

141
 /**
142
  * The checkout attempt identifier.
143
  *
144
  * @param checkoutAttemptId
145
  */ 
146
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
147
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
148
  public void setCheckoutAttemptId(String checkoutAttemptId) {
149
    this.checkoutAttemptId = checkoutAttemptId;
×
150
  }
×
151

152

153
  public AmazonPayDetails checkoutSessionId(String checkoutSessionId) {
154
    this.checkoutSessionId = checkoutSessionId;
×
155
    return this;
×
156
  }
157

158
   /**
159
   * The `checkoutSessionId` is used to identify the checkout session at the Amazon Pay side. This field is required only for drop-in and components integration, where it replaces the amazonPayToken.
160
   * @return checkoutSessionId
161
  **/
162
  @ApiModelProperty(value = "The `checkoutSessionId` is used to identify the checkout session at the Amazon Pay side. This field is required only for drop-in and components integration, where it replaces the amazonPayToken.")
163
  @JsonProperty(JSON_PROPERTY_CHECKOUT_SESSION_ID)
164
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
165

166
  public String getCheckoutSessionId() {
167
    return checkoutSessionId;
×
168
  }
169

170

171
 /**
172
  * The `checkoutSessionId` is used to identify the checkout session at the Amazon Pay side. This field is required only for drop-in and components integration, where it replaces the amazonPayToken.
173
  *
174
  * @param checkoutSessionId
175
  */ 
176
  @JsonProperty(JSON_PROPERTY_CHECKOUT_SESSION_ID)
177
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
178
  public void setCheckoutSessionId(String checkoutSessionId) {
179
    this.checkoutSessionId = checkoutSessionId;
×
180
  }
×
181

182

183
  public AmazonPayDetails subtype(String subtype) {
NEW
184
    this.subtype = subtype;
×
NEW
185
    return this;
×
186
  }
187

188
   /**
189
   * The payment method subtype.
190
   * @return subtype
191
  **/
192
  @ApiModelProperty(value = "The payment method subtype.")
193
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
194
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
195

196
  public String getSubtype() {
NEW
197
    return subtype;
×
198
  }
199

200

201
 /**
202
  * The payment method subtype.
203
  *
204
  * @param subtype
205
  */ 
206
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
207
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
208
  public void setSubtype(String subtype) {
NEW
209
    this.subtype = subtype;
×
NEW
210
  }
×
211

212

213
  public AmazonPayDetails type(TypeEnum type) {
214
    this.type = type;
×
215
    return this;
×
216
  }
217

218
   /**
219
   * **amazonpay**
220
   * @return type
221
  **/
222
  @ApiModelProperty(value = "**amazonpay**")
223
  @JsonProperty(JSON_PROPERTY_TYPE)
224
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
225

226
  public TypeEnum getType() {
227
    return type;
×
228
  }
229

230

231
 /**
232
  * **amazonpay**
233
  *
234
  * @param type
235
  */ 
236
  @JsonProperty(JSON_PROPERTY_TYPE)
237
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
238
  public void setType(TypeEnum type) {
239
    this.type = type;
×
240
  }
×
241

242

243
  /**
244
   * Return true if this AmazonPayDetails object is equal to o.
245
   */
246
  @Override
247
  public boolean equals(Object o) {
248
    if (this == o) {
×
249
      return true;
×
250
    }
251
    if (o == null || getClass() != o.getClass()) {
×
252
      return false;
×
253
    }
254
    AmazonPayDetails amazonPayDetails = (AmazonPayDetails) o;
×
255
    return Objects.equals(this.amazonPayToken, amazonPayDetails.amazonPayToken) &&
×
256
        Objects.equals(this.checkoutAttemptId, amazonPayDetails.checkoutAttemptId) &&
×
257
        Objects.equals(this.checkoutSessionId, amazonPayDetails.checkoutSessionId) &&
×
NEW
258
        Objects.equals(this.subtype, amazonPayDetails.subtype) &&
×
259
        Objects.equals(this.type, amazonPayDetails.type);
×
260
  }
261

262
  @Override
263
  public int hashCode() {
NEW
264
    return Objects.hash(amazonPayToken, checkoutAttemptId, checkoutSessionId, subtype, type);
×
265
  }
266

267
  @Override
268
  public String toString() {
269
    StringBuilder sb = new StringBuilder();
×
270
    sb.append("class AmazonPayDetails {\n");
×
271
    sb.append("    amazonPayToken: ").append(toIndentedString(amazonPayToken)).append("\n");
×
272
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
273
    sb.append("    checkoutSessionId: ").append(toIndentedString(checkoutSessionId)).append("\n");
×
NEW
274
    sb.append("    subtype: ").append(toIndentedString(subtype)).append("\n");
×
275
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
276
    sb.append("}");
×
277
    return sb.toString();
×
278
  }
279

280
  /**
281
   * Convert the given object to string with each line indented by 4 spaces
282
   * (except the first line).
283
   */
284
  private String toIndentedString(Object o) {
285
    if (o == null) {
×
286
      return "null";
×
287
    }
288
    return o.toString().replace("\n", "\n    ");
×
289
  }
290

291
/**
292
   * Create an instance of AmazonPayDetails given an JSON string
293
   *
294
   * @param jsonString JSON string
295
   * @return An instance of AmazonPayDetails
296
   * @throws JsonProcessingException if the JSON string is invalid with respect to AmazonPayDetails
297
   */
298
  public static AmazonPayDetails fromJson(String jsonString) throws JsonProcessingException {
299
    return JSON.getMapper().readValue(jsonString, AmazonPayDetails.class);
×
300
  }
301
/**
302
  * Convert an instance of AmazonPayDetails to an JSON string
303
  *
304
  * @return JSON string
305
  */
306
  public String toJson() throws JsonProcessingException {
307
    return JSON.getMapper().writeValueAsString(this);
×
308
  }
309
}
310

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