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

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

04 Dec 2023 10:18AM UTC coverage: 12.838%. First build
#2895

push

web-flow
Merge 6c685def1 into ec0c20882

1 of 148 new or added lines in 10 files covered. (0.68%)

12463 of 97082 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/management/AmexInfo.java
1
/*
2
 * Management API
3
 *
4
 * The version of the OpenAPI document: 3
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.management;
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
 * AmexInfo
32
 */
33
@JsonPropertyOrder({
34
  AmexInfo.JSON_PROPERTY_MID_NUMBER,
35
  AmexInfo.JSON_PROPERTY_SERVICE_LEVEL
36
})
37

38
public class AmexInfo {
39
  public static final String JSON_PROPERTY_MID_NUMBER = "midNumber";
40
  private String midNumber;
41

42
  /**
43
   * Service level
44
   */
NEW
45
  public enum ServiceLevelEnum {
×
NEW
46
    NOCONTRACT("noContract"),
×
47
    
NEW
48
    GATEWAYCONTRACT("gatewayContract"),
×
49
    
NEW
50
    PAYMENTDESIGNATORCONTRACT("paymentDesignatorContract");
×
51

52
    private String value;
53

NEW
54
    ServiceLevelEnum(String value) {
×
NEW
55
      this.value = value;
×
NEW
56
    }
×
57

58
    @JsonValue
59
    public String getValue() {
NEW
60
      return value;
×
61
    }
62

63
    @Override
64
    public String toString() {
NEW
65
      return String.valueOf(value);
×
66
    }
67

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

79
  public static final String JSON_PROPERTY_SERVICE_LEVEL = "serviceLevel";
80
  private ServiceLevelEnum serviceLevel;
81

NEW
82
  public AmexInfo() { 
×
NEW
83
  }
×
84

85
  public AmexInfo midNumber(String midNumber) {
NEW
86
    this.midNumber = midNumber;
×
NEW
87
    return this;
×
88
  }
89

90
   /**
91
   * MID number. Format: 10 numeric characters
92
   * @return midNumber
93
  **/
94
  @ApiModelProperty(value = "MID number. Format: 10 numeric characters")
95
  @JsonProperty(JSON_PROPERTY_MID_NUMBER)
96
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
97

98
  public String getMidNumber() {
NEW
99
    return midNumber;
×
100
  }
101

102

103
  @JsonProperty(JSON_PROPERTY_MID_NUMBER)
104
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
105
  public void setMidNumber(String midNumber) {
NEW
106
    this.midNumber = midNumber;
×
NEW
107
  }
×
108

109

110
  public AmexInfo serviceLevel(ServiceLevelEnum serviceLevel) {
NEW
111
    this.serviceLevel = serviceLevel;
×
NEW
112
    return this;
×
113
  }
114

115
   /**
116
   * Service level
117
   * @return serviceLevel
118
  **/
119
  @ApiModelProperty(required = true, value = "Service level")
120
  @JsonProperty(JSON_PROPERTY_SERVICE_LEVEL)
121
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
122

123
  public ServiceLevelEnum getServiceLevel() {
NEW
124
    return serviceLevel;
×
125
  }
126

127

128
  @JsonProperty(JSON_PROPERTY_SERVICE_LEVEL)
129
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
130
  public void setServiceLevel(ServiceLevelEnum serviceLevel) {
NEW
131
    this.serviceLevel = serviceLevel;
×
NEW
132
  }
×
133

134

135
  /**
136
   * Return true if this AmexInfo object is equal to o.
137
   */
138
  @Override
139
  public boolean equals(Object o) {
NEW
140
    if (this == o) {
×
NEW
141
      return true;
×
142
    }
NEW
143
    if (o == null || getClass() != o.getClass()) {
×
NEW
144
      return false;
×
145
    }
NEW
146
    AmexInfo amexInfo = (AmexInfo) o;
×
NEW
147
    return Objects.equals(this.midNumber, amexInfo.midNumber) &&
×
NEW
148
        Objects.equals(this.serviceLevel, amexInfo.serviceLevel);
×
149
  }
150

151
  @Override
152
  public int hashCode() {
NEW
153
    return Objects.hash(midNumber, serviceLevel);
×
154
  }
155

156
  @Override
157
  public String toString() {
NEW
158
    StringBuilder sb = new StringBuilder();
×
NEW
159
    sb.append("class AmexInfo {\n");
×
NEW
160
    sb.append("    midNumber: ").append(toIndentedString(midNumber)).append("\n");
×
NEW
161
    sb.append("    serviceLevel: ").append(toIndentedString(serviceLevel)).append("\n");
×
NEW
162
    sb.append("}");
×
NEW
163
    return sb.toString();
×
164
  }
165

166
  /**
167
   * Convert the given object to string with each line indented by 4 spaces
168
   * (except the first line).
169
   */
170
  private String toIndentedString(Object o) {
NEW
171
    if (o == null) {
×
NEW
172
      return "null";
×
173
    }
NEW
174
    return o.toString().replace("\n", "\n    ");
×
175
  }
176

177
/**
178
   * Create an instance of AmexInfo given an JSON string
179
   *
180
   * @param jsonString JSON string
181
   * @return An instance of AmexInfo
182
   * @throws JsonProcessingException if the JSON string is invalid with respect to AmexInfo
183
   */
184
  public static AmexInfo fromJson(String jsonString) throws JsonProcessingException {
NEW
185
    return JSON.getMapper().readValue(jsonString, AmexInfo.class);
×
186
  }
187
/**
188
  * Convert an instance of AmexInfo to an JSON string
189
  *
190
  * @return JSON string
191
  */
192
  public String toJson() throws JsonProcessingException {
NEW
193
    return JSON.getMapper().writeValueAsString(this);
×
194
  }
195
}
196

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