Skip to content

Commit 56baa6d

Browse files
AdyenAutomationBotAdyenAutomationBot
andauthored
Code generation: update services and models (#1552)
* false[adyen-sdk-automation] automated change * style(fmt): code formatted --------- Co-authored-by: AdyenAutomationBot <AdyenAutomationBot 38424300+AdyenAutomationBot@users.noreply.github.com>
1 parent 8d1139a commit 56baa6d

File tree

6 files changed

+76
-76
lines changed

6 files changed

+76
-76
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ public class CardDetailsRequest {
4646
public CardDetailsRequest() {}
4747

4848
/**
49-
* A minimum of the first eight digits of the card number. The full card number gives the best
49+
* A minimum of the first six digits of the card number. The full card number gives the best
5050
* result. You must be [fully PCI
5151
* compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to collect
5252
* raw card data. Alternatively, you can use the &#x60;encryptedCardNumber&#x60; field.
5353
*
54-
* @param cardNumber A minimum of the first eight digits of the card number. The full card number
54+
* @param cardNumber A minimum of the first six digits of the card number. The full card number
5555
* gives the best result. You must be [fully PCI
5656
* compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to
5757
* collect raw card data. Alternatively, you can use the &#x60;encryptedCardNumber&#x60;
@@ -64,12 +64,12 @@ public CardDetailsRequest cardNumber(String cardNumber) {
6464
}
6565

6666
/**
67-
* A minimum of the first eight digits of the card number. The full card number gives the best
67+
* A minimum of the first six digits of the card number. The full card number gives the best
6868
* result. You must be [fully PCI
6969
* compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to collect
7070
* raw card data. Alternatively, you can use the &#x60;encryptedCardNumber&#x60; field.
7171
*
72-
* @return cardNumber A minimum of the first eight digits of the card number. The full card number
72+
* @return cardNumber A minimum of the first six digits of the card number. The full card number
7373
* gives the best result. You must be [fully PCI
7474
* compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to
7575
* collect raw card data. Alternatively, you can use the &#x60;encryptedCardNumber&#x60;
@@ -82,12 +82,12 @@ public String getCardNumber() {
8282
}
8383

8484
/**
85-
* A minimum of the first eight digits of the card number. The full card number gives the best
85+
* A minimum of the first six digits of the card number. The full card number gives the best
8686
* result. You must be [fully PCI
8787
* compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to collect
8888
* raw card data. Alternatively, you can use the &#x60;encryptedCardNumber&#x60; field.
8989
*
90-
* @param cardNumber A minimum of the first eight digits of the card number. The full card number
90+
* @param cardNumber A minimum of the first six digits of the card number. The full card number
9191
* gives the best result. You must be [fully PCI
9292
* compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to
9393
* collect raw card data. Alternatively, you can use the &#x60;encryptedCardNumber&#x60;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public enum TypeEnum {
3636

3737
MULTIBANCO(String.valueOf("multibanco")),
3838

39+
BANKTRANSFER(String.valueOf("bankTransfer")),
40+
3941
BANKTRANSFER_IBAN(String.valueOf("bankTransfer_IBAN")),
4042

4143
PAYBRIGHT(String.valueOf("paybright")),

src/main/java/com/adyen/model/disputewebhooks/BalancePlatformNotificationResponse.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public BalancePlatformNotificationResponse() {}
2727

2828
/**
2929
* Respond with any **2xx** HTTP status code to [accept the
30-
* webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).
30+
* webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks).
3131
*
3232
* @param notificationResponse Respond with any **2xx** HTTP status code to [accept the
33-
* webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).
33+
* webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks).
3434
* @return the current {@code BalancePlatformNotificationResponse} instance, allowing for method
3535
* chaining
3636
*/
@@ -41,10 +41,10 @@ public BalancePlatformNotificationResponse notificationResponse(String notificat
4141

4242
/**
4343
* Respond with any **2xx** HTTP status code to [accept the
44-
* webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).
44+
* webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks).
4545
*
4646
* @return notificationResponse Respond with any **2xx** HTTP status code to [accept the
47-
* webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).
47+
* webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks).
4848
*/
4949
@JsonProperty(JSON_PROPERTY_NOTIFICATION_RESPONSE)
5050
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
@@ -54,10 +54,10 @@ public String getNotificationResponse() {
5454

5555
/**
5656
* Respond with any **2xx** HTTP status code to [accept the
57-
* webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).
57+
* webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks).
5858
*
5959
* @param notificationResponse Respond with any **2xx** HTTP status code to [accept the
60-
* webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).
60+
* webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks).
6161
*/
6262
@JsonProperty(JSON_PROPERTY_NOTIFICATION_RESPONSE)
6363
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

src/main/java/com/adyen/model/disputewebhooks/DisputeEventNotification.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ public enum TypeEnum {
6969

7070
NOTDELIVERED(String.valueOf("notDelivered")),
7171

72-
DUPLICATE(String.valueOf("duplicate"));
72+
DUPLICATE(String.valueOf("duplicate")),
73+
74+
OTHER(String.valueOf("other"));
7375

7476
private static final Logger LOG = Logger.getLogger(TypeEnum.class.getName());
7577

@@ -185,10 +187,10 @@ public void setBalancePlatform(String balancePlatform) {
185187

186188
/**
187189
* The date and time when the event was triggered, in ISO 8601 extended format. For example,
188-
* **2020-12-18T10:15:30+01:00**.
190+
* **2025-03-19T10:15:30+01:00**.
189191
*
190192
* @param creationDate The date and time when the event was triggered, in ISO 8601 extended
191-
* format. For example, **2020-12-18T10:15:30+01:00**.
193+
* format. For example, **2025-03-19T10:15:30+01:00**.
192194
* @return the current {@code DisputeEventNotification} instance, allowing for method chaining
193195
*/
194196
public DisputeEventNotification creationDate(OffsetDateTime creationDate) {
@@ -198,10 +200,10 @@ public DisputeEventNotification creationDate(OffsetDateTime creationDate) {
198200

199201
/**
200202
* The date and time when the event was triggered, in ISO 8601 extended format. For example,
201-
* **2020-12-18T10:15:30+01:00**.
203+
* **2025-03-19T10:15:30+01:00**.
202204
*
203205
* @return creationDate The date and time when the event was triggered, in ISO 8601 extended
204-
* format. For example, **2020-12-18T10:15:30+01:00**.
206+
* format. For example, **2025-03-19T10:15:30+01:00**.
205207
*/
206208
@JsonProperty(JSON_PROPERTY_CREATION_DATE)
207209
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
@@ -211,10 +213,10 @@ public OffsetDateTime getCreationDate() {
211213

212214
/**
213215
* The date and time when the event was triggered, in ISO 8601 extended format. For example,
214-
* **2020-12-18T10:15:30+01:00**.
216+
* **2025-03-19T10:15:30+01:00**.
215217
*
216218
* @param creationDate The date and time when the event was triggered, in ISO 8601 extended
217-
* format. For example, **2020-12-18T10:15:30+01:00**.
219+
* format. For example, **2025-03-19T10:15:30+01:00**.
218220
*/
219221
@JsonProperty(JSON_PROPERTY_CREATION_DATE)
220222
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

src/test/java/com/adyen/CheckoutTest.java

Lines changed: 53 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ public void testPaymentSuccess() throws Exception {
5454
new PaymentRequest()
5555
.merchantAccount("YOUR_MERCHANT_ACCOUNT")
5656
.reference("YOUR_REFERENCE")
57-
.amount(new Amount()
58-
.currency("EUR")
59-
.value(1000L))
57+
.amount(new Amount().currency("EUR").value(1000L))
6058
.returnUrl("https://your-company.example.org/checkout?shopperOrder=12xy..")
6159
.paymentMethod(new CheckoutPaymentMethod(cardDetails));
6260

@@ -128,8 +126,8 @@ public void testDeserializePaymentRequestScheme() throws Exception {
128126
@Test
129127
public void testPaymentMethodsSuccess() throws Exception {
130128
Client client = createMockClientFromFile("mocks/checkout/paymentMethodsResponse.json");
131-
PaymentMethodsRequest paymentMethodsRequest = new PaymentMethodsRequest()
132-
.merchantAccount("myMerchantAccount");
129+
PaymentMethodsRequest paymentMethodsRequest =
130+
new PaymentMethodsRequest().merchantAccount("myMerchantAccount");
133131

134132
PaymentsApi checkout = new PaymentsApi(client);
135133
PaymentMethodsResponse paymentMethodsResponse = checkout.paymentMethods(paymentMethodsRequest);
@@ -141,13 +139,12 @@ public void testPaymentMethodsSuccess() throws Exception {
141139
@Test
142140
public void testPaymentLinkSuccess() throws Exception {
143141
Client client = createMockClientFromFile("mocks/checkout/paymentLinkResponse.json");
144-
PaymentLinkRequest createPaymentLinkRequest = new PaymentLinkRequest()
145-
.amount(new Amount().currency("EUR").value(500L))
146-
.merchantAccount("myMerchantAccount")
147-
.reference("merchantReference")
148-
.lineItems(Arrays.asList(new LineItem()
149-
.brand("brand")
150-
.color("color")));
142+
PaymentLinkRequest createPaymentLinkRequest =
143+
new PaymentLinkRequest()
144+
.amount(new Amount().currency("EUR").value(500L))
145+
.merchantAccount("myMerchantAccount")
146+
.reference("merchantReference")
147+
.lineItems(Arrays.asList(new LineItem().brand("brand").color("color")));
151148
PaymentLinksApi checkout = new PaymentLinksApi(client);
152149

153150
PaymentLinkResponse paymentLinkResponse = checkout.paymentLinks(createPaymentLinkRequest);
@@ -184,8 +181,7 @@ public void TestPatchPaymentLinkSuccess() throws Exception {
184181
@Test
185182
public void testPaymentDetailsSuccess() throws Exception {
186183
Client client = createMockClientFromFile("mocks/checkout/paymentDetailsResponse.json");
187-
PaymentDetailsRequest detailsRequest = new PaymentDetailsRequest()
188-
.paymentData("STATE_DATA");
184+
PaymentDetailsRequest detailsRequest = new PaymentDetailsRequest().paymentData("STATE_DATA");
189185
PaymentsApi checkout = new PaymentsApi(client);
190186
PaymentDetailsResponse paymentDetailsResponse = checkout.paymentsDetails(detailsRequest);
191187
assertEquals(
@@ -198,8 +194,7 @@ public void testPaymentDetailsWithThreeDSRequestorChallengeInd() throws Exceptio
198194
Client client =
199195
createMockClientFromFile(
200196
"mocks/checkout/paymentDetailsResponseThreeDSRequestorChallengeInd.json");
201-
PaymentDetailsRequest detailsRequest = new PaymentDetailsRequest()
202-
.paymentData("STATE_DATA");
197+
PaymentDetailsRequest detailsRequest = new PaymentDetailsRequest().paymentData("STATE_DATA");
203198
PaymentsApi checkout = new PaymentsApi(client);
204199

205200
PaymentDetailsResponse paymentDetailsResponse = checkout.paymentsDetails(detailsRequest);
@@ -215,8 +210,7 @@ public void testPaymentDetailsWithThreeDSRequestorChallengeInd() throws Exceptio
215210
public void testPaymentDetailsWithThreeDS2Action() throws Exception {
216211
Client client =
217212
createMockClientFromFile("mocks/checkout/paymentDetailsResponseThreeDS2Action.json");
218-
PaymentDetailsRequest detailsRequest = new PaymentDetailsRequest()
219-
.paymentData("STATE_DATA");
213+
PaymentDetailsRequest detailsRequest = new PaymentDetailsRequest().paymentData("STATE_DATA");
220214
PaymentsApi checkout = new PaymentsApi(client);
221215
PaymentDetailsResponse paymentDetailsResponse = checkout.paymentsDetails(detailsRequest);
222216
assertEquals(
@@ -235,12 +229,13 @@ public void testPaymentDetailsWithThreeDS2Action() throws Exception {
235229
@Test
236230
public void testCreateSessionsSuccessCall() throws Exception {
237231
Client client = createMockClientFromFile("mocks/checkout/createSessionsResponse.json");
238-
CreateCheckoutSessionRequest sessionRequest = new CreateCheckoutSessionRequest()
239-
.merchantAccount("YOUR_MERCHANT_ACCOUNT")
240-
.amount(new Amount().currency("EUR").value(1000L))
241-
.reference("YOUR_PAYMENT_REFERENCE")
242-
.returnUrl("https://your-company.com/checkout?shopperOrder=12xy..")
243-
.countryCode("NL");
232+
CreateCheckoutSessionRequest sessionRequest =
233+
new CreateCheckoutSessionRequest()
234+
.merchantAccount("YOUR_MERCHANT_ACCOUNT")
235+
.amount(new Amount().currency("EUR").value(1000L))
236+
.reference("YOUR_PAYMENT_REFERENCE")
237+
.returnUrl("https://your-company.com/checkout?shopperOrder=12xy..")
238+
.countryCode("NL");
244239

245240
PaymentsApi checkout = new PaymentsApi(client);
246241
CreateCheckoutSessionResponse createCheckoutSessionResponse = checkout.sessions(sessionRequest);
@@ -259,10 +254,11 @@ public void testCreateSessionsSuccessCall() throws Exception {
259254
@Test
260255
public void testCreateOrderSuccessCall() throws Exception {
261256
Client client = createMockClientFromFile("mocks/checkout/createOrderResponse.json");
262-
CreateOrderRequest checkoutCreateOrderRequest = new CreateOrderRequest()
263-
.amount(new Amount().currency("EUR").value(1000L))
264-
.merchantAccount("YOUR_MERCHANT_ACCOUNT")
265-
.reference("YOUR_ORDER_REFERENCE");
257+
CreateOrderRequest checkoutCreateOrderRequest =
258+
new CreateOrderRequest()
259+
.amount(new Amount().currency("EUR").value(1000L))
260+
.merchantAccount("YOUR_MERCHANT_ACCOUNT")
261+
.reference("YOUR_ORDER_REFERENCE");
266262

267263
OrdersApi checkout = new OrdersApi(client);
268264
CreateOrderResponse checkoutCreateOrderResponse = checkout.orders(checkoutCreateOrderRequest);
@@ -273,11 +269,13 @@ public void testCreateOrderSuccessCall() throws Exception {
273269
@Test
274270
public void testCancelOrderSuccessCall() throws Exception {
275271
Client client = createMockClientFromFile("mocks/checkout/cancelOrderResponse.json");
276-
CancelOrderRequest checkoutCancelOrderRequest = new CancelOrderRequest()
277-
.merchantAccount("YOUR_MERCHANT_ACCOUNT")
278-
.order(new EncryptedOrderData()
279-
.pspReference("8815517812932012")
280-
.orderData("823fh892f8f18f4...148f13f9f3f"));
272+
CancelOrderRequest checkoutCancelOrderRequest =
273+
new CancelOrderRequest()
274+
.merchantAccount("YOUR_MERCHANT_ACCOUNT")
275+
.order(
276+
new EncryptedOrderData()
277+
.pspReference("8815517812932012")
278+
.orderData("823fh892f8f18f4...148f13f9f3f"));
281279
OrdersApi checkout = new OrdersApi(client);
282280

283281
CancelOrderResponse checkoutCancelOrderResponse =
@@ -291,10 +289,11 @@ public void testCancelOrderSuccessCall() throws Exception {
291289
@Test
292290
public void testApplePaySessionsSuccessCall() throws Exception {
293291
Client client = createMockClientFromFile("mocks/checkout/applePaySessionsResponse.json");
294-
ApplePaySessionRequest createApplePaySessionRequest = new ApplePaySessionRequest()
295-
.displayName("YOUR_MERCHANT_NAME")
296-
.domainName("YOUR_MERCHANT_DOMAIN")
297-
.merchantIdentifier("YOUR_MERCHANT_ID");
292+
ApplePaySessionRequest createApplePaySessionRequest =
293+
new ApplePaySessionRequest()
294+
.displayName("YOUR_MERCHANT_NAME")
295+
.domainName("YOUR_MERCHANT_DOMAIN")
296+
.merchantIdentifier("YOUR_MERCHANT_ID");
298297

299298
UtilityApi checkout = new UtilityApi(client);
300299
ApplePaySessionResponse applePaySessionResponse =
@@ -306,14 +305,16 @@ public void testApplePaySessionsSuccessCall() throws Exception {
306305
@Test
307306
public void testDonationsSuccessCall() throws Exception {
308307
Client client = createMockClientFromFile("mocks/checkout/donationResponse.json");
309-
DonationPaymentRequest paymentDonationRequest = new DonationPaymentRequest()
310-
.donationAccount("YOUR_DONATION_ACCOUNT")
311-
.merchantAccount("YOUR_MERCHANT_ACCOUNT")
312-
.reference("YOUR_MERCHANT_REFERENCE")
313-
.returnUrl("https://your-company.com/checkout?shopperOrder=12xy..")
314-
.countryCode("NL")
315-
.amount(new Amount().currency("EUR").value(1000L))
316-
.paymentMethod(new DonationPaymentMethod(new CardDonations().type(CardDonations.TypeEnum.SCHEME)));
308+
DonationPaymentRequest paymentDonationRequest =
309+
new DonationPaymentRequest()
310+
.donationAccount("YOUR_DONATION_ACCOUNT")
311+
.merchantAccount("YOUR_MERCHANT_ACCOUNT")
312+
.reference("YOUR_MERCHANT_REFERENCE")
313+
.returnUrl("https://your-company.com/checkout?shopperOrder=12xy..")
314+
.countryCode("NL")
315+
.amount(new Amount().currency("EUR").value(1000L))
316+
.paymentMethod(
317+
new DonationPaymentMethod(new CardDonations().type(CardDonations.TypeEnum.SCHEME)));
317318

318319
DonationsApi donationsApi = new DonationsApi(client);
319320
DonationPaymentResponse donationResponse = donationsApi.donations(paymentDonationRequest);
@@ -755,19 +756,17 @@ public void testPaymentWithIdempotencyKey() throws Exception {
755756
new PaymentRequest()
756757
.merchantAccount("YOUR_MERCHANT_ACCOUNT")
757758
.reference("YOUR_REFERENCE")
758-
.amount(new Amount()
759-
.currency("EUR")
760-
.value(1000L))
759+
.amount(new Amount().currency("EUR").value(1000L))
761760
.returnUrl("https://your-company.example.org/checkout?shopperOrder=12xy..")
762761
.paymentMethod(new CheckoutPaymentMethod(cardDetails));
763762

764763
PaymentsApi checkout = new PaymentsApi(client);
765764

766765
// set Idempotency Key
767-
RequestOptions requestOptions = new RequestOptions()
768-
.idempotencyKey("99361789-5204-4576-b123-4f9a1b2c3d45");
766+
RequestOptions requestOptions =
767+
new RequestOptions().idempotencyKey("99361789-5204-4576-b123-4f9a1b2c3d45");
769768
PaymentResponse paymentResponse = checkout.payments(paymentRequest, requestOptions);
770-
769+
771770
assertEquals("V4HZ4RBFJGXXGN82", paymentResponse.getPspReference());
772771
assertEquals(PaymentResponse.ResultCodeEnum.AUTHORISED, paymentResponse.getResultCode());
773772

@@ -780,10 +779,8 @@ public void testPaymentWithIdempotencyKey() throws Exception {
780779
eq(false),
781780
optionsCaptor.capture(),
782781
eq(ApiConstants.HttpMethod.POST),
783-
isNull()
784-
);
785-
assertEquals("99361789-5204-4576-b123-4f9a1b2c3d45", optionsCaptor.getValue().getIdempotencyKey());
786-
782+
isNull());
783+
assertEquals(
784+
"99361789-5204-4576-b123-4f9a1b2c3d45", optionsCaptor.getValue().getIdempotencyKey());
787785
}
788-
789786
}

src/test/java/com/adyen/ErrorHandlingTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public void CheckoutErrorTest() throws IOException, ApiException {
4040
ApiError apiError = e.getError();
4141
Assert.assertEquals("Validation", apiError.getErrorType());
4242
Assert.assertEquals("Invalid payment link ID", apiError.getMessage());
43-
4443
}
4544
}
4645
}

0 commit comments

Comments
 (0)