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

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

26 Mar 2024 10:51AM UTC coverage: 12.292%. First build
#3188

push

web-flow
Merge bb2b851b6 into 78d4e3259

0 of 187 new or added lines in 22 files covered. (0.0%)

12444 of 101236 relevant lines covered (12.29%)

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.fasterxml.jackson.annotation.JsonInclude;
22
import com.fasterxml.jackson.annotation.JsonProperty;
23
import com.fasterxml.jackson.annotation.JsonCreator;
24
import com.fasterxml.jackson.annotation.JsonTypeName;
25
import com.fasterxml.jackson.annotation.JsonValue;
26
import io.swagger.annotations.ApiModel;
27
import io.swagger.annotations.ApiModelProperty;
28
import java.util.ArrayList;
29
import java.util.List;
30
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
31
import com.fasterxml.jackson.core.JsonProcessingException;
32

33

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

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

49
  public static final String JSON_PROPERTY_DELIVERY_METHODS = "deliveryMethods";
NEW
50
  private List<DeliveryMethod> deliveryMethods = null;
×
51

52
  public static final String JSON_PROPERTY_PAYMENT_DATA = "paymentData";
53
  private String paymentData;
54

55
  public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference";
56
  private String pspReference;
57

58
  public static final String JSON_PROPERTY_SESSION_ID = "sessionId";
59
  private String sessionId;
60

NEW
61
  public PaypalUpdateOrderRequest() { 
×
NEW
62
  }
×
63

64
  public PaypalUpdateOrderRequest amount(Amount amount) {
NEW
65
    this.amount = amount;
×
NEW
66
    return this;
×
67
  }
68

69
   /**
70
   * Get amount
71
   * @return amount
72
  **/
73
  @ApiModelProperty(value = "")
74
  @JsonProperty(JSON_PROPERTY_AMOUNT)
75
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
76

77
  public Amount getAmount() {
NEW
78
    return amount;
×
79
  }
80

81

82
 /**
83
  * amount
84
  *
85
  * @param amount
86
  */ 
87
  @JsonProperty(JSON_PROPERTY_AMOUNT)
88
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
89
  public void setAmount(Amount amount) {
NEW
90
    this.amount = amount;
×
NEW
91
  }
×
92

93

94
  public PaypalUpdateOrderRequest deliveryMethods(List<DeliveryMethod> deliveryMethods) {
NEW
95
    this.deliveryMethods = deliveryMethods;
×
NEW
96
    return this;
×
97
  }
98

99
  public PaypalUpdateOrderRequest addDeliveryMethodsItem(DeliveryMethod deliveryMethodsItem) {
NEW
100
    if (this.deliveryMethods == null) {
×
NEW
101
      this.deliveryMethods = new ArrayList<>();
×
102
    }
NEW
103
    this.deliveryMethods.add(deliveryMethodsItem);
×
NEW
104
    return this;
×
105
  }
106

107
   /**
108
   * The list of new delivery methods and the cost of each.
109
   * @return deliveryMethods
110
  **/
111
  @ApiModelProperty(value = "The list of new delivery methods and the cost of each.")
112
  @JsonProperty(JSON_PROPERTY_DELIVERY_METHODS)
113
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
114

115
  public List<DeliveryMethod> getDeliveryMethods() {
NEW
116
    return deliveryMethods;
×
117
  }
118

119

120
 /**
121
  * The list of new delivery methods and the cost of each.
122
  *
123
  * @param deliveryMethods
124
  */ 
125
  @JsonProperty(JSON_PROPERTY_DELIVERY_METHODS)
126
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
127
  public void setDeliveryMethods(List<DeliveryMethod> deliveryMethods) {
NEW
128
    this.deliveryMethods = deliveryMethods;
×
NEW
129
  }
×
130

131

132
  public PaypalUpdateOrderRequest paymentData(String paymentData) {
NEW
133
    this.paymentData = paymentData;
×
NEW
134
    return this;
×
135
  }
136

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

145
  public String getPaymentData() {
NEW
146
    return paymentData;
×
147
  }
148

149

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

161

162
  public PaypalUpdateOrderRequest pspReference(String pspReference) {
NEW
163
    this.pspReference = pspReference;
×
NEW
164
    return this;
×
165
  }
166

167
   /**
168
   * The original &#x60;pspReference&#x60; from the &#x60;/payments&#x60; response.
169
   * @return pspReference
170
  **/
171
  @ApiModelProperty(value = "The original `pspReference` from the `/payments` response.")
172
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
173
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
174

175
  public String getPspReference() {
NEW
176
    return pspReference;
×
177
  }
178

179

180
 /**
181
  * The original &#x60;pspReference&#x60; from the &#x60;/payments&#x60; response.
182
  *
183
  * @param pspReference
184
  */ 
185
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
186
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
187
  public void setPspReference(String pspReference) {
NEW
188
    this.pspReference = pspReference;
×
NEW
189
  }
×
190

191

192
  public PaypalUpdateOrderRequest sessionId(String sessionId) {
NEW
193
    this.sessionId = sessionId;
×
NEW
194
    return this;
×
195
  }
196

197
   /**
198
   * The original &#x60;sessionId&#x60; from the &#x60;/sessions&#x60; response.
199
   * @return sessionId
200
  **/
201
  @ApiModelProperty(value = "The original `sessionId` from the `/sessions` response.")
202
  @JsonProperty(JSON_PROPERTY_SESSION_ID)
203
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
204

205
  public String getSessionId() {
NEW
206
    return sessionId;
×
207
  }
208

209

210
 /**
211
  * The original &#x60;sessionId&#x60; from the &#x60;/sessions&#x60; response.
212
  *
213
  * @param sessionId
214
  */ 
215
  @JsonProperty(JSON_PROPERTY_SESSION_ID)
216
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
217
  public void setSessionId(String sessionId) {
NEW
218
    this.sessionId = sessionId;
×
NEW
219
  }
×
220

221

222
  /**
223
   * Return true if this PaypalUpdateOrderRequest object is equal to o.
224
   */
225
  @Override
226
  public boolean equals(Object o) {
NEW
227
    if (this == o) {
×
NEW
228
      return true;
×
229
    }
NEW
230
    if (o == null || getClass() != o.getClass()) {
×
NEW
231
      return false;
×
232
    }
NEW
233
    PaypalUpdateOrderRequest paypalUpdateOrderRequest = (PaypalUpdateOrderRequest) o;
×
NEW
234
    return Objects.equals(this.amount, paypalUpdateOrderRequest.amount) &&
×
NEW
235
        Objects.equals(this.deliveryMethods, paypalUpdateOrderRequest.deliveryMethods) &&
×
NEW
236
        Objects.equals(this.paymentData, paypalUpdateOrderRequest.paymentData) &&
×
NEW
237
        Objects.equals(this.pspReference, paypalUpdateOrderRequest.pspReference) &&
×
NEW
238
        Objects.equals(this.sessionId, paypalUpdateOrderRequest.sessionId);
×
239
  }
240

241
  @Override
242
  public int hashCode() {
NEW
243
    return Objects.hash(amount, deliveryMethods, paymentData, pspReference, sessionId);
×
244
  }
245

246
  @Override
247
  public String toString() {
NEW
248
    StringBuilder sb = new StringBuilder();
×
NEW
249
    sb.append("class PaypalUpdateOrderRequest {\n");
×
NEW
250
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
×
NEW
251
    sb.append("    deliveryMethods: ").append(toIndentedString(deliveryMethods)).append("\n");
×
NEW
252
    sb.append("    paymentData: ").append(toIndentedString(paymentData)).append("\n");
×
NEW
253
    sb.append("    pspReference: ").append(toIndentedString(pspReference)).append("\n");
×
NEW
254
    sb.append("    sessionId: ").append(toIndentedString(sessionId)).append("\n");
×
NEW
255
    sb.append("}");
×
NEW
256
    return sb.toString();
×
257
  }
258

259
  /**
260
   * Convert the given object to string with each line indented by 4 spaces
261
   * (except the first line).
262
   */
263
  private String toIndentedString(Object o) {
NEW
264
    if (o == null) {
×
NEW
265
      return "null";
×
266
    }
NEW
267
    return o.toString().replace("\n", "\n    ");
×
268
  }
269

270
/**
271
   * Create an instance of PaypalUpdateOrderRequest given an JSON string
272
   *
273
   * @param jsonString JSON string
274
   * @return An instance of PaypalUpdateOrderRequest
275
   * @throws JsonProcessingException if the JSON string is invalid with respect to PaypalUpdateOrderRequest
276
   */
277
  public static PaypalUpdateOrderRequest fromJson(String jsonString) throws JsonProcessingException {
NEW
278
    return JSON.getMapper().readValue(jsonString, PaypalUpdateOrderRequest.class);
×
279
  }
280
/**
281
  * Convert an instance of PaypalUpdateOrderRequest to an JSON string
282
  *
283
  * @return JSON string
284
  */
285
  public String toJson() throws JsonProcessingException {
NEW
286
    return JSON.getMapper().writeValueAsString(this);
×
287
  }
288
}
289

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