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

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

30 Oct 2023 03:06PM CUT coverage: 12.824%. First build
#2775

push

web-flow
Merge 9921af673 into 891748f22

112 of 112 new or added lines in 12 files covered. (100.0%)

12346 of 96273 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/checkout/StandalonePaymentCancelRequest.java
1
/*
2
 * Adyen Checkout API
3
 *
4
 * The version of the OpenAPI document: 70
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.checkout;
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.checkout.ApplicationInfo;
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
 * StandalonePaymentCancelRequest
33
 */
34
@JsonPropertyOrder({
35
  StandalonePaymentCancelRequest.JSON_PROPERTY_APPLICATION_INFO,
36
  StandalonePaymentCancelRequest.JSON_PROPERTY_MERCHANT_ACCOUNT,
37
  StandalonePaymentCancelRequest.JSON_PROPERTY_PAYMENT_REFERENCE,
38
  StandalonePaymentCancelRequest.JSON_PROPERTY_REFERENCE
39
})
40

41
public class StandalonePaymentCancelRequest {
42
  public static final String JSON_PROPERTY_APPLICATION_INFO = "applicationInfo";
43
  private ApplicationInfo applicationInfo;
44

45
  public static final String JSON_PROPERTY_MERCHANT_ACCOUNT = "merchantAccount";
46
  private String merchantAccount;
47

48
  public static final String JSON_PROPERTY_PAYMENT_REFERENCE = "paymentReference";
49
  private String paymentReference;
50

51
  public static final String JSON_PROPERTY_REFERENCE = "reference";
52
  private String reference;
53

54
  public StandalonePaymentCancelRequest() { 
×
55
  }
×
56

57
  public StandalonePaymentCancelRequest applicationInfo(ApplicationInfo applicationInfo) {
58
    this.applicationInfo = applicationInfo;
×
59
    return this;
×
60
  }
61

62
   /**
63
   * Get applicationInfo
64
   * @return applicationInfo
65
  **/
66
  @ApiModelProperty(value = "")
67
  @JsonProperty(JSON_PROPERTY_APPLICATION_INFO)
68
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
69

70
  public ApplicationInfo getApplicationInfo() {
71
    return applicationInfo;
×
72
  }
73

74

75
  @JsonProperty(JSON_PROPERTY_APPLICATION_INFO)
76
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
77
  public void setApplicationInfo(ApplicationInfo applicationInfo) {
78
    this.applicationInfo = applicationInfo;
×
79
  }
×
80

81

82
  public StandalonePaymentCancelRequest merchantAccount(String merchantAccount) {
83
    this.merchantAccount = merchantAccount;
×
84
    return this;
×
85
  }
86

87
   /**
88
   * The merchant account that is used to process the payment.
89
   * @return merchantAccount
90
  **/
91
  @ApiModelProperty(required = true, value = "The merchant account that is used to process the payment.")
92
  @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
93
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
94

95
  public String getMerchantAccount() {
96
    return merchantAccount;
×
97
  }
98

99

100
  @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
101
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
102
  public void setMerchantAccount(String merchantAccount) {
103
    this.merchantAccount = merchantAccount;
×
104
  }
×
105

106

107
  public StandalonePaymentCancelRequest paymentReference(String paymentReference) {
108
    this.paymentReference = paymentReference;
×
109
    return this;
×
110
  }
111

112
   /**
113
   * The [`reference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_reference) of the payment that you want to cancel.
114
   * @return paymentReference
115
  **/
116
  @ApiModelProperty(required = true, value = "The [`reference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_reference) of the payment that you want to cancel.")
117
  @JsonProperty(JSON_PROPERTY_PAYMENT_REFERENCE)
118
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
119

120
  public String getPaymentReference() {
121
    return paymentReference;
×
122
  }
123

124

125
  @JsonProperty(JSON_PROPERTY_PAYMENT_REFERENCE)
126
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
127
  public void setPaymentReference(String paymentReference) {
128
    this.paymentReference = paymentReference;
×
129
  }
×
130

131

132
  public StandalonePaymentCancelRequest reference(String reference) {
133
    this.reference = reference;
×
134
    return this;
×
135
  }
136

137
   /**
138
   * Your reference for the cancel request. Maximum length: 80 characters.
139
   * @return reference
140
  **/
141
  @ApiModelProperty(value = "Your reference for the cancel request. Maximum length: 80 characters.")
142
  @JsonProperty(JSON_PROPERTY_REFERENCE)
143
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
144

145
  public String getReference() {
146
    return reference;
×
147
  }
148

149

150
  @JsonProperty(JSON_PROPERTY_REFERENCE)
151
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
152
  public void setReference(String reference) {
153
    this.reference = reference;
×
154
  }
×
155

156

157
  /**
158
   * Return true if this StandalonePaymentCancelRequest object is equal to o.
159
   */
160
  @Override
161
  public boolean equals(Object o) {
162
    if (this == o) {
×
163
      return true;
×
164
    }
165
    if (o == null || getClass() != o.getClass()) {
×
166
      return false;
×
167
    }
168
    StandalonePaymentCancelRequest standalonePaymentCancelRequest = (StandalonePaymentCancelRequest) o;
×
169
    return Objects.equals(this.applicationInfo, standalonePaymentCancelRequest.applicationInfo) &&
×
170
        Objects.equals(this.merchantAccount, standalonePaymentCancelRequest.merchantAccount) &&
×
171
        Objects.equals(this.paymentReference, standalonePaymentCancelRequest.paymentReference) &&
×
172
        Objects.equals(this.reference, standalonePaymentCancelRequest.reference);
×
173
  }
174

175
  @Override
176
  public int hashCode() {
177
    return Objects.hash(applicationInfo, merchantAccount, paymentReference, reference);
×
178
  }
179

180
  @Override
181
  public String toString() {
182
    StringBuilder sb = new StringBuilder();
×
183
    sb.append("class StandalonePaymentCancelRequest {\n");
×
184
    sb.append("    applicationInfo: ").append(toIndentedString(applicationInfo)).append("\n");
×
185
    sb.append("    merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n");
×
186
    sb.append("    paymentReference: ").append(toIndentedString(paymentReference)).append("\n");
×
187
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
×
188
    sb.append("}");
×
189
    return sb.toString();
×
190
  }
191

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

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

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