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

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

08 Nov 2023 09:16AM CUT coverage: 12.837%. First build
#2829

push

web-flow
Merge 828273160 into b96088175

114 of 864 new or added lines in 50 files covered. (13.19%)

12393 of 96543 relevant lines covered (12.84%)

0.13 hits per line

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

0.0
/src/main/java/com/adyen/model/binlookup/Recurring.java
1
/*
2
 * Adyen BinLookup API
3
 * The BIN Lookup API provides endpoints for retrieving information, such as cost estimates, and 3D Secure supported version based on a given BIN.  ## Authentication You need an [API credential](https://docs.adyen.com/development-resources/api-credentials) to authenticate to the API.  If using an API key, add an `X-API-Key` header with the API key as the value, for example:   ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ```  Alternatively, you can use the username and password to connect to the API using basic authentication, for example:  ``` curl -U \"ws@Company.YOUR_COMPANY_ACCOUNT\":\"YOUR_BASIC_AUTHENTICATION_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ```  ## Versioning The BinLookup API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.  For example: ``` https://pal-test.adyen.com/pal/servlet/BinLookup/v54/get3dsAvailability ```## Going live  To authneticate to the live endpoints, you need an [API credential](https://docs.adyen.com/development-resources/api-credentials) from your live Customer Area.  The live endpoint URLs contain a prefix which is unique to your company account: ```  https://{PREFIX}-pal-live.adyenpayments.com/pal/servlet/BinLookup/v54/get3dsAvailability ```  Get your `{PREFIX}` from your live Customer Area under **Developers** > **API URLs** > **Prefix**.
4
 *
5
 * The version of the OpenAPI document: 54
6
 * 
7
 *
8
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
 * https://openapi-generator.tech
10
 * Do not edit the class manually.
11
 */
12

13

14
package com.adyen.model.binlookup;
15

16
import java.util.Objects;
17
import java.util.Arrays;
18
import java.util.Map;
19
import java.util.HashMap;
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 java.time.OffsetDateTime;
28
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
29
import com.fasterxml.jackson.core.JsonProcessingException;
30

31

32
/**
33
 * Recurring
34
 */
35
@JsonPropertyOrder({
36
  Recurring.JSON_PROPERTY_CONTRACT,
37
  Recurring.JSON_PROPERTY_RECURRING_DETAIL_NAME,
38
  Recurring.JSON_PROPERTY_RECURRING_EXPIRY,
39
  Recurring.JSON_PROPERTY_RECURRING_FREQUENCY,
40
  Recurring.JSON_PROPERTY_TOKEN_SERVICE
41
})
42

43
public class Recurring {
44
  /**
45
   * The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts).
46
   */
47
  public enum ContractEnum {
×
48
    ONECLICK("ONECLICK"),
×
49
    
50
    RECURRING("RECURRING"),
×
51
    
52
    PAYOUT("PAYOUT");
×
53

54
    private String value;
55

56
    ContractEnum(String value) {
×
57
      this.value = value;
×
58
    }
×
59

60
    @JsonValue
61
    public String getValue() {
62
      return value;
×
63
    }
64

65
    @Override
66
    public String toString() {
67
      return String.valueOf(value);
×
68
    }
69

70
    @JsonCreator
71
    public static ContractEnum fromValue(String value) {
72
      for (ContractEnum b : ContractEnum.values()) {
×
73
        if (b.value.equals(value)) {
×
74
          return b;
×
75
        }
76
      }
77
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
78
    }
79
  }
80

81
  public static final String JSON_PROPERTY_CONTRACT = "contract";
82
  private ContractEnum contract;
83

84
  public static final String JSON_PROPERTY_RECURRING_DETAIL_NAME = "recurringDetailName";
85
  private String recurringDetailName;
86

87
  public static final String JSON_PROPERTY_RECURRING_EXPIRY = "recurringExpiry";
88
  private OffsetDateTime recurringExpiry;
89

90
  public static final String JSON_PROPERTY_RECURRING_FREQUENCY = "recurringFrequency";
91
  private String recurringFrequency;
92

93
  /**
94
   * The name of the token service.
95
   */
96
  public enum TokenServiceEnum {
×
97
    VISATOKENSERVICE("VISATOKENSERVICE"),
×
98
    
NEW
99
    MCTOKENSERVICE("MCTOKENSERVICE"),
×
100
    
NEW
101
    AMEXTOKENSERVICE("AMEXTOKENSERVICE"),
×
102
    
NEW
103
    TOKEN_SHARING("TOKEN_SHARING");
×
104

105
    private String value;
106

107
    TokenServiceEnum(String value) {
×
108
      this.value = value;
×
109
    }
×
110

111
    @JsonValue
112
    public String getValue() {
113
      return value;
×
114
    }
115

116
    @Override
117
    public String toString() {
118
      return String.valueOf(value);
×
119
    }
120

121
    @JsonCreator
122
    public static TokenServiceEnum fromValue(String value) {
123
      for (TokenServiceEnum b : TokenServiceEnum.values()) {
×
124
        if (b.value.equals(value)) {
×
125
          return b;
×
126
        }
127
      }
128
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
129
    }
130
  }
131

132
  public static final String JSON_PROPERTY_TOKEN_SERVICE = "tokenService";
133
  private TokenServiceEnum tokenService;
134

135
  public Recurring() { 
×
136
  }
×
137

138
  public Recurring contract(ContractEnum contract) {
139
    this.contract = contract;
×
140
    return this;
×
141
  }
142

143
   /**
144
   * The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts).
145
   * @return contract
146
  **/
147
  @ApiModelProperty(value = "The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts).")
148
  @JsonProperty(JSON_PROPERTY_CONTRACT)
149
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
150

151
  public ContractEnum getContract() {
152
    return contract;
×
153
  }
154

155

156
  @JsonProperty(JSON_PROPERTY_CONTRACT)
157
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
158
  public void setContract(ContractEnum contract) {
159
    this.contract = contract;
×
160
  }
×
161

162

163
  public Recurring recurringDetailName(String recurringDetailName) {
164
    this.recurringDetailName = recurringDetailName;
×
165
    return this;
×
166
  }
167

168
   /**
169
   * A descriptive name for this detail.
170
   * @return recurringDetailName
171
  **/
172
  @ApiModelProperty(value = "A descriptive name for this detail.")
173
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_NAME)
174
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
175

176
  public String getRecurringDetailName() {
177
    return recurringDetailName;
×
178
  }
179

180

181
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_NAME)
182
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
183
  public void setRecurringDetailName(String recurringDetailName) {
184
    this.recurringDetailName = recurringDetailName;
×
185
  }
×
186

187

188
  public Recurring recurringExpiry(OffsetDateTime recurringExpiry) {
189
    this.recurringExpiry = recurringExpiry;
×
190
    return this;
×
191
  }
192

193
   /**
194
   * Date after which no further authorisations shall be performed. Only for 3D Secure 2.
195
   * @return recurringExpiry
196
  **/
197
  @ApiModelProperty(value = "Date after which no further authorisations shall be performed. Only for 3D Secure 2.")
198
  @JsonProperty(JSON_PROPERTY_RECURRING_EXPIRY)
199
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
200

201
  public OffsetDateTime getRecurringExpiry() {
202
    return recurringExpiry;
×
203
  }
204

205

206
  @JsonProperty(JSON_PROPERTY_RECURRING_EXPIRY)
207
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
208
  public void setRecurringExpiry(OffsetDateTime recurringExpiry) {
209
    this.recurringExpiry = recurringExpiry;
×
210
  }
×
211

212

213
  public Recurring recurringFrequency(String recurringFrequency) {
214
    this.recurringFrequency = recurringFrequency;
×
215
    return this;
×
216
  }
217

218
   /**
219
   * Minimum number of days between authorisations. Only for 3D Secure 2.
220
   * @return recurringFrequency
221
  **/
222
  @ApiModelProperty(value = "Minimum number of days between authorisations. Only for 3D Secure 2.")
223
  @JsonProperty(JSON_PROPERTY_RECURRING_FREQUENCY)
224
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
225

226
  public String getRecurringFrequency() {
227
    return recurringFrequency;
×
228
  }
229

230

231
  @JsonProperty(JSON_PROPERTY_RECURRING_FREQUENCY)
232
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
233
  public void setRecurringFrequency(String recurringFrequency) {
234
    this.recurringFrequency = recurringFrequency;
×
235
  }
×
236

237

238
  public Recurring tokenService(TokenServiceEnum tokenService) {
239
    this.tokenService = tokenService;
×
240
    return this;
×
241
  }
242

243
   /**
244
   * The name of the token service.
245
   * @return tokenService
246
  **/
247
  @ApiModelProperty(value = "The name of the token service.")
248
  @JsonProperty(JSON_PROPERTY_TOKEN_SERVICE)
249
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
250

251
  public TokenServiceEnum getTokenService() {
252
    return tokenService;
×
253
  }
254

255

256
  @JsonProperty(JSON_PROPERTY_TOKEN_SERVICE)
257
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
258
  public void setTokenService(TokenServiceEnum tokenService) {
259
    this.tokenService = tokenService;
×
260
  }
×
261

262

263
  /**
264
   * Return true if this Recurring object is equal to o.
265
   */
266
  @Override
267
  public boolean equals(Object o) {
268
    if (this == o) {
×
269
      return true;
×
270
    }
271
    if (o == null || getClass() != o.getClass()) {
×
272
      return false;
×
273
    }
274
    Recurring recurring = (Recurring) o;
×
275
    return Objects.equals(this.contract, recurring.contract) &&
×
276
        Objects.equals(this.recurringDetailName, recurring.recurringDetailName) &&
×
277
        Objects.equals(this.recurringExpiry, recurring.recurringExpiry) &&
×
278
        Objects.equals(this.recurringFrequency, recurring.recurringFrequency) &&
×
279
        Objects.equals(this.tokenService, recurring.tokenService);
×
280
  }
281

282
  @Override
283
  public int hashCode() {
284
    return Objects.hash(contract, recurringDetailName, recurringExpiry, recurringFrequency, tokenService);
×
285
  }
286

287
  @Override
288
  public String toString() {
289
    StringBuilder sb = new StringBuilder();
×
290
    sb.append("class Recurring {\n");
×
291
    sb.append("    contract: ").append(toIndentedString(contract)).append("\n");
×
292
    sb.append("    recurringDetailName: ").append(toIndentedString(recurringDetailName)).append("\n");
×
293
    sb.append("    recurringExpiry: ").append(toIndentedString(recurringExpiry)).append("\n");
×
294
    sb.append("    recurringFrequency: ").append(toIndentedString(recurringFrequency)).append("\n");
×
295
    sb.append("    tokenService: ").append(toIndentedString(tokenService)).append("\n");
×
296
    sb.append("}");
×
297
    return sb.toString();
×
298
  }
299

300
  /**
301
   * Convert the given object to string with each line indented by 4 spaces
302
   * (except the first line).
303
   */
304
  private String toIndentedString(Object o) {
305
    if (o == null) {
×
306
      return "null";
×
307
    }
308
    return o.toString().replace("\n", "\n    ");
×
309
  }
310

311
/**
312
   * Create an instance of Recurring given an JSON string
313
   *
314
   * @param jsonString JSON string
315
   * @return An instance of Recurring
316
   * @throws JsonProcessingException if the JSON string is invalid with respect to Recurring
317
   */
318
  public static Recurring fromJson(String jsonString) throws JsonProcessingException {
319
    return JSON.getMapper().readValue(jsonString, Recurring.class);
×
320
  }
321
/**
322
  * Convert an instance of Recurring to an JSON string
323
  *
324
  * @return JSON string
325
  */
326
  public String toJson() throws JsonProcessingException {
327
    return JSON.getMapper().writeValueAsString(this);
×
328
  }
329
}
330

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