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

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

08 Nov 2023 09:16AM CUT coverage: 12.837%. First build
#2829

push

web-flow
Merge 828273160 into b96088175

114 of 864 new or added lines in 50 files covered. (13.19%)

12393 of 96543 relevant lines covered (12.84%)

0.13 hits per line

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

34.69
/src/main/java/com/adyen/model/transactionwebhooks/TransactionNotificationRequestV4.java
1
/*
2
 * Transaction webhooks
3
 *
4
 * The version of the OpenAPI document: 4
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.transactionwebhooks;
14

15
import java.util.Objects;
16
import java.util.Arrays;
17
import java.util.Map;
18
import java.util.HashMap;
19
import com.adyen.model.transactionwebhooks.Transaction;
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
 * TransactionNotificationRequestV4
33
 */
34
@JsonPropertyOrder({
35
  TransactionNotificationRequestV4.JSON_PROPERTY_DATA,
36
  TransactionNotificationRequestV4.JSON_PROPERTY_ENVIRONMENT,
37
  TransactionNotificationRequestV4.JSON_PROPERTY_TYPE
38
})
39

40
public class TransactionNotificationRequestV4 {
41
  public static final String JSON_PROPERTY_DATA = "data";
42
  private Transaction data;
43

44
  public static final String JSON_PROPERTY_ENVIRONMENT = "environment";
45
  private String environment;
46

47
  /**
48
   * Type of the webhook.
49
   */
50
  public enum TypeEnum {
1✔
51
    BALANCEPLATFORM_TRANSACTION_CREATED("balancePlatform.transaction.created");
1✔
52

53
    private String value;
54

55
    TypeEnum(String value) {
1✔
56
      this.value = value;
1✔
57
    }
1✔
58

59
    @JsonValue
60
    public String getValue() {
NEW
61
      return value;
×
62
    }
63

64
    @Override
65
    public String toString() {
NEW
66
      return String.valueOf(value);
×
67
    }
68

69
    @JsonCreator
70
    public static TypeEnum fromValue(String value) {
71
      for (TypeEnum b : TypeEnum.values()) {
1✔
72
        if (b.value.equals(value)) {
1✔
73
          return b;
1✔
74
        }
75
      }
NEW
76
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
77
    }
78
  }
79

80
  public static final String JSON_PROPERTY_TYPE = "type";
81
  private TypeEnum type;
82

83
  public TransactionNotificationRequestV4() { 
1✔
84
  }
1✔
85

86
  public TransactionNotificationRequestV4 data(Transaction data) {
NEW
87
    this.data = data;
×
NEW
88
    return this;
×
89
  }
90

91
   /**
92
   * Get data
93
   * @return data
94
  **/
95
  @ApiModelProperty(required = true, value = "")
96
  @JsonProperty(JSON_PROPERTY_DATA)
97
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
98

99
  public Transaction getData() {
100
    return data;
1✔
101
  }
102

103

104
  @JsonProperty(JSON_PROPERTY_DATA)
105
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
106
  public void setData(Transaction data) {
107
    this.data = data;
1✔
108
  }
1✔
109

110

111
  public TransactionNotificationRequestV4 environment(String environment) {
NEW
112
    this.environment = environment;
×
NEW
113
    return this;
×
114
  }
115

116
   /**
117
   * The environment from which the webhook originated.  Possible values: **test**, **live**.
118
   * @return environment
119
  **/
120
  @ApiModelProperty(required = true, value = "The environment from which the webhook originated.  Possible values: **test**, **live**.")
121
  @JsonProperty(JSON_PROPERTY_ENVIRONMENT)
122
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
123

124
  public String getEnvironment() {
NEW
125
    return environment;
×
126
  }
127

128

129
  @JsonProperty(JSON_PROPERTY_ENVIRONMENT)
130
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
131
  public void setEnvironment(String environment) {
132
    this.environment = environment;
1✔
133
  }
1✔
134

135

136
  public TransactionNotificationRequestV4 type(TypeEnum type) {
NEW
137
    this.type = type;
×
NEW
138
    return this;
×
139
  }
140

141
   /**
142
   * Type of the webhook.
143
   * @return type
144
  **/
145
  @ApiModelProperty(value = "Type of the webhook.")
146
  @JsonProperty(JSON_PROPERTY_TYPE)
147
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
148

149
  public TypeEnum getType() {
NEW
150
    return type;
×
151
  }
152

153

154
  @JsonProperty(JSON_PROPERTY_TYPE)
155
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
156
  public void setType(TypeEnum type) {
157
    this.type = type;
1✔
158
  }
1✔
159

160

161
  /**
162
   * Return true if this TransactionNotificationRequestV4 object is equal to o.
163
   */
164
  @Override
165
  public boolean equals(Object o) {
NEW
166
    if (this == o) {
×
NEW
167
      return true;
×
168
    }
NEW
169
    if (o == null || getClass() != o.getClass()) {
×
NEW
170
      return false;
×
171
    }
NEW
172
    TransactionNotificationRequestV4 transactionNotificationRequestV4 = (TransactionNotificationRequestV4) o;
×
NEW
173
    return Objects.equals(this.data, transactionNotificationRequestV4.data) &&
×
NEW
174
        Objects.equals(this.environment, transactionNotificationRequestV4.environment) &&
×
NEW
175
        Objects.equals(this.type, transactionNotificationRequestV4.type);
×
176
  }
177

178
  @Override
179
  public int hashCode() {
NEW
180
    return Objects.hash(data, environment, type);
×
181
  }
182

183
  @Override
184
  public String toString() {
NEW
185
    StringBuilder sb = new StringBuilder();
×
NEW
186
    sb.append("class TransactionNotificationRequestV4 {\n");
×
NEW
187
    sb.append("    data: ").append(toIndentedString(data)).append("\n");
×
NEW
188
    sb.append("    environment: ").append(toIndentedString(environment)).append("\n");
×
NEW
189
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
NEW
190
    sb.append("}");
×
NEW
191
    return sb.toString();
×
192
  }
193

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

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

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