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

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

23 Oct 2023 01:51PM UTC coverage: 12.821%. First build
#2746

push

web-flow
Merge a2bc5dbaa into c99ba89a9

2931 of 2931 new or added lines in 118 files covered. (100.0%)

12345 of 96286 relevant lines covered (12.82%)

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/transfers/ReturnTransferResponse.java
1
/*
2
 * Transfers API
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.transfers;
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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
27
import com.fasterxml.jackson.core.JsonProcessingException;
28

29

30
/**
31
 * ReturnTransferResponse
32
 */
33
@JsonPropertyOrder({
34
  ReturnTransferResponse.JSON_PROPERTY_ID,
35
  ReturnTransferResponse.JSON_PROPERTY_REFERENCE,
36
  ReturnTransferResponse.JSON_PROPERTY_STATUS,
37
  ReturnTransferResponse.JSON_PROPERTY_TRANSFER_ID
38
})
39

40
public class ReturnTransferResponse {
41
  public static final String JSON_PROPERTY_ID = "id";
42
  private String id;
43

44
  public static final String JSON_PROPERTY_REFERENCE = "reference";
45
  private String reference;
46

47
  /**
48
   * The resulting status of the return.  For example: **authorised**, **booked**, **error**.
49
   */
50
  public enum StatusEnum {
×
51
    AUTHORISED("Authorised"),
×
52
    
53
    DECLINED("Declined");
×
54

55
    private String value;
56

57
    StatusEnum(String value) {
×
58
      this.value = value;
×
59
    }
×
60

61
    @JsonValue
62
    public String getValue() {
63
      return value;
×
64
    }
65

66
    @Override
67
    public String toString() {
68
      return String.valueOf(value);
×
69
    }
70

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

82
  public static final String JSON_PROPERTY_STATUS = "status";
83
  private StatusEnum status;
84

85
  public static final String JSON_PROPERTY_TRANSFER_ID = "transferId";
86
  private String transferId;
87

88
  public ReturnTransferResponse() { 
×
89
  }
×
90

91
  public ReturnTransferResponse id(String id) {
92
    this.id = id;
×
93
    return this;
×
94
  }
95

96
   /**
97
   * The unique identifier of the return.
98
   * @return id
99
  **/
100
  @ApiModelProperty(value = "The unique identifier of the return.")
101
  @JsonProperty(JSON_PROPERTY_ID)
102
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
103

104
  public String getId() {
105
    return id;
×
106
  }
107

108

109
  @JsonProperty(JSON_PROPERTY_ID)
110
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
111
  public void setId(String id) {
112
    this.id = id;
×
113
  }
×
114

115

116
  public ReturnTransferResponse reference(String reference) {
117
    this.reference = reference;
×
118
    return this;
×
119
  }
120

121
   /**
122
   * Your internal reference for the return.
123
   * @return reference
124
  **/
125
  @ApiModelProperty(value = "Your internal reference for the return.")
126
  @JsonProperty(JSON_PROPERTY_REFERENCE)
127
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
128

129
  public String getReference() {
130
    return reference;
×
131
  }
132

133

134
  @JsonProperty(JSON_PROPERTY_REFERENCE)
135
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
136
  public void setReference(String reference) {
137
    this.reference = reference;
×
138
  }
×
139

140

141
  public ReturnTransferResponse status(StatusEnum status) {
142
    this.status = status;
×
143
    return this;
×
144
  }
145

146
   /**
147
   * The resulting status of the return.  For example: **authorised**, **booked**, **error**.
148
   * @return status
149
  **/
150
  @ApiModelProperty(value = "The resulting status of the return.  For example: **authorised**, **booked**, **error**.")
151
  @JsonProperty(JSON_PROPERTY_STATUS)
152
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
153

154
  public StatusEnum getStatus() {
155
    return status;
×
156
  }
157

158

159
  @JsonProperty(JSON_PROPERTY_STATUS)
160
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
161
  public void setStatus(StatusEnum status) {
162
    this.status = status;
×
163
  }
×
164

165

166
  public ReturnTransferResponse transferId(String transferId) {
167
    this.transferId = transferId;
×
168
    return this;
×
169
  }
170

171
   /**
172
   * The unique identifier of the original transfer.
173
   * @return transferId
174
  **/
175
  @ApiModelProperty(value = "The unique identifier of the original transfer.")
176
  @JsonProperty(JSON_PROPERTY_TRANSFER_ID)
177
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
178

179
  public String getTransferId() {
180
    return transferId;
×
181
  }
182

183

184
  @JsonProperty(JSON_PROPERTY_TRANSFER_ID)
185
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
186
  public void setTransferId(String transferId) {
187
    this.transferId = transferId;
×
188
  }
×
189

190

191
  /**
192
   * Return true if this ReturnTransferResponse object is equal to o.
193
   */
194
  @Override
195
  public boolean equals(Object o) {
196
    if (this == o) {
×
197
      return true;
×
198
    }
199
    if (o == null || getClass() != o.getClass()) {
×
200
      return false;
×
201
    }
202
    ReturnTransferResponse returnTransferResponse = (ReturnTransferResponse) o;
×
203
    return Objects.equals(this.id, returnTransferResponse.id) &&
×
204
        Objects.equals(this.reference, returnTransferResponse.reference) &&
×
205
        Objects.equals(this.status, returnTransferResponse.status) &&
×
206
        Objects.equals(this.transferId, returnTransferResponse.transferId);
×
207
  }
208

209
  @Override
210
  public int hashCode() {
211
    return Objects.hash(id, reference, status, transferId);
×
212
  }
213

214
  @Override
215
  public String toString() {
216
    StringBuilder sb = new StringBuilder();
×
217
    sb.append("class ReturnTransferResponse {\n");
×
218
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
×
219
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
×
220
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
×
221
    sb.append("    transferId: ").append(toIndentedString(transferId)).append("\n");
×
222
    sb.append("}");
×
223
    return sb.toString();
×
224
  }
225

226
  /**
227
   * Convert the given object to string with each line indented by 4 spaces
228
   * (except the first line).
229
   */
230
  private String toIndentedString(Object o) {
231
    if (o == null) {
×
232
      return "null";
×
233
    }
234
    return o.toString().replace("\n", "\n    ");
×
235
  }
236

237
/**
238
   * Create an instance of ReturnTransferResponse given an JSON string
239
   *
240
   * @param jsonString JSON string
241
   * @return An instance of ReturnTransferResponse
242
   * @throws JsonProcessingException if the JSON string is invalid with respect to ReturnTransferResponse
243
   */
244
  public static ReturnTransferResponse fromJson(String jsonString) throws JsonProcessingException {
245
    return JSON.getMapper().readValue(jsonString, ReturnTransferResponse.class);
×
246
  }
247
/**
248
  * Convert an instance of ReturnTransferResponse to an JSON string
249
  *
250
  * @return JSON string
251
  */
252
  public String toJson() throws JsonProcessingException {
253
    return JSON.getMapper().writeValueAsString(this);
×
254
  }
255
}
256

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