Skip to content

Commit 143a19e

Browse files
chore: generate code
1 parent b3e7954 commit 143a19e

5 files changed

Lines changed: 91 additions & 8 deletions

File tree

src/main/java/com/sumup/sdk/clients/CheckoutsAsyncClient.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ public CheckoutsAsyncClient(ApiClient apiClient) {
4545
*
4646
* <p>Creates a new payment checkout resource. The unique `checkout_reference` created by this
4747
* request, is used for further manipulation of the checkout. For 3DS checkouts, add the
48-
* `redirect_url` parameter to your request body schema. Follow by processing a checkout to charge
49-
* the provided payment instrument.
48+
* `redirect_url` parameter to your request body schema. To use the [Hosted
49+
* Checkout](https://developer.sumup.com/online-payments/checkouts/hosted-checkout/) page, set the
50+
* `hosted_checkout.enabled` to `true`. Follow by processing a checkout to charge the provided
51+
* payment instrument.
5052
*
5153
* <p>Operation ID: CreateCheckout
5254
*
@@ -66,8 +68,10 @@ public CompletableFuture<com.sumup.sdk.models.Checkout> create(
6668
*
6769
* <p>Creates a new payment checkout resource. The unique `checkout_reference` created by this
6870
* request, is used for further manipulation of the checkout. For 3DS checkouts, add the
69-
* `redirect_url` parameter to your request body schema. Follow by processing a checkout to charge
70-
* the provided payment instrument.
71+
* `redirect_url` parameter to your request body schema. To use the [Hosted
72+
* Checkout](https://developer.sumup.com/online-payments/checkouts/hosted-checkout/) page, set the
73+
* `hosted_checkout.enabled` to `true`. Follow by processing a checkout to charge the provided
74+
* payment instrument.
7175
*
7276
* <p>Operation ID: CreateCheckout
7377
*

src/main/java/com/sumup/sdk/clients/CheckoutsClient.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ public CheckoutsClient(ApiClient apiClient) {
4444
*
4545
* <p>Creates a new payment checkout resource. The unique `checkout_reference` created by this
4646
* request, is used for further manipulation of the checkout. For 3DS checkouts, add the
47-
* `redirect_url` parameter to your request body schema. Follow by processing a checkout to charge
48-
* the provided payment instrument.
47+
* `redirect_url` parameter to your request body schema. To use the [Hosted
48+
* Checkout](https://developer.sumup.com/online-payments/checkouts/hosted-checkout/) page, set the
49+
* `hosted_checkout.enabled` to `true`. Follow by processing a checkout to charge the provided
50+
* payment instrument.
4951
*
5052
* <p>Operation ID: CreateCheckout
5153
*
@@ -65,8 +67,10 @@ public com.sumup.sdk.models.Checkout create(com.sumup.sdk.models.CheckoutCreateR
6567
*
6668
* <p>Creates a new payment checkout resource. The unique `checkout_reference` created by this
6769
* request, is used for further manipulation of the checkout. For 3DS checkouts, add the
68-
* `redirect_url` parameter to your request body schema. Follow by processing a checkout to charge
69-
* the provided payment instrument.
70+
* `redirect_url` parameter to your request body schema. To use the [Hosted
71+
* Checkout](https://developer.sumup.com/online-payments/checkouts/hosted-checkout/) page, set the
72+
* `hosted_checkout.enabled` to `true`. Follow by processing a checkout to charge the provided
73+
* payment instrument.
7074
*
7175
* <p>Operation ID: CreateCheckout
7276
*

src/main/java/com/sumup/sdk/models/Checkout.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ public record Checkout(
4141
*/
4242
String description,
4343

44+
/**
45+
* URL of the SumUp-hosted payment page that handles the payment flow. Returned when Hosted
46+
* Checkout is enabled for the checkout.
47+
*/
48+
String hostedCheckoutUrl,
49+
4450
/** Unique SumUp identifier of the checkout resource. */
4551
String id,
4652

@@ -261,6 +267,7 @@ public Checkout build() {
261267
date,
262268
description,
263269
null,
270+
null,
264271
mandate,
265272
merchantCode,
266273
returnUrl,

src/main/java/com/sumup/sdk/models/CheckoutCreateRequest.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ public record CheckoutCreateRequest(
3535
*/
3636
String description,
3737

38+
/**
39+
* Hosted Checkout configuration. Enable it to receive a SumUp-hosted payment page URL in the
40+
* checkout response.
41+
*/
42+
com.sumup.sdk.models.HostedCheckout hostedCheckout,
43+
3844
/** Merchant account that should receive the payment. */
3945
String merchantCode,
4046

@@ -82,6 +88,7 @@ public static final class Builder {
8288
private com.sumup.sdk.models.Currency currency;
8389
private String customerId;
8490
private String description;
91+
private com.sumup.sdk.models.HostedCheckout hostedCheckout;
8592
private String merchantCode;
8693
private com.sumup.sdk.models.CheckoutCreateRequestPurpose purpose;
8794
private String redirectUrl;
@@ -149,6 +156,18 @@ public Builder description(String description) {
149156
return this;
150157
}
151158

159+
/**
160+
* Sets the value for {@code hostedCheckout}.
161+
*
162+
* @param hostedCheckout Hosted Checkout configuration. Enable it to receive a SumUp-hosted
163+
* payment page URL in the checkout response.
164+
* @return This builder instance.
165+
*/
166+
public Builder hostedCheckout(com.sumup.sdk.models.HostedCheckout hostedCheckout) {
167+
this.hostedCheckout = hostedCheckout;
168+
return this;
169+
}
170+
152171
/**
153172
* Sets the value for {@code merchantCode}.
154173
*
@@ -227,6 +246,7 @@ public CheckoutCreateRequest build() {
227246
Objects.requireNonNull(currency, "currency"),
228247
customerId,
229248
description,
249+
hostedCheckout,
230250
Objects.requireNonNull(merchantCode, "merchantCode"),
231251
purpose,
232252
redirectUrl,
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Code generated by sumup-java/codegen. DO NOT EDIT.
2+
package com.sumup.sdk.models;
3+
4+
import java.util.Objects;
5+
6+
/**
7+
* Hosted Checkout configuration. Enable it to receive a SumUp-hosted payment page URL in the
8+
* checkout response.
9+
*/
10+
public record HostedCheckout(
11+
/** Whether the checkout should include a SumUp-hosted payment page. */
12+
Boolean enabled) {
13+
/**
14+
* Creates a builder for HostedCheckout.
15+
*
16+
* @return Builder that constructs immutable HostedCheckout instances.
17+
*/
18+
public static Builder builder() {
19+
return new Builder();
20+
}
21+
22+
/** Builder for HostedCheckout instances. */
23+
public static final class Builder {
24+
private Boolean enabled;
25+
26+
private Builder() {}
27+
28+
/**
29+
* Sets the value for {@code enabled}.
30+
*
31+
* @param enabled Whether the checkout should include a SumUp-hosted payment page.
32+
* @return This builder instance.
33+
*/
34+
public Builder enabled(Boolean enabled) {
35+
this.enabled = enabled;
36+
return this;
37+
}
38+
39+
/**
40+
* Builds an immutable HostedCheckout instance.
41+
*
42+
* @return Immutable HostedCheckout.
43+
*/
44+
public HostedCheckout build() {
45+
return new HostedCheckout(Objects.requireNonNull(enabled, "enabled"));
46+
}
47+
}
48+
}

0 commit comments

Comments
 (0)