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

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

17 Apr 2024 11:08AM UTC coverage: 12.28%. First build
#3213

push

web-flow
Merge 635de835e into 0e4330fd3

19 of 236 new or added lines in 11 files covered. (8.05%)

12464 of 101499 relevant lines covered (12.28%)

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/CheckoutSessionInstallmentOption.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 java.util.ArrayList;
27
import java.util.List;
28
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
29
import com.fasterxml.jackson.core.JsonProcessingException;
30

31

32
/**
33
 * CheckoutSessionInstallmentOption
34
 */
35
@JsonPropertyOrder({
36
  CheckoutSessionInstallmentOption.JSON_PROPERTY_PLANS,
37
  CheckoutSessionInstallmentOption.JSON_PROPERTY_PRESELECTED_VALUE,
38
  CheckoutSessionInstallmentOption.JSON_PROPERTY_VALUES
39
})
40

41
public class CheckoutSessionInstallmentOption {
42
  /**
43
   * Gets or Sets plans
44
   */
45
  public enum PlansEnum {
×
NEW
46
    BUYNOW_PAYLATER("buynow_paylater"),
×
47
    
NEW
48
    INTERES_REFUND_PRCTG("interes_refund_prctg"),
×
49
    
NEW
50
    INTEREST_BONUS("interest_bonus"),
×
51
    
NEW
52
    NOINTERES_REFUND_PRCTG("nointeres_refund_prctg"),
×
53
    
NEW
54
    NOINTEREST_BONUS("nointerest_bonus"),
×
55
    
NEW
56
    REFUND_PRCTG("refund_prctg"),
×
57
    
58
    REGULAR("regular"),
×
59
    
NEW
60
    REVOLVING("revolving"),
×
61
    
NEW
62
    WITH_INTEREST("with_interest");
×
63

64
    private String value;
65

66
    PlansEnum(String value) {
×
67
      this.value = value;
×
68
    }
×
69

70
    @JsonValue
71
    public String getValue() {
72
      return value;
×
73
    }
74

75
    @Override
76
    public String toString() {
77
      return String.valueOf(value);
×
78
    }
79

80
    @JsonCreator
81
    public static PlansEnum fromValue(String value) {
82
      for (PlansEnum b : PlansEnum.values()) {
×
83
        if (b.value.equals(value)) {
×
84
          return b;
×
85
        }
86
      }
87
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
88
    }
89
  }
90

91
  public static final String JSON_PROPERTY_PLANS = "plans";
92
  private List<PlansEnum> plans = null;
×
93

94
  public static final String JSON_PROPERTY_PRESELECTED_VALUE = "preselectedValue";
95
  private Integer preselectedValue;
96

97
  public static final String JSON_PROPERTY_VALUES = "values";
98
  private List<Integer> values = null;
×
99

100
  public CheckoutSessionInstallmentOption() { 
×
101
  }
×
102

103
  public CheckoutSessionInstallmentOption plans(List<PlansEnum> plans) {
104
    this.plans = plans;
×
105
    return this;
×
106
  }
107

108
  public CheckoutSessionInstallmentOption addPlansItem(PlansEnum plansItem) {
109
    if (this.plans == null) {
×
110
      this.plans = new ArrayList<>();
×
111
    }
112
    this.plans.add(plansItem);
×
113
    return this;
×
114
  }
115

116
   /**
117
   * Defines the type of installment plan. If not set, defaults to **regular**.  Possible values: * **regular** * **revolving**
118
   * @return plans
119
  **/
120
  @ApiModelProperty(value = "Defines the type of installment plan. If not set, defaults to **regular**.  Possible values: * **regular** * **revolving**")
121
  @JsonProperty(JSON_PROPERTY_PLANS)
122
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
123

124
  public List<PlansEnum> getPlans() {
125
    return plans;
×
126
  }
127

128

129
 /**
130
  * Defines the type of installment plan. If not set, defaults to **regular**.  Possible values: * **regular** * **revolving**
131
  *
132
  * @param plans
133
  */ 
134
  @JsonProperty(JSON_PROPERTY_PLANS)
135
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
136
  public void setPlans(List<PlansEnum> plans) {
137
    this.plans = plans;
×
138
  }
×
139

140

141
  public CheckoutSessionInstallmentOption preselectedValue(Integer preselectedValue) {
142
    this.preselectedValue = preselectedValue;
×
143
    return this;
×
144
  }
145

146
   /**
147
   * Preselected number of installments offered for this payment method.
148
   * @return preselectedValue
149
  **/
150
  @ApiModelProperty(value = "Preselected number of installments offered for this payment method.")
151
  @JsonProperty(JSON_PROPERTY_PRESELECTED_VALUE)
152
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
153

154
  public Integer getPreselectedValue() {
155
    return preselectedValue;
×
156
  }
157

158

159
 /**
160
  * Preselected number of installments offered for this payment method.
161
  *
162
  * @param preselectedValue
163
  */ 
164
  @JsonProperty(JSON_PROPERTY_PRESELECTED_VALUE)
165
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
166
  public void setPreselectedValue(Integer preselectedValue) {
167
    this.preselectedValue = preselectedValue;
×
168
  }
×
169

170

171
  public CheckoutSessionInstallmentOption values(List<Integer> values) {
172
    this.values = values;
×
173
    return this;
×
174
  }
175

176
  public CheckoutSessionInstallmentOption addValuesItem(Integer valuesItem) {
177
    if (this.values == null) {
×
178
      this.values = new ArrayList<>();
×
179
    }
180
    this.values.add(valuesItem);
×
181
    return this;
×
182
  }
183

184
   /**
185
   * An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with &#x60;maxValue&#x60;.
186
   * @return values
187
  **/
188
  @ApiModelProperty(value = "An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with `maxValue`.")
189
  @JsonProperty(JSON_PROPERTY_VALUES)
190
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
191

192
  public List<Integer> getValues() {
193
    return values;
×
194
  }
195

196

197
 /**
198
  * An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with &#x60;maxValue&#x60;.
199
  *
200
  * @param values
201
  */ 
202
  @JsonProperty(JSON_PROPERTY_VALUES)
203
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
204
  public void setValues(List<Integer> values) {
205
    this.values = values;
×
206
  }
×
207

208

209
  /**
210
   * Return true if this CheckoutSessionInstallmentOption object is equal to o.
211
   */
212
  @Override
213
  public boolean equals(Object o) {
214
    if (this == o) {
×
215
      return true;
×
216
    }
217
    if (o == null || getClass() != o.getClass()) {
×
218
      return false;
×
219
    }
220
    CheckoutSessionInstallmentOption checkoutSessionInstallmentOption = (CheckoutSessionInstallmentOption) o;
×
221
    return Objects.equals(this.plans, checkoutSessionInstallmentOption.plans) &&
×
222
        Objects.equals(this.preselectedValue, checkoutSessionInstallmentOption.preselectedValue) &&
×
223
        Objects.equals(this.values, checkoutSessionInstallmentOption.values);
×
224
  }
225

226
  @Override
227
  public int hashCode() {
228
    return Objects.hash(plans, preselectedValue, values);
×
229
  }
230

231
  @Override
232
  public String toString() {
233
    StringBuilder sb = new StringBuilder();
×
234
    sb.append("class CheckoutSessionInstallmentOption {\n");
×
235
    sb.append("    plans: ").append(toIndentedString(plans)).append("\n");
×
236
    sb.append("    preselectedValue: ").append(toIndentedString(preselectedValue)).append("\n");
×
237
    sb.append("    values: ").append(toIndentedString(values)).append("\n");
×
238
    sb.append("}");
×
239
    return sb.toString();
×
240
  }
241

242
  /**
243
   * Convert the given object to string with each line indented by 4 spaces
244
   * (except the first line).
245
   */
246
  private String toIndentedString(Object o) {
247
    if (o == null) {
×
248
      return "null";
×
249
    }
250
    return o.toString().replace("\n", "\n    ");
×
251
  }
252

253
/**
254
   * Create an instance of CheckoutSessionInstallmentOption given an JSON string
255
   *
256
   * @param jsonString JSON string
257
   * @return An instance of CheckoutSessionInstallmentOption
258
   * @throws JsonProcessingException if the JSON string is invalid with respect to CheckoutSessionInstallmentOption
259
   */
260
  public static CheckoutSessionInstallmentOption fromJson(String jsonString) throws JsonProcessingException {
261
    return JSON.getMapper().readValue(jsonString, CheckoutSessionInstallmentOption.class);
×
262
  }
263
/**
264
  * Convert an instance of CheckoutSessionInstallmentOption to an JSON string
265
  *
266
  * @return JSON string
267
  */
268
  public String toJson() throws JsonProcessingException {
269
    return JSON.getMapper().writeValueAsString(this);
×
270
  }
271
}
272

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