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

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

24 May 2024 12:08PM UTC coverage: 12.05%. First build
#3286

push

web-flow
Merge 8e2ea04f7 into 67f331171

10 of 150 new or added lines in 13 files covered. (6.67%)

12475 of 103524 relevant lines covered (12.05%)

0.12 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/PaypalUpdateOrderRequest.java
1
/*
2
 * Adyen Checkout API
3
 *
4
 * The version of the OpenAPI document: 71
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.Amount;
20
import com.adyen.model.checkout.DeliveryMethod;
21
import com.adyen.model.checkout.TaxTotal;
22
import com.fasterxml.jackson.annotation.JsonInclude;
23
import com.fasterxml.jackson.annotation.JsonProperty;
24
import com.fasterxml.jackson.annotation.JsonCreator;
25
import com.fasterxml.jackson.annotation.JsonTypeName;
26
import com.fasterxml.jackson.annotation.JsonValue;
27
import io.swagger.annotations.ApiModel;
28
import io.swagger.annotations.ApiModelProperty;
29
import java.util.ArrayList;
30
import java.util.List;
31
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
32
import com.fasterxml.jackson.core.JsonProcessingException;
33

34

35
/**
36
 * PaypalUpdateOrderRequest
37
 */
38
@JsonPropertyOrder({
39
  PaypalUpdateOrderRequest.JSON_PROPERTY_AMOUNT,
40
  PaypalUpdateOrderRequest.JSON_PROPERTY_DELIVERY_METHODS,
41
  PaypalUpdateOrderRequest.JSON_PROPERTY_PAYMENT_DATA,
42
  PaypalUpdateOrderRequest.JSON_PROPERTY_PSP_REFERENCE,
43
  PaypalUpdateOrderRequest.JSON_PROPERTY_SESSION_ID,
44
  PaypalUpdateOrderRequest.JSON_PROPERTY_TAX_TOTAL
45
})
46

47
public class PaypalUpdateOrderRequest {
48
  public static final String JSON_PROPERTY_AMOUNT = "amount";
49
  private Amount amount;
50

51
  public static final String JSON_PROPERTY_DELIVERY_METHODS = "deliveryMethods";
52
  private List<DeliveryMethod> deliveryMethods = null;
×
53

54
  public static final String JSON_PROPERTY_PAYMENT_DATA = "paymentData";
55
  private String paymentData;
56

57
  public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference";
58
  private String pspReference;
59

60
  public static final String JSON_PROPERTY_SESSION_ID = "sessionId";
61
  private String sessionId;
62

63
  public static final String JSON_PROPERTY_TAX_TOTAL = "taxTotal";
64
  private TaxTotal taxTotal;
65

66
  public PaypalUpdateOrderRequest() { 
×
67
  }
×
68

69
  public PaypalUpdateOrderRequest amount(Amount amount) {
70
    this.amount = amount;
×
71
    return this;
×
72
  }
73

74
   /**
75
   * Get amount
76
   * @return amount
77
  **/
78
  @ApiModelProperty(value = "")
79
  @JsonProperty(JSON_PROPERTY_AMOUNT)
80
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
81

82
  public Amount getAmount() {
83
    return amount;
×
84
  }
85

86

87
 /**
88
  * amount
89
  *
90
  * @param amount
91
  */ 
92
  @JsonProperty(JSON_PROPERTY_AMOUNT)
93
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
94
  public void setAmount(Amount amount) {
95
    this.amount = amount;
×
96
  }
×
97

98

99
  public PaypalUpdateOrderRequest deliveryMethods(List<DeliveryMethod> deliveryMethods) {
100
    this.deliveryMethods = deliveryMethods;
×
101
    return this;
×
102
  }
103

104
  public PaypalUpdateOrderRequest addDeliveryMethodsItem(DeliveryMethod deliveryMethodsItem) {
105
    if (this.deliveryMethods == null) {
×
106
      this.deliveryMethods = new ArrayList<>();
×
107
    }
108
    this.deliveryMethods.add(deliveryMethodsItem);
×
109
    return this;
×
110
  }
111

112
   /**
113
   * The list of new delivery methods and the cost of each.
114
   * @return deliveryMethods
115
  **/
116
  @ApiModelProperty(value = "The list of new delivery methods and the cost of each.")
117
  @JsonProperty(JSON_PROPERTY_DELIVERY_METHODS)
118
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
119

120
  public List<DeliveryMethod> getDeliveryMethods() {
121
    return deliveryMethods;
×
122
  }
123

124

125
 /**
126
  * The list of new delivery methods and the cost of each.
127
  *
128
  * @param deliveryMethods
129
  */ 
130
  @JsonProperty(JSON_PROPERTY_DELIVERY_METHODS)
131
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
132
  public void setDeliveryMethods(List<DeliveryMethod> deliveryMethods) {
133
    this.deliveryMethods = deliveryMethods;
×
134
  }
×
135

136

137
  public PaypalUpdateOrderRequest paymentData(String paymentData) {
138
    this.paymentData = paymentData;
×
139
    return this;
×
140
  }
141

142
   /**
143
   * The &#x60;paymentData&#x60; from the client side. This value changes every time you make a &#x60;/paypal/updateOrder&#x60; request.
144
   * @return paymentData
145
  **/
146
  @ApiModelProperty(value = "The `paymentData` from the client side. This value changes every time you make a `/paypal/updateOrder` request.")
147
  @JsonProperty(JSON_PROPERTY_PAYMENT_DATA)
148
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
149

150
  public String getPaymentData() {
151
    return paymentData;
×
152
  }
153

154

155
 /**
156
  * The &#x60;paymentData&#x60; from the client side. This value changes every time you make a &#x60;/paypal/updateOrder&#x60; request.
157
  *
158
  * @param paymentData
159
  */ 
160
  @JsonProperty(JSON_PROPERTY_PAYMENT_DATA)
161
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
162
  public void setPaymentData(String paymentData) {
163
    this.paymentData = paymentData;
×
164
  }
×
165

166

167
  public PaypalUpdateOrderRequest pspReference(String pspReference) {
168
    this.pspReference = pspReference;
×
169
    return this;
×
170
  }
171

172
   /**
173
   * The original &#x60;pspReference&#x60; from the &#x60;/payments&#x60; response.
174
   * @return pspReference
175
  **/
176
  @ApiModelProperty(value = "The original `pspReference` from the `/payments` response.")
177
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
178
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
179

180
  public String getPspReference() {
181
    return pspReference;
×
182
  }
183

184

185
 /**
186
  * The original &#x60;pspReference&#x60; from the &#x60;/payments&#x60; response.
187
  *
188
  * @param pspReference
189
  */ 
190
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
191
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
192
  public void setPspReference(String pspReference) {
193
    this.pspReference = pspReference;
×
194
  }
×
195

196

197
  public PaypalUpdateOrderRequest sessionId(String sessionId) {
198
    this.sessionId = sessionId;
×
199
    return this;
×
200
  }
201

202
   /**
203
   * The original &#x60;sessionId&#x60; from the &#x60;/sessions&#x60; response.
204
   * @return sessionId
205
  **/
206
  @ApiModelProperty(value = "The original `sessionId` from the `/sessions` response.")
207
  @JsonProperty(JSON_PROPERTY_SESSION_ID)
208
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
209

210
  public String getSessionId() {
211
    return sessionId;
×
212
  }
213

214

215
 /**
216
  * The original &#x60;sessionId&#x60; from the &#x60;/sessions&#x60; response.
217
  *
218
  * @param sessionId
219
  */ 
220
  @JsonProperty(JSON_PROPERTY_SESSION_ID)
221
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
222
  public void setSessionId(String sessionId) {
223
    this.sessionId = sessionId;
×
224
  }
×
225

226

227
  public PaypalUpdateOrderRequest taxTotal(TaxTotal taxTotal) {
NEW
228
    this.taxTotal = taxTotal;
×
NEW
229
    return this;
×
230
  }
231

232
   /**
233
   * Get taxTotal
234
   * @return taxTotal
235
  **/
236
  @ApiModelProperty(value = "")
237
  @JsonProperty(JSON_PROPERTY_TAX_TOTAL)
238
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
239

240
  public TaxTotal getTaxTotal() {
NEW
241
    return taxTotal;
×
242
  }
243

244

245
 /**
246
  * taxTotal
247
  *
248
  * @param taxTotal
249
  */ 
250
  @JsonProperty(JSON_PROPERTY_TAX_TOTAL)
251
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
252
  public void setTaxTotal(TaxTotal taxTotal) {
NEW
253
    this.taxTotal = taxTotal;
×
NEW
254
  }
×
255

256

257
  /**
258
   * Return true if this PaypalUpdateOrderRequest object is equal to o.
259
   */
260
  @Override
261
  public boolean equals(Object o) {
262
    if (this == o) {
×
263
      return true;
×
264
    }
265
    if (o == null || getClass() != o.getClass()) {
×
266
      return false;
×
267
    }
268
    PaypalUpdateOrderRequest paypalUpdateOrderRequest = (PaypalUpdateOrderRequest) o;
×
269
    return Objects.equals(this.amount, paypalUpdateOrderRequest.amount) &&
×
270
        Objects.equals(this.deliveryMethods, paypalUpdateOrderRequest.deliveryMethods) &&
×
271
        Objects.equals(this.paymentData, paypalUpdateOrderRequest.paymentData) &&
×
272
        Objects.equals(this.pspReference, paypalUpdateOrderRequest.pspReference) &&
×
NEW
273
        Objects.equals(this.sessionId, paypalUpdateOrderRequest.sessionId) &&
×
NEW
274
        Objects.equals(this.taxTotal, paypalUpdateOrderRequest.taxTotal);
×
275
  }
276

277
  @Override
278
  public int hashCode() {
NEW
279
    return Objects.hash(amount, deliveryMethods, paymentData, pspReference, sessionId, taxTotal);
×
280
  }
281

282
  @Override
283
  public String toString() {
284
    StringBuilder sb = new StringBuilder();
×
285
    sb.append("class PaypalUpdateOrderRequest {\n");
×
286
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
×
287
    sb.append("    deliveryMethods: ").append(toIndentedString(deliveryMethods)).append("\n");
×
288
    sb.append("    paymentData: ").append(toIndentedString(paymentData)).append("\n");
×
289
    sb.append("    pspReference: ").append(toIndentedString(pspReference)).append("\n");
×
290
    sb.append("    sessionId: ").append(toIndentedString(sessionId)).append("\n");
×
NEW
291
    sb.append("    taxTotal: ").append(toIndentedString(taxTotal)).append("\n");
×
292
    sb.append("}");
×
293
    return sb.toString();
×
294
  }
295

296
  /**
297
   * Convert the given object to string with each line indented by 4 spaces
298
   * (except the first line).
299
   */
300
  private String toIndentedString(Object o) {
301
    if (o == null) {
×
302
      return "null";
×
303
    }
304
    return o.toString().replace("\n", "\n    ");
×
305
  }
306

307
/**
308
   * Create an instance of PaypalUpdateOrderRequest given an JSON string
309
   *
310
   * @param jsonString JSON string
311
   * @return An instance of PaypalUpdateOrderRequest
312
   * @throws JsonProcessingException if the JSON string is invalid with respect to PaypalUpdateOrderRequest
313
   */
314
  public static PaypalUpdateOrderRequest fromJson(String jsonString) throws JsonProcessingException {
315
    return JSON.getMapper().readValue(jsonString, PaypalUpdateOrderRequest.class);
×
316
  }
317
/**
318
  * Convert an instance of PaypalUpdateOrderRequest to an JSON string
319
  *
320
  * @return JSON string
321
  */
322
  public String toJson() throws JsonProcessingException {
323
    return JSON.getMapper().writeValueAsString(this);
×
324
  }
325
}
326

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

© 2026 Coveralls, Inc