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

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

16 Oct 2023 09:08AM CUT 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

34.0
/src/main/java/com/adyen/model/marketpaywebhooks/AccountEvent.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 java.time.OffsetDateTime;
27
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
28
import com.fasterxml.jackson.core.JsonProcessingException;
29

30

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

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

49
    private String value;
50

51
    EventEnum(String value) {
1✔
52
      this.value = value;
1✔
53
    }
1✔
54

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

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

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

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

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

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

85
  public AccountEvent() { 
1✔
86
  }
1✔
87

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

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

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

105

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

112

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

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

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

130

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

137

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

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

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

155

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

162

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

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

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

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

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

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