Skip to content

Commit 49b81cc

Browse files
AdyenAutomationBotAdyenAutomationBotgcatanese
authored
Code generation: update services and models (#1567)
* false[adyen-sdk-automation] automated change * style(fmt): code formatted * Update tests after ShopperName breaking change * style(fmt): code formatted --------- Co-authored-by: AdyenAutomationBot <AdyenAutomationBot 38424300+AdyenAutomationBot@users.noreply.github.com> Co-authored-by: gcatanese <gcatanese@yahoo.com>
1 parent 20e3963 commit 49b81cc

File tree

9 files changed

+251
-45
lines changed

9 files changed

+251
-45
lines changed

src/main/java/com/adyen/model/checkout/CreateCheckoutSessionRequest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ public static ShopperInteractionEnum fromValue(String value) {
428428
private String shopperLocale;
429429

430430
public static final String JSON_PROPERTY_SHOPPER_NAME = "shopperName";
431-
private Name shopperName;
431+
private ShopperName shopperName;
432432

433433
public static final String JSON_PROPERTY_SHOPPER_REFERENCE = "shopperReference";
434434
private String shopperReference;
@@ -2582,7 +2582,7 @@ public void setShopperLocale(String shopperLocale) {
25822582
* @param shopperName
25832583
* @return the current {@code CreateCheckoutSessionRequest} instance, allowing for method chaining
25842584
*/
2585-
public CreateCheckoutSessionRequest shopperName(Name shopperName) {
2585+
public CreateCheckoutSessionRequest shopperName(ShopperName shopperName) {
25862586
this.shopperName = shopperName;
25872587
return this;
25882588
}
@@ -2594,7 +2594,7 @@ public CreateCheckoutSessionRequest shopperName(Name shopperName) {
25942594
*/
25952595
@JsonProperty(JSON_PROPERTY_SHOPPER_NAME)
25962596
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
2597-
public Name getShopperName() {
2597+
public ShopperName getShopperName() {
25982598
return shopperName;
25992599
}
26002600

@@ -2605,7 +2605,7 @@ public Name getShopperName() {
26052605
*/
26062606
@JsonProperty(JSON_PROPERTY_SHOPPER_NAME)
26072607
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
2608-
public void setShopperName(Name shopperName) {
2608+
public void setShopperName(ShopperName shopperName) {
26092609
this.shopperName = shopperName;
26102610
}
26112611

src/main/java/com/adyen/model/checkout/CreateCheckoutSessionResponse.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ public static ShopperInteractionEnum fromValue(String value) {
436436
private String shopperLocale;
437437

438438
public static final String JSON_PROPERTY_SHOPPER_NAME = "shopperName";
439-
private Name shopperName;
439+
private ShopperName shopperName;
440440

441441
public static final String JSON_PROPERTY_SHOPPER_REFERENCE = "shopperReference";
442442
private String shopperReference;
@@ -2690,7 +2690,7 @@ public void setShopperLocale(String shopperLocale) {
26902690
* @return the current {@code CreateCheckoutSessionResponse} instance, allowing for method
26912691
* chaining
26922692
*/
2693-
public CreateCheckoutSessionResponse shopperName(Name shopperName) {
2693+
public CreateCheckoutSessionResponse shopperName(ShopperName shopperName) {
26942694
this.shopperName = shopperName;
26952695
return this;
26962696
}
@@ -2702,7 +2702,7 @@ public CreateCheckoutSessionResponse shopperName(Name shopperName) {
27022702
*/
27032703
@JsonProperty(JSON_PROPERTY_SHOPPER_NAME)
27042704
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
2705-
public Name getShopperName() {
2705+
public ShopperName getShopperName() {
27062706
return shopperName;
27072707
}
27082708

@@ -2713,7 +2713,7 @@ public Name getShopperName() {
27132713
*/
27142714
@JsonProperty(JSON_PROPERTY_SHOPPER_NAME)
27152715
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
2716-
public void setShopperName(Name shopperName) {
2716+
public void setShopperName(ShopperName shopperName) {
27172717
this.shopperName = shopperName;
27182718
}
27192719

src/main/java/com/adyen/model/checkout/DonationPaymentRequest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public static ShopperInteractionEnum fromValue(String value) {
342342
private String shopperLocale;
343343

344344
public static final String JSON_PROPERTY_SHOPPER_NAME = "shopperName";
345-
private Name shopperName;
345+
private ShopperName shopperName;
346346

347347
public static final String JSON_PROPERTY_SHOPPER_REFERENCE = "shopperReference";
348348
private String shopperReference;
@@ -2003,7 +2003,7 @@ public void setShopperLocale(String shopperLocale) {
20032003
* @param shopperName
20042004
* @return the current {@code DonationPaymentRequest} instance, allowing for method chaining
20052005
*/
2006-
public DonationPaymentRequest shopperName(Name shopperName) {
2006+
public DonationPaymentRequest shopperName(ShopperName shopperName) {
20072007
this.shopperName = shopperName;
20082008
return this;
20092009
}
@@ -2015,7 +2015,7 @@ public DonationPaymentRequest shopperName(Name shopperName) {
20152015
*/
20162016
@JsonProperty(JSON_PROPERTY_SHOPPER_NAME)
20172017
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
2018-
public Name getShopperName() {
2018+
public ShopperName getShopperName() {
20192019
return shopperName;
20202020
}
20212021

@@ -2026,7 +2026,7 @@ public Name getShopperName() {
20262026
*/
20272027
@JsonProperty(JSON_PROPERTY_SHOPPER_NAME)
20282028
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
2029-
public void setShopperName(Name shopperName) {
2029+
public void setShopperName(ShopperName shopperName) {
20302030
this.shopperName = shopperName;
20312031
}
20322032

src/main/java/com/adyen/model/checkout/PaymentRequest.java

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
PaymentRequest.JSON_PROPERTY_REFERENCE,
8282
PaymentRequest.JSON_PROPERTY_RETURN_URL,
8383
PaymentRequest.JSON_PROPERTY_RISK_DATA,
84+
PaymentRequest.JSON_PROPERTY_SDK_DATA,
8485
PaymentRequest.JSON_PROPERTY_SESSION_VALIDITY,
8586
PaymentRequest.JSON_PROPERTY_SHOPPER_CONVERSION_ID,
8687
PaymentRequest.JSON_PROPERTY_SHOPPER_EMAIL,
@@ -453,6 +454,9 @@ public static RecurringProcessingModelEnum fromValue(String value) {
453454
public static final String JSON_PROPERTY_RISK_DATA = "riskData";
454455
private RiskData riskData;
455456

457+
public static final String JSON_PROPERTY_SDK_DATA = "sdkData";
458+
private String sdkData;
459+
456460
public static final String JSON_PROPERTY_SESSION_VALIDITY = "sessionValidity";
457461
private String sessionValidity;
458462

@@ -529,7 +533,7 @@ public static ShopperInteractionEnum fromValue(String value) {
529533
private String shopperLocale;
530534

531535
public static final String JSON_PROPERTY_SHOPPER_NAME = "shopperName";
532-
private Name shopperName;
536+
private ShopperName shopperName;
533537

534538
public static final String JSON_PROPERTY_SHOPPER_REFERENCE = "shopperReference";
535539
private String shopperReference;
@@ -2809,6 +2813,46 @@ public void setRiskData(RiskData riskData) {
28092813
this.riskData = riskData;
28102814
}
28112815

2816+
/**
2817+
* Base64-encoded JSON object containing SDK related parameters required by the SDK to function
2818+
* optimally. Clients must not add unrelated or sensitive personal information.
2819+
*
2820+
* @param sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK
2821+
* to function optimally. Clients must not add unrelated or sensitive personal information.
2822+
* @return the current {@code PaymentRequest} instance, allowing for method chaining
2823+
*/
2824+
public PaymentRequest sdkData(String sdkData) {
2825+
this.sdkData = sdkData;
2826+
return this;
2827+
}
2828+
2829+
/**
2830+
* Base64-encoded JSON object containing SDK related parameters required by the SDK to function
2831+
* optimally. Clients must not add unrelated or sensitive personal information.
2832+
*
2833+
* @return sdkData Base64-encoded JSON object containing SDK related parameters required by the
2834+
* SDK to function optimally. Clients must not add unrelated or sensitive personal
2835+
* information.
2836+
*/
2837+
@JsonProperty(JSON_PROPERTY_SDK_DATA)
2838+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
2839+
public String getSdkData() {
2840+
return sdkData;
2841+
}
2842+
2843+
/**
2844+
* Base64-encoded JSON object containing SDK related parameters required by the SDK to function
2845+
* optimally. Clients must not add unrelated or sensitive personal information.
2846+
*
2847+
* @param sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK
2848+
* to function optimally. Clients must not add unrelated or sensitive personal information.
2849+
*/
2850+
@JsonProperty(JSON_PROPERTY_SDK_DATA)
2851+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
2852+
public void setSdkData(String sdkData) {
2853+
this.sdkData = sdkData;
2854+
}
2855+
28122856
/**
28132857
* The date and time until when the session remains valid, in [ISO
28142858
* 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00
@@ -3151,7 +3195,7 @@ public void setShopperLocale(String shopperLocale) {
31513195
* @param shopperName
31523196
* @return the current {@code PaymentRequest} instance, allowing for method chaining
31533197
*/
3154-
public PaymentRequest shopperName(Name shopperName) {
3198+
public PaymentRequest shopperName(ShopperName shopperName) {
31553199
this.shopperName = shopperName;
31563200
return this;
31573201
}
@@ -3163,7 +3207,7 @@ public PaymentRequest shopperName(Name shopperName) {
31633207
*/
31643208
@JsonProperty(JSON_PROPERTY_SHOPPER_NAME)
31653209
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
3166-
public Name getShopperName() {
3210+
public ShopperName getShopperName() {
31673211
return shopperName;
31683212
}
31693213

@@ -3174,7 +3218,7 @@ public Name getShopperName() {
31743218
*/
31753219
@JsonProperty(JSON_PROPERTY_SHOPPER_NAME)
31763220
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
3177-
public void setShopperName(Name shopperName) {
3221+
public void setShopperName(ShopperName shopperName) {
31783222
this.shopperName = shopperName;
31793223
}
31803224

@@ -3818,6 +3862,7 @@ public boolean equals(Object o) {
38183862
&& Objects.equals(this.reference, paymentRequest.reference)
38193863
&& Objects.equals(this.returnUrl, paymentRequest.returnUrl)
38203864
&& Objects.equals(this.riskData, paymentRequest.riskData)
3865+
&& Objects.equals(this.sdkData, paymentRequest.sdkData)
38213866
&& Objects.equals(this.sessionValidity, paymentRequest.sessionValidity)
38223867
&& Objects.equals(this.shopperConversionId, paymentRequest.shopperConversionId)
38233868
&& Objects.equals(this.shopperEmail, paymentRequest.shopperEmail)
@@ -3895,6 +3940,7 @@ public int hashCode() {
38953940
reference,
38963941
returnUrl,
38973942
riskData,
3943+
sdkData,
38983944
sessionValidity,
38993945
shopperConversionId,
39003946
shopperEmail,
@@ -3987,6 +4033,7 @@ public String toString() {
39874033
sb.append(" reference: ").append(toIndentedString(reference)).append("\n");
39884034
sb.append(" returnUrl: ").append(toIndentedString(returnUrl)).append("\n");
39894035
sb.append(" riskData: ").append(toIndentedString(riskData)).append("\n");
4036+
sb.append(" sdkData: ").append(toIndentedString(sdkData)).append("\n");
39904037
sb.append(" sessionValidity: ").append(toIndentedString(sessionValidity)).append("\n");
39914038
sb.append(" shopperConversionId: ")
39924039
.append(toIndentedString(shopperConversionId))
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
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+
package com.adyen.model.checkout;
13+
14+
import com.fasterxml.jackson.annotation.JsonInclude;
15+
import com.fasterxml.jackson.annotation.JsonProperty;
16+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
17+
import com.fasterxml.jackson.core.JsonProcessingException;
18+
import java.util.*;
19+
20+
/** ShopperName */
21+
@JsonPropertyOrder({ShopperName.JSON_PROPERTY_FIRST_NAME, ShopperName.JSON_PROPERTY_LAST_NAME})
22+
public class ShopperName {
23+
public static final String JSON_PROPERTY_FIRST_NAME = "firstName";
24+
private String firstName;
25+
26+
public static final String JSON_PROPERTY_LAST_NAME = "lastName";
27+
private String lastName;
28+
29+
public ShopperName() {}
30+
31+
/**
32+
* The first name.
33+
*
34+
* @param firstName The first name.
35+
* @return the current {@code ShopperName} instance, allowing for method chaining
36+
*/
37+
public ShopperName firstName(String firstName) {
38+
this.firstName = firstName;
39+
return this;
40+
}
41+
42+
/**
43+
* The first name.
44+
*
45+
* @return firstName The first name.
46+
*/
47+
@JsonProperty(JSON_PROPERTY_FIRST_NAME)
48+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
49+
public String getFirstName() {
50+
return firstName;
51+
}
52+
53+
/**
54+
* The first name.
55+
*
56+
* @param firstName The first name.
57+
*/
58+
@JsonProperty(JSON_PROPERTY_FIRST_NAME)
59+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
60+
public void setFirstName(String firstName) {
61+
this.firstName = firstName;
62+
}
63+
64+
/**
65+
* The last name.
66+
*
67+
* @param lastName The last name.
68+
* @return the current {@code ShopperName} instance, allowing for method chaining
69+
*/
70+
public ShopperName lastName(String lastName) {
71+
this.lastName = lastName;
72+
return this;
73+
}
74+
75+
/**
76+
* The last name.
77+
*
78+
* @return lastName The last name.
79+
*/
80+
@JsonProperty(JSON_PROPERTY_LAST_NAME)
81+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
82+
public String getLastName() {
83+
return lastName;
84+
}
85+
86+
/**
87+
* The last name.
88+
*
89+
* @param lastName The last name.
90+
*/
91+
@JsonProperty(JSON_PROPERTY_LAST_NAME)
92+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
93+
public void setLastName(String lastName) {
94+
this.lastName = lastName;
95+
}
96+
97+
/** Return true if this ShopperName object is equal to o. */
98+
@Override
99+
public boolean equals(Object o) {
100+
if (this == o) {
101+
return true;
102+
}
103+
if (o == null || getClass() != o.getClass()) {
104+
return false;
105+
}
106+
ShopperName shopperName = (ShopperName) o;
107+
return Objects.equals(this.firstName, shopperName.firstName)
108+
&& Objects.equals(this.lastName, shopperName.lastName);
109+
}
110+
111+
@Override
112+
public int hashCode() {
113+
return Objects.hash(firstName, lastName);
114+
}
115+
116+
@Override
117+
public String toString() {
118+
StringBuilder sb = new StringBuilder();
119+
sb.append("class ShopperName {\n");
120+
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
121+
sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
122+
sb.append("}");
123+
return sb.toString();
124+
}
125+
126+
/**
127+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
128+
*/
129+
private String toIndentedString(Object o) {
130+
if (o == null) {
131+
return "null";
132+
}
133+
return o.toString().replace("\n", "\n ");
134+
}
135+
136+
/**
137+
* Create an instance of ShopperName given an JSON string
138+
*
139+
* @param jsonString JSON string
140+
* @return An instance of ShopperName
141+
* @throws JsonProcessingException if the JSON string is invalid with respect to ShopperName
142+
*/
143+
public static ShopperName fromJson(String jsonString) throws JsonProcessingException {
144+
return JSON.getMapper().readValue(jsonString, ShopperName.class);
145+
}
146+
147+
/**
148+
* Convert an instance of ShopperName to an JSON string
149+
*
150+
* @return JSON string
151+
*/
152+
public String toJson() throws JsonProcessingException {
153+
return JSON.getMapper().writeValueAsString(this);
154+
}
155+
}

0 commit comments

Comments
 (0)