From cc03af0c0930c957d4b93bd3d9c555e2a2a1c69e Mon Sep 17 00:00:00 2001 From: appscisumup Date: Wed, 25 Feb 2026 10:23:53 +0000 Subject: [PATCH 1/2] chore: synced local 'openapi.json' with remote 'specs/openapi.json' --- openapi.json | 1671 ++++++++++++++++---------------------------------- 1 file changed, 528 insertions(+), 1143 deletions(-) diff --git a/openapi.json b/openapi.json index d3c76e5..b934226 100755 --- a/openapi.json +++ b/openapi.json @@ -2344,7 +2344,7 @@ "links": { "type": "array", "items": { - "$ref": "#/components/schemas/Link" + "$ref": "#/components/schemas/TransactionsHistoryLink" } } } @@ -2570,7 +2570,7 @@ "links": { "type": "array", "items": { - "$ref": "#/components/schemas/Link" + "$ref": "#/components/schemas/TransactionsHistoryLink" } } } @@ -2634,102 +2634,6 @@ ] } }, - "/v0.1/me": { - "get": { - "operationId": "GetAccount", - "summary": "Retrieve a profile", - "description": "Returns user profile information.", - "parameters": [ - { - "name": "include[]", - "in": "query", - "description": "A list of additional information you want to receive for the user. By default only personal and merchant profile information will be returned.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "settings", - "doing_business_as", - "bank_accounts", - "app_settings", - "country_details" - ] - } - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MerchantAccount" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "Invalid_Token": { - "description": "The access token is invalid or has expired.", - "value": { - "error_message": "invalid access token", - "error_code": "NOT_AUTHORIZED" - } - }, - "Not_Authorized_Token": { - "description": "The access token is valid but the application is not authorized.", - "value": { - "error_message": "NOT_AUTHORIZED", - "error_code": "NOT_AUTHORIZED" - } - }, - "Missing_Token": { - "description": "No access token is provided.", - "value": { - "message": "access token required", - "error_code": "NOT_AUTHORIZED" - } - } - } - } - } - } - }, - "deprecated": true, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "user.profile", - "user.profile_readonly" - ] - } - ], - "tags": [ - "Merchant" - ], - "x-codegen": { - "method_name": "get" - }, - "x-deprecation-notice": "The _Retrieve a profile_ endpoint is deprecated, please use the `Merchant` object instead (see [Merchants](https://developer.sumup.com/api/merchants)).", - "x-scopes": [ - "user.profile", - "user.profile_readonly" - ] - } - }, "/v1.0/merchants/{merchant_code}/payouts": { "get": { "operationId": "ListPayoutsV1", @@ -2983,256 +2887,11 @@ } ], "tags": [ - "Payouts" - ], - "x-codegen": { - "method_name": "list_deprecated" - }, - "x-scopes": [ - "user.profile", - "user.profile_readonly" - ] - } - }, - "/v0.1/me/personal-profile": { - "get": { - "operationId": "GetPersonalProfile", - "summary": "Retrieve a personal profile", - "description": "Retrieves personal profile data.", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PersonalProfileLegacy" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "Invalid_Token": { - "description": "The access token is invalid or has expired.", - "value": { - "error_message": "invalid access token", - "error_code": "NOT_AUTHORIZED" - } - }, - "Not_Authorized_Token": { - "description": "The access token is valid but the application is not authorized.", - "value": { - "error_message": "NOT_AUTHORIZED", - "error_code": "NOT_AUTHORIZED" - } - }, - "Missing_Token": { - "description": "No access token is provided.", - "value": { - "message": "access token required", - "error_code": "NOT_AUTHORIZED" - } - } - } - } - } - } - }, - "deprecated": true, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "user.profile", - "user.profile_readonly" - ] - } - ], - "tags": [ - "Merchant" - ], - "x-codegen": { - "method_name": "get_personal_profile" - }, - "x-deprecation-notice": "The _Retrieve a personal profile_ endpoint is deprecated, please use the `persons` field of the `Merchant` object instead. (see [Merchants](https://developer.sumup.com/api/merchants)).", - "x-scopes": [ - "user.profile", - "user.profile_readonly" - ] - } - }, - "/v0.1/me/merchant-profile": { - "get": { - "operationId": "GetMerchantProfile", - "summary": "Retrieve a merchant profile", - "description": "Retrieves merchant profile data.", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MerchantProfileLegacy" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "Invalid_Token": { - "description": "The access token is invalid or has expired.", - "value": { - "error_message": "invalid access token", - "error_code": "NOT_AUTHORIZED" - } - }, - "Not_Authorized_Token": { - "description": "The access token is valid but the application is not authorized.", - "value": { - "error_message": "NOT_AUTHORIZED", - "error_code": "NOT_AUTHORIZED" - } - }, - "Missing_Token": { - "description": "No access token is provided.", - "value": { - "message": "access token required", - "error_code": "NOT_AUTHORIZED" - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorForbidden" - }, - "examples": { - "Forbidden": { - "description": "You do not have required scopes for making this request.", - "value": { - "error_message": "request_not_allowed", - "error_code": "FORBIDDEN", - "status_code": "403" - } - } - } - } - } - } - }, - "deprecated": true, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "user.profile", - "user.profile_readonly" - ] - } - ], - "tags": [ - "Merchant" - ], - "x-codegen": { - "method_name": "get_merchant_profile" - }, - "x-deprecation-notice": "The _Retrieve a merchant profile_ endpoint is deprecated, please use the `Merchant` object instead (see [Merchants](https://developer.sumup.com/api/merchants)).", - "x-scopes": [ - "user.profile", - "user.profile_readonly" - ] - } - }, - "/v0.1/me/merchant-profile/doing-business-as": { - "get": { - "operationId": "GetDoingBusinessAs", - "summary": "Retrieve DBA", - "description": "Retrieves Doing Business As profile.", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DoingBusinessAsLegacy" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "Invalid_Token": { - "description": "The access token is invalid or has expired.", - "value": { - "error_message": "invalid access token", - "error_code": "NOT_AUTHORIZED" - } - }, - "Not_Authorized_Token": { - "description": "The access token is valid but the application is not authorized.", - "value": { - "error_message": "NOT_AUTHORIZED", - "error_code": "NOT_AUTHORIZED" - } - }, - "Missing_Token": { - "description": "No access token is provided.", - "value": { - "message": "access token required", - "error_code": "NOT_AUTHORIZED" - } - } - } - } - } - } - }, - "deprecated": true, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "user.profile", - "user.profile_readonly" - ] - } - ], - "tags": [ - "Merchant" + "Payouts" ], "x-codegen": { - "method_name": "get_doing_business_as" + "method_name": "list_deprecated" }, - "x-deprecation-notice": "The _Retrieve DBA_ endpoint is deprecated, please use the `business_profile` field of the `Merchant` object instead (see [Merchants](https://developer.sumup.com/api/merchants)).", "x-scopes": [ "user.profile", "user.profile_readonly" @@ -5834,42 +5493,6 @@ "x-validate": null }, "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65" - }, - { - "name": "Accept", - "in": "header", - "description": "", - "required": true, - "schema": { - "type": "string", - "x-struct": null, - "x-validate": null - }, - "example": "application/json" - }, - { - "name": "Content-Type", - "in": "header", - "description": "", - "required": true, - "schema": { - "type": "string", - "x-struct": null, - "x-validate": null - }, - "example": "application/json" - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "required": true, - "schema": { - "type": "string", - "x-struct": null, - "x-validate": null - }, - "example": "Bearer 4470641ddc7ac230dc463417aab0ba30ef499844c73072c3f6c7a88204c700bd" } ], "responses": { @@ -6312,24 +5935,6 @@ } }, "schemas": { - "AccountLegacy": { - "description": "Profile information.", - "type": "object", - "properties": { - "username": { - "description": "Username of the user profile.", - "type": "string" - }, - "type": { - "description": "The role of the user.", - "type": "string", - "enum": [ - "normal", - "operator" - ] - } - } - }, "AddressLegacy": { "description": "Profile's personal address information.", "type": "object", @@ -6366,229 +5971,6 @@ } } }, - "AddressWithDetails": { - "description": "Details of the registered address.", - "type": "object", - "properties": { - "address_line1": { - "description": "Address line 1", - "type": "string" - }, - "address_line2": { - "description": "Address line 2", - "type": "string" - }, - "city": { - "description": "City", - "type": "string" - }, - "country": { - "description": "Country ISO 3166-1 code", - "type": "string" - }, - "region_id": { - "description": "Country region id", - "type": "number" - }, - "region_name": { - "description": "Region name", - "type": "string" - }, - "region_code": { - "description": "Region code", - "type": "string" - }, - "post_code": { - "description": "Postal code", - "type": "string" - }, - "landline": { - "description": "Landline number", - "type": "string" - }, - "first_name": { - "description": "undefined", - "type": "string" - }, - "last_name": { - "description": "undefined", - "type": "string" - }, - "company": { - "description": "undefined", - "type": "string" - }, - "country_details": { - "$ref": "#/components/schemas/CountryDetails" - }, - "timeoffset_details": { - "$ref": "#/components/schemas/TimeoffsetDetails" - }, - "state_id": { - "description": "undefined", - "type": "string" - } - } - }, - "AppSettings": { - "description": "Mobile app settings", - "type": "object", - "properties": { - "checkout_preference": { - "description": "Checkout preference", - "type": "string" - }, - "include_vat": { - "description": "Include vat.", - "type": "boolean" - }, - "manual_entry_tutorial": { - "description": "Manual entry tutorial.", - "type": "boolean" - }, - "mobile_payment_tutorial": { - "description": "Mobile payment tutorial.", - "type": "boolean" - }, - "tax_enabled": { - "description": "Tax enabled.", - "type": "boolean" - }, - "mobile_payment": { - "description": "Mobile payment.", - "type": "string" - }, - "reader_payment": { - "description": "Reader payment.", - "type": "string" - }, - "cash_payment": { - "description": "Cash payment.", - "type": "string" - }, - "advanced_mode": { - "description": "Advanced mode.", - "type": "string" - }, - "expected_max_transaction_amount": { - "description": "Expected max transaction amount.", - "type": "number" - }, - "manual_entry": { - "description": "Manual entry.", - "type": "string" - }, - "terminal_mode_tutorial": { - "description": "Terminal mode tutorial.", - "type": "boolean" - }, - "tipping": { - "description": "Tipping.", - "type": "string" - }, - "tip_rates": { - "description": "Tip rates.", - "type": "array", - "items": { - "type": "number", - "format": "float" - } - }, - "barcode_scanner": { - "description": "Barcode scanner.", - "type": "string" - }, - "referral": { - "description": "Referral.", - "type": "string" - } - } - }, - "BankAccount": { - "type": "object", - "properties": { - "bank_code": { - "description": "Bank code", - "type": "string" - }, - "branch_code": { - "description": "Branch code", - "type": "string" - }, - "swift": { - "description": "SWIFT code", - "type": "string" - }, - "account_number": { - "description": "Account number", - "type": "string" - }, - "iban": { - "description": "IBAN", - "type": "string" - }, - "account_type": { - "description": "Type of the account", - "type": "string" - }, - "account_category": { - "description": "Account category - business or personal", - "type": "string" - }, - "account_holder_name": { - "type": "string" - }, - "status": { - "description": "Status in the verification process", - "type": "string" - }, - "primary": { - "description": "The primary bank account is the one used for payouts", - "type": "boolean" - }, - "created_at": { - "description": "Creation date of the bank account", - "type": "string" - }, - "bank_name": { - "description": "Bank name", - "type": "string" - } - } - }, - "BusinessOwners": { - "description": "Business owners information.", - "type": "array", - "items": { - "type": "object", - "properties": { - "first_name": { - "description": "BO's first name", - "type": "string" - }, - "last_name": { - "description": "BO's last name of the user", - "type": "string" - }, - "date_of_birth": { - "description": "Date of birth", - "type": "string" - }, - "mobile_phone": { - "description": "Mobile phone number", - "type": "string" - }, - "landline": { - "description": "BO's Landline", - "type": "string" - }, - "ownership": { - "description": "Ownership percentage", - "type": "number" - } - } - } - }, "Card": { "description": "__Required when payment type is `card`.__ Details of the payment card.", "type": "object", @@ -6670,20 +6052,75 @@ "type" ] }, - "CardResponse": { - "description": "Details of the payment card.", + "CardResponse": { + "description": "Details of the payment card.", + "type": "object", + "properties": { + "last_4_digits": { + "description": "Last 4 digits of the payment card number.", + "type": "string", + "example": "3456", + "maxLength": 4, + "minLength": 4, + "readOnly": true + }, + "type": { + "$ref": "#/components/schemas/CardType" + } + } + }, + "Device": { + "type": "object", + "properties": { + "name": { + "description": "Device name.", + "type": "string", + "example": "m0xx" + }, + "system_name": { + "description": "Device OS.", + "type": "string", + "example": "Android" + }, + "model": { + "description": "Device model.", + "type": "string", + "example": "GT-I9300" + }, + "system_version": { + "description": "Device OS version.", + "type": "string", + "example": "4.3" + }, + "uuid": { + "description": "Device UUID.", + "type": "string", + "example": "3ae2a6b7-fb0d-3b50-adbf-cb7e2db30cd2" + } + } + }, + "ElvCardAccount": { "type": "object", "properties": { + "sort_code": { + "description": "ELV card sort code.", + "type": "string", + "example": "87096214" + }, "last_4_digits": { - "description": "Last 4 digits of the payment card number.", + "description": "ELV card account number last 4 digits.", "type": "string", - "example": "3456", - "maxLength": 4, - "minLength": 4, - "readOnly": true + "example": "5674" }, - "type": { - "$ref": "#/components/schemas/CardType" + "sequence_no": { + "description": "ELV card sequence number.", + "type": "integer", + "example": 1 + }, + "iban": { + "description": "ELV IBAN.", + "type": "string", + "example": "DE60870962140012345674" } } }, @@ -7034,87 +6471,6 @@ ], "title": "Customer" }, - "CountryDetails": { - "description": "Country Details", - "type": "object", - "properties": { - "currency": { - "description": "Currency ISO 4217 code", - "type": "string" - }, - "iso_code": { - "description": "Country ISO code", - "type": "string" - }, - "en_name": { - "description": "Country EN name", - "type": "string" - }, - "native_name": { - "description": "Country native name", - "type": "string" - } - } - }, - "DoingBusinessAsLegacy": { - "description": "Doing Business As information", - "type": "object", - "properties": { - "business_name": { - "description": "Doing business as name", - "type": "string" - }, - "company_registration_number": { - "description": "Doing business as company registration number", - "type": "string" - }, - "vat_id": { - "description": "Doing business as VAT ID", - "type": "string" - }, - "website": { - "description": "Doing business as website", - "type": "string" - }, - "email": { - "description": "Doing business as email", - "type": "string" - }, - "address": { - "type": "object", - "properties": { - "address_line1": { - "description": "Address line 1", - "type": "string" - }, - "address_line2": { - "description": "Address line 2", - "type": "string" - }, - "city": { - "description": "City", - "type": "string" - }, - "country": { - "description": "Country ISO 3166-1 code", - "type": "string" - }, - "region_id": { - "description": "Country region ID", - "type": "number" - }, - "region_name": { - "description": "Country region name", - "type": "string" - }, - "post_code": { - "description": "Postal code", - "type": "string" - } - } - } - } - }, "Error": { "description": "Error message structure.", "type": "object", @@ -7277,278 +6633,110 @@ "transaction_code": { "type": "string" }, - "type": { - "type": "string", - "enum": [ - "PAYOUT", - "CHARGE_BACK_DEDUCTION", - "REFUND_DEDUCTION", - "DD_RETURN_DEDUCTION", - "BALANCE_DEDUCTION" - ] - } - } - }, - "title": "Financial Payouts" - }, - "LegalTypeLegacy": { - "description": "Id of the legal type of the merchant profile", - "type": "object", - "properties": { - "id": { - "description": "Unique id", - "type": "number" - }, - "full_description": { - "description": "Legal type description", - "type": "string" - }, - "description": { - "description": "Legal type short description", - "type": "string" - }, - "sole_trader": { - "description": "Sole trader legal type if true", - "type": "boolean" - } - } - }, - "Link": { - "description": "Details of a link to a related resource.", - "type": "object", - "properties": { - "rel": { - "description": "Specifies the relation to the current resource.", - "type": "string" - }, - "href": { - "description": "URL for accessing the related resource.", - "type": "string", - "format": "uri" - }, - "type": { - "description": "Specifies the media type of the related resource.", - "type": "string" - } - } - }, - "MandatePayload": { - "description": "Mandate is passed when a card is to be tokenized", - "type": "object", - "properties": { - "type": { - "description": "Indicates the mandate type", - "type": "string", - "enum": [ - "recurrent" - ] - }, - "user_agent": { - "description": "Operating system and web client used by the end-user", - "type": "string" - }, - "user_ip": { - "description": "IP address of the end user. Supports IPv4 and IPv6", - "type": "string" - } - }, - "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" - }, - "required": [ - "type", - "user_agent" - ] - }, - "MandateResponse": { - "description": "Created mandate", - "type": "object", - "properties": { - "type": { - "description": "Indicates the mandate type", - "type": "string" - }, - "status": { - "description": "Mandate status", - "type": "string" - }, - "merchant_code": { - "description": "Merchant code which has the mandate", - "type": "string", - "example": "MH4H92C7" - } - }, - "example": { - "type": "recurrent", - "status": "active", - "merchant_code": "MH4H92C7" - } - }, - "MerchantAccount": { - "description": "Details of the merchant account.", - "type": "object", - "properties": { - "account": { - "$ref": "#/components/schemas/AccountLegacy" - }, - "personal_profile": { - "$ref": "#/components/schemas/PersonalProfileLegacy" - }, - "merchant_profile": { - "$ref": "#/components/schemas/MerchantProfileLegacy" - }, - "app_settings": { - "$ref": "#/components/schemas/AppSettings" - }, - "permissions": { - "$ref": "#/components/schemas/PermissionsLegacy" - } - }, - "title": "Merchant Account" - }, - "MerchantProfileLegacy": { - "description": "Account's merchant profile", - "type": "object", - "properties": { - "merchant_code": { - "description": "Unique identifying code of the merchant profile", - "type": "string", - "example": "MH4H92C7" - }, - "company_name": { - "description": "Company name", - "type": "string" - }, - "website": { - "description": "Website", - "type": "string" - }, - "legal_type": { - "$ref": "#/components/schemas/LegalTypeLegacy" - }, - "merchant_category_code": { - "description": "Merchant category code", - "type": "string" - }, - "mobile_phone": { - "description": "Mobile phone number", - "type": "string" - }, - "company_registration_number": { - "description": "Company registration number", - "type": "string" - }, - "vat_id": { - "description": "Vat ID", - "type": "string" - }, - "permanent_certificate_access_code": { - "description": "Permanent certificate access code (Portugal)", - "type": "string" - }, - "nature_and_purpose": { - "description": "Nature and purpose of the business", - "type": "string" - }, - "address": { - "$ref": "#/components/schemas/AddressWithDetails" - }, - "business_owners": { - "$ref": "#/components/schemas/BusinessOwners" - }, - "doing_business_as": { - "$ref": "#/components/schemas/DoingBusinessAsLegacy" - }, - "settings": { - "$ref": "#/components/schemas/MerchantSettings" - }, - "vat_rates": { - "$ref": "#/components/schemas/VatRates" - }, - "locale": { - "description": "Merchant locale (for internal usage only)", - "type": "string" - }, - "bank_accounts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BankAccount" + "type": { + "type": "string", + "enum": [ + "PAYOUT", + "CHARGE_BACK_DEDUCTION", + "REFUND_DEDUCTION", + "DD_RETURN_DEDUCTION", + "BALANCE_DEDUCTION" + ] } - }, - "extdev": { - "description": "True if the merchant is extdev", - "type": "boolean" - }, - "payout_zone_migrated": { - "description": "True if the payout zone of this merchant is migrated", - "type": "boolean" - }, - "country": { - "description": "Merchant country code formatted according to [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) (for internal usage only)", - "type": "string" } - } + }, + "title": "Financial Payouts" }, - "MerchantSettings": { - "description": "Merchant settings (like \\\"payout_type\\\", \\\"payout_period\\\")", + "Link": { + "description": "Details of a link to a related resource.", "type": "object", "properties": { - "tax_enabled": { - "description": "Whether to show tax in receipts (saved per transaction)", - "type": "boolean" - }, - "payout_type": { - "description": "Payout type", - "type": "string" - }, - "payout_period": { - "description": "Payout frequency", + "rel": { + "description": "Specifies the relation to the current resource.", "type": "string" }, - "payout_on_demand_available": { - "description": "Whether merchant can edit payouts on demand", - "type": "boolean" - }, - "payout_on_demand": { - "description": "Whether merchant will receive payouts on demand", - "type": "boolean" - }, - "printers_enabled": { - "description": "Whether to show printers in mobile app", - "type": "boolean" + "href": { + "description": "URL for accessing the related resource.", + "type": "string", + "format": "uri" }, - "payout_instrument": { - "description": "Payout Instrument", + "type": { + "description": "Specifies the media type of the related resource.", "type": "string" + } + } + }, + "TransactionsHistoryLink": { + "type": "object", + "properties": { + "rel": { + "description": "Relation.", + "type": "string", + "example": "next" }, - "moto_payment": { - "description": "Whether merchant can make MOTO payments", + "href": { + "description": "Location.", + "type": "string", + "example": "limit=10&oldest_ref=090df9bf-93b7-40f1-8181-fbdb236568a1&order=ascending" + } + }, + "required": [ + "rel", + "href" + ] + }, + "MandatePayload": { + "description": "Mandate is passed when a card is to be tokenized", + "type": "object", + "properties": { + "type": { + "description": "Indicates the mandate type", "type": "string", "enum": [ - "UNAVAILABLE", - "ENFORCED", - "ON", - "OFF" + "recurrent" ] }, - "stone_merchant_code": { - "description": "Stone merchant code", + "user_agent": { + "description": "Operating system and web client used by the end-user", "type": "string" }, - "daily_payout_email": { - "description": "Whether merchant will receive daily payout emails", - "type": "boolean" + "user_ip": { + "description": "IP address of the end user. Supports IPv4 and IPv6", + "type": "string" + } + }, + "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" + }, + "required": [ + "type", + "user_agent" + ] + }, + "MandateResponse": { + "description": "Created mandate", + "type": "object", + "properties": { + "type": { + "description": "Indicates the mandate type", + "type": "string" }, - "monthly_payout_email": { - "description": "Whether merchant will receive monthly payout emails", - "type": "boolean" + "status": { + "description": "Mandate status", + "type": "string" }, - "gross_settlement": { - "description": "Whether merchant has gross settlement enabled", - "type": "boolean" + "merchant_code": { + "description": "Merchant code which has the mandate", + "type": "string", + "example": "MH4H92C7" } + }, + "example": { + "type": "recurrent", + "status": "active", + "merchant_code": "MH4H92C7" } }, "PaymentInstrumentResponse": { @@ -7615,28 +6803,6 @@ "created_at": "2021-03-30T10:06:07.000+00:00" } }, - "PermissionsLegacy": { - "description": "User permissions", - "type": "object", - "properties": { - "create_moto_payments": { - "description": "Create MOTO payments", - "type": "boolean" - }, - "full_transaction_history_view": { - "description": "Can view full merchant transaction history", - "type": "boolean" - }, - "refund_transactions": { - "description": "Refund transactions", - "type": "boolean" - }, - "create_referral": { - "description": "Create referral", - "type": "boolean" - } - } - }, "PersonalDetails": { "description": "Personal details for the customer.", "type": "object", @@ -7678,80 +6844,60 @@ } } }, - "PersonalProfileLegacy": { - "description": "Account's personal profile.", - "type": "object", - "properties": { - "first_name": { - "description": "First name of the user", - "type": "string" - }, - "last_name": { - "description": "Last name of the user", - "type": "string" - }, - "date_of_birth": { - "description": "Date of birth", - "type": "string" - }, - "mobile_phone": { - "description": "Mobile phone number", - "type": "string" - }, - "address": { - "$ref": "#/components/schemas/AddressWithDetails" - }, - "complete": { - "type": "boolean" - } - } - }, "Product": { - "description": "Details of the product for which the payment is made.", + "description": "Purchase product.", "type": "object", "properties": { "name": { - "description": "Name of the product from the merchant's catalog.", + "description": "Product name.", + "type": "string", + "example": "Purchase reader for merchant with code ME3FCAVF" + }, + "price_label": { + "description": "Product description.", "type": "string" }, "price": { - "description": "Price of the product without VAT.", + "description": "Product price.", "type": "number", - "format": "float" + "format": "decimal", + "example": 100 }, "vat_rate": { - "description": "VAT rate applicable to the product.", + "description": "VAT percentage.", "type": "number", - "format": "float" + "format": "decimal" }, "single_vat_amount": { - "description": "Amount of the VAT for a single product item (calculated as the product of `price` and `vat_rate`, i.e. `single_vat_amount = price * vat_rate`).", + "description": "VAT amount for a single product.", "type": "number", - "format": "float" + "format": "decimal" }, "price_with_vat": { - "description": "Price of a single product item with VAT.", + "description": "Product price incl. VAT.", "type": "number", - "format": "float" + "format": "decimal" }, "vat_amount": { - "description": "Total VAT amount for the purchase (calculated as the product of `single_vat_amount` and `quantity`, i.e. `vat_amount = single_vat_amount * quantity`).", + "description": "VAT amount.", "type": "number", - "format": "float" + "format": "decimal" }, "quantity": { - "description": "Number of product items for the purchase.", - "type": "number" + "description": "Product quantity.", + "type": "integer", + "example": 1 }, "total_price": { - "description": "Total price of the product items without VAT (calculated as the product of `price` and `quantity`, i.e. `total_price = price * quantity`).", + "description": "Quantity x product price.", "type": "number", - "format": "float" + "format": "decimal", + "example": 100 }, "total_with_vat": { - "description": "Total price of the product items including VAT (calculated as the product of `price_with_vat` and `quantity`, i.e. `total_with_vat = price_with_vat * quantity`).", + "description": "Total price incl. VAT.", "type": "number", - "format": "float" + "format": "decimal" } } }, @@ -8036,24 +7182,6 @@ } } }, - "TimeoffsetDetails": { - "description": "TimeOffset Details", - "type": "object", - "properties": { - "post_code": { - "description": "Postal code", - "type": "string" - }, - "offset": { - "description": "UTC offset", - "type": "number" - }, - "dst": { - "description": "Daylight Saving Time", - "type": "boolean" - } - } - }, "TransactionEvent": { "description": "Details of a transaction event.", "type": "object", @@ -8070,26 +7198,31 @@ "amount": { "description": "Amount of the event.", "type": "number", - "format": "float" + "format": "decimal", + "example": 58.8 }, "due_date": { "description": "Date when the transaction event is due to occur.", "type": "string", - "format": "date" + "format": "date", + "example": "2020-05-25" }, "date": { "description": "Date when the transaction event occurred.", "type": "string", - "format": "date" + "format": "date", + "example": "2020-05-25" }, "installment_number": { "description": "Consecutive number of the installment that is paid. Applicable only payout events, i.e. `event_type = PAYOUT`.", - "type": "integer" + "type": "integer", + "example": 1 }, "timestamp": { "description": "Date and time of the transaction event.", "type": "string", - "format": "date-time" + "format": "date-time", + "example": "2020-05-25T10:49:42.784Z" } } }, @@ -8238,6 +7371,27 @@ }, "card_type": { "$ref": "#/components/schemas/CardType" + }, + "payout_date": { + "description": "Payout date (if paid out at once).", + "type": "string", + "format": "date", + "example": "2019-08-28" + }, + "payout_type": { + "description": "Payout type.", + "type": "string", + "example": "BANK_ACCOUNT", + "enum": [ + "BANK_ACCOUNT", + "PREPAID_CARD" + ] + }, + "refunded_amount": { + "description": "Total refunded amount.", + "type": "number", + "format": "decimal", + "example": 0 } } } @@ -8336,11 +7490,27 @@ { "type": "object", "properties": { + "foreign_transaction_id": { + "description": "External/foreign transaction id (passed by clients).", + "type": "string", + "example": "J13253253x1" + }, + "client_transaction_id": { + "description": "Client transaction id.", + "type": "string", + "example": "urn:sumup:pos:sale:MNKKNGST:1D4E3B2D-111D-48D7-9AF0-832DAEF63DD7;2" + }, "username": { "description": "Email address of the registered user (merchant) to whom the payment is made.", "type": "string", "format": "email" }, + "fee_amount": { + "description": "Transaction SumUp total fee amount.", + "type": "number", + "format": "decimal", + "example": 8 + }, "lat": { "$ref": "#/components/schemas/Lat" }, @@ -8350,17 +7520,33 @@ "horizontal_accuracy": { "$ref": "#/components/schemas/HorizontalAccuracy" }, + "merchant_id": { + "description": "SumUp merchant internal Id.", + "type": "integer", + "format": "int64", + "example": 136902 + }, + "device_info": { + "$ref": "#/components/schemas/Device" + }, "simple_payment_type": { "description": "Simple name of the payment type.", "type": "string", "enum": [ - "MOTO", "CASH", "CC_SIGNATURE", "ELV", + "ELV_WITHOUT_SIGNATURE", "CC_CUSTOMER_ENTERED", "MANUAL_ENTRY", - "EMV" + "EMV", + "RECURRING", + "BALANCE", + "MOTO", + "BOLETO", + "APM", + "BITCOIN", + "CARD" ] }, "verification_method": { @@ -8368,31 +7554,47 @@ "type": "string", "enum": [ "none", - "na", "signature", "offline PIN", "online PIN", "offline PIN + signature", - "confirmation code verified" + "na" ] }, "card": { "$ref": "#/components/schemas/CardResponse" }, + "elv_account": { + "$ref": "#/components/schemas/ElvCardAccount" + }, "local_time": { "description": "Local date and time of the creation of the transaction.", "type": "string", "format": "date-time" }, + "payout_date": { + "description": "The date of the payout.", + "type": "string", + "format": "date", + "example": "2019-08-28" + }, "payout_type": { "description": "Payout type for the transaction.", "type": "string", "enum": [ "BANK_ACCOUNT", - "BALANCE", "PREPAID_CARD" ] }, + "process_as": { + "description": "Debit/Credit.", + "type": "string", + "example": "CREDIT", + "enum": [ + "CREDIT", + "DEBIT" + ] + }, "products": { "description": "List of products from the merchant's catalogue for which the transaction serves as a payment.", "type": "array", @@ -8403,7 +7605,35 @@ "vat_rates": { "description": "List of VAT rates applicable to the transaction.", "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "rate": { + "description": "VAT rate.", + "type": "number", + "format": "decimal", + "example": 0.045 + }, + "net": { + "description": "NET amount of products having this VAT rate applied.", + "type": "number", + "format": "decimal", + "example": 1.36 + }, + "vat": { + "description": "VAT amount of this rate applied.", + "type": "number", + "format": "decimal", + "example": 0.06 + }, + "gross": { + "description": "Gross amount of products having this VAT rate applied.", + "type": "number", + "format": "decimal", + "example": 1.42 + } + } + } }, "transaction_events": { "description": "List of transaction events related to the transaction.", @@ -8424,31 +7654,23 @@ "FAILED", "REFUND_FAILED", "REFUNDED", - "NON_COLLECTION" + "NON_COLLECTION", + "PENDING" ] }, "links": { "description": "List of hyperlinks for accessing related resources.", "type": "array", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/Link" - }, - { - "$ref": "#/components/schemas/LinkRefund" - } - ] - }, - "uniqueItems": true + "$ref": "#/components/schemas/Link" + } }, "events": { "description": "List of events related to the transaction.", "type": "array", "items": { "$ref": "#/components/schemas/Event" - }, - "uniqueItems": true + } }, "location": { "description": "Details of the payment location as received from the payment terminal.", @@ -8473,32 +7695,6 @@ } ] }, - "VatRates": { - "description": "Merchant VAT rates", - "type": "object", - "properties": { - "id": { - "description": "Internal ID", - "type": "number" - }, - "description": { - "description": "Description", - "type": "string" - }, - "rate": { - "description": "Rate", - "type": "number" - }, - "ordering": { - "description": "Ordering", - "type": "number" - }, - "country": { - "description": "Country ISO code", - "type": "string" - } - } - }, "Currency": { "description": "Three-letter [ISO4217](https://en.wikipedia.org/wiki/ISO_4217) code of the currency for the amount. Currently supported currency values are enumerated above.", "type": "string", @@ -8508,6 +7704,7 @@ "BRL", "CHF", "CLP", + "COP", "CZK", "DKK", "EUR", @@ -8560,28 +7757,6 @@ "maximum": 90, "minimum": 0 }, - "LinkRefund": { - "allOf": [ - { - "$ref": "#/components/schemas/Link" - }, - { - "type": "object", - "properties": { - "min_amount": { - "description": "Minimum allowed amount for the refund.", - "type": "number", - "format": "float" - }, - "max_amount": { - "description": "Maximum allowed amount for the refund.", - "type": "number", - "format": "float" - } - } - } - ] - }, "Lon": { "description": "Longitude value from the coordinates of the payment location (as received from the payment terminal reader).", "type": "number", @@ -8837,7 +8012,7 @@ }, "externalDocs": { "description": "Address documentation", - "url": "https://sumup.roadie.so/docs/default/Component/merchants/merchant/#addresses" + "url": "https://backstage.sumup.net/docs/default/Component/merchants/merchant/#addresses" }, "required": [ "country" @@ -9987,6 +9162,12 @@ "type": "string", "x-struct": null, "x-validate": null + }, + "type": { + "description": "Error code", + "type": "string", + "x-struct": null, + "x-validate": null } }, "required": [ @@ -10184,6 +9365,12 @@ "type": "string", "x-struct": null, "x-validate": null + }, + "type": { + "description": "Error code", + "type": "string", + "x-struct": null, + "x-validate": null } }, "required": [ @@ -10689,6 +9876,46 @@ "x-struct": "Elixir.SoloEdgeWeb.OpenApi.Errors.NotFound", "x-validate": null }, + "CountryDetails": { + "description": "Country Details", + "type": "object", + "properties": { + "currency": { + "description": "Currency ISO 4217 code", + "type": "string" + }, + "iso_code": { + "description": "Country ISO code", + "type": "string" + }, + "en_name": { + "description": "Country EN name", + "type": "string" + }, + "native_name": { + "description": "Country native name", + "type": "string" + } + } + }, + "TimeoffsetDetails": { + "description": "TimeOffset Details", + "type": "object", + "properties": { + "post_code": { + "description": "Postal code", + "type": "string" + }, + "offset": { + "description": "UTC offset", + "type": "number" + }, + "dst": { + "description": "Daylight Saving Time", + "type": "boolean" + } + } + }, "AddressPayloadLegacy": { "description": "Personal address", "type": "object", @@ -10745,6 +9972,103 @@ "post_code" ] }, + "BusinessOwners": { + "description": "Business owners information.", + "type": "array", + "items": { + "type": "object", + "properties": { + "first_name": { + "description": "BO's first name", + "type": "string" + }, + "last_name": { + "description": "BO's last name of the user", + "type": "string" + }, + "date_of_birth": { + "description": "Date of birth", + "type": "string" + }, + "mobile_phone": { + "description": "Mobile phone number", + "type": "string" + }, + "landline": { + "description": "BO's Landline", + "type": "string" + }, + "ownership": { + "description": "Ownership percentage", + "type": "number" + } + } + } + }, + "AddressWithDetails": { + "description": "Details of the registered address.", + "type": "object", + "properties": { + "address_line1": { + "description": "Address line 1", + "type": "string" + }, + "address_line2": { + "description": "Address line 2", + "type": "string" + }, + "city": { + "description": "City", + "type": "string" + }, + "country": { + "description": "Country ISO 3166-1 code", + "type": "string" + }, + "region_id": { + "description": "Country region id", + "type": "number" + }, + "region_name": { + "description": "Region name", + "type": "string" + }, + "region_code": { + "description": "Region code", + "type": "string" + }, + "post_code": { + "description": "Postal code", + "type": "string" + }, + "landline": { + "description": "Landline number", + "type": "string" + }, + "first_name": { + "description": "undefined", + "type": "string" + }, + "last_name": { + "description": "undefined", + "type": "string" + }, + "company": { + "description": "undefined", + "type": "string" + }, + "country_details": { + "$ref": "#/components/schemas/CountryDetails" + }, + "timeoffset_details": { + "$ref": "#/components/schemas/TimeoffsetDetails" + }, + "state_id": { + "description": "undefined", + "type": "string" + } + } + }, "BankAccountPayload": { "type": "object", "properties": { @@ -11036,6 +10360,86 @@ "address" ] }, + "BankAccount": { + "type": "object", + "properties": { + "bank_code": { + "description": "Bank code", + "type": "string" + }, + "branch_code": { + "description": "Branch code", + "type": "string" + }, + "swift": { + "description": "SWIFT code", + "type": "string" + }, + "account_number": { + "description": "Account number", + "type": "string" + }, + "iban": { + "description": "IBAN", + "type": "string" + }, + "account_type": { + "description": "Type of the account", + "type": "string" + }, + "account_category": { + "description": "Account category - business or personal", + "type": "string" + }, + "account_holder_name": { + "type": "string" + }, + "status": { + "description": "Status in the verification process", + "type": "string" + }, + "primary": { + "description": "The primary bank account is the one used for payouts", + "type": "boolean" + }, + "created_at": { + "description": "Creation date of the bank account", + "type": "string" + }, + "bank_name": { + "description": "Bank name", + "type": "string" + } + } + }, + "PersonalProfileLegacy": { + "description": "Account's personal profile.", + "type": "object", + "properties": { + "first_name": { + "description": "First name of the user", + "type": "string" + }, + "last_name": { + "description": "Last name of the user", + "type": "string" + }, + "date_of_birth": { + "description": "Date of birth", + "type": "string" + }, + "mobile_phone": { + "description": "Mobile phone number", + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/AddressWithDetails" + }, + "complete": { + "type": "boolean" + } + } + }, "EntryModeFilter": { "description": "Entry mode value accepted by the `entry_modes[]` filter.", "type": "string", @@ -11694,16 +11098,6 @@ } } }, - "PersonalProfileLegacy": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PersonalProfileLegacy" - } - } - } - }, "Transaction": { "description": "OK", "content": { @@ -11964,15 +11358,6 @@ } ] }, - { - "name": "Merchant", - "description": "Manage merchant profile.", - "x-core-objects": [ - { - "$ref": "#/components/schemas/MerchantAccount" - } - ] - }, { "name": "Subaccounts", "description": "Endpoints for managing merchant sub-accounts (operators).", From 985d8b9a9fb51fa7cc70d7175c8ddc67a1ba4e99 Mon Sep 17 00:00:00 2001 From: "sumup-bot[bot]" <241716704+sumup-bot[bot]@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:25:41 +0000 Subject: [PATCH 2/2] chore: generate code --- .../java/com/sumup/sdk/SumUpAsyncClient.java | 12 - src/main/java/com/sumup/sdk/SumUpClient.java | 12 - .../sdk/clients/MerchantAsyncClient.java | 256 ------------- .../com/sumup/sdk/clients/MerchantClient.java | 246 ------------ .../com/sumup/sdk/models/AccountLegacy.java | 58 --- .../sumup/sdk/models/AccountLegacyType.java | 40 -- .../com/sumup/sdk/models/AppSettings.java | 284 -------------- .../CreateReaderCheckoutErrorErrors.java | 21 +- .../CreateReaderTerminateErrorErrors.java | 21 +- .../java/com/sumup/sdk/models/Currency.java | 1 + .../java/com/sumup/sdk/models/Device.java | 102 +++++ .../sdk/models/DoingBusinessAsLegacy.java | 118 ------ .../models/DoingBusinessAsLegacyAddress.java | 133 ------- .../com/sumup/sdk/models/ElvCardAccount.java | 87 +++++ .../com/sumup/sdk/models/IncludeItem.java | 42 --- .../com/sumup/sdk/models/LegalTypeLegacy.java | 88 ----- .../java/com/sumup/sdk/models/LinkRefund.java | 4 - .../sdk/models/ListTransactionsResponse.java | 6 +- .../models/ListTransactionsV21Response.java | 6 +- .../com/sumup/sdk/models/MerchantAccount.java | 104 ------ .../sdk/models/MerchantProfileLegacy.java | 351 ------------------ .../sumup/sdk/models/MerchantSettings.java | 220 ----------- .../models/MerchantSettingsMotoPayment.java | 42 --- .../sumup/sdk/models/PermissionsLegacy.java | 89 ----- .../java/com/sumup/sdk/models/Product.java | 118 +++--- .../sumup/sdk/models/TransactionEvent.java | 6 +- .../sdk/models/TransactionsHistoryLink.java | 60 +++ .../java/com/sumup/sdk/models/VatRates.java | 103 ----- 28 files changed, 356 insertions(+), 2274 deletions(-) delete mode 100644 src/main/java/com/sumup/sdk/clients/MerchantAsyncClient.java delete mode 100644 src/main/java/com/sumup/sdk/clients/MerchantClient.java delete mode 100644 src/main/java/com/sumup/sdk/models/AccountLegacy.java delete mode 100644 src/main/java/com/sumup/sdk/models/AccountLegacyType.java delete mode 100644 src/main/java/com/sumup/sdk/models/AppSettings.java create mode 100644 src/main/java/com/sumup/sdk/models/Device.java delete mode 100644 src/main/java/com/sumup/sdk/models/DoingBusinessAsLegacy.java delete mode 100644 src/main/java/com/sumup/sdk/models/DoingBusinessAsLegacyAddress.java create mode 100644 src/main/java/com/sumup/sdk/models/ElvCardAccount.java delete mode 100644 src/main/java/com/sumup/sdk/models/IncludeItem.java delete mode 100644 src/main/java/com/sumup/sdk/models/LegalTypeLegacy.java delete mode 100644 src/main/java/com/sumup/sdk/models/LinkRefund.java delete mode 100644 src/main/java/com/sumup/sdk/models/MerchantAccount.java delete mode 100644 src/main/java/com/sumup/sdk/models/MerchantProfileLegacy.java delete mode 100644 src/main/java/com/sumup/sdk/models/MerchantSettings.java delete mode 100644 src/main/java/com/sumup/sdk/models/MerchantSettingsMotoPayment.java delete mode 100644 src/main/java/com/sumup/sdk/models/PermissionsLegacy.java create mode 100644 src/main/java/com/sumup/sdk/models/TransactionsHistoryLink.java delete mode 100644 src/main/java/com/sumup/sdk/models/VatRates.java diff --git a/src/main/java/com/sumup/sdk/SumUpAsyncClient.java b/src/main/java/com/sumup/sdk/SumUpAsyncClient.java index 97f9bde..dd0b361 100644 --- a/src/main/java/com/sumup/sdk/SumUpAsyncClient.java +++ b/src/main/java/com/sumup/sdk/SumUpAsyncClient.java @@ -5,7 +5,6 @@ import com.sumup.sdk.clients.CustomersAsyncClient; import com.sumup.sdk.clients.MembersAsyncClient; import com.sumup.sdk.clients.MembershipsAsyncClient; -import com.sumup.sdk.clients.MerchantAsyncClient; import com.sumup.sdk.clients.MerchantsAsyncClient; import com.sumup.sdk.clients.PayoutsAsyncClient; import com.sumup.sdk.clients.ReadersAsyncClient; @@ -28,7 +27,6 @@ public final class SumUpAsyncClient { private final CustomersAsyncClient customers; private final MembersAsyncClient members; private final MembershipsAsyncClient memberships; - private final MerchantAsyncClient merchant; private final MerchantsAsyncClient merchants; private final PayoutsAsyncClient payouts; private final ReadersAsyncClient readers; @@ -70,7 +68,6 @@ private SumUpAsyncClient(ApiClient apiClient) { this.customers = new CustomersAsyncClient(this.apiClient); this.members = new MembersAsyncClient(this.apiClient); this.memberships = new MembershipsAsyncClient(this.apiClient); - this.merchant = new MerchantAsyncClient(this.apiClient); this.merchants = new MerchantsAsyncClient(this.apiClient); this.payouts = new PayoutsAsyncClient(this.apiClient); this.readers = new ReadersAsyncClient(this.apiClient); @@ -134,15 +131,6 @@ public MembershipsAsyncClient memberships() { return memberships; } - /** - * Returns the MerchantAsyncClient client exposing endpoints tagged with "Merchant". - * - * @return Client for the associated API group. - */ - public MerchantAsyncClient merchant() { - return merchant; - } - /** * Returns the MerchantsAsyncClient client exposing endpoints tagged with "Merchants". * diff --git a/src/main/java/com/sumup/sdk/SumUpClient.java b/src/main/java/com/sumup/sdk/SumUpClient.java index 2c4e048..1f9f88a 100644 --- a/src/main/java/com/sumup/sdk/SumUpClient.java +++ b/src/main/java/com/sumup/sdk/SumUpClient.java @@ -5,7 +5,6 @@ import com.sumup.sdk.clients.CustomersClient; import com.sumup.sdk.clients.MembersClient; import com.sumup.sdk.clients.MembershipsClient; -import com.sumup.sdk.clients.MerchantClient; import com.sumup.sdk.clients.MerchantsClient; import com.sumup.sdk.clients.PayoutsClient; import com.sumup.sdk.clients.ReadersClient; @@ -28,7 +27,6 @@ public final class SumUpClient { private final CustomersClient customers; private final MembersClient members; private final MembershipsClient memberships; - private final MerchantClient merchant; private final MerchantsClient merchants; private final PayoutsClient payouts; private final ReadersClient readers; @@ -70,7 +68,6 @@ private SumUpClient(ApiClient apiClient) { this.customers = new CustomersClient(this.apiClient); this.members = new MembersClient(this.apiClient); this.memberships = new MembershipsClient(this.apiClient); - this.merchant = new MerchantClient(this.apiClient); this.merchants = new MerchantsClient(this.apiClient); this.payouts = new PayoutsClient(this.apiClient); this.readers = new ReadersClient(this.apiClient); @@ -134,15 +131,6 @@ public MembershipsClient memberships() { return memberships; } - /** - * Returns the MerchantClient client exposing endpoints tagged with "Merchant". - * - * @return Client for the associated API group. - */ - public MerchantClient merchant() { - return merchant; - } - /** * Returns the MerchantsClient client exposing endpoints tagged with "Merchants". * diff --git a/src/main/java/com/sumup/sdk/clients/MerchantAsyncClient.java b/src/main/java/com/sumup/sdk/clients/MerchantAsyncClient.java deleted file mode 100644 index fc3c026..0000000 --- a/src/main/java/com/sumup/sdk/clients/MerchantAsyncClient.java +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.clients; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.sumup.sdk.core.ApiClient; -import com.sumup.sdk.core.ApiException; -import com.sumup.sdk.core.HttpMethod; -import com.sumup.sdk.core.RequestOptions; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.CompletableFuture; - -/** Client for the "Merchant" API group. */ -public final class MerchantAsyncClient { - private final ApiClient apiClient; - - /** - * Creates a new MerchantAsyncClient instance backed by the provided ApiClient. - * - * @param apiClient Configured API client used to send HTTP requests. - */ - public MerchantAsyncClient(ApiClient apiClient) { - this.apiClient = Objects.requireNonNull(apiClient, "apiClient"); - } - - /** - * Retrieve a profile - * - *

Returns user profile information. - * - *

Operation ID: GetAccount - * - *

Call the overload that accepts optional parameter objects or RequestOptions to customize - * headers, authorization, query values, or timeouts. - * - * @return CompletableFuture resolved with com.sumup.sdk.models.MerchantAccount parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture getAccount() throws ApiException { - return getAccount(null); - } - - /** - * Retrieve a profile - * - *

Returns user profile information. - * - *

Operation ID: GetAccount - * - * @param getAccount Optional query parameters for this request. - *

Call the overload that accepts RequestOptions to customize headers, authorization, or - * request timeout. - * @return CompletableFuture resolved with com.sumup.sdk.models.MerchantAccount parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture getAccount( - GetAccountQueryParams getAccount) throws ApiException { - return getAccount(getAccount, null); - } - - /** - * Retrieve a profile - * - *

Returns user profile information. - * - *

Operation ID: GetAccount - * - * @param getAccount Optional query parameters for this request. - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return CompletableFuture resolved with com.sumup.sdk.models.MerchantAccount parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture getAccount( - GetAccountQueryParams getAccount, RequestOptions requestOptions) throws ApiException { - String path = "/v0.1/me"; - Map queryParams = new LinkedHashMap<>(); - if (getAccount != null) { - queryParams.putAll(getAccount.toMap()); - } - - return this.apiClient.sendAsync( - HttpMethod.GET, - path, - queryParams, - null, - null, - new TypeReference() {}, - requestOptions); - } - - /** - * Retrieve DBA - * - *

Retrieves Doing Business As profile. - * - *

Operation ID: GetDoingBusinessAs - * - *

Call the overload that accepts RequestOptions to customize headers, authorization, or - * request timeout. - * - * @return CompletableFuture resolved with com.sumup.sdk.models.DoingBusinessAsLegacy parsed - * response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture getDoingBusinessAs() - throws ApiException { - return getDoingBusinessAs(null); - } - - /** - * Retrieve DBA - * - *

Retrieves Doing Business As profile. - * - *

Operation ID: GetDoingBusinessAs - * - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return CompletableFuture resolved with com.sumup.sdk.models.DoingBusinessAsLegacy parsed - * response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture getDoingBusinessAs( - RequestOptions requestOptions) throws ApiException { - String path = "/v0.1/me/merchant-profile/doing-business-as"; - - return this.apiClient.sendAsync( - HttpMethod.GET, - path, - null, - null, - null, - new TypeReference() {}, - requestOptions); - } - - /** - * Retrieve a merchant profile - * - *

Retrieves merchant profile data. - * - *

Operation ID: GetMerchantProfile - * - *

Call the overload that accepts RequestOptions to customize headers, authorization, or - * request timeout. - * - * @return CompletableFuture resolved with com.sumup.sdk.models.MerchantProfileLegacy parsed - * response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture getMerchantProfile() - throws ApiException { - return getMerchantProfile(null); - } - - /** - * Retrieve a merchant profile - * - *

Retrieves merchant profile data. - * - *

Operation ID: GetMerchantProfile - * - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return CompletableFuture resolved with com.sumup.sdk.models.MerchantProfileLegacy parsed - * response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture getMerchantProfile( - RequestOptions requestOptions) throws ApiException { - String path = "/v0.1/me/merchant-profile"; - - return this.apiClient.sendAsync( - HttpMethod.GET, - path, - null, - null, - null, - new TypeReference() {}, - requestOptions); - } - - /** - * Retrieve a personal profile - * - *

Retrieves personal profile data. - * - *

Operation ID: GetPersonalProfile - * - *

Call the overload that accepts RequestOptions to customize headers, authorization, or - * request timeout. - * - * @return CompletableFuture resolved with com.sumup.sdk.models.PersonalProfileLegacy parsed - * response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture getPersonalProfile() - throws ApiException { - return getPersonalProfile(null); - } - - /** - * Retrieve a personal profile - * - *

Retrieves personal profile data. - * - *

Operation ID: GetPersonalProfile - * - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return CompletableFuture resolved with com.sumup.sdk.models.PersonalProfileLegacy parsed - * response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture getPersonalProfile( - RequestOptions requestOptions) throws ApiException { - String path = "/v0.1/me/personal-profile"; - - return this.apiClient.sendAsync( - HttpMethod.GET, - path, - null, - null, - null, - new TypeReference() {}, - requestOptions); - } - - /** Optional query parameters for this request. */ - public static final class GetAccountQueryParams { - private final Map values = new LinkedHashMap<>(); - - /** - * Sets the include[] query parameter. - * - * @param value A list of additional information you want to receive for the user. By default - * only personal and merchant profile information will be returned. - * @return This GetAccountQueryParams instance. - */ - public GetAccountQueryParams include(java.util.List value) { - this.values.put("include[]", Objects.requireNonNull(value, "include")); - return this; - } - - /** - * Converts query parameters to a map understood by ApiClient. - * - * @return Collected query parameters keyed by API name. - */ - Map toMap() { - return values; - } - } -} diff --git a/src/main/java/com/sumup/sdk/clients/MerchantClient.java b/src/main/java/com/sumup/sdk/clients/MerchantClient.java deleted file mode 100644 index a07b1bb..0000000 --- a/src/main/java/com/sumup/sdk/clients/MerchantClient.java +++ /dev/null @@ -1,246 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.clients; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.sumup.sdk.core.ApiClient; -import com.sumup.sdk.core.ApiException; -import com.sumup.sdk.core.HttpMethod; -import com.sumup.sdk.core.RequestOptions; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; - -/** Client for the "Merchant" API group. */ -public final class MerchantClient { - private final ApiClient apiClient; - - /** - * Creates a new MerchantClient instance backed by the provided ApiClient. - * - * @param apiClient Configured API client used to send HTTP requests. - */ - public MerchantClient(ApiClient apiClient) { - this.apiClient = Objects.requireNonNull(apiClient, "apiClient"); - } - - /** - * Retrieve a profile - * - *

Returns user profile information. - * - *

Operation ID: GetAccount - * - *

Call the overload that accepts optional parameter objects or RequestOptions to customize - * headers, authorization, query values, or timeouts. - * - * @return com.sumup.sdk.models.MerchantAccount parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.MerchantAccount getAccount() throws ApiException { - return getAccount(null); - } - - /** - * Retrieve a profile - * - *

Returns user profile information. - * - *

Operation ID: GetAccount - * - * @param getAccount Optional query parameters for this request. - *

Call the overload that accepts RequestOptions to customize headers, authorization, or - * request timeout. - * @return com.sumup.sdk.models.MerchantAccount parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.MerchantAccount getAccount(GetAccountQueryParams getAccount) - throws ApiException { - return getAccount(getAccount, null); - } - - /** - * Retrieve a profile - * - *

Returns user profile information. - * - *

Operation ID: GetAccount - * - * @param getAccount Optional query parameters for this request. - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return com.sumup.sdk.models.MerchantAccount parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.MerchantAccount getAccount( - GetAccountQueryParams getAccount, RequestOptions requestOptions) throws ApiException { - String path = "/v0.1/me"; - Map queryParams = new LinkedHashMap<>(); - if (getAccount != null) { - queryParams.putAll(getAccount.toMap()); - } - - return this.apiClient.send( - HttpMethod.GET, - path, - queryParams, - null, - null, - new TypeReference() {}, - requestOptions); - } - - /** - * Retrieve DBA - * - *

Retrieves Doing Business As profile. - * - *

Operation ID: GetDoingBusinessAs - * - *

Call the overload that accepts RequestOptions to customize headers, authorization, or - * request timeout. - * - * @return com.sumup.sdk.models.DoingBusinessAsLegacy parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.DoingBusinessAsLegacy getDoingBusinessAs() throws ApiException { - return getDoingBusinessAs(null); - } - - /** - * Retrieve DBA - * - *

Retrieves Doing Business As profile. - * - *

Operation ID: GetDoingBusinessAs - * - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return com.sumup.sdk.models.DoingBusinessAsLegacy parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.DoingBusinessAsLegacy getDoingBusinessAs( - RequestOptions requestOptions) throws ApiException { - String path = "/v0.1/me/merchant-profile/doing-business-as"; - - return this.apiClient.send( - HttpMethod.GET, - path, - null, - null, - null, - new TypeReference() {}, - requestOptions); - } - - /** - * Retrieve a merchant profile - * - *

Retrieves merchant profile data. - * - *

Operation ID: GetMerchantProfile - * - *

Call the overload that accepts RequestOptions to customize headers, authorization, or - * request timeout. - * - * @return com.sumup.sdk.models.MerchantProfileLegacy parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.MerchantProfileLegacy getMerchantProfile() throws ApiException { - return getMerchantProfile(null); - } - - /** - * Retrieve a merchant profile - * - *

Retrieves merchant profile data. - * - *

Operation ID: GetMerchantProfile - * - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return com.sumup.sdk.models.MerchantProfileLegacy parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.MerchantProfileLegacy getMerchantProfile( - RequestOptions requestOptions) throws ApiException { - String path = "/v0.1/me/merchant-profile"; - - return this.apiClient.send( - HttpMethod.GET, - path, - null, - null, - null, - new TypeReference() {}, - requestOptions); - } - - /** - * Retrieve a personal profile - * - *

Retrieves personal profile data. - * - *

Operation ID: GetPersonalProfile - * - *

Call the overload that accepts RequestOptions to customize headers, authorization, or - * request timeout. - * - * @return com.sumup.sdk.models.PersonalProfileLegacy parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.PersonalProfileLegacy getPersonalProfile() throws ApiException { - return getPersonalProfile(null); - } - - /** - * Retrieve a personal profile - * - *

Retrieves personal profile data. - * - *

Operation ID: GetPersonalProfile - * - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return com.sumup.sdk.models.PersonalProfileLegacy parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.PersonalProfileLegacy getPersonalProfile( - RequestOptions requestOptions) throws ApiException { - String path = "/v0.1/me/personal-profile"; - - return this.apiClient.send( - HttpMethod.GET, - path, - null, - null, - null, - new TypeReference() {}, - requestOptions); - } - - /** Optional query parameters for this request. */ - public static final class GetAccountQueryParams { - private final Map values = new LinkedHashMap<>(); - - /** - * Sets the include[] query parameter. - * - * @param value A list of additional information you want to receive for the user. By default - * only personal and merchant profile information will be returned. - * @return This GetAccountQueryParams instance. - */ - public GetAccountQueryParams include(java.util.List value) { - this.values.put("include[]", Objects.requireNonNull(value, "include")); - return this; - } - - /** - * Converts query parameters to a map understood by ApiClient. - * - * @return Collected query parameters keyed by API name. - */ - Map toMap() { - return values; - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/AccountLegacy.java b/src/main/java/com/sumup/sdk/models/AccountLegacy.java deleted file mode 100644 index 1f5b5c6..0000000 --- a/src/main/java/com/sumup/sdk/models/AccountLegacy.java +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Profile information. */ -public record AccountLegacy( - /** The role of the user. */ - com.sumup.sdk.models.AccountLegacyType type, - - /** Username of the user profile. */ - String username) { - /** - * Creates a builder for AccountLegacy. - * - * @return Builder that constructs immutable AccountLegacy instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for AccountLegacy instances. */ - public static final class Builder { - private com.sumup.sdk.models.AccountLegacyType type; - private String username; - - private Builder() {} - - /** - * Sets the value for {@code type}. - * - * @param type The role of the user. - * @return This builder instance. - */ - public Builder type(com.sumup.sdk.models.AccountLegacyType type) { - this.type = type; - return this; - } - - /** - * Sets the value for {@code username}. - * - * @param username Username of the user profile. - * @return This builder instance. - */ - public Builder username(String username) { - this.username = username; - return this; - } - - /** - * Builds an immutable AccountLegacy instance. - * - * @return Immutable AccountLegacy. - */ - public AccountLegacy build() { - return new AccountLegacy(type, username); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/AccountLegacyType.java b/src/main/java/com/sumup/sdk/models/AccountLegacyType.java deleted file mode 100644 index d1f7d99..0000000 --- a/src/main/java/com/sumup/sdk/models/AccountLegacyType.java +++ /dev/null @@ -1,40 +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; - -/** The role of the user. */ -public enum AccountLegacyType { - NORMAL("normal"), - OPERATOR("operator"); - - private final String value; - - AccountLegacyType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static AccountLegacyType fromValue(String value) { - if (value == null) { - return null; - } - for (AccountLegacyType entry : values()) { - if (entry.value.equals(value)) { - return entry; - } - } - throw new IllegalArgumentException("Unknown AccountLegacyType value: " + value); - } -} diff --git a/src/main/java/com/sumup/sdk/models/AppSettings.java b/src/main/java/com/sumup/sdk/models/AppSettings.java deleted file mode 100644 index 3fbb4c7..0000000 --- a/src/main/java/com/sumup/sdk/models/AppSettings.java +++ /dev/null @@ -1,284 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Mobile app settings */ -public record AppSettings( - /** Advanced mode. */ - String advancedMode, - - /** Barcode scanner. */ - String barcodeScanner, - - /** Cash payment. */ - String cashPayment, - - /** Checkout preference */ - String checkoutPreference, - - /** Expected max transaction amount. */ - Double expectedMaxTransactionAmount, - - /** Include vat. */ - Boolean includeVat, - - /** Manual entry. */ - String manualEntry, - - /** Manual entry tutorial. */ - Boolean manualEntryTutorial, - - /** Mobile payment. */ - String mobilePayment, - - /** Mobile payment tutorial. */ - Boolean mobilePaymentTutorial, - - /** Reader payment. */ - String readerPayment, - - /** Referral. */ - String referral, - - /** Tax enabled. */ - Boolean taxEnabled, - - /** Terminal mode tutorial. */ - Boolean terminalModeTutorial, - - /** Tip rates. */ - java.util.List tipRates, - - /** Tipping. */ - String tipping) { - /** - * Creates a builder for AppSettings. - * - * @return Builder that constructs immutable AppSettings instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for AppSettings instances. */ - public static final class Builder { - private String advancedMode; - private String barcodeScanner; - private String cashPayment; - private String checkoutPreference; - private Double expectedMaxTransactionAmount; - private Boolean includeVat; - private String manualEntry; - private Boolean manualEntryTutorial; - private String mobilePayment; - private Boolean mobilePaymentTutorial; - private String readerPayment; - private String referral; - private Boolean taxEnabled; - private Boolean terminalModeTutorial; - private java.util.List tipRates; - private String tipping; - - private Builder() {} - - /** - * Sets the value for {@code advancedMode}. - * - * @param advancedMode Advanced mode. - * @return This builder instance. - */ - public Builder advancedMode(String advancedMode) { - this.advancedMode = advancedMode; - return this; - } - - /** - * Sets the value for {@code barcodeScanner}. - * - * @param barcodeScanner Barcode scanner. - * @return This builder instance. - */ - public Builder barcodeScanner(String barcodeScanner) { - this.barcodeScanner = barcodeScanner; - return this; - } - - /** - * Sets the value for {@code cashPayment}. - * - * @param cashPayment Cash payment. - * @return This builder instance. - */ - public Builder cashPayment(String cashPayment) { - this.cashPayment = cashPayment; - return this; - } - - /** - * Sets the value for {@code checkoutPreference}. - * - * @param checkoutPreference Checkout preference - * @return This builder instance. - */ - public Builder checkoutPreference(String checkoutPreference) { - this.checkoutPreference = checkoutPreference; - return this; - } - - /** - * Sets the value for {@code expectedMaxTransactionAmount}. - * - * @param expectedMaxTransactionAmount Expected max transaction amount. - * @return This builder instance. - */ - public Builder expectedMaxTransactionAmount(Double expectedMaxTransactionAmount) { - this.expectedMaxTransactionAmount = expectedMaxTransactionAmount; - return this; - } - - /** - * Sets the value for {@code includeVat}. - * - * @param includeVat Include vat. - * @return This builder instance. - */ - public Builder includeVat(Boolean includeVat) { - this.includeVat = includeVat; - return this; - } - - /** - * Sets the value for {@code manualEntry}. - * - * @param manualEntry Manual entry. - * @return This builder instance. - */ - public Builder manualEntry(String manualEntry) { - this.manualEntry = manualEntry; - return this; - } - - /** - * Sets the value for {@code manualEntryTutorial}. - * - * @param manualEntryTutorial Manual entry tutorial. - * @return This builder instance. - */ - public Builder manualEntryTutorial(Boolean manualEntryTutorial) { - this.manualEntryTutorial = manualEntryTutorial; - return this; - } - - /** - * Sets the value for {@code mobilePayment}. - * - * @param mobilePayment Mobile payment. - * @return This builder instance. - */ - public Builder mobilePayment(String mobilePayment) { - this.mobilePayment = mobilePayment; - return this; - } - - /** - * Sets the value for {@code mobilePaymentTutorial}. - * - * @param mobilePaymentTutorial Mobile payment tutorial. - * @return This builder instance. - */ - public Builder mobilePaymentTutorial(Boolean mobilePaymentTutorial) { - this.mobilePaymentTutorial = mobilePaymentTutorial; - return this; - } - - /** - * Sets the value for {@code readerPayment}. - * - * @param readerPayment Reader payment. - * @return This builder instance. - */ - public Builder readerPayment(String readerPayment) { - this.readerPayment = readerPayment; - return this; - } - - /** - * Sets the value for {@code referral}. - * - * @param referral Referral. - * @return This builder instance. - */ - public Builder referral(String referral) { - this.referral = referral; - return this; - } - - /** - * Sets the value for {@code taxEnabled}. - * - * @param taxEnabled Tax enabled. - * @return This builder instance. - */ - public Builder taxEnabled(Boolean taxEnabled) { - this.taxEnabled = taxEnabled; - return this; - } - - /** - * Sets the value for {@code terminalModeTutorial}. - * - * @param terminalModeTutorial Terminal mode tutorial. - * @return This builder instance. - */ - public Builder terminalModeTutorial(Boolean terminalModeTutorial) { - this.terminalModeTutorial = terminalModeTutorial; - return this; - } - - /** - * Sets the value for {@code tipRates}. - * - * @param tipRates Tip rates. - * @return This builder instance. - */ - public Builder tipRates(java.util.List tipRates) { - this.tipRates = tipRates; - return this; - } - - /** - * Sets the value for {@code tipping}. - * - * @param tipping Tipping. - * @return This builder instance. - */ - public Builder tipping(String tipping) { - this.tipping = tipping; - return this; - } - - /** - * Builds an immutable AppSettings instance. - * - * @return Immutable AppSettings. - */ - public AppSettings build() { - return new AppSettings( - advancedMode, - barcodeScanner, - cashPayment, - checkoutPreference, - expectedMaxTransactionAmount, - includeVat, - manualEntry, - manualEntryTutorial, - mobilePayment, - mobilePaymentTutorial, - readerPayment, - referral, - taxEnabled, - terminalModeTutorial, - tipRates, - tipping); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/CreateReaderCheckoutErrorErrors.java b/src/main/java/com/sumup/sdk/models/CreateReaderCheckoutErrorErrors.java index cc2a659..a27452f 100644 --- a/src/main/java/com/sumup/sdk/models/CreateReaderCheckoutErrorErrors.java +++ b/src/main/java/com/sumup/sdk/models/CreateReaderCheckoutErrorErrors.java @@ -1,9 +1,14 @@ // Code generated by sumup-java/codegen. DO NOT EDIT. package com.sumup.sdk.models; +import java.util.Objects; + public record CreateReaderCheckoutErrorErrors( /** Error message */ - String detail) { + String detail, + + /** Error code */ + String type) { /** * Creates a builder for CreateReaderCheckoutErrorErrors. * @@ -16,6 +21,7 @@ public static Builder builder() { /** Builder for CreateReaderCheckoutErrorErrors instances. */ public static final class Builder { private String detail; + private String type; private Builder() {} @@ -30,13 +36,24 @@ public Builder detail(String detail) { return this; } + /** + * Sets the value for {@code type}. + * + * @param type Error code + * @return This builder instance. + */ + public Builder type(String type) { + this.type = type; + return this; + } + /** * Builds an immutable CreateReaderCheckoutErrorErrors instance. * * @return Immutable CreateReaderCheckoutErrorErrors. */ public CreateReaderCheckoutErrorErrors build() { - return new CreateReaderCheckoutErrorErrors(detail); + return new CreateReaderCheckoutErrorErrors(detail, Objects.requireNonNull(type, "type")); } } } diff --git a/src/main/java/com/sumup/sdk/models/CreateReaderTerminateErrorErrors.java b/src/main/java/com/sumup/sdk/models/CreateReaderTerminateErrorErrors.java index 0205202..a38b666 100644 --- a/src/main/java/com/sumup/sdk/models/CreateReaderTerminateErrorErrors.java +++ b/src/main/java/com/sumup/sdk/models/CreateReaderTerminateErrorErrors.java @@ -1,9 +1,14 @@ // Code generated by sumup-java/codegen. DO NOT EDIT. package com.sumup.sdk.models; +import java.util.Objects; + public record CreateReaderTerminateErrorErrors( /** Error message */ - String detail) { + String detail, + + /** Error code */ + String type) { /** * Creates a builder for CreateReaderTerminateErrorErrors. * @@ -16,6 +21,7 @@ public static Builder builder() { /** Builder for CreateReaderTerminateErrorErrors instances. */ public static final class Builder { private String detail; + private String type; private Builder() {} @@ -30,13 +36,24 @@ public Builder detail(String detail) { return this; } + /** + * Sets the value for {@code type}. + * + * @param type Error code + * @return This builder instance. + */ + public Builder type(String type) { + this.type = type; + return this; + } + /** * Builds an immutable CreateReaderTerminateErrorErrors instance. * * @return Immutable CreateReaderTerminateErrorErrors. */ public CreateReaderTerminateErrorErrors build() { - return new CreateReaderTerminateErrorErrors(detail); + return new CreateReaderTerminateErrorErrors(detail, Objects.requireNonNull(type, "type")); } } } diff --git a/src/main/java/com/sumup/sdk/models/Currency.java b/src/main/java/com/sumup/sdk/models/Currency.java index 3357f0e..876283e 100644 --- a/src/main/java/com/sumup/sdk/models/Currency.java +++ b/src/main/java/com/sumup/sdk/models/Currency.java @@ -13,6 +13,7 @@ public enum Currency { BRL("BRL"), CHF("CHF"), CLP("CLP"), + COP("COP"), CZK("CZK"), DKK("DKK"), EUR("EUR"), diff --git a/src/main/java/com/sumup/sdk/models/Device.java b/src/main/java/com/sumup/sdk/models/Device.java new file mode 100644 index 0000000..6923d11 --- /dev/null +++ b/src/main/java/com/sumup/sdk/models/Device.java @@ -0,0 +1,102 @@ +// Code generated by sumup-java/codegen. DO NOT EDIT. +package com.sumup.sdk.models; + +public record Device( + /** Device model. */ + String model, + + /** Device name. */ + String name, + + /** Device OS. */ + String systemName, + + /** Device OS version. */ + String systemVersion, + + /** Device UUID. */ + String uuid) { + /** + * Creates a builder for Device. + * + * @return Builder that constructs immutable Device instances. + */ + public static Builder builder() { + return new Builder(); + } + + /** Builder for Device instances. */ + public static final class Builder { + private String model; + private String name; + private String systemName; + private String systemVersion; + private String uuid; + + private Builder() {} + + /** + * Sets the value for {@code model}. + * + * @param model Device model. + * @return This builder instance. + */ + public Builder model(String model) { + this.model = model; + return this; + } + + /** + * Sets the value for {@code name}. + * + * @param name Device name. + * @return This builder instance. + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * Sets the value for {@code systemName}. + * + * @param systemName Device OS. + * @return This builder instance. + */ + public Builder systemName(String systemName) { + this.systemName = systemName; + return this; + } + + /** + * Sets the value for {@code systemVersion}. + * + * @param systemVersion Device OS version. + * @return This builder instance. + */ + public Builder systemVersion(String systemVersion) { + this.systemVersion = systemVersion; + return this; + } + + /** + * Sets the value for {@code uuid}. + * + * @param uuid Device UUID. + * @return This builder instance. + */ + public Builder uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Builds an immutable Device instance. + * + * @return Immutable Device. + */ + public Device build() { + return new Device(model, name, systemName, systemVersion, uuid); + } + } +} diff --git a/src/main/java/com/sumup/sdk/models/DoingBusinessAsLegacy.java b/src/main/java/com/sumup/sdk/models/DoingBusinessAsLegacy.java deleted file mode 100644 index 57934e3..0000000 --- a/src/main/java/com/sumup/sdk/models/DoingBusinessAsLegacy.java +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Doing Business As information */ -public record DoingBusinessAsLegacy( - com.sumup.sdk.models.DoingBusinessAsLegacyAddress address, - - /** Doing business as name */ - String businessName, - - /** Doing business as company registration number */ - String companyRegistrationNumber, - - /** Doing business as email */ - String email, - - /** Doing business as VAT ID */ - String vatId, - - /** Doing business as website */ - String website) { - /** - * Creates a builder for DoingBusinessAsLegacy. - * - * @return Builder that constructs immutable DoingBusinessAsLegacy instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for DoingBusinessAsLegacy instances. */ - public static final class Builder { - private com.sumup.sdk.models.DoingBusinessAsLegacyAddress address; - private String businessName; - private String companyRegistrationNumber; - private String email; - private String vatId; - private String website; - - private Builder() {} - - /** - * Sets the value for {@code address}. - * - * @param address Value for the address field. - * @return This builder instance. - */ - public Builder address(com.sumup.sdk.models.DoingBusinessAsLegacyAddress address) { - this.address = address; - return this; - } - - /** - * Sets the value for {@code businessName}. - * - * @param businessName Doing business as name - * @return This builder instance. - */ - public Builder businessName(String businessName) { - this.businessName = businessName; - return this; - } - - /** - * Sets the value for {@code companyRegistrationNumber}. - * - * @param companyRegistrationNumber Doing business as company registration number - * @return This builder instance. - */ - public Builder companyRegistrationNumber(String companyRegistrationNumber) { - this.companyRegistrationNumber = companyRegistrationNumber; - return this; - } - - /** - * Sets the value for {@code email}. - * - * @param email Doing business as email - * @return This builder instance. - */ - public Builder email(String email) { - this.email = email; - return this; - } - - /** - * Sets the value for {@code vatId}. - * - * @param vatId Doing business as VAT ID - * @return This builder instance. - */ - public Builder vatId(String vatId) { - this.vatId = vatId; - return this; - } - - /** - * Sets the value for {@code website}. - * - * @param website Doing business as website - * @return This builder instance. - */ - public Builder website(String website) { - this.website = website; - return this; - } - - /** - * Builds an immutable DoingBusinessAsLegacy instance. - * - * @return Immutable DoingBusinessAsLegacy. - */ - public DoingBusinessAsLegacy build() { - return new DoingBusinessAsLegacy( - address, businessName, companyRegistrationNumber, email, vatId, website); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/DoingBusinessAsLegacyAddress.java b/src/main/java/com/sumup/sdk/models/DoingBusinessAsLegacyAddress.java deleted file mode 100644 index 9ea3c9c..0000000 --- a/src/main/java/com/sumup/sdk/models/DoingBusinessAsLegacyAddress.java +++ /dev/null @@ -1,133 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -public record DoingBusinessAsLegacyAddress( - /** Address line 1 */ - String addressLine1, - - /** Address line 2 */ - String addressLine2, - - /** City */ - String city, - - /** Country ISO 3166-1 code */ - String country, - - /** Postal code */ - String postCode, - - /** Country region ID */ - Double regionId, - - /** Country region name */ - String regionName) { - /** - * Creates a builder for DoingBusinessAsLegacyAddress. - * - * @return Builder that constructs immutable DoingBusinessAsLegacyAddress instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for DoingBusinessAsLegacyAddress instances. */ - public static final class Builder { - private String addressLine1; - private String addressLine2; - private String city; - private String country; - private String postCode; - private Double regionId; - private String regionName; - - private Builder() {} - - /** - * Sets the value for {@code addressLine1}. - * - * @param addressLine1 Address line 1 - * @return This builder instance. - */ - public Builder addressLine1(String addressLine1) { - this.addressLine1 = addressLine1; - return this; - } - - /** - * Sets the value for {@code addressLine2}. - * - * @param addressLine2 Address line 2 - * @return This builder instance. - */ - public Builder addressLine2(String addressLine2) { - this.addressLine2 = addressLine2; - return this; - } - - /** - * Sets the value for {@code city}. - * - * @param city City - * @return This builder instance. - */ - public Builder city(String city) { - this.city = city; - return this; - } - - /** - * Sets the value for {@code country}. - * - * @param country Country ISO 3166-1 code - * @return This builder instance. - */ - public Builder country(String country) { - this.country = country; - return this; - } - - /** - * Sets the value for {@code postCode}. - * - * @param postCode Postal code - * @return This builder instance. - */ - public Builder postCode(String postCode) { - this.postCode = postCode; - return this; - } - - /** - * Sets the value for {@code regionId}. - * - * @param regionId Country region ID - * @return This builder instance. - */ - public Builder regionId(Double regionId) { - this.regionId = regionId; - return this; - } - - /** - * Sets the value for {@code regionName}. - * - * @param regionName Country region name - * @return This builder instance. - */ - public Builder regionName(String regionName) { - this.regionName = regionName; - return this; - } - - /** - * Builds an immutable DoingBusinessAsLegacyAddress instance. - * - * @return Immutable DoingBusinessAsLegacyAddress. - */ - public DoingBusinessAsLegacyAddress build() { - return new DoingBusinessAsLegacyAddress( - addressLine1, addressLine2, city, country, postCode, regionId, regionName); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/ElvCardAccount.java b/src/main/java/com/sumup/sdk/models/ElvCardAccount.java new file mode 100644 index 0000000..a739ae8 --- /dev/null +++ b/src/main/java/com/sumup/sdk/models/ElvCardAccount.java @@ -0,0 +1,87 @@ +// Code generated by sumup-java/codegen. DO NOT EDIT. +package com.sumup.sdk.models; + +public record ElvCardAccount( + /** ELV IBAN. */ + String iban, + + /** ELV card account number last 4 digits. */ + String last4Digits, + + /** ELV card sequence number. */ + Long sequenceNo, + + /** ELV card sort code. */ + String sortCode) { + /** + * Creates a builder for ElvCardAccount. + * + * @return Builder that constructs immutable ElvCardAccount instances. + */ + public static Builder builder() { + return new Builder(); + } + + /** Builder for ElvCardAccount instances. */ + public static final class Builder { + private String iban; + private String last4Digits; + private Long sequenceNo; + private String sortCode; + + private Builder() {} + + /** + * Sets the value for {@code iban}. + * + * @param iban ELV IBAN. + * @return This builder instance. + */ + public Builder iban(String iban) { + this.iban = iban; + return this; + } + + /** + * Sets the value for {@code last4Digits}. + * + * @param last4Digits ELV card account number last 4 digits. + * @return This builder instance. + */ + public Builder last4Digits(String last4Digits) { + this.last4Digits = last4Digits; + return this; + } + + /** + * Sets the value for {@code sequenceNo}. + * + * @param sequenceNo ELV card sequence number. + * @return This builder instance. + */ + public Builder sequenceNo(Long sequenceNo) { + this.sequenceNo = sequenceNo; + return this; + } + + /** + * Sets the value for {@code sortCode}. + * + * @param sortCode ELV card sort code. + * @return This builder instance. + */ + public Builder sortCode(String sortCode) { + this.sortCode = sortCode; + return this; + } + + /** + * Builds an immutable ElvCardAccount instance. + * + * @return Immutable ElvCardAccount. + */ + public ElvCardAccount build() { + return new ElvCardAccount(iban, last4Digits, sequenceNo, sortCode); + } + } +} diff --git a/src/main/java/com/sumup/sdk/models/IncludeItem.java b/src/main/java/com/sumup/sdk/models/IncludeItem.java deleted file mode 100644 index d8b755a..0000000 --- a/src/main/java/com/sumup/sdk/models/IncludeItem.java +++ /dev/null @@ -1,42 +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; - -public enum IncludeItem { - SETTINGS("settings"), - DOING_BUSINESS_AS("doing_business_as"), - BANK_ACCOUNTS("bank_accounts"), - APP_SETTINGS("app_settings"), - COUNTRY_DETAILS("country_details"); - - private final String value; - - IncludeItem(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static IncludeItem fromValue(String value) { - if (value == null) { - return null; - } - for (IncludeItem entry : values()) { - if (entry.value.equals(value)) { - return entry; - } - } - throw new IllegalArgumentException("Unknown IncludeItem value: " + value); - } -} diff --git a/src/main/java/com/sumup/sdk/models/LegalTypeLegacy.java b/src/main/java/com/sumup/sdk/models/LegalTypeLegacy.java deleted file mode 100644 index 3d8de15..0000000 --- a/src/main/java/com/sumup/sdk/models/LegalTypeLegacy.java +++ /dev/null @@ -1,88 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Id of the legal type of the merchant profile */ -public record LegalTypeLegacy( - /** Legal type short description */ - String description, - - /** Legal type description */ - String fullDescription, - - /** Unique id */ - Double id, - - /** Sole trader legal type if true */ - Boolean soleTrader) { - /** - * Creates a builder for LegalTypeLegacy. - * - * @return Builder that constructs immutable LegalTypeLegacy instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for LegalTypeLegacy instances. */ - public static final class Builder { - private String description; - private String fullDescription; - private Double id; - private Boolean soleTrader; - - private Builder() {} - - /** - * Sets the value for {@code description}. - * - * @param description Legal type short description - * @return This builder instance. - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Sets the value for {@code fullDescription}. - * - * @param fullDescription Legal type description - * @return This builder instance. - */ - public Builder fullDescription(String fullDescription) { - this.fullDescription = fullDescription; - return this; - } - - /** - * Sets the value for {@code id}. - * - * @param id Unique id - * @return This builder instance. - */ - public Builder id(Double id) { - this.id = id; - return this; - } - - /** - * Sets the value for {@code soleTrader}. - * - * @param soleTrader Sole trader legal type if true - * @return This builder instance. - */ - public Builder soleTrader(Boolean soleTrader) { - this.soleTrader = soleTrader; - return this; - } - - /** - * Builds an immutable LegalTypeLegacy instance. - * - * @return Immutable LegalTypeLegacy. - */ - public LegalTypeLegacy build() { - return new LegalTypeLegacy(description, fullDescription, id, soleTrader); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/LinkRefund.java b/src/main/java/com/sumup/sdk/models/LinkRefund.java deleted file mode 100644 index af1a8a6..0000000 --- a/src/main/java/com/sumup/sdk/models/LinkRefund.java +++ /dev/null @@ -1,4 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -public record LinkRefund(com.sumup.sdk.models.Link value) {} diff --git a/src/main/java/com/sumup/sdk/models/ListTransactionsResponse.java b/src/main/java/com/sumup/sdk/models/ListTransactionsResponse.java index b3618bd..c02e010 100644 --- a/src/main/java/com/sumup/sdk/models/ListTransactionsResponse.java +++ b/src/main/java/com/sumup/sdk/models/ListTransactionsResponse.java @@ -3,7 +3,7 @@ public record ListTransactionsResponse( java.util.List items, - java.util.List links) { + java.util.List links) { /** * Creates a builder for ListTransactionsResponse. * @@ -16,7 +16,7 @@ public static Builder builder() { /** Builder for ListTransactionsResponse instances. */ public static final class Builder { private java.util.List items; - private java.util.List links; + private java.util.List links; private Builder() {} @@ -37,7 +37,7 @@ public Builder items(java.util.List ite * @param links Value for the links field. * @return This builder instance. */ - public Builder links(java.util.List links) { + public Builder links(java.util.List links) { this.links = links; return this; } diff --git a/src/main/java/com/sumup/sdk/models/ListTransactionsV21Response.java b/src/main/java/com/sumup/sdk/models/ListTransactionsV21Response.java index e7c0954..02258b2 100644 --- a/src/main/java/com/sumup/sdk/models/ListTransactionsV21Response.java +++ b/src/main/java/com/sumup/sdk/models/ListTransactionsV21Response.java @@ -3,7 +3,7 @@ public record ListTransactionsV21Response( java.util.List items, - java.util.List links) { + java.util.List links) { /** * Creates a builder for ListTransactionsV21Response. * @@ -16,7 +16,7 @@ public static Builder builder() { /** Builder for ListTransactionsV21Response instances. */ public static final class Builder { private java.util.List items; - private java.util.List links; + private java.util.List links; private Builder() {} @@ -37,7 +37,7 @@ public Builder items(java.util.List ite * @param links Value for the links field. * @return This builder instance. */ - public Builder links(java.util.List links) { + public Builder links(java.util.List links) { this.links = links; return this; } diff --git a/src/main/java/com/sumup/sdk/models/MerchantAccount.java b/src/main/java/com/sumup/sdk/models/MerchantAccount.java deleted file mode 100644 index 614011c..0000000 --- a/src/main/java/com/sumup/sdk/models/MerchantAccount.java +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Details of the merchant account. */ -public record MerchantAccount( - /** Profile information. */ - com.sumup.sdk.models.AccountLegacy account, - - /** Mobile app settings */ - com.sumup.sdk.models.AppSettings appSettings, - - /** Account's merchant profile */ - com.sumup.sdk.models.MerchantProfileLegacy merchantProfile, - - /** User permissions */ - com.sumup.sdk.models.PermissionsLegacy permissions, - - /** Account's personal profile. */ - com.sumup.sdk.models.PersonalProfileLegacy personalProfile) { - /** - * Creates a builder for MerchantAccount. - * - * @return Builder that constructs immutable MerchantAccount instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for MerchantAccount instances. */ - public static final class Builder { - private com.sumup.sdk.models.AccountLegacy account; - private com.sumup.sdk.models.AppSettings appSettings; - private com.sumup.sdk.models.MerchantProfileLegacy merchantProfile; - private com.sumup.sdk.models.PermissionsLegacy permissions; - private com.sumup.sdk.models.PersonalProfileLegacy personalProfile; - - private Builder() {} - - /** - * Sets the value for {@code account}. - * - * @param account Profile information. - * @return This builder instance. - */ - public Builder account(com.sumup.sdk.models.AccountLegacy account) { - this.account = account; - return this; - } - - /** - * Sets the value for {@code appSettings}. - * - * @param appSettings Mobile app settings - * @return This builder instance. - */ - public Builder appSettings(com.sumup.sdk.models.AppSettings appSettings) { - this.appSettings = appSettings; - return this; - } - - /** - * Sets the value for {@code merchantProfile}. - * - * @param merchantProfile Account's merchant profile - * @return This builder instance. - */ - public Builder merchantProfile(com.sumup.sdk.models.MerchantProfileLegacy merchantProfile) { - this.merchantProfile = merchantProfile; - return this; - } - - /** - * Sets the value for {@code permissions}. - * - * @param permissions User permissions - * @return This builder instance. - */ - public Builder permissions(com.sumup.sdk.models.PermissionsLegacy permissions) { - this.permissions = permissions; - return this; - } - - /** - * Sets the value for {@code personalProfile}. - * - * @param personalProfile Account's personal profile. - * @return This builder instance. - */ - public Builder personalProfile(com.sumup.sdk.models.PersonalProfileLegacy personalProfile) { - this.personalProfile = personalProfile; - return this; - } - - /** - * Builds an immutable MerchantAccount instance. - * - * @return Immutable MerchantAccount. - */ - public MerchantAccount build() { - return new MerchantAccount( - account, appSettings, merchantProfile, permissions, personalProfile); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/MerchantProfileLegacy.java b/src/main/java/com/sumup/sdk/models/MerchantProfileLegacy.java deleted file mode 100644 index 82debca..0000000 --- a/src/main/java/com/sumup/sdk/models/MerchantProfileLegacy.java +++ /dev/null @@ -1,351 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Account's merchant profile */ -public record MerchantProfileLegacy( - /** Details of the registered address. */ - com.sumup.sdk.models.AddressWithDetails address, - java.util.List bankAccounts, - - /** Business owners information. */ - com.sumup.sdk.models.BusinessOwners businessOwners, - - /** Company name */ - String companyName, - - /** Company registration number */ - String companyRegistrationNumber, - - /** - * Merchant country code formatted according to [ISO3166-1 - * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) (for internal usage only) - */ - String country, - - /** Doing Business As information */ - com.sumup.sdk.models.DoingBusinessAsLegacy doingBusinessAs, - - /** True if the merchant is extdev */ - Boolean extdev, - - /** Id of the legal type of the merchant profile */ - com.sumup.sdk.models.LegalTypeLegacy legalType, - - /** Merchant locale (for internal usage only) */ - String locale, - - /** Merchant category code */ - String merchantCategoryCode, - - /** Unique identifying code of the merchant profile */ - String merchantCode, - - /** Mobile phone number */ - String mobilePhone, - - /** Nature and purpose of the business */ - String natureAndPurpose, - - /** True if the payout zone of this merchant is migrated */ - Boolean payoutZoneMigrated, - - /** Permanent certificate access code (Portugal) */ - String permanentCertificateAccessCode, - - /** Merchant settings (like \"payout_type\", \"payout_period\") */ - com.sumup.sdk.models.MerchantSettings settings, - - /** Vat ID */ - String vatId, - - /** Merchant VAT rates */ - com.sumup.sdk.models.VatRates vatRates, - - /** Website */ - String website) { - /** - * Creates a builder for MerchantProfileLegacy. - * - * @return Builder that constructs immutable MerchantProfileLegacy instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for MerchantProfileLegacy instances. */ - public static final class Builder { - private com.sumup.sdk.models.AddressWithDetails address; - private java.util.List bankAccounts; - private com.sumup.sdk.models.BusinessOwners businessOwners; - private String companyName; - private String companyRegistrationNumber; - private String country; - private com.sumup.sdk.models.DoingBusinessAsLegacy doingBusinessAs; - private Boolean extdev; - private com.sumup.sdk.models.LegalTypeLegacy legalType; - private String locale; - private String merchantCategoryCode; - private String merchantCode; - private String mobilePhone; - private String natureAndPurpose; - private Boolean payoutZoneMigrated; - private String permanentCertificateAccessCode; - private com.sumup.sdk.models.MerchantSettings settings; - private String vatId; - private com.sumup.sdk.models.VatRates vatRates; - private String website; - - private Builder() {} - - /** - * Sets the value for {@code address}. - * - * @param address Details of the registered address. - * @return This builder instance. - */ - public Builder address(com.sumup.sdk.models.AddressWithDetails address) { - this.address = address; - return this; - } - - /** - * Sets the value for {@code bankAccounts}. - * - * @param bankAccounts Value for the bankAccounts field. - * @return This builder instance. - */ - public Builder bankAccounts(java.util.List bankAccounts) { - this.bankAccounts = bankAccounts; - return this; - } - - /** - * Sets the value for {@code businessOwners}. - * - * @param businessOwners Business owners information. - * @return This builder instance. - */ - public Builder businessOwners(com.sumup.sdk.models.BusinessOwners businessOwners) { - this.businessOwners = businessOwners; - return this; - } - - /** - * Sets the value for {@code companyName}. - * - * @param companyName Company name - * @return This builder instance. - */ - public Builder companyName(String companyName) { - this.companyName = companyName; - return this; - } - - /** - * Sets the value for {@code companyRegistrationNumber}. - * - * @param companyRegistrationNumber Company registration number - * @return This builder instance. - */ - public Builder companyRegistrationNumber(String companyRegistrationNumber) { - this.companyRegistrationNumber = companyRegistrationNumber; - return this; - } - - /** - * Sets the value for {@code country}. - * - * @param country Merchant country code formatted according to [ISO3166-1 - * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) (for internal usage - * only) - * @return This builder instance. - */ - public Builder country(String country) { - this.country = country; - return this; - } - - /** - * Sets the value for {@code doingBusinessAs}. - * - * @param doingBusinessAs Doing Business As information - * @return This builder instance. - */ - public Builder doingBusinessAs(com.sumup.sdk.models.DoingBusinessAsLegacy doingBusinessAs) { - this.doingBusinessAs = doingBusinessAs; - return this; - } - - /** - * Sets the value for {@code extdev}. - * - * @param extdev True if the merchant is extdev - * @return This builder instance. - */ - public Builder extdev(Boolean extdev) { - this.extdev = extdev; - return this; - } - - /** - * Sets the value for {@code legalType}. - * - * @param legalType Id of the legal type of the merchant profile - * @return This builder instance. - */ - public Builder legalType(com.sumup.sdk.models.LegalTypeLegacy legalType) { - this.legalType = legalType; - return this; - } - - /** - * Sets the value for {@code locale}. - * - * @param locale Merchant locale (for internal usage only) - * @return This builder instance. - */ - public Builder locale(String locale) { - this.locale = locale; - return this; - } - - /** - * Sets the value for {@code merchantCategoryCode}. - * - * @param merchantCategoryCode Merchant category code - * @return This builder instance. - */ - public Builder merchantCategoryCode(String merchantCategoryCode) { - this.merchantCategoryCode = merchantCategoryCode; - return this; - } - - /** - * Sets the value for {@code merchantCode}. - * - * @param merchantCode Unique identifying code of the merchant profile - * @return This builder instance. - */ - public Builder merchantCode(String merchantCode) { - this.merchantCode = merchantCode; - return this; - } - - /** - * Sets the value for {@code mobilePhone}. - * - * @param mobilePhone Mobile phone number - * @return This builder instance. - */ - public Builder mobilePhone(String mobilePhone) { - this.mobilePhone = mobilePhone; - return this; - } - - /** - * Sets the value for {@code natureAndPurpose}. - * - * @param natureAndPurpose Nature and purpose of the business - * @return This builder instance. - */ - public Builder natureAndPurpose(String natureAndPurpose) { - this.natureAndPurpose = natureAndPurpose; - return this; - } - - /** - * Sets the value for {@code payoutZoneMigrated}. - * - * @param payoutZoneMigrated True if the payout zone of this merchant is migrated - * @return This builder instance. - */ - public Builder payoutZoneMigrated(Boolean payoutZoneMigrated) { - this.payoutZoneMigrated = payoutZoneMigrated; - return this; - } - - /** - * Sets the value for {@code permanentCertificateAccessCode}. - * - * @param permanentCertificateAccessCode Permanent certificate access code (Portugal) - * @return This builder instance. - */ - public Builder permanentCertificateAccessCode(String permanentCertificateAccessCode) { - this.permanentCertificateAccessCode = permanentCertificateAccessCode; - return this; - } - - /** - * Sets the value for {@code settings}. - * - * @param settings Merchant settings (like \"payout_type\", \"payout_period\") - * @return This builder instance. - */ - public Builder settings(com.sumup.sdk.models.MerchantSettings settings) { - this.settings = settings; - return this; - } - - /** - * Sets the value for {@code vatId}. - * - * @param vatId Vat ID - * @return This builder instance. - */ - public Builder vatId(String vatId) { - this.vatId = vatId; - return this; - } - - /** - * Sets the value for {@code vatRates}. - * - * @param vatRates Merchant VAT rates - * @return This builder instance. - */ - public Builder vatRates(com.sumup.sdk.models.VatRates vatRates) { - this.vatRates = vatRates; - return this; - } - - /** - * Sets the value for {@code website}. - * - * @param website Website - * @return This builder instance. - */ - public Builder website(String website) { - this.website = website; - return this; - } - - /** - * Builds an immutable MerchantProfileLegacy instance. - * - * @return Immutable MerchantProfileLegacy. - */ - public MerchantProfileLegacy build() { - return new MerchantProfileLegacy( - address, - bankAccounts, - businessOwners, - companyName, - companyRegistrationNumber, - country, - doingBusinessAs, - extdev, - legalType, - locale, - merchantCategoryCode, - merchantCode, - mobilePhone, - natureAndPurpose, - payoutZoneMigrated, - permanentCertificateAccessCode, - settings, - vatId, - vatRates, - website); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/MerchantSettings.java b/src/main/java/com/sumup/sdk/models/MerchantSettings.java deleted file mode 100644 index 2226f31..0000000 --- a/src/main/java/com/sumup/sdk/models/MerchantSettings.java +++ /dev/null @@ -1,220 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Merchant settings (like \"payout_type\", \"payout_period\") */ -public record MerchantSettings( - /** Whether merchant will receive daily payout emails */ - Boolean dailyPayoutEmail, - - /** Whether merchant has gross settlement enabled */ - Boolean grossSettlement, - - /** Whether merchant will receive monthly payout emails */ - Boolean monthlyPayoutEmail, - - /** Whether merchant can make MOTO payments */ - com.sumup.sdk.models.MerchantSettingsMotoPayment motoPayment, - - /** Payout Instrument */ - String payoutInstrument, - - /** Whether merchant will receive payouts on demand */ - Boolean payoutOnDemand, - - /** Whether merchant can edit payouts on demand */ - Boolean payoutOnDemandAvailable, - - /** Payout frequency */ - String payoutPeriod, - - /** Payout type */ - String payoutType, - - /** Whether to show printers in mobile app */ - Boolean printersEnabled, - - /** Stone merchant code */ - String stoneMerchantCode, - - /** Whether to show tax in receipts (saved per transaction) */ - Boolean taxEnabled) { - /** - * Creates a builder for MerchantSettings. - * - * @return Builder that constructs immutable MerchantSettings instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for MerchantSettings instances. */ - public static final class Builder { - private Boolean dailyPayoutEmail; - private Boolean grossSettlement; - private Boolean monthlyPayoutEmail; - private com.sumup.sdk.models.MerchantSettingsMotoPayment motoPayment; - private String payoutInstrument; - private Boolean payoutOnDemand; - private Boolean payoutOnDemandAvailable; - private String payoutPeriod; - private String payoutType; - private Boolean printersEnabled; - private String stoneMerchantCode; - private Boolean taxEnabled; - - private Builder() {} - - /** - * Sets the value for {@code dailyPayoutEmail}. - * - * @param dailyPayoutEmail Whether merchant will receive daily payout emails - * @return This builder instance. - */ - public Builder dailyPayoutEmail(Boolean dailyPayoutEmail) { - this.dailyPayoutEmail = dailyPayoutEmail; - return this; - } - - /** - * Sets the value for {@code grossSettlement}. - * - * @param grossSettlement Whether merchant has gross settlement enabled - * @return This builder instance. - */ - public Builder grossSettlement(Boolean grossSettlement) { - this.grossSettlement = grossSettlement; - return this; - } - - /** - * Sets the value for {@code monthlyPayoutEmail}. - * - * @param monthlyPayoutEmail Whether merchant will receive monthly payout emails - * @return This builder instance. - */ - public Builder monthlyPayoutEmail(Boolean monthlyPayoutEmail) { - this.monthlyPayoutEmail = monthlyPayoutEmail; - return this; - } - - /** - * Sets the value for {@code motoPayment}. - * - * @param motoPayment Whether merchant can make MOTO payments - * @return This builder instance. - */ - public Builder motoPayment(com.sumup.sdk.models.MerchantSettingsMotoPayment motoPayment) { - this.motoPayment = motoPayment; - return this; - } - - /** - * Sets the value for {@code payoutInstrument}. - * - * @param payoutInstrument Payout Instrument - * @return This builder instance. - */ - public Builder payoutInstrument(String payoutInstrument) { - this.payoutInstrument = payoutInstrument; - return this; - } - - /** - * Sets the value for {@code payoutOnDemand}. - * - * @param payoutOnDemand Whether merchant will receive payouts on demand - * @return This builder instance. - */ - public Builder payoutOnDemand(Boolean payoutOnDemand) { - this.payoutOnDemand = payoutOnDemand; - return this; - } - - /** - * Sets the value for {@code payoutOnDemandAvailable}. - * - * @param payoutOnDemandAvailable Whether merchant can edit payouts on demand - * @return This builder instance. - */ - public Builder payoutOnDemandAvailable(Boolean payoutOnDemandAvailable) { - this.payoutOnDemandAvailable = payoutOnDemandAvailable; - return this; - } - - /** - * Sets the value for {@code payoutPeriod}. - * - * @param payoutPeriod Payout frequency - * @return This builder instance. - */ - public Builder payoutPeriod(String payoutPeriod) { - this.payoutPeriod = payoutPeriod; - return this; - } - - /** - * Sets the value for {@code payoutType}. - * - * @param payoutType Payout type - * @return This builder instance. - */ - public Builder payoutType(String payoutType) { - this.payoutType = payoutType; - return this; - } - - /** - * Sets the value for {@code printersEnabled}. - * - * @param printersEnabled Whether to show printers in mobile app - * @return This builder instance. - */ - public Builder printersEnabled(Boolean printersEnabled) { - this.printersEnabled = printersEnabled; - return this; - } - - /** - * Sets the value for {@code stoneMerchantCode}. - * - * @param stoneMerchantCode Stone merchant code - * @return This builder instance. - */ - public Builder stoneMerchantCode(String stoneMerchantCode) { - this.stoneMerchantCode = stoneMerchantCode; - return this; - } - - /** - * Sets the value for {@code taxEnabled}. - * - * @param taxEnabled Whether to show tax in receipts (saved per transaction) - * @return This builder instance. - */ - public Builder taxEnabled(Boolean taxEnabled) { - this.taxEnabled = taxEnabled; - return this; - } - - /** - * Builds an immutable MerchantSettings instance. - * - * @return Immutable MerchantSettings. - */ - public MerchantSettings build() { - return new MerchantSettings( - dailyPayoutEmail, - grossSettlement, - monthlyPayoutEmail, - motoPayment, - payoutInstrument, - payoutOnDemand, - payoutOnDemandAvailable, - payoutPeriod, - payoutType, - printersEnabled, - stoneMerchantCode, - taxEnabled); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/MerchantSettingsMotoPayment.java b/src/main/java/com/sumup/sdk/models/MerchantSettingsMotoPayment.java deleted file mode 100644 index c263bde..0000000 --- a/src/main/java/com/sumup/sdk/models/MerchantSettingsMotoPayment.java +++ /dev/null @@ -1,42 +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; - -/** Whether merchant can make MOTO payments */ -public enum MerchantSettingsMotoPayment { - UNAVAILABLE("UNAVAILABLE"), - ENFORCED("ENFORCED"), - ON("ON"), - OFF("OFF"); - - private final String value; - - MerchantSettingsMotoPayment(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static MerchantSettingsMotoPayment fromValue(String value) { - if (value == null) { - return null; - } - for (MerchantSettingsMotoPayment entry : values()) { - if (entry.value.equals(value)) { - return entry; - } - } - throw new IllegalArgumentException("Unknown MerchantSettingsMotoPayment value: " + value); - } -} diff --git a/src/main/java/com/sumup/sdk/models/PermissionsLegacy.java b/src/main/java/com/sumup/sdk/models/PermissionsLegacy.java deleted file mode 100644 index 80021f8..0000000 --- a/src/main/java/com/sumup/sdk/models/PermissionsLegacy.java +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** User permissions */ -public record PermissionsLegacy( - /** Create MOTO payments */ - Boolean createMotoPayments, - - /** Create referral */ - Boolean createReferral, - - /** Can view full merchant transaction history */ - Boolean fullTransactionHistoryView, - - /** Refund transactions */ - Boolean refundTransactions) { - /** - * Creates a builder for PermissionsLegacy. - * - * @return Builder that constructs immutable PermissionsLegacy instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for PermissionsLegacy instances. */ - public static final class Builder { - private Boolean createMotoPayments; - private Boolean createReferral; - private Boolean fullTransactionHistoryView; - private Boolean refundTransactions; - - private Builder() {} - - /** - * Sets the value for {@code createMotoPayments}. - * - * @param createMotoPayments Create MOTO payments - * @return This builder instance. - */ - public Builder createMotoPayments(Boolean createMotoPayments) { - this.createMotoPayments = createMotoPayments; - return this; - } - - /** - * Sets the value for {@code createReferral}. - * - * @param createReferral Create referral - * @return This builder instance. - */ - public Builder createReferral(Boolean createReferral) { - this.createReferral = createReferral; - return this; - } - - /** - * Sets the value for {@code fullTransactionHistoryView}. - * - * @param fullTransactionHistoryView Can view full merchant transaction history - * @return This builder instance. - */ - public Builder fullTransactionHistoryView(Boolean fullTransactionHistoryView) { - this.fullTransactionHistoryView = fullTransactionHistoryView; - return this; - } - - /** - * Sets the value for {@code refundTransactions}. - * - * @param refundTransactions Refund transactions - * @return This builder instance. - */ - public Builder refundTransactions(Boolean refundTransactions) { - this.refundTransactions = refundTransactions; - return this; - } - - /** - * Builds an immutable PermissionsLegacy instance. - * - * @return Immutable PermissionsLegacy. - */ - public PermissionsLegacy build() { - return new PermissionsLegacy( - createMotoPayments, createReferral, fullTransactionHistoryView, refundTransactions); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/Product.java b/src/main/java/com/sumup/sdk/models/Product.java index fa497d8..fdb86c5 100644 --- a/src/main/java/com/sumup/sdk/models/Product.java +++ b/src/main/java/com/sumup/sdk/models/Product.java @@ -1,46 +1,37 @@ // Code generated by sumup-java/codegen. DO NOT EDIT. package com.sumup.sdk.models; -/** Details of the product for which the payment is made. */ +/** Purchase product. */ public record Product( - /** Name of the product from the merchant's catalog. */ + /** Product name. */ String name, - /** Price of the product without VAT. */ - Float price, + /** Product price. */ + Double price, - /** Price of a single product item with VAT. */ - Float priceWithVat, + /** Product description. */ + String priceLabel, - /** Number of product items for the purchase. */ - Double quantity, + /** Product price incl. VAT. */ + Double priceWithVat, - /** - * Amount of the VAT for a single product item (calculated as the product of `price` and - * `vat_rate`, i.e. `single_vat_amount = price * vat_rate`). - */ - Float singleVatAmount, + /** Product quantity. */ + Long quantity, - /** - * Total price of the product items without VAT (calculated as the product of `price` and - * `quantity`, i.e. `total_price = price * quantity`). - */ - Float totalPrice, + /** VAT amount for a single product. */ + Double singleVatAmount, - /** - * Total price of the product items including VAT (calculated as the product of `price_with_vat` - * and `quantity`, i.e. `total_with_vat = price_with_vat * quantity`). - */ - Float totalWithVat, + /** Quantity x product price. */ + Double totalPrice, - /** - * Total VAT amount for the purchase (calculated as the product of `single_vat_amount` and - * `quantity`, i.e. `vat_amount = single_vat_amount * quantity`). - */ - Float vatAmount, + /** Total price incl. VAT. */ + Double totalWithVat, - /** VAT rate applicable to the product. */ - Float vatRate) { + /** VAT amount. */ + Double vatAmount, + + /** VAT percentage. */ + Double vatRate) { /** * Creates a builder for Product. * @@ -53,21 +44,22 @@ public static Builder builder() { /** Builder for Product instances. */ public static final class Builder { private String name; - private Float price; - private Float priceWithVat; - private Double quantity; - private Float singleVatAmount; - private Float totalPrice; - private Float totalWithVat; - private Float vatAmount; - private Float vatRate; + private Double price; + private String priceLabel; + private Double priceWithVat; + private Long quantity; + private Double singleVatAmount; + private Double totalPrice; + private Double totalWithVat; + private Double vatAmount; + private Double vatRate; private Builder() {} /** * Sets the value for {@code name}. * - * @param name Name of the product from the merchant's catalog. + * @param name Product name. * @return This builder instance. */ public Builder name(String name) { @@ -78,21 +70,32 @@ public Builder name(String name) { /** * Sets the value for {@code price}. * - * @param price Price of the product without VAT. + * @param price Product price. * @return This builder instance. */ - public Builder price(Float price) { + public Builder price(Double price) { this.price = price; return this; } + /** + * Sets the value for {@code priceLabel}. + * + * @param priceLabel Product description. + * @return This builder instance. + */ + public Builder priceLabel(String priceLabel) { + this.priceLabel = priceLabel; + return this; + } + /** * Sets the value for {@code priceWithVat}. * - * @param priceWithVat Price of a single product item with VAT. + * @param priceWithVat Product price incl. VAT. * @return This builder instance. */ - public Builder priceWithVat(Float priceWithVat) { + public Builder priceWithVat(Double priceWithVat) { this.priceWithVat = priceWithVat; return this; } @@ -100,10 +103,10 @@ public Builder priceWithVat(Float priceWithVat) { /** * Sets the value for {@code quantity}. * - * @param quantity Number of product items for the purchase. + * @param quantity Product quantity. * @return This builder instance. */ - public Builder quantity(Double quantity) { + public Builder quantity(Long quantity) { this.quantity = quantity; return this; } @@ -111,11 +114,10 @@ public Builder quantity(Double quantity) { /** * Sets the value for {@code singleVatAmount}. * - * @param singleVatAmount Amount of the VAT for a single product item (calculated as the product - * of `price` and `vat_rate`, i.e. `single_vat_amount = price * vat_rate`). + * @param singleVatAmount VAT amount for a single product. * @return This builder instance. */ - public Builder singleVatAmount(Float singleVatAmount) { + public Builder singleVatAmount(Double singleVatAmount) { this.singleVatAmount = singleVatAmount; return this; } @@ -123,11 +125,10 @@ public Builder singleVatAmount(Float singleVatAmount) { /** * Sets the value for {@code totalPrice}. * - * @param totalPrice Total price of the product items without VAT (calculated as the product of - * `price` and `quantity`, i.e. `total_price = price * quantity`). + * @param totalPrice Quantity x product price. * @return This builder instance. */ - public Builder totalPrice(Float totalPrice) { + public Builder totalPrice(Double totalPrice) { this.totalPrice = totalPrice; return this; } @@ -135,11 +136,10 @@ public Builder totalPrice(Float totalPrice) { /** * Sets the value for {@code totalWithVat}. * - * @param totalWithVat Total price of the product items including VAT (calculated as the product - * of `price_with_vat` and `quantity`, i.e. `total_with_vat = price_with_vat * quantity`). + * @param totalWithVat Total price incl. VAT. * @return This builder instance. */ - public Builder totalWithVat(Float totalWithVat) { + public Builder totalWithVat(Double totalWithVat) { this.totalWithVat = totalWithVat; return this; } @@ -147,11 +147,10 @@ public Builder totalWithVat(Float totalWithVat) { /** * Sets the value for {@code vatAmount}. * - * @param vatAmount Total VAT amount for the purchase (calculated as the product of - * `single_vat_amount` and `quantity`, i.e. `vat_amount = single_vat_amount * quantity`). + * @param vatAmount VAT amount. * @return This builder instance. */ - public Builder vatAmount(Float vatAmount) { + public Builder vatAmount(Double vatAmount) { this.vatAmount = vatAmount; return this; } @@ -159,10 +158,10 @@ public Builder vatAmount(Float vatAmount) { /** * Sets the value for {@code vatRate}. * - * @param vatRate VAT rate applicable to the product. + * @param vatRate VAT percentage. * @return This builder instance. */ - public Builder vatRate(Float vatRate) { + public Builder vatRate(Double vatRate) { this.vatRate = vatRate; return this; } @@ -176,6 +175,7 @@ public Product build() { return new Product( name, price, + priceLabel, priceWithVat, quantity, singleVatAmount, diff --git a/src/main/java/com/sumup/sdk/models/TransactionEvent.java b/src/main/java/com/sumup/sdk/models/TransactionEvent.java index c5c9b64..6ef7bb4 100644 --- a/src/main/java/com/sumup/sdk/models/TransactionEvent.java +++ b/src/main/java/com/sumup/sdk/models/TransactionEvent.java @@ -4,7 +4,7 @@ /** Details of a transaction event. */ public record TransactionEvent( /** Amount of the event. */ - Float amount, + Double amount, /** Date when the transaction event occurred. */ java.time.LocalDate date, @@ -40,7 +40,7 @@ public static Builder builder() { /** Builder for TransactionEvent instances. */ public static final class Builder { - private Float amount; + private Double amount; private java.time.LocalDate date; private java.time.LocalDate dueDate; private com.sumup.sdk.models.EventType eventType; @@ -57,7 +57,7 @@ private Builder() {} * @param amount Amount of the event. * @return This builder instance. */ - public Builder amount(Float amount) { + public Builder amount(Double amount) { this.amount = amount; return this; } diff --git a/src/main/java/com/sumup/sdk/models/TransactionsHistoryLink.java b/src/main/java/com/sumup/sdk/models/TransactionsHistoryLink.java new file mode 100644 index 0000000..0d8bd77 --- /dev/null +++ b/src/main/java/com/sumup/sdk/models/TransactionsHistoryLink.java @@ -0,0 +1,60 @@ +// Code generated by sumup-java/codegen. DO NOT EDIT. +package com.sumup.sdk.models; + +import java.util.Objects; + +public record TransactionsHistoryLink( + /** Location. */ + String href, + + /** Relation. */ + String rel) { + /** + * Creates a builder for TransactionsHistoryLink. + * + * @return Builder that constructs immutable TransactionsHistoryLink instances. + */ + public static Builder builder() { + return new Builder(); + } + + /** Builder for TransactionsHistoryLink instances. */ + public static final class Builder { + private String href; + private String rel; + + private Builder() {} + + /** + * Sets the value for {@code href}. + * + * @param href Location. + * @return This builder instance. + */ + public Builder href(String href) { + this.href = href; + return this; + } + + /** + * Sets the value for {@code rel}. + * + * @param rel Relation. + * @return This builder instance. + */ + public Builder rel(String rel) { + this.rel = rel; + return this; + } + + /** + * Builds an immutable TransactionsHistoryLink instance. + * + * @return Immutable TransactionsHistoryLink. + */ + public TransactionsHistoryLink build() { + return new TransactionsHistoryLink( + Objects.requireNonNull(href, "href"), Objects.requireNonNull(rel, "rel")); + } + } +} diff --git a/src/main/java/com/sumup/sdk/models/VatRates.java b/src/main/java/com/sumup/sdk/models/VatRates.java deleted file mode 100644 index d15d3d3..0000000 --- a/src/main/java/com/sumup/sdk/models/VatRates.java +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Merchant VAT rates */ -public record VatRates( - /** Country ISO code */ - String country, - - /** Description */ - String description, - - /** Internal ID */ - Double id, - - /** Ordering */ - Double ordering, - - /** Rate */ - Double rate) { - /** - * Creates a builder for VatRates. - * - * @return Builder that constructs immutable VatRates instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for VatRates instances. */ - public static final class Builder { - private String country; - private String description; - private Double id; - private Double ordering; - private Double rate; - - private Builder() {} - - /** - * Sets the value for {@code country}. - * - * @param country Country ISO code - * @return This builder instance. - */ - public Builder country(String country) { - this.country = country; - return this; - } - - /** - * Sets the value for {@code description}. - * - * @param description Description - * @return This builder instance. - */ - public Builder description(String description) { - this.description = description; - return this; - } - - /** - * Sets the value for {@code id}. - * - * @param id Internal ID - * @return This builder instance. - */ - public Builder id(Double id) { - this.id = id; - return this; - } - - /** - * Sets the value for {@code ordering}. - * - * @param ordering Ordering - * @return This builder instance. - */ - public Builder ordering(Double ordering) { - this.ordering = ordering; - return this; - } - - /** - * Sets the value for {@code rate}. - * - * @param rate Rate - * @return This builder instance. - */ - public Builder rate(Double rate) { - this.rate = rate; - return this; - } - - /** - * Builds an immutable VatRates instance. - * - * @return Immutable VatRates. - */ - public VatRates build() { - return new VatRates(country, description, id, ordering, rate); - } - } -}