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

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

11 Sep 2023 11:23AM UTC coverage: 13.077%. First build
#2628

push

web-flow
Merge cd1454997 into ba706cfa8

2334 of 2334 new or added lines in 46 files covered. (100.0%)

10217 of 78130 relevant lines covered (13.08%)

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/balanceplatform/AddressRequirement.java
1
/*
2
 * Configuration API
3
 *
4
 * The version of the OpenAPI document: 2
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.balanceplatform;
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
 * AddressRequirement
34
 */
35
@JsonPropertyOrder({
36
  AddressRequirement.JSON_PROPERTY_DESCRIPTION,
37
  AddressRequirement.JSON_PROPERTY_REQUIRED_ADDRESS_FIELDS,
38
  AddressRequirement.JSON_PROPERTY_TYPE
39
})
40

41
public class AddressRequirement {
42
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
43
  private String description;
44

45
  public static final String JSON_PROPERTY_REQUIRED_ADDRESS_FIELDS = "requiredAddressFields";
46
  private List<String> requiredAddressFields = null;
×
47

48
  /**
49
   * **addressRequirement**
50
   */
51
  public enum TypeEnum {
×
52
    ADDRESSREQUIREMENT("addressRequirement");
×
53

54
    private String value;
55

56
    TypeEnum(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 TypeEnum fromValue(String value) {
72
      for (TypeEnum b : TypeEnum.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_TYPE = "type";
82
  private TypeEnum type = TypeEnum.ADDRESSREQUIREMENT;
×
83

84
  public AddressRequirement() { 
×
85
  }
×
86

87
  public AddressRequirement description(String description) {
88
    this.description = description;
×
89
    return this;
×
90
  }
91

92
   /**
93
   * Specifies the required address related fields for a particular route.
94
   * @return description
95
  **/
96
  @ApiModelProperty(value = "Specifies the required address related fields for a particular route.")
97
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
98
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
99

100
  public String getDescription() {
101
    return description;
×
102
  }
103

104

105
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
106
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
107
  public void setDescription(String description) {
108
    this.description = description;
×
109
  }
×
110

111

112
  public AddressRequirement requiredAddressFields(List<String> requiredAddressFields) {
113
    this.requiredAddressFields = requiredAddressFields;
×
114
    return this;
×
115
  }
116

117
  public AddressRequirement addRequiredAddressFieldsItem(String requiredAddressFieldsItem) {
118
    if (this.requiredAddressFields == null) {
×
119
      this.requiredAddressFields = new ArrayList<>();
×
120
    }
121
    this.requiredAddressFields.add(requiredAddressFieldsItem);
×
122
    return this;
×
123
  }
124

125
   /**
126
   * List of address fields.
127
   * @return requiredAddressFields
128
  **/
129
  @ApiModelProperty(value = "List of address fields.")
130
  @JsonProperty(JSON_PROPERTY_REQUIRED_ADDRESS_FIELDS)
131
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
132

133
  public List<String> getRequiredAddressFields() {
134
    return requiredAddressFields;
×
135
  }
136

137

138
  @JsonProperty(JSON_PROPERTY_REQUIRED_ADDRESS_FIELDS)
139
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
140
  public void setRequiredAddressFields(List<String> requiredAddressFields) {
141
    this.requiredAddressFields = requiredAddressFields;
×
142
  }
×
143

144

145
  public AddressRequirement type(TypeEnum type) {
146
    this.type = type;
×
147
    return this;
×
148
  }
149

150
   /**
151
   * **addressRequirement**
152
   * @return type
153
  **/
154
  @ApiModelProperty(required = true, value = "**addressRequirement**")
155
  @JsonProperty(JSON_PROPERTY_TYPE)
156
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
157

158
  public TypeEnum getType() {
159
    return type;
×
160
  }
161

162

163
  @JsonProperty(JSON_PROPERTY_TYPE)
164
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
165
  public void setType(TypeEnum type) {
166
    this.type = type;
×
167
  }
×
168

169

170
  /**
171
   * Return true if this AddressRequirement object is equal to o.
172
   */
173
  @Override
174
  public boolean equals(Object o) {
175
    if (this == o) {
×
176
      return true;
×
177
    }
178
    if (o == null || getClass() != o.getClass()) {
×
179
      return false;
×
180
    }
181
    AddressRequirement addressRequirement = (AddressRequirement) o;
×
182
    return Objects.equals(this.description, addressRequirement.description) &&
×
183
        Objects.equals(this.requiredAddressFields, addressRequirement.requiredAddressFields) &&
×
184
        Objects.equals(this.type, addressRequirement.type);
×
185
  }
186

187
  @Override
188
  public int hashCode() {
189
    return Objects.hash(description, requiredAddressFields, type);
×
190
  }
191

192
  @Override
193
  public String toString() {
194
    StringBuilder sb = new StringBuilder();
×
195
    sb.append("class AddressRequirement {\n");
×
196
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
197
    sb.append("    requiredAddressFields: ").append(toIndentedString(requiredAddressFields)).append("\n");
×
198
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
199
    sb.append("}");
×
200
    return sb.toString();
×
201
  }
202

203
  /**
204
   * Convert the given object to string with each line indented by 4 spaces
205
   * (except the first line).
206
   */
207
  private String toIndentedString(Object o) {
208
    if (o == null) {
×
209
      return "null";
×
210
    }
211
    return o.toString().replace("\n", "\n    ");
×
212
  }
213

214
/**
215
   * Create an instance of AddressRequirement given an JSON string
216
   *
217
   * @param jsonString JSON string
218
   * @return An instance of AddressRequirement
219
   * @throws JsonProcessingException if the JSON string is invalid with respect to AddressRequirement
220
   */
221
  public static AddressRequirement fromJson(String jsonString) throws JsonProcessingException {
222
    return JSON.getMapper().readValue(jsonString, AddressRequirement.class);
×
223
  }
224
/**
225
  * Convert an instance of AddressRequirement to an JSON string
226
  *
227
  * @return JSON string
228
  */
229
  public String toJson() throws JsonProcessingException {
230
    return JSON.getMapper().writeValueAsString(this);
×
231
  }
232
}
233

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