Skip to content

Commit 682c33c

Browse files
authored
chore: synced file(s) with sumup/apis (#67)
1 parent f78df43 commit 682c33c

3 files changed

Lines changed: 89 additions & 2 deletions

File tree

openapi.json

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6474,7 +6474,9 @@
64746474
"boleto",
64756475
"ideal",
64766476
"blik",
6477-
"bancontact"
6477+
"bancontact",
6478+
"google_pay",
6479+
"apple_pay"
64786480
]
64796481
},
64806482
"installments": {
@@ -6489,6 +6491,50 @@
64896491
"card": {
64906492
"$ref": "#/components/schemas/Card"
64916493
},
6494+
"google_pay": {
6495+
"description": "Raw `PaymentData` object received from Google Pay. Send the Google Pay response payload as-is.",
6496+
"type": "object",
6497+
"example": {
6498+
"apiVersionMinor": 0,
6499+
"apiVersion": 2,
6500+
"paymentMethodData": {
6501+
"description": "Visa •••• 1111",
6502+
"tokenizationData": {
6503+
"type": "PAYMENT_GATEWAY",
6504+
"token": "token-data"
6505+
},
6506+
"type": "CARD",
6507+
"info": {
6508+
"cardNetwork": "VISA",
6509+
"cardDetails": "1111"
6510+
}
6511+
}
6512+
}
6513+
},
6514+
"apple_pay": {
6515+
"description": "Raw payment token object received from Apple Pay. Send the Apple Pay response payload as-is.",
6516+
"type": "object",
6517+
"example": {
6518+
"token": {
6519+
"paymentData": {
6520+
"data": "si2xuT2ArQo689SfE-long-token",
6521+
"signature": "MIAGCSqGSIb3DQEHA-long-signature",
6522+
"header": {
6523+
"publicKeyHash": "PWfjDi3TSwgZ20TY/A7f3V6J/1rhHyRDCspbeljM0io=",
6524+
"ephemeralPublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaBtz7UN2MNV0qInJVEEhXy10PU0KfO6KxFjXm93oKWL6lCsxZZGDl/EKioUHVSlKgpsKGin0xvgldfxeJVgy0g==",
6525+
"transactionId": "62e0568bc9258e9d0e059d745650fc8211d05ef7a7a1589a6411bf9b12cdfd04"
6526+
},
6527+
"version": "EC_v1"
6528+
},
6529+
"paymentMethod": {
6530+
"displayName": "MasterCard 8837",
6531+
"network": "MasterCard",
6532+
"type": "debit"
6533+
},
6534+
"transactionIdentifier": "62E0568BC9258E9D0E059D745650FC8211D05EF7A7A1589A6411BF9B12CDFD04"
6535+
}
6536+
}
6537+
},
64926538
"token": {
64936539
"description": "__Required when using a tokenized card to process a checkout.__ Unique token identifying the saved payment card for a customer.",
64946540
"type": "string"

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

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,23 @@
55

66
/** Details of the payment instrument for processing the checkout. */
77
public record ProcessCheckout(
8+
/**
9+
* Raw payment token object received from Apple Pay. Send the Apple Pay response payload as-is.
10+
*/
11+
java.util.Map<String, Object> applePay,
12+
813
/** __Required when payment type is `card`.__ Details of the payment card. */
914
com.sumup.sdk.models.Card card,
1015

1116
/** __Required when `token` is provided.__ Unique ID of the customer. */
1217
String customerId,
1318

19+
/**
20+
* Raw `PaymentData` object received from Google Pay. Send the Google Pay response payload
21+
* as-is.
22+
*/
23+
java.util.Map<String, Object> googlePay,
24+
1425
/** Number of installments for deferred payments. Available only to merchant users in Brazil. */
1526
Long installments,
1627

@@ -39,8 +50,10 @@ public static Builder builder() {
3950

4051
/** Builder for ProcessCheckout instances. */
4152
public static final class Builder {
53+
private java.util.Map<String, Object> applePay;
4254
private com.sumup.sdk.models.Card card;
4355
private String customerId;
56+
private java.util.Map<String, Object> googlePay;
4457
private Long installments;
4558
private com.sumup.sdk.models.MandatePayload mandate;
4659
private com.sumup.sdk.models.ProcessCheckoutPaymentType paymentType;
@@ -49,6 +62,18 @@ public static final class Builder {
4962

5063
private Builder() {}
5164

65+
/**
66+
* Sets the value for {@code applePay}.
67+
*
68+
* @param applePay Raw payment token object received from Apple Pay. Send the Apple Pay response
69+
* payload as-is.
70+
* @return This builder instance.
71+
*/
72+
public Builder applePay(java.util.Map<String, Object> applePay) {
73+
this.applePay = applePay;
74+
return this;
75+
}
76+
5277
/**
5378
* Sets the value for {@code card}.
5479
*
@@ -71,6 +96,18 @@ public Builder customerId(String customerId) {
7196
return this;
7297
}
7398

99+
/**
100+
* Sets the value for {@code googlePay}.
101+
*
102+
* @param googlePay Raw `PaymentData` object received from Google Pay. Send the Google Pay
103+
* response payload as-is.
104+
* @return This builder instance.
105+
*/
106+
public Builder googlePay(java.util.Map<String, Object> googlePay) {
107+
this.googlePay = googlePay;
108+
return this;
109+
}
110+
74111
/**
75112
* Sets the value for {@code installments}.
76113
*
@@ -135,8 +172,10 @@ public Builder token(String token) {
135172
*/
136173
public ProcessCheckout build() {
137174
return new ProcessCheckout(
175+
applePay,
138176
card,
139177
customerId,
178+
googlePay,
140179
installments,
141180
mandate,
142181
Objects.requireNonNull(paymentType, "paymentType"),

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ public enum ProcessCheckoutPaymentType {
1010
BOLETO("boleto"),
1111
IDEAL("ideal"),
1212
BLIK("blik"),
13-
BANCONTACT("bancontact");
13+
BANCONTACT("bancontact"),
14+
GOOGLE_PAY("google_pay"),
15+
APPLE_PAY("apple_pay");
1416

1517
private final String value;
1618

0 commit comments

Comments
 (0)