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

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

02 Oct 2023 02:08PM UTC coverage: 12.623%. First build
#2676

push

web-flow
Merge 8c2a459f7 into 9e36e9c01

9362 of 9362 new or added lines in 164 files covered. (100.0%)

11051 of 87544 relevant lines covered (12.62%)

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/UpdateAccountHolderStateRequest.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
 * UpdateAccountHolderStateRequest
33
 */
34
@JsonPropertyOrder({
35
  UpdateAccountHolderStateRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE,
36
  UpdateAccountHolderStateRequest.JSON_PROPERTY_DISABLE,
37
  UpdateAccountHolderStateRequest.JSON_PROPERTY_REASON,
38
  UpdateAccountHolderStateRequest.JSON_PROPERTY_STATE_TYPE
39
})
40

41
public class UpdateAccountHolderStateRequest {
42
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode";
43
  private String accountHolderCode;
44

45
  public static final String JSON_PROPERTY_DISABLE = "disable";
46
  private Boolean disable;
47

48
  public static final String JSON_PROPERTY_REASON = "reason";
49
  private String reason;
50

51
  /**
52
   * The state to be updated. >Permitted values are: `Processing`, `Payout`
53
   */
54
  public enum StateTypeEnum {
×
55
    LIMITEDPAYOUT("LimitedPayout"),
×
56
    
57
    LIMITEDPROCESSING("LimitedProcessing"),
×
58
    
59
    LIMITLESSPAYOUT("LimitlessPayout"),
×
60
    
61
    LIMITLESSPROCESSING("LimitlessProcessing"),
×
62
    
63
    PAYOUT("Payout"),
×
64
    
65
    PROCESSING("Processing");
×
66

67
    private String value;
68

69
    StateTypeEnum(String value) {
×
70
      this.value = value;
×
71
    }
×
72

73
    @JsonValue
74
    public String getValue() {
75
      return value;
×
76
    }
77

78
    @Override
79
    public String toString() {
80
      return String.valueOf(value);
×
81
    }
82

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

94
  public static final String JSON_PROPERTY_STATE_TYPE = "stateType";
95
  private StateTypeEnum stateType;
96

97
  public UpdateAccountHolderStateRequest() { 
×
98
  }
×
99

100
  public UpdateAccountHolderStateRequest accountHolderCode(String accountHolderCode) {
101
    this.accountHolderCode = accountHolderCode;
×
102
    return this;
×
103
  }
104

105
   /**
106
   * The code of the Account Holder on which to update the state.
107
   * @return accountHolderCode
108
  **/
109
  @ApiModelProperty(required = true, value = "The code of the Account Holder on which to update the state.")
110
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
111
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
112

113
  public String getAccountHolderCode() {
114
    return accountHolderCode;
×
115
  }
116

117

118
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
119
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
120
  public void setAccountHolderCode(String accountHolderCode) {
121
    this.accountHolderCode = accountHolderCode;
×
122
  }
×
123

124

125
  public UpdateAccountHolderStateRequest disable(Boolean disable) {
126
    this.disable = disable;
×
127
    return this;
×
128
  }
129

130
   /**
131
   * If true, disable the requested state.  If false, enable the requested state.
132
   * @return disable
133
  **/
134
  @ApiModelProperty(required = true, value = "If true, disable the requested state.  If false, enable the requested state.")
135
  @JsonProperty(JSON_PROPERTY_DISABLE)
136
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
137

138
  public Boolean getDisable() {
139
    return disable;
×
140
  }
141

142

143
  @JsonProperty(JSON_PROPERTY_DISABLE)
144
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
145
  public void setDisable(Boolean disable) {
146
    this.disable = disable;
×
147
  }
×
148

149

150
  public UpdateAccountHolderStateRequest reason(String reason) {
151
    this.reason = reason;
×
152
    return this;
×
153
  }
154

155
   /**
156
   * The reason that the state is being updated. >Required if the state is being disabled.
157
   * @return reason
158
  **/
159
  @ApiModelProperty(value = "The reason that the state is being updated. >Required if the state is being disabled.")
160
  @JsonProperty(JSON_PROPERTY_REASON)
161
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
162

163
  public String getReason() {
164
    return reason;
×
165
  }
166

167

168
  @JsonProperty(JSON_PROPERTY_REASON)
169
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
170
  public void setReason(String reason) {
171
    this.reason = reason;
×
172
  }
×
173

174

175
  public UpdateAccountHolderStateRequest stateType(StateTypeEnum stateType) {
176
    this.stateType = stateType;
×
177
    return this;
×
178
  }
179

180
   /**
181
   * The state to be updated. >Permitted values are: `Processing`, `Payout`
182
   * @return stateType
183
  **/
184
  @ApiModelProperty(required = true, value = "The state to be updated. >Permitted values are: `Processing`, `Payout`")
185
  @JsonProperty(JSON_PROPERTY_STATE_TYPE)
186
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
187

188
  public StateTypeEnum getStateType() {
189
    return stateType;
×
190
  }
191

192

193
  @JsonProperty(JSON_PROPERTY_STATE_TYPE)
194
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
195
  public void setStateType(StateTypeEnum stateType) {
196
    this.stateType = stateType;
×
197
  }
×
198

199

200
  /**
201
   * Return true if this UpdateAccountHolderStateRequest object is equal to o.
202
   */
203
  @Override
204
  public boolean equals(Object o) {
205
    if (this == o) {
×
206
      return true;
×
207
    }
208
    if (o == null || getClass() != o.getClass()) {
×
209
      return false;
×
210
    }
211
    UpdateAccountHolderStateRequest updateAccountHolderStateRequest = (UpdateAccountHolderStateRequest) o;
×
212
    return Objects.equals(this.accountHolderCode, updateAccountHolderStateRequest.accountHolderCode) &&
×
213
        Objects.equals(this.disable, updateAccountHolderStateRequest.disable) &&
×
214
        Objects.equals(this.reason, updateAccountHolderStateRequest.reason) &&
×
215
        Objects.equals(this.stateType, updateAccountHolderStateRequest.stateType);
×
216
  }
217

218
  @Override
219
  public int hashCode() {
220
    return Objects.hash(accountHolderCode, disable, reason, stateType);
×
221
  }
222

223
  @Override
224
  public String toString() {
225
    StringBuilder sb = new StringBuilder();
×
226
    sb.append("class UpdateAccountHolderStateRequest {\n");
×
227
    sb.append("    accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n");
×
228
    sb.append("    disable: ").append(toIndentedString(disable)).append("\n");
×
229
    sb.append("    reason: ").append(toIndentedString(reason)).append("\n");
×
230
    sb.append("    stateType: ").append(toIndentedString(stateType)).append("\n");
×
231
    sb.append("}");
×
232
    return sb.toString();
×
233
  }
234

235
  /**
236
   * Convert the given object to string with each line indented by 4 spaces
237
   * (except the first line).
238
   */
239
  private String toIndentedString(Object o) {
240
    if (o == null) {
×
241
      return "null";
×
242
    }
243
    return o.toString().replace("\n", "\n    ");
×
244
  }
245

246
/**
247
   * Create an instance of UpdateAccountHolderStateRequest given an JSON string
248
   *
249
   * @param jsonString JSON string
250
   * @return An instance of UpdateAccountHolderStateRequest
251
   * @throws JsonProcessingException if the JSON string is invalid with respect to UpdateAccountHolderStateRequest
252
   */
253
  public static UpdateAccountHolderStateRequest fromJson(String jsonString) throws JsonProcessingException {
254
    return JSON.getMapper().readValue(jsonString, UpdateAccountHolderStateRequest.class);
×
255
  }
256
/**
257
  * Convert an instance of UpdateAccountHolderStateRequest to an JSON string
258
  *
259
  * @return JSON string
260
  */
261
  public String toJson() throws JsonProcessingException {
262
    return JSON.getMapper().writeValueAsString(this);
×
263
  }
264
}
265

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