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

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

22 Sep 2023 11:24AM UTC coverage: 12.611%. First build
#2661

push

web-flow
Merge 251f6ff51 into 9e36e9c01

9262 of 9262 new or added lines in 142 files covered. (100.0%)

11033 of 87486 relevant lines covered (12.61%)

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/marketpayaccount/ViasPhoneNumber.java
1
/*
2
 * Account API
3
 * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead.  The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them.  For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, 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@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints).  ## Versioning The Account 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://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ```
4
 *
5
 * The version of the OpenAPI document: 6
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.marketpayaccount;
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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
28
import com.fasterxml.jackson.core.JsonProcessingException;
29

30

31
/**
32
 * ViasPhoneNumber
33
 */
34
@JsonPropertyOrder({
35
  ViasPhoneNumber.JSON_PROPERTY_PHONE_COUNTRY_CODE,
36
  ViasPhoneNumber.JSON_PROPERTY_PHONE_NUMBER,
37
  ViasPhoneNumber.JSON_PROPERTY_PHONE_TYPE
38
})
39

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

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

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

59
    private String value;
60

61
    PhoneTypeEnum(String value) {
×
62
      this.value = value;
×
63
    }
×
64

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

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

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

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

89
  public ViasPhoneNumber() { 
×
90
  }
×
91

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

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

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

109

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

116

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

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

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

134

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

141

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

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

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

159

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

166

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

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

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

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

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

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