• 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/AccountEvent.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 java.time.OffsetDateTime;
28
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
29
import com.fasterxml.jackson.core.JsonProcessingException;
30

31

32
/**
33
 * AccountEvent
34
 */
35
@JsonPropertyOrder({
36
  AccountEvent.JSON_PROPERTY_EVENT,
37
  AccountEvent.JSON_PROPERTY_EXECUTION_DATE,
38
  AccountEvent.JSON_PROPERTY_REASON
39
})
40

41
public class AccountEvent {
42
  /**
43
   * The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process).
44
   */
45
  public enum EventEnum {
×
46
    INACTIVATEACCOUNT("InactivateAccount"),
×
47
    
48
    REFUNDNOTPAIDOUTTRANSFERS("RefundNotPaidOutTransfers");
×
49

50
    private String value;
51

52
    EventEnum(String value) {
×
53
      this.value = value;
×
54
    }
×
55

56
    @JsonValue
57
    public String getValue() {
58
      return value;
×
59
    }
60

61
    @Override
62
    public String toString() {
63
      return String.valueOf(value);
×
64
    }
65

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

77
  public static final String JSON_PROPERTY_EVENT = "event";
78
  private EventEnum event;
79

80
  public static final String JSON_PROPERTY_EXECUTION_DATE = "executionDate";
81
  private OffsetDateTime executionDate;
82

83
  public static final String JSON_PROPERTY_REASON = "reason";
84
  private String reason;
85

86
  public AccountEvent() { 
×
87
  }
×
88

89
  public AccountEvent event(EventEnum event) {
90
    this.event = event;
×
91
    return this;
×
92
  }
93

94
   /**
95
   * The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process).
96
   * @return event
97
  **/
98
  @ApiModelProperty(value = "The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process).")
99
  @JsonProperty(JSON_PROPERTY_EVENT)
100
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
101

102
  public EventEnum getEvent() {
103
    return event;
×
104
  }
105

106

107
  @JsonProperty(JSON_PROPERTY_EVENT)
108
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
109
  public void setEvent(EventEnum event) {
110
    this.event = event;
×
111
  }
×
112

113

114
  public AccountEvent executionDate(OffsetDateTime executionDate) {
115
    this.executionDate = executionDate;
×
116
    return this;
×
117
  }
118

119
   /**
120
   * The date on which the event will take place.
121
   * @return executionDate
122
  **/
123
  @ApiModelProperty(value = "The date on which the event will take place.")
124
  @JsonProperty(JSON_PROPERTY_EXECUTION_DATE)
125
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
126

127
  public OffsetDateTime getExecutionDate() {
128
    return executionDate;
×
129
  }
130

131

132
  @JsonProperty(JSON_PROPERTY_EXECUTION_DATE)
133
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
134
  public void setExecutionDate(OffsetDateTime executionDate) {
135
    this.executionDate = executionDate;
×
136
  }
×
137

138

139
  public AccountEvent reason(String reason) {
140
    this.reason = reason;
×
141
    return this;
×
142
  }
143

144
   /**
145
   * The reason why this event has been created.
146
   * @return reason
147
  **/
148
  @ApiModelProperty(value = "The reason why this event has been created.")
149
  @JsonProperty(JSON_PROPERTY_REASON)
150
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
151

152
  public String getReason() {
153
    return reason;
×
154
  }
155

156

157
  @JsonProperty(JSON_PROPERTY_REASON)
158
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
159
  public void setReason(String reason) {
160
    this.reason = reason;
×
161
  }
×
162

163

164
  /**
165
   * Return true if this AccountEvent object is equal to o.
166
   */
167
  @Override
168
  public boolean equals(Object o) {
169
    if (this == o) {
×
170
      return true;
×
171
    }
172
    if (o == null || getClass() != o.getClass()) {
×
173
      return false;
×
174
    }
175
    AccountEvent accountEvent = (AccountEvent) o;
×
176
    return Objects.equals(this.event, accountEvent.event) &&
×
177
        Objects.equals(this.executionDate, accountEvent.executionDate) &&
×
178
        Objects.equals(this.reason, accountEvent.reason);
×
179
  }
180

181
  @Override
182
  public int hashCode() {
183
    return Objects.hash(event, executionDate, reason);
×
184
  }
185

186
  @Override
187
  public String toString() {
188
    StringBuilder sb = new StringBuilder();
×
189
    sb.append("class AccountEvent {\n");
×
190
    sb.append("    event: ").append(toIndentedString(event)).append("\n");
×
191
    sb.append("    executionDate: ").append(toIndentedString(executionDate)).append("\n");
×
192
    sb.append("    reason: ").append(toIndentedString(reason)).append("\n");
×
193
    sb.append("}");
×
194
    return sb.toString();
×
195
  }
196

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

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

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