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

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

16 Oct 2023 09:08AM UTC coverage: 12.568%. First build
#2703

push

web-flow
Merge 5bb3765b7 into fe719ccb3

6014 of 6014 new or added lines in 86 files covered. (100.0%)

11852 of 94302 relevant lines covered (12.57%)

0.13 hits per line

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

36.54
/src/main/java/com/adyen/model/marketpaywebhooks/ViasPhoneNumber.java
1
/*
2
 * Classic Platforms - Notifications
3
 *
4
 * The version of the OpenAPI document: 6
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.marketpaywebhooks;
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
 * ViasPhoneNumber
32
 */
33
@JsonPropertyOrder({
34
  ViasPhoneNumber.JSON_PROPERTY_PHONE_COUNTRY_CODE,
35
  ViasPhoneNumber.JSON_PROPERTY_PHONE_NUMBER,
36
  ViasPhoneNumber.JSON_PROPERTY_PHONE_TYPE
37
})
38

39
public class ViasPhoneNumber {
40
  public static final String JSON_PROPERTY_PHONE_COUNTRY_CODE = "phoneCountryCode";
41
  private String phoneCountryCode;
42

43
  public static final String JSON_PROPERTY_PHONE_NUMBER = "phoneNumber";
44
  private String phoneNumber;
45

46
  /**
47
   * The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`.
48
   */
49
  public enum PhoneTypeEnum {
1✔
50
    FAX("Fax"),
1✔
51
    
52
    LANDLINE("Landline"),
1✔
53
    
54
    MOBILE("Mobile"),
1✔
55
    
56
    SIP("SIP");
1✔
57

58
    private String value;
59

60
    PhoneTypeEnum(String value) {
1✔
61
      this.value = value;
1✔
62
    }
1✔
63

64
    @JsonValue
65
    public String getValue() {
66
      return value;
×
67
    }
68

69
    @Override
70
    public String toString() {
71
      return String.valueOf(value);
×
72
    }
73

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

85
  public static final String JSON_PROPERTY_PHONE_TYPE = "phoneType";
86
  private PhoneTypeEnum phoneType;
87

88
  public ViasPhoneNumber() { 
1✔
89
  }
1✔
90

91
  public ViasPhoneNumber phoneCountryCode(String phoneCountryCode) {
92
    this.phoneCountryCode = phoneCountryCode;
×
93
    return this;
×
94
  }
95

96
   /**
97
   * The two-character country code of the phone number. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL').
98
   * @return phoneCountryCode
99
  **/
100
  @ApiModelProperty(value = "The two-character country code of the phone number. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL').")
101
  @JsonProperty(JSON_PROPERTY_PHONE_COUNTRY_CODE)
102
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
103

104
  public String getPhoneCountryCode() {
105
    return phoneCountryCode;
×
106
  }
107

108

109
  @JsonProperty(JSON_PROPERTY_PHONE_COUNTRY_CODE)
110
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
111
  public void setPhoneCountryCode(String phoneCountryCode) {
112
    this.phoneCountryCode = phoneCountryCode;
1✔
113
  }
1✔
114

115

116
  public ViasPhoneNumber phoneNumber(String phoneNumber) {
117
    this.phoneNumber = phoneNumber;
×
118
    return this;
×
119
  }
120

121
   /**
122
   * The phone number. >The inclusion of the phone number country code is not necessary.
123
   * @return phoneNumber
124
  **/
125
  @ApiModelProperty(value = "The phone number. >The inclusion of the phone number country code is not necessary.")
126
  @JsonProperty(JSON_PROPERTY_PHONE_NUMBER)
127
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
128

129
  public String getPhoneNumber() {
130
    return phoneNumber;
×
131
  }
132

133

134
  @JsonProperty(JSON_PROPERTY_PHONE_NUMBER)
135
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
136
  public void setPhoneNumber(String phoneNumber) {
137
    this.phoneNumber = phoneNumber;
1✔
138
  }
1✔
139

140

141
  public ViasPhoneNumber phoneType(PhoneTypeEnum phoneType) {
142
    this.phoneType = phoneType;
×
143
    return this;
×
144
  }
145

146
   /**
147
   * The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`.
148
   * @return phoneType
149
  **/
150
  @ApiModelProperty(value = "The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`.")
151
  @JsonProperty(JSON_PROPERTY_PHONE_TYPE)
152
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
153

154
  public PhoneTypeEnum getPhoneType() {
155
    return phoneType;
×
156
  }
157

158

159
  @JsonProperty(JSON_PROPERTY_PHONE_TYPE)
160
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
161
  public void setPhoneType(PhoneTypeEnum phoneType) {
162
    this.phoneType = phoneType;
1✔
163
  }
1✔
164

165

166
  /**
167
   * Return true if this ViasPhoneNumber object is equal to o.
168
   */
169
  @Override
170
  public boolean equals(Object o) {
171
    if (this == o) {
×
172
      return true;
×
173
    }
174
    if (o == null || getClass() != o.getClass()) {
×
175
      return false;
×
176
    }
177
    ViasPhoneNumber viasPhoneNumber = (ViasPhoneNumber) o;
×
178
    return Objects.equals(this.phoneCountryCode, viasPhoneNumber.phoneCountryCode) &&
×
179
        Objects.equals(this.phoneNumber, viasPhoneNumber.phoneNumber) &&
×
180
        Objects.equals(this.phoneType, viasPhoneNumber.phoneType);
×
181
  }
182

183
  @Override
184
  public int hashCode() {
185
    return Objects.hash(phoneCountryCode, phoneNumber, phoneType);
×
186
  }
187

188
  @Override
189
  public String toString() {
190
    StringBuilder sb = new StringBuilder();
×
191
    sb.append("class ViasPhoneNumber {\n");
×
192
    sb.append("    phoneCountryCode: ").append(toIndentedString(phoneCountryCode)).append("\n");
×
193
    sb.append("    phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n");
×
194
    sb.append("    phoneType: ").append(toIndentedString(phoneType)).append("\n");
×
195
    sb.append("}");
×
196
    return sb.toString();
×
197
  }
198

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

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

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