diff --git a/openapi.json b/openapi.json index 8817b48..fcbcfc7 100755 --- a/openapi.json +++ b/openapi.json @@ -855,407 +855,6 @@ } } }, - "put": { - "operationId": "ProcessCheckout", - "summary": "Process a checkout", - "description": "Processing a checkout will attempt to charge the provided payment instrument for the amount of the specified checkout resource initiated in the `Create a checkout` endpoint.\n\nFollow this request with `Retrieve a checkout` to confirm its status.", - "tags": [ - "Checkouts" - ], - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "payments", - "checkouts.write" - ] - } - ], - "x-codegen": { - "method_name": "process" - }, - "x-scopes": [ - "payments", - "checkouts.write" - ], - "requestBody": { - "required": true, - "description": "Details of the payment instrument for processing the checkout.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessCheckout" - }, - "examples": { - "ProcessCard": { - "description": "Process a checkout with a card", - "value": { - "payment_type": "card", - "installments": 1, - "mandate": { - "type": "recurrent", - "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36", - "user_ip": "172.217.169.174" - }, - "card": { - "type": "VISA", - "name": "John Doe", - "number": "1234567890123456", - "expiry_year": "2023", - "expiry_month": "01", - "cvv": "123", - "zip_code": "12345" - } - } - }, - "ProcessToken": { - "description": "Process a checkout with a token", - "value": { - "payment_type": "card", - "installments": 1, - "token": "ba85dfee-c3cf-48a6-84f5-d7d761fbba50", - "customer_id": "MEDKHDTI" - } - }, - "ProcessBoleto": { - "description": "Process a checkout with Boleto", - "value": { - "payment_type": "boleto", - "personal_details": { - "email": "user@example.com", - "first_name": "John", - "last_name": "Doe", - "tax_id": "423.378.593-47", - "address": { - "country": "BR", - "city": "São Paulo", - "line1": "Rua Gilberto Sabino, 215", - "state": "SP", - "postal_code": "05425-020" - } - } - } - }, - "ProcessiDeal": { - "description": "Process a checkout with iDeal", - "value": { - "payment_type": "ideal", - "personal_details": { - "email": "user@example.com", - "first_name": "John", - "last_name": "Doe", - "address": { - "country": "NL" - } - } - } - }, - "ProcessBancontact": { - "description": "Process a checkout with Bancontact", - "value": { - "payment_type": "bancontact", - "personal_details": { - "email": "user@example.com", - "first_name": "John", - "last_name": "Doe", - "address": { - "country": "BE" - } - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Returns the checkout resource after a processing attempt.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutSuccess" - }, - "examples": { - "CheckoutSuccessCard": { - "description": "Successfully processed checkout with a card", - "value": { - "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", - "amount": 10.1, - "currency": "EUR", - "merchant_code": "MH4H92C7", - "description": "Purchase", - "return_url": "http://example.com", - "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", - "status": "PENDING", - "date": "2020-02-29T10:56:56+00:00", - "valid_until": "2020-02-29T10:56:56+00:00", - "customer_id": "831ff8d4cd5958ab5670", - "mandate": { - "type": "recurrent", - "status": "active", - "merchant_code": "MH4H92C7" - }, - "transactions": [ - { - "id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", - "transaction_code": "TEENSK4W2K", - "amount": 10.1, - "currency": "EUR", - "timestamp": "2020-02-29T10:56:56.876Z", - "status": "SUCCESSFUL", - "payment_type": "ECOM", - "installments_count": 1, - "merchant_code": "MH4H92C7", - "vat_amount": 6, - "tip_amount": 3, - "entry_mode": "CUSTOMER_ENTRY", - "auth_code": "053201" - } - ], - "transaction_code": "TEENSK4W2K", - "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4" - } - }, - "CheckoutSuccessToken": { - "description": "Successfully processed checkout with a token", - "value": { - "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", - "amount": 10.1, - "currency": "EUR", - "merchant_code": "MH4H92C7", - "description": "Purchase with token", - "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", - "status": "PENDING", - "date": "2020-02-29T10:56:56+00:00", - "transaction_code": "TEENSK4W2K", - "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", - "merchant_name": "Sample Merchant", - "redirect_url": "https://mysite.com/completed_purchase", - "customer_id": "831ff8d4cd5958ab5670", - "payment_instrument": { - "token": "e76d7e5c-9375-4fac-a7e7-b19dc5302fbc" - }, - "transactions": [ - { - "id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", - "transaction_code": "TEENSK4W2K", - "amount": 10.1, - "currency": "EUR", - "timestamp": "2020-02-29T10:56:56.876Z", - "status": "SUCCESSFUL", - "payment_type": "ECOM", - "installments_count": 1, - "merchant_code": "MH4H92C7", - "vat_amount": 6, - "tip_amount": 3, - "entry_mode": "CUSTOMER_ENTRY", - "auth_code": "053201" - } - ] - } - }, - "CheckoutSuccessBoleto": { - "description": "Successfully processed checkout with Boleto", - "value": { - "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", - "amount": 10.1, - "currency": "BRL", - "merchant_code": "MH4H92C7", - "description": "Boleto checkout", - "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", - "status": "PENDING", - "date": "2021-07-06T12:34:02.000+00:00", - "merchant_name": "Sample shop", - "boleto": { - "barcode": "34191090081790614310603072340007886840000000200", - "url": "https://checkouts.sample.com/v0.1/checkouts/2e7a36cc-7897-446b-a966-952ab5f049ea/boleto" - }, - "redirect_url": "https://website.com", - "purpose": "CHECKOUT", - "transactions": [ - { - "id": "debd2986-9852-4e86-8a8e-7ea9c87dd679", - "transaction_code": "TEN3E696NP", - "merchant_code": "MH4H92C9", - "amount": 10.1, - "vat_amount": 6, - "tip_amount": 3, - "currency": "BRL", - "timestamp": "2021-07-06T12:34:16.460+00:00", - "status": "PENDING", - "payment_type": "BOLETO", - "entry_mode": "BOLETO", - "installments_count": 1 - } - ] - } - }, - "CheckoutSuccessiDeal": { - "description": "Successfully processed checkout with iDeal", - "value": { - "next_step": { - "url": "https://r3.girogate.de/ti/simideal", - "method": "GET", - "payload": { - "tx": "961473700", - "rs": "ILnaUeQTKJ184fVrjGILrLjePX9E4rmz", - "cs": "c8bc0ea231f8372431ca22d6f8319f8de0263d0b1705759ed27155f245f193c5" - }, - "full": "https://r3.girogate.de/ti/simideal?tx=961473700\u0026rs=ILnaUeQTKJ184fVrjGILrLjePX9E4rmz\u0026cs=c8bc0ea231f8372431ca22d6f8319f8de0263d0b1705759ed27155f245f193c5", - "mechanism": [ - "browser" - ] - } - } - }, - "CheckoutSuccessBancontact": { - "description": "Successfully processed checkout with Bancontact", - "value": { - "next_step": { - "url": "https://r3.girogate.de/ti/simbcmc", - "method": "GET", - "payload": { - "tx": "624788471", - "rs": "5MioXoKt2Gwj9dLgqAX1bMRBuT5xTSdB", - "cs": "697edacdd9175f3f99542500fa0ff08280b66aaff3c2641a2e212e4b039473cc" - }, - "full": "https://r3.girogate.de/ti/simbcmc?tx=624788471\u0026rs=5MioXoKt2Gwj9dLgqAX1bMRBuT5xTSdB\u0026cs=697edacdd9175f3f99542500fa0ff08280b66aaff3c2641a2e212e4b039473cc", - "mechanism": [ - "browser" - ] - } - } - } - } - } - } - }, - "202": { - "description": "Returns the next required action for asynchronous checkout processing.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutAccepted" - } - } - } - }, - "400": { - "description": "The request body is invalid for processing the checkout.", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/ErrorExtended" - }, - { - "type": "array", - "description": "List of error messages.", - "items": { - "$ref": "#/components/schemas/ErrorExtended" - } - } - ] - }, - "examples": { - "Invalid_Parameter": { - "description": "A required parameter has an invalid value.", - "value": { - "message": "Validation error", - "error_code": "INVALID", - "param": "card.expiry_year" - } - }, - "Multiple_Invalid_Parameters": { - "description": "Multiple required parameters have invalid values.", - "value": [ - { - "error_code": "INVALID", - "message": "Validation error", - "param": "card.name" - }, - { - "error_code": "INVALID", - "message": "Validation error", - "param": "card.number" - }, - { - "error_code": "INVALID", - "message": "Validation error", - "param": "card.expiry_year" - } - ] - } - } - } - } - }, - "401": { - "description": "The request is not authorized.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "examples": { - "Problem_Details": { - "description": "Unauthorized response returned by API gateway.", - "value": { - "detail": "Unauthorized.", - "status": 401, - "title": "Unauthorized", - "trace_id": "3c77294349d3b5647ea2d990f0d8f017", - "type": "https://developer.sumup.com/problem/unauthorized" - } - } - } - } - } - }, - "404": { - "description": "The requested resource does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "Not_Found": { - "description": "The identified resource is not found on the server.", - "value": { - "error_code": "NOT_FOUND", - "message": "Resource not found" - } - } - } - } - } - }, - "409": { - "description": "The request conflicts with the current state of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "Checkout_Processed": { - "description": "The identified checkout resource is already processed.", - "value": { - "error_code": "CHECKOUT_PROCESSED", - "message": "Checkout is already processed" - } - } - } - } - } - } - } - }, "delete": { "operationId": "DeactivateCheckout", "summary": "Deactivate a checkout", @@ -6139,85 +5738,11 @@ "example": "10115" }, "state": { - "type": "string", - "description": "State name or abbreviation from the address.", - "example": "Berlin" - } - } - }, - "Card": { - "title": "Card", - "type": "object", - "description": "__Required when payment type is `card`.__ Details of the payment card.", - "properties": { - "name": { - "type": "string", - "description": "Name of the cardholder as it appears on the payment card.", - "writeOnly": true, - "example": "FIRSTNAME LASTNAME" - }, - "number": { - "type": "string", - "description": "Number of the payment card (without spaces).", - "writeOnly": true, - "example": "1234567890123456" - }, - "expiry_year": { - "type": "string", - "description": "Year from the expiration time of the payment card. Accepted formats are `YY` and `YYYY`.", - "writeOnly": true, - "minLength": 2, - "maxLength": 4, - "example": "2023" - }, - "expiry_month": { - "type": "string", - "description": "Month from the expiration time of the payment card. Accepted format is `MM`.", - "writeOnly": true, - "example": "12", - "enum": [ - "01", - "02", - "03", - "04", - "05", - "06", - "07", - "08", - "09", - "10", - "11", - "12" - ] - }, - "cvv": { - "type": "string", - "description": "Three or four-digit card verification value (security code) of the payment card.", - "writeOnly": true, - "maxLength": 4, - "minLength": 3, - "example": "123" - }, - "zip_code": { - "type": "string", - "description": "Required five-digit ZIP code. Applicable only to merchant users in the USA.", - "writeOnly": true, - "maxLength": 5, - "minLength": 5, - "example": "12345" - }, - "type": { - "$ref": "#/components/schemas/CardType" + "type": "string", + "description": "State name or abbreviation from the address.", + "example": "Berlin" } - }, - "required": [ - "name", - "number", - "expiry_month", - "expiry_year", - "cvv", - "type" - ] + } }, "CardResponse": { "title": "Card Response", @@ -6538,100 +6063,6 @@ } } }, - "ProcessCheckout": { - "title": "Process Checkout", - "type": "object", - "description": "Request body for attempting payment on an existing checkout. The required companion fields depend on the selected `payment_type`, for example card details, saved-card data, or payer information required by a specific payment method.", - "properties": { - "payment_type": { - "type": "string", - "description": "Payment method used for this processing attempt. It determines which additional request fields are required.", - "enum": [ - "card", - "boleto", - "ideal", - "blik", - "bancontact", - "google_pay", - "apple_pay" - ], - "example": "card" - }, - "installments": { - "type": "integer", - "description": "Number of installments for deferred payments. Available only to merchant users in Brazil.", - "minimum": 1, - "maximum": 12, - "example": 1 - }, - "mandate": { - "$ref": "#/components/schemas/MandatePayload" - }, - "card": { - "$ref": "#/components/schemas/Card" - }, - "google_pay": { - "type": "object", - "description": "Raw `PaymentData` object received from Google Pay. Send the Google Pay response payload as-is.", - "example": { - "apiVersionMinor": 0, - "apiVersion": 2, - "paymentMethodData": { - "description": "Visa •••• 1111", - "tokenizationData": { - "type": "PAYMENT_GATEWAY", - "token": "token-data" - }, - "type": "CARD", - "info": { - "cardNetwork": "VISA", - "cardDetails": "1111" - } - } - } - }, - "apple_pay": { - "type": "object", - "description": "Raw payment token object received from Apple Pay. Send the Apple Pay response payload as-is.", - "example": { - "token": { - "paymentData": { - "data": "si2xuT2ArQo689SfE-long-token", - "signature": "MIAGCSqGSIb3DQEHA-long-signature", - "header": { - "publicKeyHash": "PWfjDi3TSwgZ20TY/A7f3V6J/1rhHyRDCspbeljM0io=", - "ephemeralPublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaBtz7UN2MNV0qInJVEEhXy10PU0KfO6KxFjXm93oKWL6lCsxZZGDl/EKioUHVSlKgpsKGin0xvgldfxeJVgy0g==", - "transactionId": "62e0568bc9258e9d0e059d745650fc8211d05ef7a7a1589a6411bf9b12cdfd04" - }, - "version": "EC_v1" - }, - "paymentMethod": { - "displayName": "MasterCard 8837", - "network": "MasterCard", - "type": "debit" - }, - "transactionIdentifier": "62E0568BC9258E9D0E059D745650FC8211D05EF7A7A1589A6411BF9B12CDFD04" - } - } - }, - "token": { - "type": "string", - "description": "Saved-card token to use instead of raw card details when processing with a previously stored payment instrument.", - "example": "ba85dfee-c3cf-48a6-84f5-d7d761fbba50" - }, - "customer_id": { - "type": "string", - "description": "Customer identifier associated with the saved payment instrument. Required when `token` is provided.", - "example": "MEDKHDTI" - }, - "personal_details": { - "$ref": "#/components/schemas/PersonalDetails" - } - }, - "required": [ - "payment_type" - ] - }, "CheckoutSuccess": { "title": "Checkout Success", "description": "Checkout resource returned after a synchronous processing attempt. In addition to the base checkout fields, it can include the resulting transaction identifiers and any newly created payment instrument token.", @@ -6679,60 +6110,6 @@ } ] }, - "CheckoutAccepted": { - "title": "Checkout Accepted", - "type": "object", - "description": "Response returned when checkout processing requires an additional payer action, such as a 3DS challenge or a redirect to an external payment method page.", - "properties": { - "next_step": { - "type": "object", - "description": "Instructions for the next action the payer or client must take.", - "properties": { - "url": { - "type": "string", - "example": "https://dummy-3ds-gateway.com/cap?RID=1233\u0026VAA=A", - "description": "URL to open or submit in order to continue processing." - }, - "method": { - "type": "string", - "example": "POST", - "description": "HTTP method to use when following the next step." - }, - "redirect_url": { - "type": "string", - "example": "https://mysite.com/completed_purchase", - "description": "Merchant URL where the payer returns after the external flow finishes." - }, - "mechanism": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "iframe", - "browser" - ] - }, - "description": "Allowed presentation mechanisms for the next step. `iframe` means the flow can be embedded, while `browser` means it can be completed through a full-page redirect.", - "example": [ - "iframe" - ] - }, - "payload": { - "type": "object", - "description": "Parameters required to complete the next step. The exact keys depend on the payment provider and flow type.", - "additionalProperties": { - "type": "string" - }, - "example": { - "PaReq": "eJxVUttu2zAM/RXDr4MjyY5dO6BVuE27FZuDZHGG9VGRmMSFb/Wljff1k9KkF0APPCR1eHQouD6WhfWCbZfXVWyzCbUtrGSt8mof25vs3gltq+tFpURRVxjbI3b2NYfs0CLO1yiHFjmk2HVij1auYrsRW1+F0U4qZxfKwJlur4QTYcQcJoIdc+XO2/poc1gmv/GZw3k216MnLpAL1JytPIiq5yDk883Dgk+DwPV9IGcIJbYPc84o1Ye6lHqu5wVA3tJQiRL5eiiHxlqKscSq76xfeZn3qICciiDroerbkYeuvnYBMLQFP/R9MyOkM9cnCoGYJJAPScvBRJ0mOeaKr/6l08XT6jXN7tx0vvHSbOMtsj1dzB9jIKYDlOiRu1omYyy0WDCj0YxFQE55EKWZzj2f6ee9xdCYEcmnwucEaN9bvaeRR1ehFn9BgMdGr0l3aCvfYyAfem9/GENlrz36ufpTBPTv07r8lm3qpPiOo1y/7u+SJImNzacmw5hrX1wt/kRpABBDQ84bJOf16+jLt/gPhUvGGw==", - "MD": "b1a536c0-29b9-11eb-adc1-0242ac120002", - "TermUrl": "https://api.sumup.com/v0.1/checkouts/e552de3b-1777-4c91-bdb8-756967678572/complete_payment" - } - } - } - } - } - }, "Customer": { "type": "object", "title": "Customer", @@ -7090,40 +6467,6 @@ "href" ] }, - "MandatePayload": { - "title": "Mandate Payload", - "type": "object", - "description": "Mandate details used when a checkout should create a reusable card token for future recurring or merchant-initiated payments.", - "properties": { - "type": { - "type": "string", - "description": "Type of mandate to create for the saved payment instrument.", - "enum": [ - "recurrent" - ], - "example": "recurrent" - }, - "user_agent": { - "type": "string", - "description": "Browser or client user agent observed when consent was collected.", - "example": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36" - }, - "user_ip": { - "type": "string", - "description": "IP address of the payer when the mandate was accepted.", - "example": "172.217.169.174" - } - }, - "required": [ - "type", - "user_agent" - ], - "example": { - "type": "recurrent", - "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36", - "user_ip": "172.217.169.174" - } - }, "MandateResponse": { "title": "Mandate Response", "type": "object", @@ -9094,7 +8437,7 @@ }, "value": { "type": "string", - "description": "The company identifier value.", + "description": "The personal identifier value.", "example": "847.060.136-90", "maxLength": 128 } @@ -10570,96 +9913,6 @@ } } }, - "CheckoutProcess": { - "required": true, - "description": "Details of the payment instrument for processing the checkout.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessCheckout" - }, - "examples": { - "ProcessCard": { - "description": "Process a checkout with a card", - "value": { - "payment_type": "card", - "installments": 1, - "mandate": { - "type": "recurrent", - "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36", - "user_ip": "172.217.169.174" - }, - "card": { - "type": "VISA", - "name": "John Doe", - "number": "1234567890123456", - "expiry_year": "2023", - "expiry_month": "01", - "cvv": "123", - "zip_code": "12345" - } - } - }, - "ProcessToken": { - "description": "Process a checkout with a token", - "value": { - "payment_type": "card", - "installments": 1, - "token": "ba85dfee-c3cf-48a6-84f5-d7d761fbba50", - "customer_id": "MEDKHDTI" - } - }, - "ProcessBoleto": { - "description": "Process a checkout with Boleto", - "value": { - "payment_type": "boleto", - "personal_details": { - "email": "user@example.com", - "first_name": "John", - "last_name": "Doe", - "tax_id": "423.378.593-47", - "address": { - "country": "BR", - "city": "São Paulo", - "line1": "Rua Gilberto Sabino, 215", - "state": "SP", - "postal_code": "05425-020" - } - } - } - }, - "ProcessiDeal": { - "description": "Process a checkout with iDeal", - "value": { - "payment_type": "ideal", - "personal_details": { - "email": "user@example.com", - "first_name": "John", - "last_name": "Doe", - "address": { - "country": "NL" - } - } - } - }, - "ProcessBancontact": { - "description": "Process a checkout with Bancontact", - "value": { - "payment_type": "bancontact", - "personal_details": { - "email": "user@example.com", - "first_name": "John", - "last_name": "Doe", - "address": { - "country": "BE" - } - } - } - } - } - } - } - }, "CustomerCreate": { "required": true, "description": "Details of the customer.", @@ -10922,178 +10175,6 @@ } } }, - "CheckoutProcess": { - "description": "Returns the checkout resource after a processing attempt.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutSuccess" - }, - "examples": { - "CheckoutSuccessCard": { - "description": "Successfully processed checkout with a card", - "value": { - "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", - "amount": 10.1, - "currency": "EUR", - "merchant_code": "MH4H92C7", - "description": "Purchase", - "return_url": "http://example.com", - "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", - "status": "PENDING", - "date": "2020-02-29T10:56:56+00:00", - "valid_until": "2020-02-29T10:56:56+00:00", - "customer_id": "831ff8d4cd5958ab5670", - "mandate": { - "type": "recurrent", - "status": "active", - "merchant_code": "MH4H92C7" - }, - "transactions": [ - { - "id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", - "transaction_code": "TEENSK4W2K", - "amount": 10.1, - "currency": "EUR", - "timestamp": "2020-02-29T10:56:56.876Z", - "status": "SUCCESSFUL", - "payment_type": "ECOM", - "installments_count": 1, - "merchant_code": "MH4H92C7", - "vat_amount": 6, - "tip_amount": 3, - "entry_mode": "CUSTOMER_ENTRY", - "auth_code": "053201" - } - ], - "transaction_code": "TEENSK4W2K", - "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4" - } - }, - "CheckoutSuccessToken": { - "description": "Successfully processed checkout with a token", - "value": { - "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", - "amount": 10.1, - "currency": "EUR", - "merchant_code": "MH4H92C7", - "description": "Purchase with token", - "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", - "status": "PENDING", - "date": "2020-02-29T10:56:56+00:00", - "transaction_code": "TEENSK4W2K", - "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", - "merchant_name": "Sample Merchant", - "redirect_url": "https://mysite.com/completed_purchase", - "customer_id": "831ff8d4cd5958ab5670", - "payment_instrument": { - "token": "e76d7e5c-9375-4fac-a7e7-b19dc5302fbc" - }, - "transactions": [ - { - "id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", - "transaction_code": "TEENSK4W2K", - "amount": 10.1, - "currency": "EUR", - "timestamp": "2020-02-29T10:56:56.876Z", - "status": "SUCCESSFUL", - "payment_type": "ECOM", - "installments_count": 1, - "merchant_code": "MH4H92C7", - "vat_amount": 6, - "tip_amount": 3, - "entry_mode": "CUSTOMER_ENTRY", - "auth_code": "053201" - } - ] - } - }, - "CheckoutSuccessBoleto": { - "description": "Successfully processed checkout with Boleto", - "value": { - "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", - "amount": 10.1, - "currency": "BRL", - "merchant_code": "MH4H92C7", - "description": "Boleto checkout", - "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", - "status": "PENDING", - "date": "2021-07-06T12:34:02.000+00:00", - "merchant_name": "Sample shop", - "boleto": { - "barcode": "34191090081790614310603072340007886840000000200", - "url": "https://checkouts.sample.com/v0.1/checkouts/2e7a36cc-7897-446b-a966-952ab5f049ea/boleto" - }, - "redirect_url": "https://website.com", - "purpose": "CHECKOUT", - "transactions": [ - { - "id": "debd2986-9852-4e86-8a8e-7ea9c87dd679", - "transaction_code": "TEN3E696NP", - "merchant_code": "MH4H92C9", - "amount": 10.1, - "vat_amount": 6, - "tip_amount": 3, - "currency": "BRL", - "timestamp": "2021-07-06T12:34:16.460+00:00", - "status": "PENDING", - "payment_type": "BOLETO", - "entry_mode": "BOLETO", - "installments_count": 1 - } - ] - } - }, - "CheckoutSuccessiDeal": { - "description": "Successfully processed checkout with iDeal", - "value": { - "next_step": { - "url": "https://r3.girogate.de/ti/simideal", - "method": "GET", - "payload": { - "tx": "961473700", - "rs": "ILnaUeQTKJ184fVrjGILrLjePX9E4rmz", - "cs": "c8bc0ea231f8372431ca22d6f8319f8de0263d0b1705759ed27155f245f193c5" - }, - "full": "https://r3.girogate.de/ti/simideal?tx=961473700\u0026rs=ILnaUeQTKJ184fVrjGILrLjePX9E4rmz\u0026cs=c8bc0ea231f8372431ca22d6f8319f8de0263d0b1705759ed27155f245f193c5", - "mechanism": [ - "browser" - ] - } - } - }, - "CheckoutSuccessBancontact": { - "description": "Successfully processed checkout with Bancontact", - "value": { - "next_step": { - "url": "https://r3.girogate.de/ti/simbcmc", - "method": "GET", - "payload": { - "tx": "624788471", - "rs": "5MioXoKt2Gwj9dLgqAX1bMRBuT5xTSdB", - "cs": "697edacdd9175f3f99542500fa0ff08280b66aaff3c2641a2e212e4b039473cc" - }, - "full": "https://r3.girogate.de/ti/simbcmc?tx=624788471\u0026rs=5MioXoKt2Gwj9dLgqAX1bMRBuT5xTSdB\u0026cs=697edacdd9175f3f99542500fa0ff08280b66aaff3c2641a2e212e4b039473cc", - "mechanism": [ - "browser" - ] - } - } - } - } - } - } - }, - "CheckoutProcessAccepted": { - "description": "Returns the next required action for asynchronous checkout processing.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutAccepted" - } - } - } - }, "Customer": { "description": "Returns the customer resource.", "content": { diff --git a/src/main/java/com/sumup/sdk/clients/CheckoutsAsyncClient.java b/src/main/java/com/sumup/sdk/clients/CheckoutsAsyncClient.java index 1bc1b71..3f5894c 100644 --- a/src/main/java/com/sumup/sdk/clients/CheckoutsAsyncClient.java +++ b/src/main/java/com/sumup/sdk/clients/CheckoutsAsyncClient.java @@ -407,63 +407,6 @@ public CompletableFuture> l requestOptions); } - /** - * Process a checkout - * - *

Processing a checkout will attempt to charge the provided payment instrument for the amount - * of the specified checkout resource initiated in the `Create a checkout` endpoint. Follow this - * request with `Retrieve a checkout` to confirm its status. - * - *

Operation ID: ProcessCheckout - * - * @param checkoutId Unique identifier of the checkout resource. - * @param request Details of the payment instrument for processing the checkout. - *

Call the overload that accepts RequestOptions to customize headers, authorization, or - * request timeout. - * @return CompletableFuture resolved with com.sumup.sdk.models.CheckoutSuccess parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture process( - String checkoutId, com.sumup.sdk.models.ProcessCheckout request) throws ApiException { - return process(checkoutId, request, null); - } - - /** - * Process a checkout - * - *

Processing a checkout will attempt to charge the provided payment instrument for the amount - * of the specified checkout resource initiated in the `Create a checkout` endpoint. Follow this - * request with `Retrieve a checkout` to confirm its status. - * - *

Operation ID: ProcessCheckout - * - * @param checkoutId Unique identifier of the checkout resource. - * @param request Details of the payment instrument for processing the checkout. - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return CompletableFuture resolved with com.sumup.sdk.models.CheckoutSuccess parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture process( - String checkoutId, - com.sumup.sdk.models.ProcessCheckout request, - RequestOptions requestOptions) - throws ApiException { - Objects.requireNonNull(checkoutId, "checkoutId"); - Objects.requireNonNull(request, "request"); - String path = "/v0.1/checkouts/{checkout_id}"; - path = path.replace("{checkout_id}", ApiClient.urlEncode(ApiClient.parameterValue(checkoutId))); - - return this.apiClient.sendAsync( - HttpMethod.PUT, - path, - null, - null, - request, - new TypeReference() {}, - requestOptions); - } - /** * Update a checkout * diff --git a/src/main/java/com/sumup/sdk/clients/CheckoutsClient.java b/src/main/java/com/sumup/sdk/clients/CheckoutsClient.java index f150329..5dfc7cc 100644 --- a/src/main/java/com/sumup/sdk/clients/CheckoutsClient.java +++ b/src/main/java/com/sumup/sdk/clients/CheckoutsClient.java @@ -395,63 +395,6 @@ public com.sumup.sdk.models.GetPaymentMethodsResponse listAvailablePaymentMethod requestOptions); } - /** - * Process a checkout - * - *

Processing a checkout will attempt to charge the provided payment instrument for the amount - * of the specified checkout resource initiated in the `Create a checkout` endpoint. Follow this - * request with `Retrieve a checkout` to confirm its status. - * - *

Operation ID: ProcessCheckout - * - * @param checkoutId Unique identifier of the checkout resource. - * @param request Details of the payment instrument for processing the checkout. - *

Call the overload that accepts RequestOptions to customize headers, authorization, or - * request timeout. - * @return com.sumup.sdk.models.CheckoutSuccess parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.CheckoutSuccess process( - String checkoutId, com.sumup.sdk.models.ProcessCheckout request) throws ApiException { - return process(checkoutId, request, null); - } - - /** - * Process a checkout - * - *

Processing a checkout will attempt to charge the provided payment instrument for the amount - * of the specified checkout resource initiated in the `Create a checkout` endpoint. Follow this - * request with `Retrieve a checkout` to confirm its status. - * - *

Operation ID: ProcessCheckout - * - * @param checkoutId Unique identifier of the checkout resource. - * @param request Details of the payment instrument for processing the checkout. - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return com.sumup.sdk.models.CheckoutSuccess parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.CheckoutSuccess process( - String checkoutId, - com.sumup.sdk.models.ProcessCheckout request, - RequestOptions requestOptions) - throws ApiException { - Objects.requireNonNull(checkoutId, "checkoutId"); - Objects.requireNonNull(request, "request"); - String path = "/v0.1/checkouts/{checkout_id}"; - path = path.replace("{checkout_id}", ApiClient.urlEncode(ApiClient.parameterValue(checkoutId))); - - return this.apiClient.send( - HttpMethod.PUT, - path, - null, - null, - request, - new TypeReference() {}, - requestOptions); - } - /** * Update a checkout * diff --git a/src/main/java/com/sumup/sdk/models/Card.java b/src/main/java/com/sumup/sdk/models/Card.java deleted file mode 100644 index ab06495..0000000 --- a/src/main/java/com/sumup/sdk/models/Card.java +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import java.util.Objects; - -/** __Required when payment type is `card`.__ Details of the payment card. */ -public record Card( - /** Three or four-digit card verification value (security code) of the payment card. */ - String cvv, - - /** Month from the expiration time of the payment card. Accepted format is `MM`. */ - com.sumup.sdk.models.CardExpiryMonth expiryMonth, - - /** Year from the expiration time of the payment card. Accepted formats are `YY` and `YYYY`. */ - String expiryYear, - - /** Name of the cardholder as it appears on the payment card. */ - String name, - - /** Number of the payment card (without spaces). */ - String number, - - /** Issuing card network of the payment card used for the transaction. */ - com.sumup.sdk.models.CardType type, - - /** Required five-digit ZIP code. Applicable only to merchant users in the USA. */ - String zipCode) { - /** - * Creates a builder for Card. - * - * @return Builder that constructs immutable Card instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for Card instances. */ - public static final class Builder { - private String cvv; - private com.sumup.sdk.models.CardExpiryMonth expiryMonth; - private String expiryYear; - private String name; - private String number; - private com.sumup.sdk.models.CardType type; - private String zipCode; - - private Builder() {} - - /** - * Sets the value for {@code cvv}. - * - * @param cvv Three or four-digit card verification value (security code) of the payment card. - * @return This builder instance. - */ - public Builder cvv(String cvv) { - this.cvv = cvv; - return this; - } - - /** - * Sets the value for {@code expiryMonth}. - * - * @param expiryMonth Month from the expiration time of the payment card. Accepted format is - * `MM`. - * @return This builder instance. - */ - public Builder expiryMonth(com.sumup.sdk.models.CardExpiryMonth expiryMonth) { - this.expiryMonth = expiryMonth; - return this; - } - - /** - * Sets the value for {@code expiryYear}. - * - * @param expiryYear Year from the expiration time of the payment card. Accepted formats are - * `YY` and `YYYY`. - * @return This builder instance. - */ - public Builder expiryYear(String expiryYear) { - this.expiryYear = expiryYear; - return this; - } - - /** - * Sets the value for {@code name}. - * - * @param name Name of the cardholder as it appears on the payment card. - * @return This builder instance. - */ - public Builder name(String name) { - this.name = name; - return this; - } - - /** - * Sets the value for {@code number}. - * - * @param number Number of the payment card (without spaces). - * @return This builder instance. - */ - public Builder number(String number) { - this.number = number; - return this; - } - - /** - * Sets the value for {@code type}. - * - * @param type Issuing card network of the payment card used for the transaction. - * @return This builder instance. - */ - public Builder type(com.sumup.sdk.models.CardType type) { - this.type = type; - return this; - } - - /** - * Sets the value for {@code zipCode}. - * - * @param zipCode Required five-digit ZIP code. Applicable only to merchant users in the USA. - * @return This builder instance. - */ - public Builder zipCode(String zipCode) { - this.zipCode = zipCode; - return this; - } - - /** - * Builds an immutable Card instance. - * - * @return Immutable Card. - */ - public Card build() { - return new Card( - Objects.requireNonNull(cvv, "cvv"), - Objects.requireNonNull(expiryMonth, "expiryMonth"), - Objects.requireNonNull(expiryYear, "expiryYear"), - Objects.requireNonNull(name, "name"), - Objects.requireNonNull(number, "number"), - Objects.requireNonNull(type, "type"), - zipCode); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/CardExpiryMonth.java b/src/main/java/com/sumup/sdk/models/CardExpiryMonth.java deleted file mode 100644 index 6fdd43f..0000000 --- a/src/main/java/com/sumup/sdk/models/CardExpiryMonth.java +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; - -/** Month from the expiration time of the payment card. Accepted format is `MM`. */ -public final class CardExpiryMonth { - public static final CardExpiryMonth VALUE_01 = new CardExpiryMonth("01"); - public static final CardExpiryMonth VALUE_02 = new CardExpiryMonth("02"); - public static final CardExpiryMonth VALUE_03 = new CardExpiryMonth("03"); - public static final CardExpiryMonth VALUE_04 = new CardExpiryMonth("04"); - public static final CardExpiryMonth VALUE_05 = new CardExpiryMonth("05"); - public static final CardExpiryMonth VALUE_06 = new CardExpiryMonth("06"); - public static final CardExpiryMonth VALUE_07 = new CardExpiryMonth("07"); - public static final CardExpiryMonth VALUE_08 = new CardExpiryMonth("08"); - public static final CardExpiryMonth VALUE_09 = new CardExpiryMonth("09"); - public static final CardExpiryMonth VALUE_10 = new CardExpiryMonth("10"); - public static final CardExpiryMonth VALUE_11 = new CardExpiryMonth("11"); - public static final CardExpiryMonth VALUE_12 = new CardExpiryMonth("12"); - - private final String value; - - private CardExpiryMonth(String value) { - this.value = Objects.requireNonNull(value, "value"); - } - - /** - * Creates a CardExpiryMonth for a value not yet known to this SDK version. - * - * @param value Wire value sent to or received from the API. - * @return Open enum value wrapping {@code value}. - */ - public static CardExpiryMonth of(String value) { - return new CardExpiryMonth(value); - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static CardExpiryMonth fromValue(String value) { - return value == null ? null : new CardExpiryMonth(value); - } - - @Override - public boolean equals(Object other) { - return this == other - || (other instanceof CardExpiryMonth that && this.value.equals(that.value)); - } - - @Override - public int hashCode() { - return value.hashCode(); - } -} diff --git a/src/main/java/com/sumup/sdk/models/CheckoutAccepted.java b/src/main/java/com/sumup/sdk/models/CheckoutAccepted.java deleted file mode 100644 index 8e639f6..0000000 --- a/src/main/java/com/sumup/sdk/models/CheckoutAccepted.java +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** - * Response returned when checkout processing requires an additional payer action, such as a 3DS - * challenge or a redirect to an external payment method page. - */ -public record CheckoutAccepted( - /** Instructions for the next action the payer or client must take. */ - com.sumup.sdk.models.CheckoutAcceptedNextStep nextStep) { - /** - * Creates a builder for CheckoutAccepted. - * - * @return Builder that constructs immutable CheckoutAccepted instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for CheckoutAccepted instances. */ - public static final class Builder { - private com.sumup.sdk.models.CheckoutAcceptedNextStep nextStep; - - private Builder() {} - - /** - * Sets the value for {@code nextStep}. - * - * @param nextStep Instructions for the next action the payer or client must take. - * @return This builder instance. - */ - public Builder nextStep(com.sumup.sdk.models.CheckoutAcceptedNextStep nextStep) { - this.nextStep = nextStep; - return this; - } - - /** - * Builds an immutable CheckoutAccepted instance. - * - * @return Immutable CheckoutAccepted. - */ - public CheckoutAccepted build() { - return new CheckoutAccepted(nextStep); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/CheckoutAcceptedNextStep.java b/src/main/java/com/sumup/sdk/models/CheckoutAcceptedNextStep.java deleted file mode 100644 index 433c362..0000000 --- a/src/main/java/com/sumup/sdk/models/CheckoutAcceptedNextStep.java +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Instructions for the next action the payer or client must take. */ -public record CheckoutAcceptedNextStep( - /** - * Allowed presentation mechanisms for the next step. `iframe` means the flow can be embedded, - * while `browser` means it can be completed through a full-page redirect. - */ - java.util.List mechanism, - - /** HTTP method to use when following the next step. */ - String method, - - /** - * Parameters required to complete the next step. The exact keys depend on the payment provider - * and flow type. - */ - java.util.Map payload, - - /** Merchant URL where the payer returns after the external flow finishes. */ - String redirectUrl, - - /** URL to open or submit in order to continue processing. */ - String url) { - /** - * Creates a builder for CheckoutAcceptedNextStep. - * - * @return Builder that constructs immutable CheckoutAcceptedNextStep instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for CheckoutAcceptedNextStep instances. */ - public static final class Builder { - private java.util.List mechanism; - private String method; - private java.util.Map payload; - private String redirectUrl; - private String url; - - private Builder() {} - - /** - * Sets the value for {@code mechanism}. - * - * @param mechanism Allowed presentation mechanisms for the next step. `iframe` means the flow - * can be embedded, while `browser` means it can be completed through a full-page redirect. - * @return This builder instance. - */ - public Builder mechanism( - java.util.List mechanism) { - this.mechanism = mechanism; - return this; - } - - /** - * Sets the value for {@code method}. - * - * @param method HTTP method to use when following the next step. - * @return This builder instance. - */ - public Builder method(String method) { - this.method = method; - return this; - } - - /** - * Sets the value for {@code payload}. - * - * @param payload Parameters required to complete the next step. The exact keys depend on the - * payment provider and flow type. - * @return This builder instance. - */ - public Builder payload(java.util.Map payload) { - this.payload = payload; - return this; - } - - /** - * Sets the value for {@code redirectUrl}. - * - * @param redirectUrl Merchant URL where the payer returns after the external flow finishes. - * @return This builder instance. - */ - public Builder redirectUrl(String redirectUrl) { - this.redirectUrl = redirectUrl; - return this; - } - - /** - * Sets the value for {@code url}. - * - * @param url URL to open or submit in order to continue processing. - * @return This builder instance. - */ - public Builder url(String url) { - this.url = url; - return this; - } - - /** - * Builds an immutable CheckoutAcceptedNextStep instance. - * - * @return Immutable CheckoutAcceptedNextStep. - */ - public CheckoutAcceptedNextStep build() { - return new CheckoutAcceptedNextStep(mechanism, method, payload, redirectUrl, url); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/CheckoutAcceptedNextStepMechanismItem.java b/src/main/java/com/sumup/sdk/models/CheckoutAcceptedNextStepMechanismItem.java deleted file mode 100644 index fe4c819..0000000 --- a/src/main/java/com/sumup/sdk/models/CheckoutAcceptedNextStepMechanismItem.java +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; - -public final class CheckoutAcceptedNextStepMechanismItem { - public static final CheckoutAcceptedNextStepMechanismItem IFRAME = - new CheckoutAcceptedNextStepMechanismItem("iframe"); - public static final CheckoutAcceptedNextStepMechanismItem BROWSER = - new CheckoutAcceptedNextStepMechanismItem("browser"); - - private final String value; - - private CheckoutAcceptedNextStepMechanismItem(String value) { - this.value = Objects.requireNonNull(value, "value"); - } - - /** - * Creates a CheckoutAcceptedNextStepMechanismItem for a value not yet known to this SDK version. - * - * @param value Wire value sent to or received from the API. - * @return Open enum value wrapping {@code value}. - */ - public static CheckoutAcceptedNextStepMechanismItem of(String value) { - return new CheckoutAcceptedNextStepMechanismItem(value); - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static CheckoutAcceptedNextStepMechanismItem fromValue(String value) { - return value == null ? null : new CheckoutAcceptedNextStepMechanismItem(value); - } - - @Override - public boolean equals(Object other) { - return this == other - || (other instanceof CheckoutAcceptedNextStepMechanismItem that - && this.value.equals(that.value)); - } - - @Override - public int hashCode() { - return value.hashCode(); - } -} diff --git a/src/main/java/com/sumup/sdk/models/MandatePayload.java b/src/main/java/com/sumup/sdk/models/MandatePayload.java deleted file mode 100644 index 2c3af0e..0000000 --- a/src/main/java/com/sumup/sdk/models/MandatePayload.java +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import java.util.Objects; - -/** - * Mandate details used when a checkout should create a reusable card token for future recurring or - * merchant-initiated payments. - */ -public record MandatePayload( - /** Type of mandate to create for the saved payment instrument. */ - com.sumup.sdk.models.MandatePayloadType type, - - /** Browser or client user agent observed when consent was collected. */ - String userAgent, - - /** IP address of the payer when the mandate was accepted. */ - String userIp) { - /** - * Creates a builder for MandatePayload. - * - * @return Builder that constructs immutable MandatePayload instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for MandatePayload instances. */ - public static final class Builder { - private com.sumup.sdk.models.MandatePayloadType type; - private String userAgent; - private String userIp; - - private Builder() {} - - /** - * Sets the value for {@code type}. - * - * @param type Type of mandate to create for the saved payment instrument. - * @return This builder instance. - */ - public Builder type(com.sumup.sdk.models.MandatePayloadType type) { - this.type = type; - return this; - } - - /** - * Sets the value for {@code userAgent}. - * - * @param userAgent Browser or client user agent observed when consent was collected. - * @return This builder instance. - */ - public Builder userAgent(String userAgent) { - this.userAgent = userAgent; - return this; - } - - /** - * Sets the value for {@code userIp}. - * - * @param userIp IP address of the payer when the mandate was accepted. - * @return This builder instance. - */ - public Builder userIp(String userIp) { - this.userIp = userIp; - return this; - } - - /** - * Builds an immutable MandatePayload instance. - * - * @return Immutable MandatePayload. - */ - public MandatePayload build() { - return new MandatePayload( - Objects.requireNonNull(type, "type"), - Objects.requireNonNull(userAgent, "userAgent"), - userIp); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/MandatePayloadType.java b/src/main/java/com/sumup/sdk/models/MandatePayloadType.java deleted file mode 100644 index 6ea55a9..0000000 --- a/src/main/java/com/sumup/sdk/models/MandatePayloadType.java +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; - -/** Type of mandate to create for the saved payment instrument. */ -public final class MandatePayloadType { - public static final MandatePayloadType RECURRENT = new MandatePayloadType("recurrent"); - - private final String value; - - private MandatePayloadType(String value) { - this.value = Objects.requireNonNull(value, "value"); - } - - /** - * Creates a MandatePayloadType for a value not yet known to this SDK version. - * - * @param value Wire value sent to or received from the API. - * @return Open enum value wrapping {@code value}. - */ - public static MandatePayloadType of(String value) { - return new MandatePayloadType(value); - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static MandatePayloadType fromValue(String value) { - return value == null ? null : new MandatePayloadType(value); - } - - @Override - public boolean equals(Object other) { - return this == other - || (other instanceof MandatePayloadType that && this.value.equals(that.value)); - } - - @Override - public int hashCode() { - return value.hashCode(); - } -} diff --git a/src/main/java/com/sumup/sdk/models/PersonalIdentifier.java b/src/main/java/com/sumup/sdk/models/PersonalIdentifier.java index e5dc0ba..4789dcb 100644 --- a/src/main/java/com/sumup/sdk/models/PersonalIdentifier.java +++ b/src/main/java/com/sumup/sdk/models/PersonalIdentifier.java @@ -7,7 +7,7 @@ public record PersonalIdentifier( /** The unique reference for the personal identifier type. */ String ref, - /** The company identifier value. */ + /** The personal identifier value. */ String value) { /** * Creates a builder for PersonalIdentifier. @@ -39,7 +39,7 @@ public Builder ref(String ref) { /** * Sets the value for {@code value}. * - * @param value The company identifier value. + * @param value The personal identifier value. * @return This builder instance. */ public Builder value(String value) { diff --git a/src/main/java/com/sumup/sdk/models/ProcessCheckout.java b/src/main/java/com/sumup/sdk/models/ProcessCheckout.java deleted file mode 100644 index 93a78f5..0000000 --- a/src/main/java/com/sumup/sdk/models/ProcessCheckout.java +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import java.util.Objects; - -/** - * Request body for attempting payment on an existing checkout. The required companion fields depend - * on the selected `payment_type`, for example card details, saved-card data, or payer information - * required by a specific payment method. - */ -public record ProcessCheckout( - /** - * Raw payment token object received from Apple Pay. Send the Apple Pay response payload as-is. - */ - java.util.Map applePay, - - /** __Required when payment type is `card`.__ Details of the payment card. */ - com.sumup.sdk.models.Card card, - - /** - * Customer identifier associated with the saved payment instrument. Required when `token` is - * provided. - */ - String customerId, - - /** - * Raw `PaymentData` object received from Google Pay. Send the Google Pay response payload - * as-is. - */ - java.util.Map googlePay, - - /** Number of installments for deferred payments. Available only to merchant users in Brazil. */ - Long installments, - - /** - * Mandate details used when a checkout should create a reusable card token for future recurring - * or merchant-initiated payments. - */ - com.sumup.sdk.models.MandatePayload mandate, - - /** - * Payment method used for this processing attempt. It determines which additional request - * fields are required. - */ - com.sumup.sdk.models.ProcessCheckoutPaymentType paymentType, - - /** Personal details for the customer. */ - com.sumup.sdk.models.PersonalDetails personalDetails, - - /** - * Saved-card token to use instead of raw card details when processing with a previously stored - * payment instrument. - */ - String token) { - /** - * Creates a builder for ProcessCheckout. - * - * @return Builder that constructs immutable ProcessCheckout instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for ProcessCheckout instances. */ - public static final class Builder { - private java.util.Map applePay; - private com.sumup.sdk.models.Card card; - private String customerId; - private java.util.Map googlePay; - private Long installments; - private com.sumup.sdk.models.MandatePayload mandate; - private com.sumup.sdk.models.ProcessCheckoutPaymentType paymentType; - private com.sumup.sdk.models.PersonalDetails personalDetails; - private String token; - - private Builder() {} - - /** - * Sets the value for {@code applePay}. - * - * @param applePay Raw payment token object received from Apple Pay. Send the Apple Pay response - * payload as-is. - * @return This builder instance. - */ - public Builder applePay(java.util.Map applePay) { - this.applePay = applePay; - return this; - } - - /** - * Sets the value for {@code card}. - * - * @param card __Required when payment type is `card`.__ Details of the payment card. - * @return This builder instance. - */ - public Builder card(com.sumup.sdk.models.Card card) { - this.card = card; - return this; - } - - /** - * Sets the value for {@code customerId}. - * - * @param customerId Customer identifier associated with the saved payment instrument. Required - * when `token` is provided. - * @return This builder instance. - */ - public Builder customerId(String customerId) { - this.customerId = customerId; - return this; - } - - /** - * Sets the value for {@code googlePay}. - * - * @param googlePay Raw `PaymentData` object received from Google Pay. Send the Google Pay - * response payload as-is. - * @return This builder instance. - */ - public Builder googlePay(java.util.Map googlePay) { - this.googlePay = googlePay; - return this; - } - - /** - * Sets the value for {@code installments}. - * - * @param installments Number of installments for deferred payments. Available only to merchant - * users in Brazil. - * @return This builder instance. - */ - public Builder installments(Long installments) { - this.installments = installments; - return this; - } - - /** - * Sets the value for {@code mandate}. - * - * @param mandate Mandate details used when a checkout should create a reusable card token for - * future recurring or merchant-initiated payments. - * @return This builder instance. - */ - public Builder mandate(com.sumup.sdk.models.MandatePayload mandate) { - this.mandate = mandate; - return this; - } - - /** - * Sets the value for {@code paymentType}. - * - * @param paymentType Payment method used for this processing attempt. It determines which - * additional request fields are required. - * @return This builder instance. - */ - public Builder paymentType(com.sumup.sdk.models.ProcessCheckoutPaymentType paymentType) { - this.paymentType = paymentType; - return this; - } - - /** - * Sets the value for {@code personalDetails}. - * - * @param personalDetails Personal details for the customer. - * @return This builder instance. - */ - public Builder personalDetails(com.sumup.sdk.models.PersonalDetails personalDetails) { - this.personalDetails = personalDetails; - return this; - } - - /** - * Sets the value for {@code token}. - * - * @param token Saved-card token to use instead of raw card details when processing with a - * previously stored payment instrument. - * @return This builder instance. - */ - public Builder token(String token) { - this.token = token; - return this; - } - - /** - * Builds an immutable ProcessCheckout instance. - * - * @return Immutable ProcessCheckout. - */ - public ProcessCheckout build() { - return new ProcessCheckout( - applePay, - card, - customerId, - googlePay, - installments, - mandate, - Objects.requireNonNull(paymentType, "paymentType"), - personalDetails, - token); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/ProcessCheckoutPaymentType.java b/src/main/java/com/sumup/sdk/models/ProcessCheckoutPaymentType.java deleted file mode 100644 index 5d2713d..0000000 --- a/src/main/java/com/sumup/sdk/models/ProcessCheckoutPaymentType.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; - -/** - * Payment method used for this processing attempt. It determines which additional request fields - * are required. - */ -public final class ProcessCheckoutPaymentType { - public static final ProcessCheckoutPaymentType CARD = new ProcessCheckoutPaymentType("card"); - public static final ProcessCheckoutPaymentType BOLETO = new ProcessCheckoutPaymentType("boleto"); - public static final ProcessCheckoutPaymentType IDEAL = new ProcessCheckoutPaymentType("ideal"); - public static final ProcessCheckoutPaymentType BLIK = new ProcessCheckoutPaymentType("blik"); - public static final ProcessCheckoutPaymentType BANCONTACT = - new ProcessCheckoutPaymentType("bancontact"); - public static final ProcessCheckoutPaymentType GOOGLE_PAY = - new ProcessCheckoutPaymentType("google_pay"); - public static final ProcessCheckoutPaymentType APPLE_PAY = - new ProcessCheckoutPaymentType("apple_pay"); - - private final String value; - - private ProcessCheckoutPaymentType(String value) { - this.value = Objects.requireNonNull(value, "value"); - } - - /** - * Creates a ProcessCheckoutPaymentType for a value not yet known to this SDK version. - * - * @param value Wire value sent to or received from the API. - * @return Open enum value wrapping {@code value}. - */ - public static ProcessCheckoutPaymentType of(String value) { - return new ProcessCheckoutPaymentType(value); - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static ProcessCheckoutPaymentType fromValue(String value) { - return value == null ? null : new ProcessCheckoutPaymentType(value); - } - - @Override - public boolean equals(Object other) { - return this == other - || (other instanceof ProcessCheckoutPaymentType that && this.value.equals(that.value)); - } - - @Override - public int hashCode() { - return value.hashCode(); - } -}