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

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

21 Mar 2024 10:28AM CUT coverage: 12.294%. First build
#3177

push

web-flow
Merge 3d6ff7572 into d61048882

0 of 208 new or added lines in 10 files covered. (0.0%)

12446 of 101233 relevant lines covered (12.29%)

0.12 hits per line

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

0.0
/src/main/java/com/adyen/model/checkout/StoredPaymentMethodRequest.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.adyen.model.checkout.PaymentMethodToStore;
20
import com.fasterxml.jackson.annotation.JsonInclude;
21
import com.fasterxml.jackson.annotation.JsonProperty;
22
import com.fasterxml.jackson.annotation.JsonCreator;
23
import com.fasterxml.jackson.annotation.JsonTypeName;
24
import com.fasterxml.jackson.annotation.JsonValue;
25
import io.swagger.annotations.ApiModel;
26
import io.swagger.annotations.ApiModelProperty;
27
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
28
import com.fasterxml.jackson.core.JsonProcessingException;
29

30

31
/**
32
 * StoredPaymentMethodRequest
33
 */
34
@JsonPropertyOrder({
35
  StoredPaymentMethodRequest.JSON_PROPERTY_MERCHANT_ACCOUNT,
36
  StoredPaymentMethodRequest.JSON_PROPERTY_PAYMENT_METHOD,
37
  StoredPaymentMethodRequest.JSON_PROPERTY_RECURRING_PROCESSING_MODEL,
38
  StoredPaymentMethodRequest.JSON_PROPERTY_SHOPPER_EMAIL,
39
  StoredPaymentMethodRequest.JSON_PROPERTY_SHOPPER_I_P,
40
  StoredPaymentMethodRequest.JSON_PROPERTY_SHOPPER_REFERENCE
41
})
42

43
public class StoredPaymentMethodRequest {
44
  public static final String JSON_PROPERTY_MERCHANT_ACCOUNT = "merchantAccount";
45
  private String merchantAccount;
46

47
  public static final String JSON_PROPERTY_PAYMENT_METHOD = "paymentMethod";
48
  private PaymentMethodToStore paymentMethod;
49

50
  /**
51
   * Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. 
52
   */
NEW
53
  public enum RecurringProcessingModelEnum {
×
NEW
54
    CARDONFILE("CardOnFile"),
×
55
    
NEW
56
    SUBSCRIPTION("Subscription"),
×
57
    
NEW
58
    UNSCHEDULEDCARDONFILE("UnscheduledCardOnFile");
×
59

60
    private String value;
61

NEW
62
    RecurringProcessingModelEnum(String value) {
×
NEW
63
      this.value = value;
×
NEW
64
    }
×
65

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

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

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

87
  public static final String JSON_PROPERTY_RECURRING_PROCESSING_MODEL = "recurringProcessingModel";
88
  private RecurringProcessingModelEnum recurringProcessingModel;
89

90
  public static final String JSON_PROPERTY_SHOPPER_EMAIL = "shopperEmail";
91
  private String shopperEmail;
92

93
  public static final String JSON_PROPERTY_SHOPPER_I_P = "shopperIP";
94
  private String shopperIP;
95

96
  public static final String JSON_PROPERTY_SHOPPER_REFERENCE = "shopperReference";
97
  private String shopperReference;
98

NEW
99
  public StoredPaymentMethodRequest() { 
×
NEW
100
  }
×
101

102
  public StoredPaymentMethodRequest merchantAccount(String merchantAccount) {
NEW
103
    this.merchantAccount = merchantAccount;
×
NEW
104
    return this;
×
105
  }
106

107
   /**
108
   * The merchant account identifier, with which you want to process the transaction.
109
   * @return merchantAccount
110
  **/
111
  @ApiModelProperty(required = true, value = "The merchant account identifier, with which you want to process the transaction.")
112
  @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
113
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
114

115
  public String getMerchantAccount() {
NEW
116
    return merchantAccount;
×
117
  }
118

119

120
 /**
121
  * The merchant account identifier, with which you want to process the transaction.
122
  *
123
  * @param merchantAccount
124
  */ 
125
  @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
126
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
127
  public void setMerchantAccount(String merchantAccount) {
NEW
128
    this.merchantAccount = merchantAccount;
×
NEW
129
  }
×
130

131

132
  public StoredPaymentMethodRequest paymentMethod(PaymentMethodToStore paymentMethod) {
NEW
133
    this.paymentMethod = paymentMethod;
×
NEW
134
    return this;
×
135
  }
136

137
   /**
138
   * Get paymentMethod
139
   * @return paymentMethod
140
  **/
141
  @ApiModelProperty(required = true, value = "")
142
  @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD)
143
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
144

145
  public PaymentMethodToStore getPaymentMethod() {
NEW
146
    return paymentMethod;
×
147
  }
148

149

150
 /**
151
  * paymentMethod
152
  *
153
  * @param paymentMethod
154
  */ 
155
  @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD)
156
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
157
  public void setPaymentMethod(PaymentMethodToStore paymentMethod) {
NEW
158
    this.paymentMethod = paymentMethod;
×
NEW
159
  }
×
160

161

162
  public StoredPaymentMethodRequest recurringProcessingModel(RecurringProcessingModelEnum recurringProcessingModel) {
NEW
163
    this.recurringProcessingModel = recurringProcessingModel;
×
NEW
164
    return this;
×
165
  }
166

167
   /**
168
   * Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. 
169
   * @return recurringProcessingModel
170
  **/
171
  @ApiModelProperty(required = true, value = "Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. ")
172
  @JsonProperty(JSON_PROPERTY_RECURRING_PROCESSING_MODEL)
173
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
174

175
  public RecurringProcessingModelEnum getRecurringProcessingModel() {
NEW
176
    return recurringProcessingModel;
×
177
  }
178

179

180
 /**
181
  * Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. 
182
  *
183
  * @param recurringProcessingModel
184
  */ 
185
  @JsonProperty(JSON_PROPERTY_RECURRING_PROCESSING_MODEL)
186
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
187
  public void setRecurringProcessingModel(RecurringProcessingModelEnum recurringProcessingModel) {
NEW
188
    this.recurringProcessingModel = recurringProcessingModel;
×
NEW
189
  }
×
190

191

192
  public StoredPaymentMethodRequest shopperEmail(String shopperEmail) {
NEW
193
    this.shopperEmail = shopperEmail;
×
NEW
194
    return this;
×
195
  }
196

197
   /**
198
   * The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks.
199
   * @return shopperEmail
200
  **/
201
  @ApiModelProperty(value = "The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks.")
202
  @JsonProperty(JSON_PROPERTY_SHOPPER_EMAIL)
203
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
204

205
  public String getShopperEmail() {
NEW
206
    return shopperEmail;
×
207
  }
208

209

210
 /**
211
  * The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks.
212
  *
213
  * @param shopperEmail
214
  */ 
215
  @JsonProperty(JSON_PROPERTY_SHOPPER_EMAIL)
216
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
217
  public void setShopperEmail(String shopperEmail) {
NEW
218
    this.shopperEmail = shopperEmail;
×
NEW
219
  }
×
220

221

222
  public StoredPaymentMethodRequest shopperIP(String shopperIP) {
NEW
223
    this.shopperIP = shopperIP;
×
NEW
224
    return this;
×
225
  }
226

227
   /**
228
   * The IP address of a shopper.
229
   * @return shopperIP
230
  **/
231
  @ApiModelProperty(value = "The IP address of a shopper.")
232
  @JsonProperty(JSON_PROPERTY_SHOPPER_I_P)
233
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
234

235
  public String getShopperIP() {
NEW
236
    return shopperIP;
×
237
  }
238

239

240
 /**
241
  * The IP address of a shopper.
242
  *
243
  * @param shopperIP
244
  */ 
245
  @JsonProperty(JSON_PROPERTY_SHOPPER_I_P)
246
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
247
  public void setShopperIP(String shopperIP) {
NEW
248
    this.shopperIP = shopperIP;
×
NEW
249
  }
×
250

251

252
  public StoredPaymentMethodRequest shopperReference(String shopperReference) {
NEW
253
    this.shopperReference = shopperReference;
×
NEW
254
    return this;
×
255
  }
256

257
   /**
258
   * A unique identifier for the shopper (for example, user ID or account ID).
259
   * @return shopperReference
260
  **/
261
  @ApiModelProperty(required = true, value = "A unique identifier for the shopper (for example, user ID or account ID).")
262
  @JsonProperty(JSON_PROPERTY_SHOPPER_REFERENCE)
263
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
264

265
  public String getShopperReference() {
NEW
266
    return shopperReference;
×
267
  }
268

269

270
 /**
271
  * A unique identifier for the shopper (for example, user ID or account ID).
272
  *
273
  * @param shopperReference
274
  */ 
275
  @JsonProperty(JSON_PROPERTY_SHOPPER_REFERENCE)
276
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
277
  public void setShopperReference(String shopperReference) {
NEW
278
    this.shopperReference = shopperReference;
×
NEW
279
  }
×
280

281

282
  /**
283
   * Return true if this StoredPaymentMethodRequest object is equal to o.
284
   */
285
  @Override
286
  public boolean equals(Object o) {
NEW
287
    if (this == o) {
×
NEW
288
      return true;
×
289
    }
NEW
290
    if (o == null || getClass() != o.getClass()) {
×
NEW
291
      return false;
×
292
    }
NEW
293
    StoredPaymentMethodRequest storedPaymentMethodRequest = (StoredPaymentMethodRequest) o;
×
NEW
294
    return Objects.equals(this.merchantAccount, storedPaymentMethodRequest.merchantAccount) &&
×
NEW
295
        Objects.equals(this.paymentMethod, storedPaymentMethodRequest.paymentMethod) &&
×
NEW
296
        Objects.equals(this.recurringProcessingModel, storedPaymentMethodRequest.recurringProcessingModel) &&
×
NEW
297
        Objects.equals(this.shopperEmail, storedPaymentMethodRequest.shopperEmail) &&
×
NEW
298
        Objects.equals(this.shopperIP, storedPaymentMethodRequest.shopperIP) &&
×
NEW
299
        Objects.equals(this.shopperReference, storedPaymentMethodRequest.shopperReference);
×
300
  }
301

302
  @Override
303
  public int hashCode() {
NEW
304
    return Objects.hash(merchantAccount, paymentMethod, recurringProcessingModel, shopperEmail, shopperIP, shopperReference);
×
305
  }
306

307
  @Override
308
  public String toString() {
NEW
309
    StringBuilder sb = new StringBuilder();
×
NEW
310
    sb.append("class StoredPaymentMethodRequest {\n");
×
NEW
311
    sb.append("    merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n");
×
NEW
312
    sb.append("    paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n");
×
NEW
313
    sb.append("    recurringProcessingModel: ").append(toIndentedString(recurringProcessingModel)).append("\n");
×
NEW
314
    sb.append("    shopperEmail: ").append(toIndentedString(shopperEmail)).append("\n");
×
NEW
315
    sb.append("    shopperIP: ").append(toIndentedString(shopperIP)).append("\n");
×
NEW
316
    sb.append("    shopperReference: ").append(toIndentedString(shopperReference)).append("\n");
×
NEW
317
    sb.append("}");
×
NEW
318
    return sb.toString();
×
319
  }
320

321
  /**
322
   * Convert the given object to string with each line indented by 4 spaces
323
   * (except the first line).
324
   */
325
  private String toIndentedString(Object o) {
NEW
326
    if (o == null) {
×
NEW
327
      return "null";
×
328
    }
NEW
329
    return o.toString().replace("\n", "\n    ");
×
330
  }
331

332
/**
333
   * Create an instance of StoredPaymentMethodRequest given an JSON string
334
   *
335
   * @param jsonString JSON string
336
   * @return An instance of StoredPaymentMethodRequest
337
   * @throws JsonProcessingException if the JSON string is invalid with respect to StoredPaymentMethodRequest
338
   */
339
  public static StoredPaymentMethodRequest fromJson(String jsonString) throws JsonProcessingException {
NEW
340
    return JSON.getMapper().readValue(jsonString, StoredPaymentMethodRequest.class);
×
341
  }
342
/**
343
  * Convert an instance of StoredPaymentMethodRequest to an JSON string
344
  *
345
  * @return JSON string
346
  */
347
  public String toJson() throws JsonProcessingException {
NEW
348
    return JSON.getMapper().writeValueAsString(this);
×
349
  }
350
}
351

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