From b2fe195698d1b3c47f91f45f8ced448dc8bbbb87 Mon Sep 17 00:00:00 2001 From: appscisumup Date: Tue, 28 Apr 2026 07:40:37 +0000 Subject: [PATCH 1/2] chore: synced local 'openapi.json' with remote 'specs/openapi.json' --- openapi.json | 2051 +++++++++++++++----------------------------------- 1 file changed, 589 insertions(+), 1462 deletions(-) diff --git a/openapi.json b/openapi.json index b838c21..cc9d3e6 100755 --- a/openapi.json +++ b/openapi.json @@ -1900,10 +1900,20 @@ ] } }, - "/v0.1/me/refund/{txn_id}": { + "/v1.0/merchants/{merchant_code}/payments/{id}/refunds": { "parameters": [ { - "name": "txn_id", + "name": "merchant_code", + "in": "path", + "description": "Merchant code of the account that owns the payment to refund.", + "required": true, + "schema": { + "type": "string", + "example": "MH4H92C7" + } + }, + { + "name": "id", "in": "path", "description": "Unique ID of the transaction.", "required": true, @@ -2149,121 +2159,6 @@ ] } }, - "/v0.1/me/transactions": { - "get": { - "operationId": "GetTransaction", - "summary": "Retrieve a transaction", - "description": "Retrieves the full details of an identified transaction. The transaction resource is identified by a query parameter and *one* of following parameters is required:\n- `id`\n- `transaction_code`\n- `foreign_transaction_id`\n- `client_transaction_id`", - "parameters": [ - { - "name": "id", - "in": "query", - "description": "Retrieves the transaction resource with the specified transaction ID (the `id` parameter in the transaction resource).", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "transaction_code", - "in": "query", - "description": "Retrieves the transaction resource with the specified transaction code.", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Returns the requested transaction resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionFull" - }, - "example": { - "id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", - "transaction_code": "TEENSK4W2K", - "amount": 10.1, - "currency": "EUR", - "timestamp": "2020-02-29T10:56:56.876Z", - "status": "SUCCESSFUL", - "payment_type": "ECOM", - "installments_count": 1, - "merchant_code": "MH4H92C7", - "vat_amount": 6, - "tip_amount": 3, - "entry_mode": "CUSTOMER_ENTRY", - "auth_code": "053201" - } - } - } - }, - "401": { - "description": "The request is not authorized.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "examples": { - "Problem_Details": { - "description": "Unauthorized response returned by API gateway.", - "value": { - "detail": "Unauthorized.", - "status": 401, - "title": "Unauthorized", - "trace_id": "3c77294349d3b5647ea2d990f0d8f017", - "type": "https://developer.sumup.com/problem/unauthorized" - } - } - } - } - } - }, - "404": { - "description": "The requested resource does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "Not_Found": { - "description": "The identified resource is not found on the server.", - "value": { - "error_code": "NOT_FOUND", - "message": "Resource not found" - } - } - } - } - } - } - }, - "deprecated": true, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "transactions.history" - ] - } - ], - "tags": [ - "Transactions" - ], - "x-codegen": { - "method_name": "get_deprecated" - }, - "x-scopes": [ - "transactions.history" - ] - } - }, "/v2.1/merchants/{merchant_code}/transactions/history": { "get": { "operationId": "ListTransactionsV2.1", @@ -2566,383 +2461,115 @@ ] } }, - "/v0.1/me/transactions/history": { + "/v1.0/merchants/{merchant_code}/payouts": { "get": { - "operationId": "ListTransactions", - "summary": "List transactions", - "description": "Lists detailed history of all transactions associated with the merchant profile.", + "operationId": "ListPayoutsV1", + "summary": "List payouts", + "description": "Lists payout and payout-deduction records for the specified merchant account within the requested date range.\n\nThe response can include:\n- regular payouts (`type = PAYOUT`)\n- deduction records for refunds, chargebacks, direct debit returns, or balance adjustments\n\nResults are sorted by payout date in the requested `order`.", "parameters": [ { - "name": "transaction_code", - "in": "query", - "description": "Retrieves the transaction resource with the specified transaction code.", - "required": false, + "name": "merchant_code", + "in": "path", + "description": "Merchant code of the account whose payouts should be listed.", + "required": true, "schema": { - "type": "string" + "type": "string", + "example": "MH4H92C7" } }, { - "name": "order", + "name": "start_date", "in": "query", - "description": "Specifies the order in which the returned results are displayed.", + "description": "Start date of the payout period filter, inclusive, in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`).", + "required": true, "schema": { "type": "string", - "default": "ascending", - "enum": [ - "ascending", - "descending" - ] + "format": "date", + "example": "2024-02-01" } }, { - "name": "limit", + "name": "end_date", "in": "query", - "description": "Specifies the maximum number of results per page. Value must be a positive integer and if not specified, will return 10 results.", + "description": "End date of the payout period filter, inclusive, in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). Must be greater than or equal to `start_date`.", + "required": true, "schema": { - "type": "integer" + "type": "string", + "format": "date", + "example": "2024-02-29" } }, { - "name": "users", + "name": "format", "in": "query", - "description": "Filters the returned results by user email.", + "description": "Response format for the payout list.", "required": false, "schema": { - "type": "array", - "items": { - "type": "string", - "format": "email" - }, - "example": [ - "merchant@example.com" + "type": "string", + "example": "json", + "default": "json", + "enum": [ + "json", + "csv" ] - }, - "example": [ - "merchant@example.com" - ] - }, - { - "name": "statuses[]", - "in": "query", - "description": "Filters the returned results by the specified list of final statuses of the transactions.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "SUCCESSFUL", - "CANCELLED", - "FAILED", - "REFUNDED", - "CHARGE_BACK" - ] - } } }, { - "name": "payment_types", + "name": "limit", "in": "query", - "description": "Filters the returned results by the specified list of payment types used for the transactions.", + "description": "Maximum number of payout records to return.", "required": false, "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentType" - } + "type": "integer", + "example": 10, + "maximum": 9999, + "minimum": 1 } }, { - "name": "types", + "name": "order", "in": "query", - "description": "Filters the returned results by the specified list of transaction types.", + "description": "Sort direction for the returned payouts.", "required": false, "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "PAYMENT", - "REFUND", - "CHARGE_BACK" - ] - } - } - }, - { - "name": "changes_since", - "in": "query", - "description": "Filters the results by the latest modification time of resources and returns only transactions that are modified *at or after* the specified timestamp (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "newest_time", - "in": "query", - "description": "Filters the results by the creation time of resources and returns only transactions that are created *before* the specified timestamp (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "newest_ref", - "in": "query", - "description": "Filters the results by the reference ID of transaction events and returns only transactions with events whose IDs are *smaller* than the specified value. This parameters supersedes the `newest_time` parameter (if both are provided in the request).", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "oldest_time", - "in": "query", - "description": "Filters the results by the creation time of resources and returns only transactions that are created *at or after* the specified timestamp (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "oldest_ref", - "in": "query", - "description": "Filters the results by the reference ID of transaction events and returns only transactions with events whose IDs are *greater* than the specified value. This parameters supersedes the `oldest_time` parameter (if both are provided in the request).", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Returns a page of transaction history items.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransactionHistory" - }, - "example": [ - { - "transaction_code": "TEENSK4W2K", - "amount": 10.1, - "currency": "EUR", - "timestamp": "2020-02-29T10:56:56.876Z", - "status": "SUCCESSFUL", - "payment_type": "ECOM", - "installments_count": 1, - "merchant_code": "MH4H92C7", - "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", - "user": "merchant@example.com", - "type": "PAYMENT", - "payout_date": "2019-08-28", - "payout_type": "BANK_ACCOUNT", - "refunded_amount": 0 - } - ] - }, - "links": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransactionsHistoryLink" - }, - "example": [] - } - } - }, - "example": { - "items": [ - { - "transaction_code": "TEENSK4W2K", - "amount": 10.1, - "currency": "EUR", - "timestamp": "2020-02-29T10:56:56.876Z", - "status": "SUCCESSFUL", - "payment_type": "ECOM", - "installments_count": 1, - "merchant_code": "MH4H92C7", - "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", - "user": "merchant@example.com", - "type": "PAYMENT", - "payout_date": "2019-08-28", - "payout_type": "BANK_ACCOUNT", - "refunded_amount": 0 - } - ], - "links": [] - } - } - } - }, - "400": { - "description": "The request is invalid for the submitted query parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "Invalid_Parameter": { - "description": "A request parameter has an invalid value.", - "value": { - "message": "Validation error", - "error_code": "INVALID" - } - } - } - } - } - }, - "401": { - "description": "The request is not authorized.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "examples": { - "Problem_Details": { - "description": "Unauthorized response returned by API gateway.", - "value": { - "detail": "Unauthorized.", - "status": 401, - "title": "Unauthorized", - "trace_id": "3c77294349d3b5647ea2d990f0d8f017", - "type": "https://developer.sumup.com/problem/unauthorized" - } - } - } - } - } - } - }, - "deprecated": true, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "transactions.history" - ] - } - ], - "tags": [ - "Transactions" - ], - "x-codegen": { - "method_name": "list_deprecated" - }, - "x-scopes": [ - "transactions.history" - ] - } - }, - "/v1.0/merchants/{merchant_code}/payouts": { - "get": { - "operationId": "ListPayoutsV1", - "summary": "List payouts", - "description": "Lists ordered payouts for the merchant account.", - "parameters": [ - { - "name": "merchant_code", - "in": "path", - "description": "Merchant code of the account whose payouts should be listed.", - "required": true, - "schema": { - "type": "string", - "example": "MH4H92C7" - } - }, - { - "name": "start_date", - "in": "query", - "description": "Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).", - "required": true, - "schema": { - "type": "string", - "format": "date" - } - }, - { - "name": "end_date", - "in": "query", - "description": "End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).", - "required": true, - "schema": { - "type": "string", - "format": "date" - } - }, - { - "name": "format", - "in": "query", - "description": "Response format for the payout list.", - "required": false, - "schema": { - "type": "string", - "example": "json", - "enum": [ - "json", - "csv" - ] - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of payout records to return.", - "required": false, - "schema": { - "type": "integer", - "example": 10 - } - }, - { - "name": "order", - "in": "query", - "description": "Sort direction for the returned payouts.", - "required": false, - "schema": { - "type": "string", - "example": "desc", - "enum": [ - "desc", - "asc" - ] - } - } - ], - "responses": { - "200": { - "description": "Returns the list of payouts for the requested period.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FinancialPayouts" - }, - "example": [ - { - "amount": 132.45, - "currency": "EUR", - "date": "2024-02-29", - "fee": 3.12, - "id": 123456789, - "reference": "payout-2024-02-29", - "status": "SUCCESSFUL", - "transaction_code": "TEENSK4W2K", - "type": "PAYOUT" - } + "type": "string", + "example": "desc", + "default": "asc", + "enum": [ + "asc", + "desc" + ] + } + } + ], + "responses": { + "200": { + "description": "Returns the list of payout and deduction records for the requested period.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FinancialPayouts" + }, + "example": [ + { + "amount": 132.45, + "currency": "EUR", + "date": "2024-02-29", + "fee": 3.12, + "id": 123456789, + "reference": "payout-2024-02-29", + "status": "SUCCESSFUL", + "transaction_code": "TEENSK4W2K", + "type": "PAYOUT" + } ] + }, + "text/plain": { + "schema": { + "description": "CSV-formatted payout export returned when `format=csv`.", + "type": "string" + }, + "example": "id,type,amount,date,currency,fee,status,reference,transaction_code\n123456789,PAYOUT,132.45,2024-02-29,EUR,3.12,SUCCESSFUL,payout-2024-02-29,TEENSK4W2K" } } }, @@ -2957,7 +2584,7 @@ } }, "examples": { - "Missing_Required_Dates": { + "Missing required dates": { "description": "Required date filters are missing.", "value": [ { @@ -2971,169 +2598,13 @@ "param": "end_date" } ] - } - } - } - } - }, - "401": { - "description": "The request is not authorized.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "examples": { - "Problem_Details": { - "description": "Unauthorized response returned by API gateway.", - "value": { - "detail": "Unauthorized.", - "status": 401, - "title": "Unauthorized", - "trace_id": "3c77294349d3b5647ea2d990f0d8f017", - "type": "https://developer.sumup.com/problem/unauthorized" - } - } - } - } - } - } - }, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "user.profile", - "user.profile_readonly" - ] - } - ], - "tags": [ - "Payouts" - ], - "x-codegen": { - "method_name": "list" - }, - "x-scopes": [ - "user.profile", - "user.profile_readonly" - ] - } - }, - "/v0.1/me/financials/payouts": { - "get": { - "operationId": "ListPayouts", - "summary": "List payouts", - "description": "Lists ordered payouts for the merchant account.", - "parameters": [ - { - "name": "start_date", - "in": "query", - "description": "Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).", - "required": true, - "schema": { - "type": "string", - "format": "date" - } - }, - { - "name": "end_date", - "in": "query", - "description": "End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).", - "required": true, - "schema": { - "type": "string", - "format": "date" - } - }, - { - "name": "format", - "in": "query", - "description": "Response format for the payout list.", - "required": false, - "schema": { - "type": "string", - "example": "json", - "enum": [ - "json", - "csv" - ] - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of payout records to return.", - "required": false, - "schema": { - "type": "integer", - "example": 10 - } - }, - { - "name": "order", - "in": "query", - "description": "Sort direction for the returned payouts.", - "required": false, - "schema": { - "type": "string", - "example": "desc", - "enum": [ - "desc", - "asc" - ] - } - } - ], - "responses": { - "200": { - "description": "Returns the list of payouts for the requested period.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FinancialPayouts" - }, - "example": [ - { - "amount": 132.45, - "currency": "EUR", - "date": "2024-02-29", - "fee": 3.12, - "id": 123456789, - "reference": "payout-2024-02-29", - "status": "SUCCESSFUL", - "transaction_code": "TEENSK4W2K", - "type": "PAYOUT" - } - ] - } - } - }, - "400": { - "description": "The request is invalid for the submitted query parameters.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ErrorExtended" - } - }, - "examples": { - "Missing_Required_Dates": { - "description": "Required date filters are missing.", + }, + "Invalid date range": { + "description": "`start_date` cannot be later than `end_date`.", "value": [ { - "error_code": "MISSING", - "message": "Validation error: required", - "param": "start_date" - }, - { - "error_code": "MISSING", - "message": "Validation error: required", - "param": "end_date" + "error_code": "INVALID", + "message": "negative date range" } ] } @@ -3142,524 +2613,182 @@ } }, "401": { - "description": "The request is not authorized.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "examples": { - "Problem_Details": { - "description": "Unauthorized response returned by API gateway.", - "value": { - "detail": "Unauthorized.", - "status": 401, - "title": "Unauthorized", - "trace_id": "3c77294349d3b5647ea2d990f0d8f017", - "type": "https://developer.sumup.com/problem/unauthorized" - } - } - } - } - } - } - }, - "deprecated": true, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "user.profile", - "user.profile_readonly" - ] - } - ], - "tags": [ - "Payouts" - ], - "x-codegen": { - "method_name": "list_deprecated" - }, - "x-scopes": [ - "user.profile", - "user.profile_readonly" - ] - } - }, - "/v1.1/receipts/{id}": { - "get": { - "operationId": "GetReceipt", - "summary": "Retrieve receipt details", - "description": "Retrieves receipt specific data for a transaction.", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "SumUp unique transaction ID or transaction code, e.g. TS7HDYLSKD.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "mid", - "in": "query", - "description": "Merchant code.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tx_event_id", - "in": "query", - "description": "The ID of the transaction event (refund).", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "Returns receipt details for the requested transaction.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Receipt" - }, - "example": { - "transaction_data": { - "transaction_code": "TEENSK4W2K", - "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", - "merchant_code": "MH4H92C7", - "amount": "10.10", - "vat_amount": "6.00", - "tip_amount": "3.00", - "currency": "EUR", - "timestamp": "2020-02-29T10:56:56.876Z", - "status": "SUCCESSFUL", - "payment_type": "ECOM", - "entry_mode": "CUSTOMER_ENTRY", - "installments_count": 1, - "process_as": "CREDIT" - }, - "merchant_data": { - "merchant_profile": { - "merchant_code": "MH4H92C7" - } - }, - "acquirer_data": { - "authorization_code": "053201" - } - } - } - } - }, - "400": { - "description": "The request is invalid for the submitted parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "Invalid_Merchant_Code": { - "description": "The provided merchant code is invalid.", - "value": { - "message": "is not a valid merchant code", - "error_code": "INVALID" - } - } - } - } - } - }, - "401": { - "description": "The request is not authorized.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "examples": { - "Problem_Details": { - "description": "Unauthorized response returned by API gateway.", - "value": { - "detail": "Unauthorized.", - "status": 401, - "title": "Unauthorized", - "trace_id": "3c77294349d3b5647ea2d990f0d8f017", - "type": "https://developer.sumup.com/problem/unauthorized" - } - } - } - } - } - }, - "404": { - "description": "The requested transaction event does not exist for the provided transaction.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - }, - "examples": { - "Event_Not_Found": { - "description": "The provided transaction event ID cannot be found for this transaction.", - "value": { - "message": "No such tx event (ID=9567461191) for transaction 4ffb8dfc-7f2b-413d-a497-2ad00766585e", - "error_code": "NOT_FOUND" - } - } - } - } - } - } - }, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [] - } - ], - "tags": [ - "Receipts" - ], - "x-codegen": { - "method_name": "get" - }, - "x-scopes": [] - } - }, - "/v0.1/me/accounts": { - "get": { - "operationId": "ListSubAccounts", - "summary": "List operators", - "description": "Returns list of operators for currently authorized user's merchant.", - "parameters": [ - { - "name": "query", - "in": "query", - "description": "Search query used to filter users that match given query term.\n\nCurrent implementation allow querying only over the email address.\nAll operators whos email address contains the query string are returned.", - "schema": { - "type": "string" - } - }, - { - "name": "include_primary", - "in": "query", - "description": "If true the list of operators will include also the primary user.", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "description": "List of operators.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Operator" - } - } - } - } - }, - "401": { - "description": "Authentication failed or missing required scope.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://developer.sumup.com/problem/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "Authentication credentials are missing or invalid." - } - } - } - } - }, - "deprecated": true, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [] - } - ], - "tags": [ - "Subaccounts" - ], - "x-deprecation-notice": "Subaccounts API is deprecated, to list users in your merchant account please use [List members](https://developer.sumup.com/api/members/list) instead.", - "x-permissions": [ - "members_list" - ], - "x-scopes": [] - }, - "post": { - "operationId": "CreateSubAccount", - "summary": "Create an operator", - "description": "Creates new operator for currently authorized users' merchant.", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "username": { - "type": "string", - "format": "email", - "example": "operator1@mydomain.com" - }, - "password": { - "type": "string", - "example": "correct horse batter staple", - "minLength": 8 - }, - "nickname": { - "type": "string", - "example": "Operator 1" - }, - "permissions": { - "type": "object", - "properties": { - "create_moto_payments": { - "type": "boolean" - }, - "create_referral": { - "type": "boolean" - }, - "full_transaction_history_view": { - "type": "boolean" - }, - "refund_transactions": { - "type": "boolean" - } - } - } - }, - "required": [ - "username", - "password" - ] - } - } - } - }, - "responses": { - "200": { - "description": "Newly created operator.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Operator" - } - } - } - }, - "403": { - "description": "Operator creation was forbidden.", + "description": "The request is not authorized.", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Problem" }, - "example": { - "type": "https://developer.sumup.com/problem/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "You do not have permission to perform this action." + "examples": { + "Problem_Details": { + "description": "Unauthorized response returned by API gateway.", + "value": { + "detail": "Unauthorized.", + "status": 401, + "title": "Unauthorized", + "trace_id": "3c77294349d3b5647ea2d990f0d8f017", + "type": "https://developer.sumup.com/problem/unauthorized" + } + } } } } } }, - "deprecated": true, "security": [ { "apiKey": [] }, { - "oauth2": [] + "oauth2": [ + "user.profile", + "user.profile_readonly" + ] } ], "tags": [ - "Subaccounts" - ], - "x-deprecation-notice": "Subaccounts API is deprecated, to create a user in your merchant account please use [Create member](https://developer.sumup.com/api/members/create) instead.", - "x-permissions": [ - "members_update" + "Payouts" ], - "x-scopes": [] + "x-codegen": { + "method_name": "list" + }, + "x-scopes": [ + "user.profile", + "user.profile_readonly" + ] } }, - "/v0.1/me/accounts/{operator_id}": { + "/v1.1/receipts/{id}": { "get": { - "operationId": "CompatGetOperator", - "summary": "Retrieve an operator", - "description": "Returns specific operator.", + "operationId": "GetReceipt", + "summary": "Retrieve receipt details", + "description": "Retrieves receipt specific data for a transaction.", "parameters": [ { - "name": "operator_id", + "name": "id", "in": "path", - "description": "The unique identifier for the operator.", + "description": "SumUp unique transaction ID or transaction code, e.g. TS7HDYLSKD.", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" + } + }, + { + "name": "mid", + "in": "query", + "description": "Merchant code.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tx_event_id", + "in": "query", + "description": "The ID of the transaction event (refund).", + "required": false, + "schema": { + "type": "integer" } } ], "responses": { "200": { - "description": "Information about the requested operator.", + "description": "Returns receipt details for the requested transaction.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Operator" + "$ref": "#/components/schemas/Receipt" + }, + "example": { + "transaction_data": { + "transaction_code": "TEENSK4W2K", + "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", + "merchant_code": "MH4H92C7", + "amount": "10.10", + "vat_amount": "6.00", + "tip_amount": "3.00", + "currency": "EUR", + "timestamp": "2020-02-29T10:56:56.876Z", + "status": "SUCCESSFUL", + "payment_type": "ECOM", + "entry_mode": "CUSTOMER_ENTRY", + "installments_count": 1, + "process_as": "CREDIT" + }, + "merchant_data": { + "merchant_profile": { + "merchant_code": "MH4H92C7" + } + }, + "acquirer_data": { + "authorization_code": "053201" + } } } } }, - "401": { - "description": "Authentication failed or missing required scope.", + "400": { + "description": "The request is invalid for the submitted parameters.", "content": { - "application/problem+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/Error" }, - "example": { - "type": "https://developer.sumup.com/problem/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "Authentication credentials are missing or invalid." - } - } - } - } - }, - "deprecated": true, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [] - } - ], - "tags": [ - "Subaccounts" - ], - "x-deprecation-notice": "Subaccounts API is deprecated, to get a user that's a member of your merchant account please use [Get member](https://developer.sumup.com/api/members/get) instead.", - "x-permissions": [ - "members_view" - ], - "x-scopes": [] - }, - "put": { - "operationId": "UpdateSubAccount", - "summary": "Update an operator", - "description": "Updates operator. If the operator was disabled and their password is updated they will be unblocked.", - "parameters": [ - { - "name": "operator_id", - "in": "path", - "description": "The unique identifier for the operator.", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "example": "correct horse batter staple", - "minLength": 8 - }, - "username": { - "type": "string", - "format": "email", - "maxLength": 256 - }, - "disabled": { - "type": "boolean" - }, - "nickname": { - "type": "string", - "example": "Operator 1" - }, - "permissions": { - "type": "object", - "properties": { - "create_moto_payments": { - "type": "boolean" - }, - "create_referral": { - "type": "boolean" - }, - "full_transaction_history_view": { - "type": "boolean" - }, - "refund_transactions": { - "type": "boolean" - } + "examples": { + "Invalid_Merchant_Code": { + "description": "The provided merchant code is invalid.", + "value": { + "message": "is not a valid merchant code", + "error_code": "INVALID" } } } } } - } - }, - "responses": { - "200": { - "description": "Updated operator.", + }, + "401": { + "description": "The request is not authorized.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Operator" + "$ref": "#/components/schemas/Problem" + }, + "examples": { + "Problem_Details": { + "description": "Unauthorized response returned by API gateway.", + "value": { + "detail": "Unauthorized.", + "status": 401, + "title": "Unauthorized", + "trace_id": "3c77294349d3b5647ea2d990f0d8f017", + "type": "https://developer.sumup.com/problem/unauthorized" + } + } } } } }, - "400": { - "description": "Invalid Operators' email or password was already used.", + "404": { + "description": "The requested transaction event does not exist for the provided transaction.", "content": { - "application/problem+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/Error" }, - "example": { - "type": "https://developer.sumup.com/problem/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "Request validation failed." + "examples": { + "Event_Not_Found": { + "description": "The provided transaction event ID cannot be found for this transaction.", + "value": { + "message": "No such tx event (ID=9567461191) for transaction 4ffb8dfc-7f2b-413d-a497-2ad00766585e", + "error_code": "NOT_FOUND" + } + } } } } } }, - "deprecated": true, "security": [ { "apiKey": [] @@ -3669,12 +2798,11 @@ } ], "tags": [ - "Subaccounts" - ], - "x-deprecation-notice": "Subaccounts API is deprecated, to update a user that's a member of your merchant account please use [Update member](https://developer.sumup.com/api/members/update) instead.", - "x-permissions": [ - "members_update" + "Receipts" ], + "x-codegen": { + "method_name": "get" + }, "x-scopes": [] } }, @@ -7244,55 +6372,89 @@ "title": "Event" }, "FinancialPayouts": { - "description": "List of payout summaries.", + "description": "Ordered list of payout and payout-deduction records.", "type": "array", "items": { - "type": "object", - "properties": { - "amount": { - "type": "number", - "format": "float" - }, - "currency": { - "type": "string" - }, - "date": { - "type": "string", - "format": "date" - }, - "fee": { - "type": "number", - "format": "float" - }, - "id": { - "type": "integer" - }, - "reference": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "SUCCESSFUL", - "FAILED" - ] - }, - "transaction_code": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "PAYOUT", - "CHARGE_BACK_DEDUCTION", - "REFUND_DEDUCTION", - "DD_RETURN_DEDUCTION", - "BALANCE_DEDUCTION" - ] - } + "$ref": "#/components/schemas/FinancialPayout" + }, + "title": "Financial Payouts" + }, + "FinancialPayout": { + "description": "A single payout-related record.\n\nA record can represent either:\n- an actual payout sent to the merchant (`type = PAYOUT`)\n- a deduction applied against merchant funds for a refund, chargeback, direct debit return, or balance adjustment", + "type": "object", + "properties": { + "id": { + "description": "Unique identifier of the payout-related record.", + "type": "integer", + "example": 123456789 + }, + "type": { + "description": "High-level payout record category.", + "type": "string", + "example": "PAYOUT", + "enum": [ + "PAYOUT", + "CHARGE_BACK_DEDUCTION", + "REFUND_DEDUCTION", + "DD_RETURN_DEDUCTION", + "BALANCE_DEDUCTION" + ] + }, + "amount": { + "description": "Amount of the payout or deduction in major units.", + "type": "number", + "format": "float", + "example": 132.45 + }, + "date": { + "description": "Payout date associated with the record, in `YYYY-MM-DD` format.", + "type": "string", + "format": "date", + "example": "2024-02-29" + }, + "currency": { + "description": "Three-letter ISO 4217 currency code of the payout.", + "type": "string", + "example": "EUR" + }, + "fee": { + "description": "Fee amount associated with the payout record, in major units.", + "type": "number", + "format": "float", + "example": 3.12 + }, + "status": { + "description": "Merchant-facing outcome of the payout record.", + "type": "string", + "example": "SUCCESSFUL", + "enum": [ + "SUCCESSFUL", + "FAILED" + ] + }, + "reference": { + "description": "Processor or payout reference associated with the record.", + "type": "string", + "example": "payout-2024-02-29" + }, + "transaction_code": { + "description": "Transaction code of the original sale associated with the payout or deduction.", + "type": "string", + "example": "TEENSK4W2K" } }, - "title": "Financial Payouts" + "required": [ + "id", + "type", + "amount", + "date", + "currency", + "fee", + "status", + "reference", + "transaction_code" + ], + "title": "Financial Payout" }, "Link": { "description": "Details of a link to a related resource.", @@ -8467,331 +7629,84 @@ "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", - "example": "EUR", - "enum": [ - "BGN", - "BRL", - "CHF", - "CLP", - "COP", - "CZK", - "DKK", - "EUR", - "GBP", - "HRK", - "HUF", - "NOK", - "PLN", - "RON", - "SEK", - "USD" - ], - "title": "Currency" - }, - "EventType": { - "description": "Type of the transaction event.", - "type": "string", - "enum": [ - "PAYOUT", - "CHARGE_BACK", - "REFUND", - "PAYOUT_DEDUCTION" - ], - "title": "Event Type" - }, - "EventStatus": { - "description": "Status of the transaction event.\n\nNot every value is used for every event type.\n\n- `PENDING`: The event has been created but is not final yet. Used for events that are still being processed and whose final outcome is not known yet.\n- `SCHEDULED`: The event is planned for a future payout cycle but has not been executed yet. This applies to payout events before money is actually sent out.\n- `RECONCILED`: The underlying payment has been matched with settlement data and is ready to continue through payout processing, but the funds have not been paid out yet. This applies to payout events.\n- `PAID_OUT`: The payout event has been completed and the funds were included in a merchant payout.\n- `REFUNDED`: A refund event has been accepted and recorded in the refund flow. This is the status returned for refund events once the transaction amount is being or has been returned to the payer.\n- `SUCCESSFUL`: The event completed successfully. Use this as the generic terminal success status for event types that do not expose a more specific business outcome such as `PAID_OUT` or `REFUNDED`.\n- `FAILED`: The event could not be completed. Typical examples are a payout that could not be executed or an event that was rejected during processing.", - "type": "string", - "enum": [ - "FAILED", - "PAID_OUT", - "PENDING", - "RECONCILED", - "REFUNDED", - "SCHEDULED", - "SUCCESSFUL" - ], - "title": "Event Status" - }, - "EventID": { - "description": "Unique ID of the transaction event.", - "type": "integer", - "format": "int64", - "title": "Event ID" - }, - "HorizontalAccuracy": { - "description": "Indication of the precision of the geographical position received from the payment terminal.", - "type": "number", - "format": "float", - "title": "Horizontal Accuracy" - }, - "Lat": { - "description": "Latitude value from the coordinates of the payment location (as received from the payment terminal reader).", - "type": "number", - "format": "float", - "maximum": 90, - "minimum": 0, - "title": "Latitude" - }, - "Lon": { - "description": "Longitude value from the coordinates of the payment location (as received from the payment terminal reader).", - "type": "number", - "format": "float", - "maximum": 180, - "minimum": 0, - "title": "Longitude" - }, - "TransactionID": { - "description": "Unique ID of the transaction.", - "type": "string", - "title": "Transaction ID" - }, - "Permissions": { - "description": "Permissions assigned to an operator or user.", - "type": "object", - "properties": { - "create_moto_payments": { - "type": "boolean" - }, - "create_referral": { - "type": "boolean" - }, - "full_transaction_history_view": { - "type": "boolean" - }, - "refund_transactions": { - "type": "boolean" - }, - "admin": { - "type": "boolean" - } - }, - "required": [ - "create_moto_payments", - "create_referral", - "full_transaction_history_view", - "refund_transactions", - "admin" - ] - }, - "Operator": { - "description": "Operator account for a merchant.", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "username": { - "type": "string", - "example": "operator1@mydomain.com" - }, - "nickname": { - "type": "string", - "example": "Operator 1", - "nullable": true - }, - "disabled": { - "type": "boolean", - "example": false - }, - "created_at": { - "description": "The timestamp of when the operator was created.", - "type": "string", - "format": "date-time" - }, - "updated_at": { - "description": "The timestamp of when the operator was last updated.", - "type": "string", - "format": "date-time" - }, - "permissions": { - "$ref": "#/components/schemas/Permissions" - }, - "account_type": { - "type": "string", - "enum": [ - "operator", - "normal" - ] - } - }, - "required": [ - "id", - "username", - "disabled", - "created_at", - "updated_at", - "permissions", - "account_type" - ] - }, - "Attributes": { - "description": "Object attributes that are modifiable only by SumUp applications.", - "type": "object", - "example": {}, - "additionalProperties": true - }, - "Address": { - "description": "An address somewhere in the world. The address fields used depend on the country conventions. For example, in Great Britain, `city` is `post_town`. In the United States, the top-level administrative unit used in addresses is `state`, whereas in Chile it's `region`.\nWhether an address is valid or not depends on whether the locally required fields are present. Fields not supported in a country will be ignored.", - "type": "object", - "properties": { - "street_address": { - "type": "array", - "items": { - "type": "string", - "description": "The first line of the address.", - "maxLength": 100 - }, - "example": [ - "Paul-Linke-Ufer 39-40", - "2. Hinterhof" - ], - "maxItems": 2 - }, - "post_code": { - "description": "The postal code (aka. zip code) of the address.\n", - "type": "string", - "example": "10999", - "maxLength": 32 - }, - "country": { - "$ref": "#/components/schemas/CountryCode" - }, - "city": { - "description": "The city of the address.\n", - "type": "string", - "example": "Berlin", - "maxLength": 512 - }, - "province": { - "description": "The province where the address is located. This may not be relevant in some countries.\n", - "type": "string", - "example": "Berlin", - "maxLength": 512 - }, - "region": { - "description": "The region where the address is located. This may not be relevant in some countries.\n", - "type": "string", - "example": "Baden Wuerttemberg", - "maxLength": 512 - }, - "county": { - "description": "A county is a geographic region of a country used for administrative or other purposes in some nations. Used in countries such as Ireland, Romania, etc.\n", - "type": "string", - "example": "Dublin County", - "maxLength": 512 - }, - "autonomous_community": { - "description": "In Spain, an autonomous community is the first sub-national level of political and administrative division.\n", - "type": "string", - "example": "Catalonia", - "maxLength": 512 - }, - "post_town": { - "description": "A post town is a required part of all postal addresses in the United Kingdom and Ireland, and a basic unit of the postal delivery system.\n", - "type": "string", - "example": "London", - "maxLength": 512 - }, - "state": { - "description": "Most often, a country has a single state, with various administrative divisions. The term \"state\" is sometimes used to refer to the federated polities that make up the federation. Used in countries such as the United States and Brazil.\n", - "type": "string", - "example": "California", - "maxLength": 512 - }, - "neighborhood": { - "description": "Locality level of the address. Used in countries such as Brazil or Chile.\n", - "type": "string", - "example": "Copacabana", - "maxLength": 512 - }, - "commune": { - "description": "In many countries, terms cognate with \"commune\" are used, referring to the community living in the area and the common interest. Used in countries such as Chile.\n", - "type": "string", - "example": "Providencia", - "maxLength": 512 - }, - "department": { - "description": "A department (French: département, Spanish: departamento) is an administrative or political division in several countries. Used in countries such as Colombia.\n", - "type": "string", - "example": "Antioquia", - "maxLength": 512 - }, - "municipality": { - "description": "A municipality is usually a single administrative division having corporate status and powers of self-government or jurisdiction as granted by national and regional laws to which it is subordinate. Used in countries such as Colombia.\n", - "type": "string", - "example": "Medellín", - "maxLength": 512 - }, - "district": { - "description": "A district is a type of administrative division that in some countries is managed by the local government. Used in countries such as Portugal.\n", - "type": "string", - "example": "Lisbon District", - "maxLength": 512 - }, - "zip_code": { - "description": "A US system of postal codes used by the United States Postal Service (USPS).\n", - "type": "string", - "example": "94103", - "maxLength": 512 - }, - "eircode": { - "description": "A postal address in Ireland.\n", - "type": "string", - "example": "D02 X285", - "maxLength": 512 - } - }, - "example": { - "street_address": [ - "Paul-Linke-Ufer 39-40", - "2. Hinterhof" - ], - "post_code": "10999", - "city": "Berlin", - "country": "DE" - }, - "externalDocs": { - "description": "Address documentation", - "url": "https://backstage.sumup.net/docs/default/Component/merchants/merchant/#addresses" - }, - "required": [ - "country" - ] + "example": "EUR", + "enum": [ + "BGN", + "BRL", + "CHF", + "CLP", + "COP", + "CZK", + "DKK", + "EUR", + "GBP", + "HRK", + "HUF", + "NOK", + "PLN", + "RON", + "SEK", + "USD" + ], + "title": "Currency" }, - "CountryCode": { - "description": "An [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)\ncountry code. This definition users `oneOf` with a two-character string\ntype to allow for support of future countries in client code.", + "EventType": { + "description": "Type of the transaction event.", "type": "string", - "example": "BR", - "maxLength": 2, - "minLength": 2, - "pattern": "^[A-Z]{2}$" + "enum": [ + "PAYOUT", + "CHARGE_BACK", + "REFUND", + "PAYOUT_DEDUCTION" + ], + "title": "Event Type" }, - "PersonalIdentifier": { - "type": "object", - "properties": { - "ref": { - "description": "The unique reference for the personal identifier type.", - "type": "string", - "example": "br.cpf", - "maxLength": 32 - }, - "value": { - "description": "The company identifier value.", - "type": "string", - "example": "847.060.136-90", - "maxLength": 128 - } - }, - "example": { - "ref": "br.cpf", - "value": "847.060.136-90" - }, - "required": [ - "ref", - "value" - ] + "EventStatus": { + "description": "Status of the transaction event.\n\nNot every value is used for every event type.\n\n- `PENDING`: The event has been created but is not final yet. Used for events that are still being processed and whose final outcome is not known yet.\n- `SCHEDULED`: The event is planned for a future payout cycle but has not been executed yet. This applies to payout events before money is actually sent out.\n- `RECONCILED`: The underlying payment has been matched with settlement data and is ready to continue through payout processing, but the funds have not been paid out yet. This applies to payout events.\n- `PAID_OUT`: The payout event has been completed and the funds were included in a merchant payout.\n- `REFUNDED`: A refund event has been accepted and recorded in the refund flow. This is the status returned for refund events once the transaction amount is being or has been returned to the payer.\n- `SUCCESSFUL`: The event completed successfully. Use this as the generic terminal success status for event types that do not expose a more specific business outcome such as `PAID_OUT` or `REFUNDED`.\n- `FAILED`: The event could not be completed. Typical examples are a payout that could not be executed or an event that was rejected during processing.", + "type": "string", + "enum": [ + "FAILED", + "PAID_OUT", + "PENDING", + "RECONCILED", + "REFUNDED", + "SCHEDULED", + "SUCCESSFUL" + ], + "title": "Event Status" + }, + "EventID": { + "description": "Unique ID of the transaction event.", + "type": "integer", + "format": "int64", + "title": "Event ID" + }, + "HorizontalAccuracy": { + "description": "Indication of the precision of the geographical position received from the payment terminal.", + "type": "number", + "format": "float", + "title": "Horizontal Accuracy" + }, + "Lat": { + "description": "Latitude value from the coordinates of the payment location (as received from the payment terminal reader).", + "type": "number", + "format": "float", + "maximum": 90, + "minimum": 0, + "title": "Latitude" + }, + "Lon": { + "description": "Longitude value from the coordinates of the payment location (as received from the payment terminal reader).", + "type": "number", + "format": "float", + "maximum": 180, + "minimum": 0, + "title": "Longitude" + }, + "TransactionID": { + "description": "Unique ID of the transaction.", + "type": "string", + "title": "Transaction ID" }, "MembershipStatus": { "description": "The status of the membership.", @@ -9167,8 +8082,7 @@ "type": "string" }, "example": [], - "maxItems": 100, - "x-deprecation-notice": "Permissions include only legacy permissions, please use roles instead. Member access is based on their roles within a given resource and the permissions these roles grant." + "maxItems": 100 }, "is_predefined": { "description": "True if the role is provided by SumUp.", @@ -9201,6 +8115,12 @@ ], "title": "Role" }, + "Attributes": { + "description": "Object attributes that are modifiable only by SumUp applications.", + "type": "object", + "example": {}, + "additionalProperties": true + }, "Metadata": { "description": "Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata. Maximum of 64 parameters are allowed in the object.", "type": "object", @@ -9420,12 +8340,199 @@ } ] }, + "CountryCode": { + "description": "An [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. This definition users `oneOf` with a two-character string type to allow for support of future countries in client code.\n", + "type": "string", + "examples": [ + "AR", + "AT", + "AU", + "BE", + "BG", + "BR", + "CH", + "CL", + "CO", + "CY", + "CZ", + "DE", + "DK", + "EE", + "ES", + "FI", + "FR", + "GB", + "GR", + "HU", + "IE", + "IT", + "LT", + "LU", + "LV", + "MT", + "MX", + "NL", + "NO", + "PE", + "PL", + "PT", + "RO", + "SE", + "SI", + "SK", + "US" + ], + "maxLength": 2, + "minLength": 2 + }, "PhoneNumber": { "description": "A publicly available phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format.\n", "type": "string", "example": "+420123456789", "maxLength": 16 }, + "Address": { + "description": "An address somewhere in the world. The address fields used depend on the country conventions. For example, in Great Britain, `city` is `post_town`. In the United States, the top-level administrative unit used in addresses is `state`, whereas in Chile it's `region`.\nWhether an address is valid or not depends on whether the locally required fields are present. Fields not supported in a country will be ignored.", + "type": "object", + "properties": { + "street_address": { + "type": "array", + "items": { + "type": "string", + "description": "The first line of the address.", + "maxLength": 100 + }, + "example": [ + "Paul-Linke-Ufer 39-40", + "2. Hinterhof" + ], + "maxItems": 2, + "minItems": 1 + }, + "post_code": { + "description": "The postal code (aka. zip code) of the address.\n", + "type": "string", + "example": "10999", + "maxLength": 10 + }, + "country": { + "$ref": "#/components/schemas/CountryCode" + }, + "city": { + "description": "The city of the address.\n", + "type": "string", + "example": "Berlin", + "maxLength": 60 + }, + "province": { + "description": "The province where the address is located. This may not be relevant in some countries.\n", + "type": "string", + "example": "Ontario", + "maxLength": 60 + }, + "region": { + "description": "The region where the address is located. This may not be relevant in some countries.\n", + "type": "string", + "example": "Baden-Wuerttemberg", + "maxLength": 60 + }, + "county": { + "description": "A county is a geographic region of a country used for administrative or other purposes in some nations. Used in countries such as Ireland, Romania, etc.\n", + "type": "string", + "example": "Dublin", + "maxLength": 60 + }, + "autonomous_community": { + "description": "In Spain, an autonomous community is the first sub-national level of political and administrative division.\n", + "type": "string", + "example": "Catalonia", + "maxLength": 60 + }, + "post_town": { + "description": "A post town is a required part of all postal addresses in the United Kingdom and Ireland, and a basic unit of the postal delivery system.\n", + "type": "string", + "example": "London", + "maxLength": 60 + }, + "state": { + "description": "Most often, a country has a single state, with various administrative divisions. The term \"state\" is sometimes used to refer to the federated polities that make up the federation. Used in countries such as the United States and Brazil.\n", + "type": "string", + "example": "California", + "maxLength": 60 + }, + "neighborhood": { + "description": "Locality level of the address. Used in countries such as Brazil or Chile.\n", + "type": "string", + "example": "Copacabana", + "maxLength": 60 + }, + "commune": { + "description": "In many countries, terms cognate with \"commune\" are used, referring to the community living in the area and the common interest. Used in countries such as Chile.\n", + "type": "string", + "example": "Providencia", + "maxLength": 60 + }, + "department": { + "description": "A department (French: département, Spanish: departamento) is an administrative or political division in several countries. Used in countries such as Colombia.\n", + "type": "string", + "example": "Antioquia", + "maxLength": 60 + }, + "municipality": { + "description": "A municipality is usually a single administrative division having corporate status and powers of self-government or jurisdiction as granted by national and regional laws to which it is subordinate. Used in countries such as Colombia.\n", + "type": "string", + "example": "Medellin", + "maxLength": 60 + }, + "district": { + "description": "A district is a type of administrative division that in some countries is managed by the local government. Used in countries such as Portugal.\n", + "type": "string", + "example": "Lisbon", + "maxLength": 60 + }, + "zip_code": { + "description": "A US system of postal codes used by the United States Postal Service (USPS).\n", + "type": "string", + "example": "94103", + "maxLength": 10 + }, + "eircode": { + "description": "A postal address in Ireland.\n", + "type": "string", + "example": "D02 X285", + "maxLength": 10 + } + }, + "examples": [ + { + "street_address": [ + "Paul-Linke-Ufer 39-40", + "2. Hinterhof" + ], + "post_code": "10999", + "city": "Berlin", + "country": "DE" + }, + { + "street_address": [ + "156 Avenida Vida Nova", + "Apto 2" + ], + "city": "Taboão da Serra", + "post_code": "06764045", + "state": "SP", + "neighborhood": "Jardim Maria Rosa", + "country": "BR" + } + ], + "externalDocs": { + "description": "Address documentation", + "url": "https://developer.sumup.com/tools/glossary/merchant#addresses" + }, + "required": [ + "country" + ] + }, "Branding": { "description": "Settings used to apply the Merchant's branding to email receipts, invoices, checkouts, and other products.", "type": "object", @@ -9565,6 +8672,36 @@ "share" ] }, + "PersonalIdentifier": { + "type": "object", + "properties": { + "ref": { + "description": "The unique reference for the personal identifier type as defined in the country SDK.\n", + "type": "string", + "examples": [ + "br.cpf" + ] + }, + "value": { + "description": "The company identifier value.\n", + "type": "string", + "examples": [ + "847.060.136-90" + ], + "maxLength": 30 + } + }, + "examples": [ + { + "ref": "br.cpf", + "value": "847.060.136-90" + } + ], + "required": [ + "ref", + "value" + ] + }, "Version": { "description": "The version of the resource. The version reflects a specific change submitted to the API via one of the `PATCH` endpoints.\n", "type": "string", @@ -11315,16 +10452,6 @@ } ] }, - { - "name": "Subaccounts", - "description": "Endpoints for managing merchant sub-accounts (operators).", - "x-deprecation-notice": "Subaccounts API is deprecated, please use [Members](https://developer.sumup.com/api/members) API instead to manage your account members.", - "x-core-objects": [ - { - "$ref": "#/components/schemas/Operator" - } - ] - }, { "name": "Members", "description": "Endpoints to manage account members. Members are users that have membership within merchant accounts.", From e8970a26520585b0ff2a1c4ef6eec7d02e273d88 Mon Sep 17 00:00:00 2001 From: "sumup-bot[bot]" <241716704+sumup-bot[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 07:42:21 +0000 Subject: [PATCH 2/2] chore: generate code --- .../java/com/sumup/sdk/SumUpAsyncClient.java | 12 - src/main/java/com/sumup/sdk/SumUpClient.java | 12 - .../sumup/sdk/clients/PayoutsAsyncClient.java | 166 ++------ .../com/sumup/sdk/clients/PayoutsClient.java | 166 ++------ .../sdk/clients/SubaccountsAsyncClient.java | 289 -------------- .../sumup/sdk/clients/SubaccountsClient.java | 283 -------------- .../sdk/clients/TransactionsAsyncClient.java | 367 +----------------- .../sumup/sdk/clients/TransactionsClient.java | 362 +---------------- .../sdk/models/CreateSubAccountRequest.java | 87 ----- .../CreateSubAccountRequestPermissions.java | 81 ---- .../com/sumup/sdk/models/FinancialPayout.java | 179 +++++++++ ...sOrder.java => FinancialPayoutStatus.java} | 21 +- .../sumup/sdk/models/FinancialPayoutType.java | 61 +++ .../sumup/sdk/models/FinancialPayouts.java | 4 +- .../sdk/models/FinancialPayoutsItem.java | 146 ------- .../models/FinancialPayoutsItemStatus.java | 54 --- .../sdk/models/FinancialPayoutsItemType.java | 60 --- .../sumup/sdk/models/ListPayoutsFormat.java | 53 --- .../sumup/sdk/models/ListPayoutsOrder.java | 53 --- .../sumup/sdk/models/ListPayoutsV1Order.java | 2 +- .../sdk/models/ListTransactionsResponse.java | 54 --- .../models/ListTransactionsStatusesItem.java | 61 --- .../sdk/models/ListTransactionsTypesItem.java | 55 --- .../java/com/sumup/sdk/models/Operator.java | 149 ------- .../sumup/sdk/models/OperatorAccountType.java | 53 --- .../com/sumup/sdk/models/Permissions.java | 101 ----- .../sumup/sdk/models/PersonalIdentifier.java | 5 +- .../sdk/models/UpdateSubAccountRequest.java | 94 ----- .../UpdateSubAccountRequestPermissions.java | 81 ---- 29 files changed, 343 insertions(+), 2768 deletions(-) delete mode 100644 src/main/java/com/sumup/sdk/clients/SubaccountsAsyncClient.java delete mode 100644 src/main/java/com/sumup/sdk/clients/SubaccountsClient.java delete mode 100644 src/main/java/com/sumup/sdk/models/CreateSubAccountRequest.java delete mode 100644 src/main/java/com/sumup/sdk/models/CreateSubAccountRequestPermissions.java create mode 100644 src/main/java/com/sumup/sdk/models/FinancialPayout.java rename src/main/java/com/sumup/sdk/models/{ListTransactionsOrder.java => FinancialPayoutStatus.java} (53%) create mode 100644 src/main/java/com/sumup/sdk/models/FinancialPayoutType.java delete mode 100644 src/main/java/com/sumup/sdk/models/FinancialPayoutsItem.java delete mode 100644 src/main/java/com/sumup/sdk/models/FinancialPayoutsItemStatus.java delete mode 100644 src/main/java/com/sumup/sdk/models/FinancialPayoutsItemType.java delete mode 100644 src/main/java/com/sumup/sdk/models/ListPayoutsFormat.java delete mode 100644 src/main/java/com/sumup/sdk/models/ListPayoutsOrder.java delete mode 100644 src/main/java/com/sumup/sdk/models/ListTransactionsResponse.java delete mode 100644 src/main/java/com/sumup/sdk/models/ListTransactionsStatusesItem.java delete mode 100644 src/main/java/com/sumup/sdk/models/ListTransactionsTypesItem.java delete mode 100644 src/main/java/com/sumup/sdk/models/Operator.java delete mode 100644 src/main/java/com/sumup/sdk/models/OperatorAccountType.java delete mode 100644 src/main/java/com/sumup/sdk/models/Permissions.java delete mode 100644 src/main/java/com/sumup/sdk/models/UpdateSubAccountRequest.java delete mode 100644 src/main/java/com/sumup/sdk/models/UpdateSubAccountRequestPermissions.java diff --git a/src/main/java/com/sumup/sdk/SumUpAsyncClient.java b/src/main/java/com/sumup/sdk/SumUpAsyncClient.java index 7dd3103..fab88ae 100644 --- a/src/main/java/com/sumup/sdk/SumUpAsyncClient.java +++ b/src/main/java/com/sumup/sdk/SumUpAsyncClient.java @@ -10,7 +10,6 @@ import com.sumup.sdk.clients.ReadersAsyncClient; import com.sumup.sdk.clients.ReceiptsAsyncClient; import com.sumup.sdk.clients.RolesAsyncClient; -import com.sumup.sdk.clients.SubaccountsAsyncClient; import com.sumup.sdk.clients.TransactionsAsyncClient; import com.sumup.sdk.core.ApiClient; import java.net.http.HttpClient; @@ -32,7 +31,6 @@ public final class SumUpAsyncClient { private final ReadersAsyncClient readers; private final ReceiptsAsyncClient receipts; private final RolesAsyncClient roles; - private final SubaccountsAsyncClient subaccounts; private final TransactionsAsyncClient transactions; /** Creates a SumUpAsyncClient using the API key from the SUMUP_API_KEY environment variable. */ @@ -73,7 +71,6 @@ private SumUpAsyncClient(ApiClient apiClient) { this.readers = new ReadersAsyncClient(this.apiClient); this.receipts = new ReceiptsAsyncClient(this.apiClient); this.roles = new RolesAsyncClient(this.apiClient); - this.subaccounts = new SubaccountsAsyncClient(this.apiClient); this.transactions = new TransactionsAsyncClient(this.apiClient); } @@ -176,15 +173,6 @@ public RolesAsyncClient roles() { return roles; } - /** - * Returns the SubaccountsAsyncClient client for the "Subaccounts" API group. - * - * @return Client for the associated API group. - */ - public SubaccountsAsyncClient subaccounts() { - return subaccounts; - } - /** * Returns the TransactionsAsyncClient client for the "Transactions" API group. * diff --git a/src/main/java/com/sumup/sdk/SumUpClient.java b/src/main/java/com/sumup/sdk/SumUpClient.java index 0b03fd9..cace91c 100644 --- a/src/main/java/com/sumup/sdk/SumUpClient.java +++ b/src/main/java/com/sumup/sdk/SumUpClient.java @@ -10,7 +10,6 @@ import com.sumup.sdk.clients.ReadersClient; import com.sumup.sdk.clients.ReceiptsClient; import com.sumup.sdk.clients.RolesClient; -import com.sumup.sdk.clients.SubaccountsClient; import com.sumup.sdk.clients.TransactionsClient; import com.sumup.sdk.core.ApiClient; import java.net.http.HttpClient; @@ -32,7 +31,6 @@ public final class SumUpClient { private final ReadersClient readers; private final ReceiptsClient receipts; private final RolesClient roles; - private final SubaccountsClient subaccounts; private final TransactionsClient transactions; /** Creates a SumUpClient using the API key from the SUMUP_API_KEY environment variable. */ @@ -73,7 +71,6 @@ private SumUpClient(ApiClient apiClient) { this.readers = new ReadersClient(this.apiClient); this.receipts = new ReceiptsClient(this.apiClient); this.roles = new RolesClient(this.apiClient); - this.subaccounts = new SubaccountsClient(this.apiClient); this.transactions = new TransactionsClient(this.apiClient); } @@ -176,15 +173,6 @@ public RolesClient roles() { return roles; } - /** - * Returns the SubaccountsClient client for the "Subaccounts" API group. - * - * @return Client for the associated API group. - */ - public SubaccountsClient subaccounts() { - return subaccounts; - } - /** * Returns the TransactionsClient client for the "Transactions" API group. * diff --git a/src/main/java/com/sumup/sdk/clients/PayoutsAsyncClient.java b/src/main/java/com/sumup/sdk/clients/PayoutsAsyncClient.java index fd916d0..5c0d67d 100644 --- a/src/main/java/com/sumup/sdk/clients/PayoutsAsyncClient.java +++ b/src/main/java/com/sumup/sdk/clients/PayoutsAsyncClient.java @@ -33,13 +33,19 @@ public PayoutsAsyncClient(ApiClient apiClient) { /** * List payouts * - *

Lists ordered payouts for the merchant account. + *

Lists payout and payout-deduction records for the specified merchant account within the + * requested date range. The response can include: - regular payouts (`type = PAYOUT`) - deduction + * records for refunds, chargebacks, direct debit returns, or balance adjustments Results are + * sorted by payout date in the requested `order`. * *

Operation ID: ListPayoutsV1 * * @param merchantCode Merchant code of the account whose payouts should be listed. - * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). + * @param endDate End date of the payout period filter, inclusive, in + * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). Must be + * greater than or equal to `start_date`. + * @param startDate Start date of the payout period filter, inclusive, in + * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). *

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.FinancialPayouts parsed response. @@ -54,13 +60,19 @@ public CompletableFuture list( /** * List payouts * - *

Lists ordered payouts for the merchant account. + *

Lists payout and payout-deduction records for the specified merchant account within the + * requested date range. The response can include: - regular payouts (`type = PAYOUT`) - deduction + * records for refunds, chargebacks, direct debit returns, or balance adjustments Results are + * sorted by payout date in the requested `order`. * *

Operation ID: ListPayoutsV1 * * @param merchantCode Merchant code of the account whose payouts should be listed. - * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). + * @param endDate End date of the payout period filter, inclusive, in + * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). Must be + * greater than or equal to `start_date`. + * @param startDate Start date of the payout period filter, inclusive, in + * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). * @param listPayoutsV1 Optional query parameters for this request. *

Call the overload that accepts RequestOptions to customize headers, authorization, or * request timeout. @@ -79,13 +91,19 @@ public CompletableFuture list( /** * List payouts * - *

Lists ordered payouts for the merchant account. + *

Lists payout and payout-deduction records for the specified merchant account within the + * requested date range. The response can include: - regular payouts (`type = PAYOUT`) - deduction + * records for refunds, chargebacks, direct debit returns, or balance adjustments Results are + * sorted by payout date in the requested `order`. * *

Operation ID: ListPayoutsV1 * * @param merchantCode Merchant code of the account whose payouts should be listed. - * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). + * @param endDate End date of the payout period filter, inclusive, in + * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). Must be + * greater than or equal to `start_date`. + * @param startDate Start date of the payout period filter, inclusive, in + * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). * @param listPayoutsV1 Optional query parameters for this request. * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass * {@code null} to use client defaults. @@ -123,89 +141,6 @@ public CompletableFuture list( requestOptions); } - /** - * List payouts - * - *

Lists ordered payouts for the merchant account. - * - *

Operation ID: ListPayouts - * - * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - *

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.FinancialPayouts parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture listDeprecated( - java.time.LocalDate endDate, java.time.LocalDate startDate) throws ApiException { - return listDeprecated(endDate, startDate, null); - } - - /** - * List payouts - * - *

Lists ordered payouts for the merchant account. - * - *

Operation ID: ListPayouts - * - * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param listPayouts 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.FinancialPayouts parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture listDeprecated( - java.time.LocalDate endDate, - java.time.LocalDate startDate, - ListPayoutsQueryParams listPayouts) - throws ApiException { - return listDeprecated(endDate, startDate, listPayouts, null); - } - - /** - * List payouts - * - *

Lists ordered payouts for the merchant account. - * - *

Operation ID: ListPayouts - * - * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param listPayouts 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.FinancialPayouts parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture listDeprecated( - java.time.LocalDate endDate, - java.time.LocalDate startDate, - ListPayoutsQueryParams listPayouts, - RequestOptions requestOptions) - throws ApiException { - Objects.requireNonNull(endDate, "endDate"); - Objects.requireNonNull(startDate, "startDate"); - String path = "/v0.1/me/financials/payouts"; - Map queryParams = new LinkedHashMap<>(); - queryParams.put("end_date", endDate); - queryParams.put("start_date", startDate); - if (listPayouts != null) { - queryParams.putAll(listPayouts.toMap()); - } - - return this.apiClient.sendAsync( - HttpMethod.GET, - path, - queryParams, - null, - null, - new TypeReference() {}, - requestOptions); - } - /** Optional query parameters for this request. */ public static final class ListPayoutsV1QueryParams { private final Map values = new LinkedHashMap<>(); @@ -252,51 +187,4 @@ Map toMap() { return values; } } - - /** Optional query parameters for this request. */ - public static final class ListPayoutsQueryParams { - private final Map values = new LinkedHashMap<>(); - - /** - * Sets the format query parameter. - * - * @param value Response format for the payout list. - * @return This ListPayoutsQueryParams instance. - */ - public ListPayoutsQueryParams format(com.sumup.sdk.models.ListPayoutsFormat value) { - this.values.put("format", Objects.requireNonNull(value, "format")); - return this; - } - - /** - * Sets the limit query parameter. - * - * @param value Maximum number of payout records to return. - * @return This ListPayoutsQueryParams instance. - */ - public ListPayoutsQueryParams limit(Long value) { - this.values.put("limit", Objects.requireNonNull(value, "limit")); - return this; - } - - /** - * Sets the order query parameter. - * - * @param value Sort direction for the returned payouts. - * @return This ListPayoutsQueryParams instance. - */ - public ListPayoutsQueryParams order(com.sumup.sdk.models.ListPayoutsOrder value) { - this.values.put("order", Objects.requireNonNull(value, "order")); - 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/PayoutsClient.java b/src/main/java/com/sumup/sdk/clients/PayoutsClient.java index 57d9bf3..9369b85 100644 --- a/src/main/java/com/sumup/sdk/clients/PayoutsClient.java +++ b/src/main/java/com/sumup/sdk/clients/PayoutsClient.java @@ -32,13 +32,19 @@ public PayoutsClient(ApiClient apiClient) { /** * List payouts * - *

Lists ordered payouts for the merchant account. + *

Lists payout and payout-deduction records for the specified merchant account within the + * requested date range. The response can include: - regular payouts (`type = PAYOUT`) - deduction + * records for refunds, chargebacks, direct debit returns, or balance adjustments Results are + * sorted by payout date in the requested `order`. * *

Operation ID: ListPayoutsV1 * * @param merchantCode Merchant code of the account whose payouts should be listed. - * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). + * @param endDate End date of the payout period filter, inclusive, in + * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). Must be + * greater than or equal to `start_date`. + * @param startDate Start date of the payout period filter, inclusive, in + * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). *

Call the overload that accepts optional parameter objects or RequestOptions to customize * headers, authorization, query values, or timeouts. * @return com.sumup.sdk.models.FinancialPayouts parsed response. @@ -53,13 +59,19 @@ public com.sumup.sdk.models.FinancialPayouts list( /** * List payouts * - *

Lists ordered payouts for the merchant account. + *

Lists payout and payout-deduction records for the specified merchant account within the + * requested date range. The response can include: - regular payouts (`type = PAYOUT`) - deduction + * records for refunds, chargebacks, direct debit returns, or balance adjustments Results are + * sorted by payout date in the requested `order`. * *

Operation ID: ListPayoutsV1 * * @param merchantCode Merchant code of the account whose payouts should be listed. - * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). + * @param endDate End date of the payout period filter, inclusive, in + * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). Must be + * greater than or equal to `start_date`. + * @param startDate Start date of the payout period filter, inclusive, in + * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). * @param listPayoutsV1 Optional query parameters for this request. *

Call the overload that accepts RequestOptions to customize headers, authorization, or * request timeout. @@ -78,13 +90,19 @@ public com.sumup.sdk.models.FinancialPayouts list( /** * List payouts * - *

Lists ordered payouts for the merchant account. + *

Lists payout and payout-deduction records for the specified merchant account within the + * requested date range. The response can include: - regular payouts (`type = PAYOUT`) - deduction + * records for refunds, chargebacks, direct debit returns, or balance adjustments Results are + * sorted by payout date in the requested `order`. * *

Operation ID: ListPayoutsV1 * * @param merchantCode Merchant code of the account whose payouts should be listed. - * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). + * @param endDate End date of the payout period filter, inclusive, in + * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). Must be + * greater than or equal to `start_date`. + * @param startDate Start date of the payout period filter, inclusive, in + * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). * @param listPayoutsV1 Optional query parameters for this request. * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass * {@code null} to use client defaults. @@ -122,89 +140,6 @@ public com.sumup.sdk.models.FinancialPayouts list( requestOptions); } - /** - * List payouts - * - *

Lists ordered payouts for the merchant account. - * - *

Operation ID: ListPayouts - * - * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - *

Call the overload that accepts optional parameter objects or RequestOptions to customize - * headers, authorization, query values, or timeouts. - * @return com.sumup.sdk.models.FinancialPayouts parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.FinancialPayouts listDeprecated( - java.time.LocalDate endDate, java.time.LocalDate startDate) throws ApiException { - return listDeprecated(endDate, startDate, null); - } - - /** - * List payouts - * - *

Lists ordered payouts for the merchant account. - * - *

Operation ID: ListPayouts - * - * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param listPayouts Optional query parameters for this request. - *

Call the overload that accepts RequestOptions to customize headers, authorization, or - * request timeout. - * @return com.sumup.sdk.models.FinancialPayouts parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.FinancialPayouts listDeprecated( - java.time.LocalDate endDate, - java.time.LocalDate startDate, - ListPayoutsQueryParams listPayouts) - throws ApiException { - return listDeprecated(endDate, startDate, listPayouts, null); - } - - /** - * List payouts - * - *

Lists ordered payouts for the merchant account. - * - *

Operation ID: ListPayouts - * - * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @param listPayouts 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.FinancialPayouts parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.FinancialPayouts listDeprecated( - java.time.LocalDate endDate, - java.time.LocalDate startDate, - ListPayoutsQueryParams listPayouts, - RequestOptions requestOptions) - throws ApiException { - Objects.requireNonNull(endDate, "endDate"); - Objects.requireNonNull(startDate, "startDate"); - String path = "/v0.1/me/financials/payouts"; - Map queryParams = new LinkedHashMap<>(); - queryParams.put("end_date", endDate); - queryParams.put("start_date", startDate); - if (listPayouts != null) { - queryParams.putAll(listPayouts.toMap()); - } - - return this.apiClient.send( - HttpMethod.GET, - path, - queryParams, - null, - null, - new TypeReference() {}, - requestOptions); - } - /** Optional query parameters for this request. */ public static final class ListPayoutsV1QueryParams { private final Map values = new LinkedHashMap<>(); @@ -251,51 +186,4 @@ Map toMap() { return values; } } - - /** Optional query parameters for this request. */ - public static final class ListPayoutsQueryParams { - private final Map values = new LinkedHashMap<>(); - - /** - * Sets the format query parameter. - * - * @param value Response format for the payout list. - * @return This ListPayoutsQueryParams instance. - */ - public ListPayoutsQueryParams format(com.sumup.sdk.models.ListPayoutsFormat value) { - this.values.put("format", Objects.requireNonNull(value, "format")); - return this; - } - - /** - * Sets the limit query parameter. - * - * @param value Maximum number of payout records to return. - * @return This ListPayoutsQueryParams instance. - */ - public ListPayoutsQueryParams limit(Long value) { - this.values.put("limit", Objects.requireNonNull(value, "limit")); - return this; - } - - /** - * Sets the order query parameter. - * - * @param value Sort direction for the returned payouts. - * @return This ListPayoutsQueryParams instance. - */ - public ListPayoutsQueryParams order(com.sumup.sdk.models.ListPayoutsOrder value) { - this.values.put("order", Objects.requireNonNull(value, "order")); - 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/SubaccountsAsyncClient.java b/src/main/java/com/sumup/sdk/clients/SubaccountsAsyncClient.java deleted file mode 100644 index 1859c7b..0000000 --- a/src/main/java/com/sumup/sdk/clients/SubaccountsAsyncClient.java +++ /dev/null @@ -1,289 +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 "Subaccounts" API group. - * - *

Endpoints for managing merchant sub-accounts (operators). - */ -public final class SubaccountsAsyncClient { - private final ApiClient apiClient; - - /** - * Creates a new SubaccountsAsyncClient instance backed by the provided ApiClient. - * - * @param apiClient Configured API client used to send HTTP requests. - */ - public SubaccountsAsyncClient(ApiClient apiClient) { - this.apiClient = Objects.requireNonNull(apiClient, "apiClient"); - } - - /** - * Retrieve an operator - * - *

Returns specific operator. - * - *

Operation ID: CompatGetOperator - * - * @param operatorId The unique identifier for the operator. - *

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

Returns specific operator. - * - *

Operation ID: CompatGetOperator - * - * @param operatorId The unique identifier for the operator. - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return CompletableFuture resolved with com.sumup.sdk.models.Operator parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture compatGetOperator( - Integer operatorId, RequestOptions requestOptions) throws ApiException { - Objects.requireNonNull(operatorId, "operatorId"); - String path = "/v0.1/me/accounts/{operator_id}"; - path = path.replace("{operator_id}", ApiClient.urlEncode(ApiClient.parameterValue(operatorId))); - - return this.apiClient.sendAsync( - HttpMethod.GET, - path, - null, - null, - null, - new TypeReference() {}, - requestOptions); - } - - /** - * Create an operator - * - *

Creates new operator for currently authorized users' merchant. - * - *

Operation ID: CreateSubAccount - * - * @param request Request body payload. - *

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

Creates new operator for currently authorized users' merchant. - * - *

Operation ID: CreateSubAccount - * - * @param request Request body payload. - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return CompletableFuture resolved with com.sumup.sdk.models.Operator parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture createSubAccount( - com.sumup.sdk.models.CreateSubAccountRequest request, RequestOptions requestOptions) - throws ApiException { - Objects.requireNonNull(request, "request"); - String path = "/v0.1/me/accounts"; - - return this.apiClient.sendAsync( - HttpMethod.POST, - path, - null, - null, - request, - new TypeReference() {}, - requestOptions); - } - - /** - * List operators - * - *

Returns list of operators for currently authorized user's merchant. - * - *

Operation ID: ListSubAccounts - * - *

Call the overload that accepts optional parameter objects or RequestOptions to customize - * headers, authorization, query values, or timeouts. - * - * @return CompletableFuture resolved with {@code java.util.List} - * parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture> listSubAccounts() - throws ApiException { - return listSubAccounts(null); - } - - /** - * List operators - * - *

Returns list of operators for currently authorized user's merchant. - * - *

Operation ID: ListSubAccounts - * - * @param listSubAccounts Optional query parameters for this request. - *

Call the overload that accepts RequestOptions to customize headers, authorization, or - * request timeout. - * @return CompletableFuture resolved with {@code java.util.List} - * parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture> listSubAccounts( - ListSubAccountsQueryParams listSubAccounts) throws ApiException { - return listSubAccounts(listSubAccounts, null); - } - - /** - * List operators - * - *

Returns list of operators for currently authorized user's merchant. - * - *

Operation ID: ListSubAccounts - * - * @param listSubAccounts 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 {@code java.util.List} - * parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture> listSubAccounts( - ListSubAccountsQueryParams listSubAccounts, RequestOptions requestOptions) - throws ApiException { - String path = "/v0.1/me/accounts"; - Map queryParams = new LinkedHashMap<>(); - if (listSubAccounts != null) { - queryParams.putAll(listSubAccounts.toMap()); - } - - return this.apiClient.sendAsync( - HttpMethod.GET, - path, - queryParams, - null, - null, - new TypeReference>() {}, - requestOptions); - } - - /** - * Update an operator - * - *

Updates operator. If the operator was disabled and their password is updated they will be - * unblocked. - * - *

Operation ID: UpdateSubAccount - * - * @param operatorId The unique identifier for the operator. - * @param request Request body payload. - *

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

Updates operator. If the operator was disabled and their password is updated they will be - * unblocked. - * - *

Operation ID: UpdateSubAccount - * - * @param operatorId The unique identifier for the operator. - * @param request Request body payload. - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return CompletableFuture resolved with com.sumup.sdk.models.Operator parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture updateSubAccount( - Integer operatorId, - com.sumup.sdk.models.UpdateSubAccountRequest request, - RequestOptions requestOptions) - throws ApiException { - Objects.requireNonNull(operatorId, "operatorId"); - Objects.requireNonNull(request, "request"); - String path = "/v0.1/me/accounts/{operator_id}"; - path = path.replace("{operator_id}", ApiClient.urlEncode(ApiClient.parameterValue(operatorId))); - - return this.apiClient.sendAsync( - HttpMethod.PUT, - path, - null, - null, - request, - new TypeReference() {}, - requestOptions); - } - - /** Optional query parameters for this request. */ - public static final class ListSubAccountsQueryParams { - private final Map values = new LinkedHashMap<>(); - - /** - * Sets the include_primary query parameter. - * - * @param value If true the list of operators will include also the primary user. - * @return This ListSubAccountsQueryParams instance. - */ - public ListSubAccountsQueryParams includePrimary(Boolean value) { - this.values.put("include_primary", Objects.requireNonNull(value, "includePrimary")); - return this; - } - - /** - * Sets the query query parameter. - * - * @param value Search query used to filter users that match given query term. Current - * implementation allow querying only over the email address. All operators whos email - * address contains the query string are returned. - * @return This ListSubAccountsQueryParams instance. - */ - public ListSubAccountsQueryParams query(String value) { - this.values.put("query", Objects.requireNonNull(value, "query")); - 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/SubaccountsClient.java b/src/main/java/com/sumup/sdk/clients/SubaccountsClient.java deleted file mode 100644 index a16e5d1..0000000 --- a/src/main/java/com/sumup/sdk/clients/SubaccountsClient.java +++ /dev/null @@ -1,283 +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 "Subaccounts" API group. - * - *

Endpoints for managing merchant sub-accounts (operators). - */ -public final class SubaccountsClient { - private final ApiClient apiClient; - - /** - * Creates a new SubaccountsClient instance backed by the provided ApiClient. - * - * @param apiClient Configured API client used to send HTTP requests. - */ - public SubaccountsClient(ApiClient apiClient) { - this.apiClient = Objects.requireNonNull(apiClient, "apiClient"); - } - - /** - * Retrieve an operator - * - *

Returns specific operator. - * - *

Operation ID: CompatGetOperator - * - * @param operatorId The unique identifier for the operator. - *

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

Returns specific operator. - * - *

Operation ID: CompatGetOperator - * - * @param operatorId The unique identifier for the operator. - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return com.sumup.sdk.models.Operator parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.Operator compatGetOperator( - Integer operatorId, RequestOptions requestOptions) throws ApiException { - Objects.requireNonNull(operatorId, "operatorId"); - String path = "/v0.1/me/accounts/{operator_id}"; - path = path.replace("{operator_id}", ApiClient.urlEncode(ApiClient.parameterValue(operatorId))); - - return this.apiClient.send( - HttpMethod.GET, - path, - null, - null, - null, - new TypeReference() {}, - requestOptions); - } - - /** - * Create an operator - * - *

Creates new operator for currently authorized users' merchant. - * - *

Operation ID: CreateSubAccount - * - * @param request Request body payload. - *

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

Creates new operator for currently authorized users' merchant. - * - *

Operation ID: CreateSubAccount - * - * @param request Request body payload. - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return com.sumup.sdk.models.Operator parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.Operator createSubAccount( - com.sumup.sdk.models.CreateSubAccountRequest request, RequestOptions requestOptions) - throws ApiException { - Objects.requireNonNull(request, "request"); - String path = "/v0.1/me/accounts"; - - return this.apiClient.send( - HttpMethod.POST, - path, - null, - null, - request, - new TypeReference() {}, - requestOptions); - } - - /** - * List operators - * - *

Returns list of operators for currently authorized user's merchant. - * - *

Operation ID: ListSubAccounts - * - *

Call the overload that accepts optional parameter objects or RequestOptions to customize - * headers, authorization, query values, or timeouts. - * - * @return {@code java.util.List} parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public java.util.List listSubAccounts() throws ApiException { - return listSubAccounts(null); - } - - /** - * List operators - * - *

Returns list of operators for currently authorized user's merchant. - * - *

Operation ID: ListSubAccounts - * - * @param listSubAccounts Optional query parameters for this request. - *

Call the overload that accepts RequestOptions to customize headers, authorization, or - * request timeout. - * @return {@code java.util.List} parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public java.util.List listSubAccounts( - ListSubAccountsQueryParams listSubAccounts) throws ApiException { - return listSubAccounts(listSubAccounts, null); - } - - /** - * List operators - * - *

Returns list of operators for currently authorized user's merchant. - * - *

Operation ID: ListSubAccounts - * - * @param listSubAccounts Optional query parameters for this request. - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return {@code java.util.List} parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public java.util.List listSubAccounts( - ListSubAccountsQueryParams listSubAccounts, RequestOptions requestOptions) - throws ApiException { - String path = "/v0.1/me/accounts"; - Map queryParams = new LinkedHashMap<>(); - if (listSubAccounts != null) { - queryParams.putAll(listSubAccounts.toMap()); - } - - return this.apiClient.send( - HttpMethod.GET, - path, - queryParams, - null, - null, - new TypeReference>() {}, - requestOptions); - } - - /** - * Update an operator - * - *

Updates operator. If the operator was disabled and their password is updated they will be - * unblocked. - * - *

Operation ID: UpdateSubAccount - * - * @param operatorId The unique identifier for the operator. - * @param request Request body payload. - *

Call the overload that accepts RequestOptions to customize headers, authorization, or - * request timeout. - * @return com.sumup.sdk.models.Operator parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.Operator updateSubAccount( - Integer operatorId, com.sumup.sdk.models.UpdateSubAccountRequest request) - throws ApiException { - return updateSubAccount(operatorId, request, null); - } - - /** - * Update an operator - * - *

Updates operator. If the operator was disabled and their password is updated they will be - * unblocked. - * - *

Operation ID: UpdateSubAccount - * - * @param operatorId The unique identifier for the operator. - * @param request Request body payload. - * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass - * {@code null} to use client defaults. - * @return com.sumup.sdk.models.Operator parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.Operator updateSubAccount( - Integer operatorId, - com.sumup.sdk.models.UpdateSubAccountRequest request, - RequestOptions requestOptions) - throws ApiException { - Objects.requireNonNull(operatorId, "operatorId"); - Objects.requireNonNull(request, "request"); - String path = "/v0.1/me/accounts/{operator_id}"; - path = path.replace("{operator_id}", ApiClient.urlEncode(ApiClient.parameterValue(operatorId))); - - return this.apiClient.send( - HttpMethod.PUT, - path, - null, - null, - request, - new TypeReference() {}, - requestOptions); - } - - /** Optional query parameters for this request. */ - public static final class ListSubAccountsQueryParams { - private final Map values = new LinkedHashMap<>(); - - /** - * Sets the include_primary query parameter. - * - * @param value If true the list of operators will include also the primary user. - * @return This ListSubAccountsQueryParams instance. - */ - public ListSubAccountsQueryParams includePrimary(Boolean value) { - this.values.put("include_primary", Objects.requireNonNull(value, "includePrimary")); - return this; - } - - /** - * Sets the query query parameter. - * - * @param value Search query used to filter users that match given query term. Current - * implementation allow querying only over the email address. All operators whos email - * address contains the query string are returned. - * @return This ListSubAccountsQueryParams instance. - */ - public ListSubAccountsQueryParams query(String value) { - this.values.put("query", Objects.requireNonNull(value, "query")); - 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/TransactionsAsyncClient.java b/src/main/java/com/sumup/sdk/clients/TransactionsAsyncClient.java index 2eea9ee..1fe763b 100644 --- a/src/main/java/com/sumup/sdk/clients/TransactionsAsyncClient.java +++ b/src/main/java/com/sumup/sdk/clients/TransactionsAsyncClient.java @@ -125,79 +125,6 @@ public CompletableFuture get( requestOptions); } - /** - * Retrieve a transaction - * - *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: - `id` - - * `transaction_code` - `foreign_transaction_id` - `client_transaction_id` - * - *

Operation ID: GetTransaction - * - *

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.TransactionFull parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture getDeprecated() - throws ApiException { - return getDeprecated(null); - } - - /** - * Retrieve a transaction - * - *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: - `id` - - * `transaction_code` - `foreign_transaction_id` - `client_transaction_id` - * - *

Operation ID: GetTransaction - * - * @param getTransaction 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.TransactionFull parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture getDeprecated( - GetTransactionQueryParams getTransaction) throws ApiException { - return getDeprecated(getTransaction, null); - } - - /** - * Retrieve a transaction - * - *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: - `id` - - * `transaction_code` - `foreign_transaction_id` - `client_transaction_id` - * - *

Operation ID: GetTransaction - * - * @param getTransaction 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.TransactionFull parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture getDeprecated( - GetTransactionQueryParams getTransaction, RequestOptions requestOptions) throws ApiException { - String path = "/v0.1/me/transactions"; - Map queryParams = new LinkedHashMap<>(); - if (getTransaction != null) { - queryParams.putAll(getTransaction.toMap()); - } - - return this.apiClient.sendAsync( - HttpMethod.GET, - path, - queryParams, - null, - null, - new TypeReference() {}, - requestOptions); - } - /** * List transactions * @@ -277,77 +204,6 @@ public CompletableFuture list( requestOptions); } - /** - * List transactions - * - *

Lists detailed history of all transactions associated with the merchant profile. - * - *

Operation ID: ListTransactions - * - *

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.ListTransactionsResponse parsed - * response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture listDeprecated() - throws ApiException { - return listDeprecated(null); - } - - /** - * List transactions - * - *

Lists detailed history of all transactions associated with the merchant profile. - * - *

Operation ID: ListTransactions - * - * @param listTransactions 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.ListTransactionsResponse parsed - * response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture listDeprecated( - ListTransactionsQueryParams listTransactions) throws ApiException { - return listDeprecated(listTransactions, null); - } - - /** - * List transactions - * - *

Lists detailed history of all transactions associated with the merchant profile. - * - *

Operation ID: ListTransactions - * - * @param listTransactions 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.ListTransactionsResponse parsed - * response. - * @throws ApiException if the SumUp API returns an error. - */ - public CompletableFuture listDeprecated( - ListTransactionsQueryParams listTransactions, RequestOptions requestOptions) - throws ApiException { - String path = "/v0.1/me/transactions/history"; - Map queryParams = new LinkedHashMap<>(); - if (listTransactions != null) { - queryParams.putAll(listTransactions.toMap()); - } - - return this.apiClient.sendAsync( - HttpMethod.GET, - path, - queryParams, - null, - null, - new TypeReference() {}, - requestOptions); - } - /** * Refund a transaction * @@ -355,7 +211,8 @@ public CompletableFuture listDepr * *

Operation ID: RefundTransaction * - * @param txnId Unique ID of the transaction. + * @param id Unique ID of the transaction. + * @param merchantCode Merchant code of the account that owns the payment to refund. * @param request Optional amount for partial refunds. *

Call the overload that accepts RequestOptions to customize headers, authorization, or * request timeout. @@ -363,8 +220,9 @@ public CompletableFuture listDepr * @throws ApiException if the SumUp API returns an error. */ public CompletableFuture refund( - String txnId, com.sumup.sdk.models.RefundTransactionRequest request) throws ApiException { - return refund(txnId, request, null); + String id, String merchantCode, com.sumup.sdk.models.RefundTransactionRequest request) + throws ApiException { + return refund(id, merchantCode, request, null); } /** @@ -374,7 +232,8 @@ public CompletableFuture refund( * *

Operation ID: RefundTransaction * - * @param txnId Unique ID of the transaction. + * @param id Unique ID of the transaction. + * @param merchantCode Merchant code of the account that owns the payment to refund. * @param request Optional amount for partial refunds. * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass * {@code null} to use client defaults. @@ -382,13 +241,18 @@ public CompletableFuture refund( * @throws ApiException if the SumUp API returns an error. */ public CompletableFuture refund( - String txnId, + String id, + String merchantCode, com.sumup.sdk.models.RefundTransactionRequest request, RequestOptions requestOptions) throws ApiException { - Objects.requireNonNull(txnId, "txnId"); - String path = "/v0.1/me/refund/{txn_id}"; - path = path.replace("{txn_id}", ApiClient.urlEncode(ApiClient.parameterValue(txnId))); + Objects.requireNonNull(id, "id"); + Objects.requireNonNull(merchantCode, "merchantCode"); + String path = "/v1.0/merchants/{merchant_code}/payments/{id}/refunds"; + path = path.replace("{id}", ApiClient.urlEncode(ApiClient.parameterValue(id))); + path = + path.replace( + "{merchant_code}", ApiClient.urlEncode(ApiClient.parameterValue(merchantCode))); return this.apiClient.sendAsync( HttpMethod.POST, path, null, null, request, null, requestOptions); @@ -455,43 +319,6 @@ Map toMap() { } } - /** Optional query parameters for this request. */ - public static final class GetTransactionQueryParams { - private final Map values = new LinkedHashMap<>(); - - /** - * Sets the id query parameter. - * - * @param value Retrieves the transaction resource with the specified transaction ID (the `id` - * parameter in the transaction resource). - * @return This GetTransactionQueryParams instance. - */ - public GetTransactionQueryParams id(String value) { - this.values.put("id", Objects.requireNonNull(value, "id")); - return this; - } - - /** - * Sets the transaction_code query parameter. - * - * @param value Retrieves the transaction resource with the specified transaction code. - * @return This GetTransactionQueryParams instance. - */ - public GetTransactionQueryParams transactionCode(String value) { - this.values.put("transaction_code", Objects.requireNonNull(value, "transactionCode")); - return this; - } - - /** - * Converts query parameters to a map understood by ApiClient. - * - * @return Collected query parameters keyed by API name. - */ - Map toMap() { - return values; - } - } - /** Optional query parameters for this request. */ public static final class ListTransactionsV21QueryParams { private final Map values = new LinkedHashMap<>(); @@ -666,166 +493,4 @@ Map toMap() { return values; } } - - /** Optional query parameters for this request. */ - public static final class ListTransactionsQueryParams { - private final Map values = new LinkedHashMap<>(); - - /** - * Sets the changes_since query parameter. - * - * @param value Filters the results by the latest modification time of resources and returns - * only transactions that are modified *at or after* the specified timestamp (in - * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams changesSince(java.time.OffsetDateTime value) { - this.values.put("changes_since", Objects.requireNonNull(value, "changesSince")); - return this; - } - - /** - * Sets the limit query parameter. - * - * @param value Specifies the maximum number of results per page. Value must be a positive - * integer and if not specified, will return 10 results. - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams limit(Long value) { - this.values.put("limit", Objects.requireNonNull(value, "limit")); - return this; - } - - /** - * Sets the newest_ref query parameter. - * - * @param value Filters the results by the reference ID of transaction events and returns only - * transactions with events whose IDs are *smaller* than the specified value. This - * parameters supersedes the `newest_time` parameter (if both are provided in the request). - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams newestRef(String value) { - this.values.put("newest_ref", Objects.requireNonNull(value, "newestRef")); - return this; - } - - /** - * Sets the newest_time query parameter. - * - * @param value Filters the results by the creation time of resources and returns only - * transactions that are created *before* the specified timestamp (in - * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams newestTime(java.time.OffsetDateTime value) { - this.values.put("newest_time", Objects.requireNonNull(value, "newestTime")); - return this; - } - - /** - * Sets the oldest_ref query parameter. - * - * @param value Filters the results by the reference ID of transaction events and returns only - * transactions with events whose IDs are *greater* than the specified value. This - * parameters supersedes the `oldest_time` parameter (if both are provided in the request). - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams oldestRef(String value) { - this.values.put("oldest_ref", Objects.requireNonNull(value, "oldestRef")); - return this; - } - - /** - * Sets the oldest_time query parameter. - * - * @param value Filters the results by the creation time of resources and returns only - * transactions that are created *at or after* the specified timestamp (in - * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams oldestTime(java.time.OffsetDateTime value) { - this.values.put("oldest_time", Objects.requireNonNull(value, "oldestTime")); - return this; - } - - /** - * Sets the order query parameter. - * - * @param value Specifies the order in which the returned results are displayed. - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams order(com.sumup.sdk.models.ListTransactionsOrder value) { - this.values.put("order", Objects.requireNonNull(value, "order")); - return this; - } - - /** - * Sets the payment_types query parameter. - * - * @param value Filters the returned results by the specified list of payment types used for the - * transactions. - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams paymentTypes( - java.util.List value) { - this.values.put("payment_types", Objects.requireNonNull(value, "paymentTypes")); - return this; - } - - /** - * Sets the statuses[] query parameter. - * - * @param value Filters the returned results by the specified list of final statuses of the - * transactions. - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams statuses( - java.util.List value) { - this.values.put("statuses[]", Objects.requireNonNull(value, "statuses")); - return this; - } - - /** - * Sets the transaction_code query parameter. - * - * @param value Retrieves the transaction resource with the specified transaction code. - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams transactionCode(String value) { - this.values.put("transaction_code", Objects.requireNonNull(value, "transactionCode")); - return this; - } - - /** - * Sets the types query parameter. - * - * @param value Filters the returned results by the specified list of transaction types. - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams types( - java.util.List value) { - this.values.put("types", Objects.requireNonNull(value, "types")); - return this; - } - - /** - * Sets the users query parameter. - * - * @param value Filters the returned results by user email. - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams users(java.util.List value) { - this.values.put("users", Objects.requireNonNull(value, "users")); - 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/TransactionsClient.java b/src/main/java/com/sumup/sdk/clients/TransactionsClient.java index ca0ead2..8cc2934 100644 --- a/src/main/java/com/sumup/sdk/clients/TransactionsClient.java +++ b/src/main/java/com/sumup/sdk/clients/TransactionsClient.java @@ -123,78 +123,6 @@ public com.sumup.sdk.models.TransactionFull get( requestOptions); } - /** - * Retrieve a transaction - * - *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: - `id` - - * `transaction_code` - `foreign_transaction_id` - `client_transaction_id` - * - *

Operation ID: GetTransaction - * - *

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

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: - `id` - - * `transaction_code` - `foreign_transaction_id` - `client_transaction_id` - * - *

Operation ID: GetTransaction - * - * @param getTransaction Optional query parameters for this request. - *

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

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: - `id` - - * `transaction_code` - `foreign_transaction_id` - `client_transaction_id` - * - *

Operation ID: GetTransaction - * - * @param getTransaction 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.TransactionFull parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.TransactionFull getDeprecated( - GetTransactionQueryParams getTransaction, RequestOptions requestOptions) throws ApiException { - String path = "/v0.1/me/transactions"; - Map queryParams = new LinkedHashMap<>(); - if (getTransaction != null) { - queryParams.putAll(getTransaction.toMap()); - } - - return this.apiClient.send( - HttpMethod.GET, - path, - queryParams, - null, - null, - new TypeReference() {}, - requestOptions); - } - /** * List transactions * @@ -271,73 +199,6 @@ public com.sumup.sdk.models.ListTransactionsV21Response list( requestOptions); } - /** - * List transactions - * - *

Lists detailed history of all transactions associated with the merchant profile. - * - *

Operation ID: ListTransactions - * - *

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

Lists detailed history of all transactions associated with the merchant profile. - * - *

Operation ID: ListTransactions - * - * @param listTransactions Optional query parameters for this request. - *

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

Lists detailed history of all transactions associated with the merchant profile. - * - *

Operation ID: ListTransactions - * - * @param listTransactions 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.ListTransactionsResponse parsed response. - * @throws ApiException if the SumUp API returns an error. - */ - public com.sumup.sdk.models.ListTransactionsResponse listDeprecated( - ListTransactionsQueryParams listTransactions, RequestOptions requestOptions) - throws ApiException { - String path = "/v0.1/me/transactions/history"; - Map queryParams = new LinkedHashMap<>(); - if (listTransactions != null) { - queryParams.putAll(listTransactions.toMap()); - } - - return this.apiClient.send( - HttpMethod.GET, - path, - queryParams, - null, - null, - new TypeReference() {}, - requestOptions); - } - /** * Refund a transaction * @@ -345,15 +206,17 @@ public com.sumup.sdk.models.ListTransactionsResponse listDeprecated( * *

Operation ID: RefundTransaction * - * @param txnId Unique ID of the transaction. + * @param id Unique ID of the transaction. + * @param merchantCode Merchant code of the account that owns the payment to refund. * @param request Optional amount for partial refunds. *

Call the overload that accepts RequestOptions to customize headers, authorization, or * request timeout. * @throws ApiException if the SumUp API returns an error. */ - public void refund(String txnId, com.sumup.sdk.models.RefundTransactionRequest request) + public void refund( + String id, String merchantCode, com.sumup.sdk.models.RefundTransactionRequest request) throws ApiException { - refund(txnId, request, null); + refund(id, merchantCode, request, null); } /** @@ -363,20 +226,26 @@ public void refund(String txnId, com.sumup.sdk.models.RefundTransactionRequest r * *

Operation ID: RefundTransaction * - * @param txnId Unique ID of the transaction. + * @param id Unique ID of the transaction. + * @param merchantCode Merchant code of the account that owns the payment to refund. * @param request Optional amount for partial refunds. * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass * {@code null} to use client defaults. * @throws ApiException if the SumUp API returns an error. */ public void refund( - String txnId, + String id, + String merchantCode, com.sumup.sdk.models.RefundTransactionRequest request, RequestOptions requestOptions) throws ApiException { - Objects.requireNonNull(txnId, "txnId"); - String path = "/v0.1/me/refund/{txn_id}"; - path = path.replace("{txn_id}", ApiClient.urlEncode(ApiClient.parameterValue(txnId))); + Objects.requireNonNull(id, "id"); + Objects.requireNonNull(merchantCode, "merchantCode"); + String path = "/v1.0/merchants/{merchant_code}/payments/{id}/refunds"; + path = path.replace("{id}", ApiClient.urlEncode(ApiClient.parameterValue(id))); + path = + path.replace( + "{merchant_code}", ApiClient.urlEncode(ApiClient.parameterValue(merchantCode))); this.apiClient.send(HttpMethod.POST, path, null, null, request, null, requestOptions); } @@ -442,43 +311,6 @@ Map toMap() { } } - /** Optional query parameters for this request. */ - public static final class GetTransactionQueryParams { - private final Map values = new LinkedHashMap<>(); - - /** - * Sets the id query parameter. - * - * @param value Retrieves the transaction resource with the specified transaction ID (the `id` - * parameter in the transaction resource). - * @return This GetTransactionQueryParams instance. - */ - public GetTransactionQueryParams id(String value) { - this.values.put("id", Objects.requireNonNull(value, "id")); - return this; - } - - /** - * Sets the transaction_code query parameter. - * - * @param value Retrieves the transaction resource with the specified transaction code. - * @return This GetTransactionQueryParams instance. - */ - public GetTransactionQueryParams transactionCode(String value) { - this.values.put("transaction_code", Objects.requireNonNull(value, "transactionCode")); - return this; - } - - /** - * Converts query parameters to a map understood by ApiClient. - * - * @return Collected query parameters keyed by API name. - */ - Map toMap() { - return values; - } - } - /** Optional query parameters for this request. */ public static final class ListTransactionsV21QueryParams { private final Map values = new LinkedHashMap<>(); @@ -653,166 +485,4 @@ Map toMap() { return values; } } - - /** Optional query parameters for this request. */ - public static final class ListTransactionsQueryParams { - private final Map values = new LinkedHashMap<>(); - - /** - * Sets the changes_since query parameter. - * - * @param value Filters the results by the latest modification time of resources and returns - * only transactions that are modified *at or after* the specified timestamp (in - * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams changesSince(java.time.OffsetDateTime value) { - this.values.put("changes_since", Objects.requireNonNull(value, "changesSince")); - return this; - } - - /** - * Sets the limit query parameter. - * - * @param value Specifies the maximum number of results per page. Value must be a positive - * integer and if not specified, will return 10 results. - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams limit(Long value) { - this.values.put("limit", Objects.requireNonNull(value, "limit")); - return this; - } - - /** - * Sets the newest_ref query parameter. - * - * @param value Filters the results by the reference ID of transaction events and returns only - * transactions with events whose IDs are *smaller* than the specified value. This - * parameters supersedes the `newest_time` parameter (if both are provided in the request). - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams newestRef(String value) { - this.values.put("newest_ref", Objects.requireNonNull(value, "newestRef")); - return this; - } - - /** - * Sets the newest_time query parameter. - * - * @param value Filters the results by the creation time of resources and returns only - * transactions that are created *before* the specified timestamp (in - * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams newestTime(java.time.OffsetDateTime value) { - this.values.put("newest_time", Objects.requireNonNull(value, "newestTime")); - return this; - } - - /** - * Sets the oldest_ref query parameter. - * - * @param value Filters the results by the reference ID of transaction events and returns only - * transactions with events whose IDs are *greater* than the specified value. This - * parameters supersedes the `oldest_time` parameter (if both are provided in the request). - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams oldestRef(String value) { - this.values.put("oldest_ref", Objects.requireNonNull(value, "oldestRef")); - return this; - } - - /** - * Sets the oldest_time query parameter. - * - * @param value Filters the results by the creation time of resources and returns only - * transactions that are created *at or after* the specified timestamp (in - * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams oldestTime(java.time.OffsetDateTime value) { - this.values.put("oldest_time", Objects.requireNonNull(value, "oldestTime")); - return this; - } - - /** - * Sets the order query parameter. - * - * @param value Specifies the order in which the returned results are displayed. - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams order(com.sumup.sdk.models.ListTransactionsOrder value) { - this.values.put("order", Objects.requireNonNull(value, "order")); - return this; - } - - /** - * Sets the payment_types query parameter. - * - * @param value Filters the returned results by the specified list of payment types used for the - * transactions. - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams paymentTypes( - java.util.List value) { - this.values.put("payment_types", Objects.requireNonNull(value, "paymentTypes")); - return this; - } - - /** - * Sets the statuses[] query parameter. - * - * @param value Filters the returned results by the specified list of final statuses of the - * transactions. - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams statuses( - java.util.List value) { - this.values.put("statuses[]", Objects.requireNonNull(value, "statuses")); - return this; - } - - /** - * Sets the transaction_code query parameter. - * - * @param value Retrieves the transaction resource with the specified transaction code. - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams transactionCode(String value) { - this.values.put("transaction_code", Objects.requireNonNull(value, "transactionCode")); - return this; - } - - /** - * Sets the types query parameter. - * - * @param value Filters the returned results by the specified list of transaction types. - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams types( - java.util.List value) { - this.values.put("types", Objects.requireNonNull(value, "types")); - return this; - } - - /** - * Sets the users query parameter. - * - * @param value Filters the returned results by user email. - * @return This ListTransactionsQueryParams instance. - */ - public ListTransactionsQueryParams users(java.util.List value) { - this.values.put("users", Objects.requireNonNull(value, "users")); - 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/CreateSubAccountRequest.java b/src/main/java/com/sumup/sdk/models/CreateSubAccountRequest.java deleted file mode 100644 index a273ddb..0000000 --- a/src/main/java/com/sumup/sdk/models/CreateSubAccountRequest.java +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import java.util.Objects; - -public record CreateSubAccountRequest( - String nickname, - String password, - com.sumup.sdk.models.CreateSubAccountRequestPermissions permissions, - String username) { - /** - * Creates a builder for CreateSubAccountRequest. - * - * @return Builder that constructs immutable CreateSubAccountRequest instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for CreateSubAccountRequest instances. */ - public static final class Builder { - private String nickname; - private String password; - private com.sumup.sdk.models.CreateSubAccountRequestPermissions permissions; - private String username; - - private Builder() {} - - /** - * Sets the value for {@code nickname}. - * - * @param nickname Value for the nickname field. - * @return This builder instance. - */ - public Builder nickname(String nickname) { - this.nickname = nickname; - return this; - } - - /** - * Sets the value for {@code password}. - * - * @param password Value for the password field. - * @return This builder instance. - */ - public Builder password(String password) { - this.password = password; - return this; - } - - /** - * Sets the value for {@code permissions}. - * - * @param permissions Value for the permissions field. - * @return This builder instance. - */ - public Builder permissions( - com.sumup.sdk.models.CreateSubAccountRequestPermissions permissions) { - this.permissions = permissions; - return this; - } - - /** - * Sets the value for {@code username}. - * - * @param username Value for the username field. - * @return This builder instance. - */ - public Builder username(String username) { - this.username = username; - return this; - } - - /** - * Builds an immutable CreateSubAccountRequest instance. - * - * @return Immutable CreateSubAccountRequest. - */ - public CreateSubAccountRequest build() { - return new CreateSubAccountRequest( - nickname, - Objects.requireNonNull(password, "password"), - permissions, - Objects.requireNonNull(username, "username")); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/CreateSubAccountRequestPermissions.java b/src/main/java/com/sumup/sdk/models/CreateSubAccountRequestPermissions.java deleted file mode 100644 index 3285765..0000000 --- a/src/main/java/com/sumup/sdk/models/CreateSubAccountRequestPermissions.java +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -public record CreateSubAccountRequestPermissions( - Boolean createMotoPayments, - Boolean createReferral, - Boolean fullTransactionHistoryView, - Boolean refundTransactions) { - /** - * Creates a builder for CreateSubAccountRequestPermissions. - * - * @return Builder that constructs immutable CreateSubAccountRequestPermissions instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for CreateSubAccountRequestPermissions 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 Value for the createMotoPayments field. - * @return This builder instance. - */ - public Builder createMotoPayments(Boolean createMotoPayments) { - this.createMotoPayments = createMotoPayments; - return this; - } - - /** - * Sets the value for {@code createReferral}. - * - * @param createReferral Value for the createReferral field. - * @return This builder instance. - */ - public Builder createReferral(Boolean createReferral) { - this.createReferral = createReferral; - return this; - } - - /** - * Sets the value for {@code fullTransactionHistoryView}. - * - * @param fullTransactionHistoryView Value for the fullTransactionHistoryView field. - * @return This builder instance. - */ - public Builder fullTransactionHistoryView(Boolean fullTransactionHistoryView) { - this.fullTransactionHistoryView = fullTransactionHistoryView; - return this; - } - - /** - * Sets the value for {@code refundTransactions}. - * - * @param refundTransactions Value for the refundTransactions field. - * @return This builder instance. - */ - public Builder refundTransactions(Boolean refundTransactions) { - this.refundTransactions = refundTransactions; - return this; - } - - /** - * Builds an immutable CreateSubAccountRequestPermissions instance. - * - * @return Immutable CreateSubAccountRequestPermissions. - */ - public CreateSubAccountRequestPermissions build() { - return new CreateSubAccountRequestPermissions( - createMotoPayments, createReferral, fullTransactionHistoryView, refundTransactions); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/FinancialPayout.java b/src/main/java/com/sumup/sdk/models/FinancialPayout.java new file mode 100644 index 0000000..4c4466d --- /dev/null +++ b/src/main/java/com/sumup/sdk/models/FinancialPayout.java @@ -0,0 +1,179 @@ +// Code generated by sumup-java/codegen. DO NOT EDIT. +package com.sumup.sdk.models; + +import java.util.Objects; + +/** + * A single payout-related record. A record can represent either: - an actual payout sent to the + * merchant (`type = PAYOUT`) - a deduction applied against merchant funds for a refund, chargeback, + * direct debit return, or balance adjustment + */ +public record FinancialPayout( + /** Amount of the payout or deduction in major units. */ + Float amount, + + /** Three-letter ISO 4217 currency code of the payout. */ + String currency, + + /** Payout date associated with the record, in `YYYY-MM-DD` format. */ + java.time.LocalDate date, + + /** Fee amount associated with the payout record, in major units. */ + Float fee, + + /** Unique identifier of the payout-related record. */ + Long id, + + /** Processor or payout reference associated with the record. */ + String reference, + + /** Merchant-facing outcome of the payout record. */ + com.sumup.sdk.models.FinancialPayoutStatus status, + + /** Transaction code of the original sale associated with the payout or deduction. */ + String transactionCode, + + /** High-level payout record category. */ + com.sumup.sdk.models.FinancialPayoutType type) { + /** + * Creates a builder for FinancialPayout. + * + * @return Builder that constructs immutable FinancialPayout instances. + */ + public static Builder builder() { + return new Builder(); + } + + /** Builder for FinancialPayout instances. */ + public static final class Builder { + private Float amount; + private String currency; + private java.time.LocalDate date; + private Float fee; + private Long id; + private String reference; + private com.sumup.sdk.models.FinancialPayoutStatus status; + private String transactionCode; + private com.sumup.sdk.models.FinancialPayoutType type; + + private Builder() {} + + /** + * Sets the value for {@code amount}. + * + * @param amount Amount of the payout or deduction in major units. + * @return This builder instance. + */ + public Builder amount(Float amount) { + this.amount = amount; + return this; + } + + /** + * Sets the value for {@code currency}. + * + * @param currency Three-letter ISO 4217 currency code of the payout. + * @return This builder instance. + */ + public Builder currency(String currency) { + this.currency = currency; + return this; + } + + /** + * Sets the value for {@code date}. + * + * @param date Payout date associated with the record, in `YYYY-MM-DD` format. + * @return This builder instance. + */ + public Builder date(java.time.LocalDate date) { + this.date = date; + return this; + } + + /** + * Sets the value for {@code fee}. + * + * @param fee Fee amount associated with the payout record, in major units. + * @return This builder instance. + */ + public Builder fee(Float fee) { + this.fee = fee; + return this; + } + + /** + * Sets the value for {@code id}. + * + * @param id Unique identifier of the payout-related record. + * @return This builder instance. + */ + public Builder id(Long id) { + this.id = id; + return this; + } + + /** + * Sets the value for {@code reference}. + * + * @param reference Processor or payout reference associated with the record. + * @return This builder instance. + */ + public Builder reference(String reference) { + this.reference = reference; + return this; + } + + /** + * Sets the value for {@code status}. + * + * @param status Merchant-facing outcome of the payout record. + * @return This builder instance. + */ + public Builder status(com.sumup.sdk.models.FinancialPayoutStatus status) { + this.status = status; + return this; + } + + /** + * Sets the value for {@code transactionCode}. + * + * @param transactionCode Transaction code of the original sale associated with the payout or + * deduction. + * @return This builder instance. + */ + public Builder transactionCode(String transactionCode) { + this.transactionCode = transactionCode; + return this; + } + + /** + * Sets the value for {@code type}. + * + * @param type High-level payout record category. + * @return This builder instance. + */ + public Builder type(com.sumup.sdk.models.FinancialPayoutType type) { + this.type = type; + return this; + } + + /** + * Builds an immutable FinancialPayout instance. + * + * @return Immutable FinancialPayout. + */ + public FinancialPayout build() { + return new FinancialPayout( + Objects.requireNonNull(amount, "amount"), + Objects.requireNonNull(currency, "currency"), + Objects.requireNonNull(date, "date"), + Objects.requireNonNull(fee, "fee"), + Objects.requireNonNull(id, "id"), + Objects.requireNonNull(reference, "reference"), + Objects.requireNonNull(status, "status"), + Objects.requireNonNull(transactionCode, "transactionCode"), + Objects.requireNonNull(type, "type")); + } + } +} diff --git a/src/main/java/com/sumup/sdk/models/ListTransactionsOrder.java b/src/main/java/com/sumup/sdk/models/FinancialPayoutStatus.java similarity index 53% rename from src/main/java/com/sumup/sdk/models/ListTransactionsOrder.java rename to src/main/java/com/sumup/sdk/models/FinancialPayoutStatus.java index 0f5c889..1204897 100644 --- a/src/main/java/com/sumup/sdk/models/ListTransactionsOrder.java +++ b/src/main/java/com/sumup/sdk/models/FinancialPayoutStatus.java @@ -5,24 +5,25 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.util.Objects; -public final class ListTransactionsOrder { - public static final ListTransactionsOrder ASCENDING = new ListTransactionsOrder("ascending"); - public static final ListTransactionsOrder DESCENDING = new ListTransactionsOrder("descending"); +/** Merchant-facing outcome of the payout record. */ +public final class FinancialPayoutStatus { + public static final FinancialPayoutStatus SUCCESSFUL = new FinancialPayoutStatus("SUCCESSFUL"); + public static final FinancialPayoutStatus FAILED = new FinancialPayoutStatus("FAILED"); private final String value; - private ListTransactionsOrder(String value) { + private FinancialPayoutStatus(String value) { this.value = Objects.requireNonNull(value, "value"); } /** - * Creates a ListTransactionsOrder for a value not yet known to this SDK version. + * Creates a FinancialPayoutStatus for a value not yet known to this SDK version. * * @param value Wire value sent to or received from the API. * @return Open enum value wrapping {@code value}. */ - public static ListTransactionsOrder of(String value) { - return new ListTransactionsOrder(value); + public static FinancialPayoutStatus of(String value) { + return new FinancialPayoutStatus(value); } @JsonValue @@ -36,14 +37,14 @@ public String toString() { } @JsonCreator - public static ListTransactionsOrder fromValue(String value) { - return value == null ? null : new ListTransactionsOrder(value); + public static FinancialPayoutStatus fromValue(String value) { + return value == null ? null : new FinancialPayoutStatus(value); } @Override public boolean equals(Object other) { return this == other - || (other instanceof ListTransactionsOrder that && this.value.equals(that.value)); + || (other instanceof FinancialPayoutStatus that && this.value.equals(that.value)); } @Override diff --git a/src/main/java/com/sumup/sdk/models/FinancialPayoutType.java b/src/main/java/com/sumup/sdk/models/FinancialPayoutType.java new file mode 100644 index 0000000..b6e3d61 --- /dev/null +++ b/src/main/java/com/sumup/sdk/models/FinancialPayoutType.java @@ -0,0 +1,61 @@ +// Code generated by sumup-java/codegen. DO NOT EDIT. +package com.sumup.sdk.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; + +/** High-level payout record category. */ +public final class FinancialPayoutType { + public static final FinancialPayoutType PAYOUT = new FinancialPayoutType("PAYOUT"); + public static final FinancialPayoutType CHARGE_BACK_DEDUCTION = + new FinancialPayoutType("CHARGE_BACK_DEDUCTION"); + public static final FinancialPayoutType REFUND_DEDUCTION = + new FinancialPayoutType("REFUND_DEDUCTION"); + public static final FinancialPayoutType DD_RETURN_DEDUCTION = + new FinancialPayoutType("DD_RETURN_DEDUCTION"); + public static final FinancialPayoutType BALANCE_DEDUCTION = + new FinancialPayoutType("BALANCE_DEDUCTION"); + + private final String value; + + private FinancialPayoutType(String value) { + this.value = Objects.requireNonNull(value, "value"); + } + + /** + * Creates a FinancialPayoutType for a value not yet known to this SDK version. + * + * @param value Wire value sent to or received from the API. + * @return Open enum value wrapping {@code value}. + */ + public static FinancialPayoutType of(String value) { + return new FinancialPayoutType(value); + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return value; + } + + @JsonCreator + public static FinancialPayoutType fromValue(String value) { + return value == null ? null : new FinancialPayoutType(value); + } + + @Override + public boolean equals(Object other) { + return this == other + || (other instanceof FinancialPayoutType that && this.value.equals(that.value)); + } + + @Override + public int hashCode() { + return value.hashCode(); + } +} diff --git a/src/main/java/com/sumup/sdk/models/FinancialPayouts.java b/src/main/java/com/sumup/sdk/models/FinancialPayouts.java index 9878f20..d2cf28b 100644 --- a/src/main/java/com/sumup/sdk/models/FinancialPayouts.java +++ b/src/main/java/com/sumup/sdk/models/FinancialPayouts.java @@ -1,5 +1,5 @@ // Code generated by sumup-java/codegen. DO NOT EDIT. package com.sumup.sdk.models; -/** List of payout summaries. */ -public record FinancialPayouts(java.util.List value) {} +/** Ordered list of payout and payout-deduction records. */ +public record FinancialPayouts(java.util.List value) {} diff --git a/src/main/java/com/sumup/sdk/models/FinancialPayoutsItem.java b/src/main/java/com/sumup/sdk/models/FinancialPayoutsItem.java deleted file mode 100644 index 879ecae..0000000 --- a/src/main/java/com/sumup/sdk/models/FinancialPayoutsItem.java +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -public record FinancialPayoutsItem( - Float amount, - String currency, - java.time.LocalDate date, - Float fee, - Long id, - String reference, - com.sumup.sdk.models.FinancialPayoutsItemStatus status, - String transactionCode, - com.sumup.sdk.models.FinancialPayoutsItemType type) { - /** - * Creates a builder for FinancialPayoutsItem. - * - * @return Builder that constructs immutable FinancialPayoutsItem instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for FinancialPayoutsItem instances. */ - public static final class Builder { - private Float amount; - private String currency; - private java.time.LocalDate date; - private Float fee; - private Long id; - private String reference; - private com.sumup.sdk.models.FinancialPayoutsItemStatus status; - private String transactionCode; - private com.sumup.sdk.models.FinancialPayoutsItemType type; - - private Builder() {} - - /** - * Sets the value for {@code amount}. - * - * @param amount Value for the amount field. - * @return This builder instance. - */ - public Builder amount(Float amount) { - this.amount = amount; - return this; - } - - /** - * Sets the value for {@code currency}. - * - * @param currency Value for the currency field. - * @return This builder instance. - */ - public Builder currency(String currency) { - this.currency = currency; - return this; - } - - /** - * Sets the value for {@code date}. - * - * @param date Value for the date field. - * @return This builder instance. - */ - public Builder date(java.time.LocalDate date) { - this.date = date; - return this; - } - - /** - * Sets the value for {@code fee}. - * - * @param fee Value for the fee field. - * @return This builder instance. - */ - public Builder fee(Float fee) { - this.fee = fee; - return this; - } - - /** - * Sets the value for {@code id}. - * - * @param id Value for the id field. - * @return This builder instance. - */ - public Builder id(Long id) { - this.id = id; - return this; - } - - /** - * Sets the value for {@code reference}. - * - * @param reference Value for the reference field. - * @return This builder instance. - */ - public Builder reference(String reference) { - this.reference = reference; - return this; - } - - /** - * Sets the value for {@code status}. - * - * @param status Value for the status field. - * @return This builder instance. - */ - public Builder status(com.sumup.sdk.models.FinancialPayoutsItemStatus status) { - this.status = status; - return this; - } - - /** - * Sets the value for {@code transactionCode}. - * - * @param transactionCode Value for the transactionCode field. - * @return This builder instance. - */ - public Builder transactionCode(String transactionCode) { - this.transactionCode = transactionCode; - return this; - } - - /** - * Sets the value for {@code type}. - * - * @param type Value for the type field. - * @return This builder instance. - */ - public Builder type(com.sumup.sdk.models.FinancialPayoutsItemType type) { - this.type = type; - return this; - } - - /** - * Builds an immutable FinancialPayoutsItem instance. - * - * @return Immutable FinancialPayoutsItem. - */ - public FinancialPayoutsItem build() { - return new FinancialPayoutsItem( - amount, currency, date, fee, id, reference, status, transactionCode, type); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/FinancialPayoutsItemStatus.java b/src/main/java/com/sumup/sdk/models/FinancialPayoutsItemStatus.java deleted file mode 100644 index dda78cb..0000000 --- a/src/main/java/com/sumup/sdk/models/FinancialPayoutsItemStatus.java +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; - -public final class FinancialPayoutsItemStatus { - public static final FinancialPayoutsItemStatus SUCCESSFUL = - new FinancialPayoutsItemStatus("SUCCESSFUL"); - public static final FinancialPayoutsItemStatus FAILED = new FinancialPayoutsItemStatus("FAILED"); - - private final String value; - - private FinancialPayoutsItemStatus(String value) { - this.value = Objects.requireNonNull(value, "value"); - } - - /** - * Creates a FinancialPayoutsItemStatus for a value not yet known to this SDK version. - * - * @param value Wire value sent to or received from the API. - * @return Open enum value wrapping {@code value}. - */ - public static FinancialPayoutsItemStatus of(String value) { - return new FinancialPayoutsItemStatus(value); - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static FinancialPayoutsItemStatus fromValue(String value) { - return value == null ? null : new FinancialPayoutsItemStatus(value); - } - - @Override - public boolean equals(Object other) { - return this == other - || (other instanceof FinancialPayoutsItemStatus that && this.value.equals(that.value)); - } - - @Override - public int hashCode() { - return value.hashCode(); - } -} diff --git a/src/main/java/com/sumup/sdk/models/FinancialPayoutsItemType.java b/src/main/java/com/sumup/sdk/models/FinancialPayoutsItemType.java deleted file mode 100644 index baeaab6..0000000 --- a/src/main/java/com/sumup/sdk/models/FinancialPayoutsItemType.java +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; - -public final class FinancialPayoutsItemType { - public static final FinancialPayoutsItemType PAYOUT = new FinancialPayoutsItemType("PAYOUT"); - public static final FinancialPayoutsItemType CHARGE_BACK_DEDUCTION = - new FinancialPayoutsItemType("CHARGE_BACK_DEDUCTION"); - public static final FinancialPayoutsItemType REFUND_DEDUCTION = - new FinancialPayoutsItemType("REFUND_DEDUCTION"); - public static final FinancialPayoutsItemType DD_RETURN_DEDUCTION = - new FinancialPayoutsItemType("DD_RETURN_DEDUCTION"); - public static final FinancialPayoutsItemType BALANCE_DEDUCTION = - new FinancialPayoutsItemType("BALANCE_DEDUCTION"); - - private final String value; - - private FinancialPayoutsItemType(String value) { - this.value = Objects.requireNonNull(value, "value"); - } - - /** - * Creates a FinancialPayoutsItemType for a value not yet known to this SDK version. - * - * @param value Wire value sent to or received from the API. - * @return Open enum value wrapping {@code value}. - */ - public static FinancialPayoutsItemType of(String value) { - return new FinancialPayoutsItemType(value); - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static FinancialPayoutsItemType fromValue(String value) { - return value == null ? null : new FinancialPayoutsItemType(value); - } - - @Override - public boolean equals(Object other) { - return this == other - || (other instanceof FinancialPayoutsItemType that && this.value.equals(that.value)); - } - - @Override - public int hashCode() { - return value.hashCode(); - } -} diff --git a/src/main/java/com/sumup/sdk/models/ListPayoutsFormat.java b/src/main/java/com/sumup/sdk/models/ListPayoutsFormat.java deleted file mode 100644 index 74586ba..0000000 --- a/src/main/java/com/sumup/sdk/models/ListPayoutsFormat.java +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; - -public final class ListPayoutsFormat { - public static final ListPayoutsFormat JSON = new ListPayoutsFormat("json"); - public static final ListPayoutsFormat CSV = new ListPayoutsFormat("csv"); - - private final String value; - - private ListPayoutsFormat(String value) { - this.value = Objects.requireNonNull(value, "value"); - } - - /** - * Creates a ListPayoutsFormat for a value not yet known to this SDK version. - * - * @param value Wire value sent to or received from the API. - * @return Open enum value wrapping {@code value}. - */ - public static ListPayoutsFormat of(String value) { - return new ListPayoutsFormat(value); - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static ListPayoutsFormat fromValue(String value) { - return value == null ? null : new ListPayoutsFormat(value); - } - - @Override - public boolean equals(Object other) { - return this == other - || (other instanceof ListPayoutsFormat that && this.value.equals(that.value)); - } - - @Override - public int hashCode() { - return value.hashCode(); - } -} diff --git a/src/main/java/com/sumup/sdk/models/ListPayoutsOrder.java b/src/main/java/com/sumup/sdk/models/ListPayoutsOrder.java deleted file mode 100644 index 23c0da2..0000000 --- a/src/main/java/com/sumup/sdk/models/ListPayoutsOrder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; - -public final class ListPayoutsOrder { - public static final ListPayoutsOrder DESC = new ListPayoutsOrder("desc"); - public static final ListPayoutsOrder ASC = new ListPayoutsOrder("asc"); - - private final String value; - - private ListPayoutsOrder(String value) { - this.value = Objects.requireNonNull(value, "value"); - } - - /** - * Creates a ListPayoutsOrder for a value not yet known to this SDK version. - * - * @param value Wire value sent to or received from the API. - * @return Open enum value wrapping {@code value}. - */ - public static ListPayoutsOrder of(String value) { - return new ListPayoutsOrder(value); - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static ListPayoutsOrder fromValue(String value) { - return value == null ? null : new ListPayoutsOrder(value); - } - - @Override - public boolean equals(Object other) { - return this == other - || (other instanceof ListPayoutsOrder that && this.value.equals(that.value)); - } - - @Override - public int hashCode() { - return value.hashCode(); - } -} diff --git a/src/main/java/com/sumup/sdk/models/ListPayoutsV1Order.java b/src/main/java/com/sumup/sdk/models/ListPayoutsV1Order.java index f120ea8..ae49501 100644 --- a/src/main/java/com/sumup/sdk/models/ListPayoutsV1Order.java +++ b/src/main/java/com/sumup/sdk/models/ListPayoutsV1Order.java @@ -6,8 +6,8 @@ import java.util.Objects; public final class ListPayoutsV1Order { - public static final ListPayoutsV1Order DESC = new ListPayoutsV1Order("desc"); public static final ListPayoutsV1Order ASC = new ListPayoutsV1Order("asc"); + public static final ListPayoutsV1Order DESC = new ListPayoutsV1Order("desc"); private final String value; diff --git a/src/main/java/com/sumup/sdk/models/ListTransactionsResponse.java b/src/main/java/com/sumup/sdk/models/ListTransactionsResponse.java deleted file mode 100644 index c02e010..0000000 --- a/src/main/java/com/sumup/sdk/models/ListTransactionsResponse.java +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -public record ListTransactionsResponse( - java.util.List items, - java.util.List links) { - /** - * Creates a builder for ListTransactionsResponse. - * - * @return Builder that constructs immutable ListTransactionsResponse instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for ListTransactionsResponse instances. */ - public static final class Builder { - private java.util.List items; - private java.util.List links; - - private Builder() {} - - /** - * Sets the value for {@code items}. - * - * @param items Value for the items field. - * @return This builder instance. - */ - public Builder items(java.util.List items) { - this.items = items; - return this; - } - - /** - * Sets the value for {@code links}. - * - * @param links Value for the links field. - * @return This builder instance. - */ - public Builder links(java.util.List links) { - this.links = links; - return this; - } - - /** - * Builds an immutable ListTransactionsResponse instance. - * - * @return Immutable ListTransactionsResponse. - */ - public ListTransactionsResponse build() { - return new ListTransactionsResponse(items, links); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/ListTransactionsStatusesItem.java b/src/main/java/com/sumup/sdk/models/ListTransactionsStatusesItem.java deleted file mode 100644 index b2af6c0..0000000 --- a/src/main/java/com/sumup/sdk/models/ListTransactionsStatusesItem.java +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; - -public final class ListTransactionsStatusesItem { - public static final ListTransactionsStatusesItem SUCCESSFUL = - new ListTransactionsStatusesItem("SUCCESSFUL"); - public static final ListTransactionsStatusesItem CANCELLED = - new ListTransactionsStatusesItem("CANCELLED"); - public static final ListTransactionsStatusesItem FAILED = - new ListTransactionsStatusesItem("FAILED"); - public static final ListTransactionsStatusesItem REFUNDED = - new ListTransactionsStatusesItem("REFUNDED"); - public static final ListTransactionsStatusesItem CHARGE_BACK = - new ListTransactionsStatusesItem("CHARGE_BACK"); - - private final String value; - - private ListTransactionsStatusesItem(String value) { - this.value = Objects.requireNonNull(value, "value"); - } - - /** - * Creates a ListTransactionsStatusesItem for a value not yet known to this SDK version. - * - * @param value Wire value sent to or received from the API. - * @return Open enum value wrapping {@code value}. - */ - public static ListTransactionsStatusesItem of(String value) { - return new ListTransactionsStatusesItem(value); - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static ListTransactionsStatusesItem fromValue(String value) { - return value == null ? null : new ListTransactionsStatusesItem(value); - } - - @Override - public boolean equals(Object other) { - return this == other - || (other instanceof ListTransactionsStatusesItem that && this.value.equals(that.value)); - } - - @Override - public int hashCode() { - return value.hashCode(); - } -} diff --git a/src/main/java/com/sumup/sdk/models/ListTransactionsTypesItem.java b/src/main/java/com/sumup/sdk/models/ListTransactionsTypesItem.java deleted file mode 100644 index 6ece86c..0000000 --- a/src/main/java/com/sumup/sdk/models/ListTransactionsTypesItem.java +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; - -public final class ListTransactionsTypesItem { - public static final ListTransactionsTypesItem PAYMENT = new ListTransactionsTypesItem("PAYMENT"); - public static final ListTransactionsTypesItem REFUND = new ListTransactionsTypesItem("REFUND"); - public static final ListTransactionsTypesItem CHARGE_BACK = - new ListTransactionsTypesItem("CHARGE_BACK"); - - private final String value; - - private ListTransactionsTypesItem(String value) { - this.value = Objects.requireNonNull(value, "value"); - } - - /** - * Creates a ListTransactionsTypesItem for a value not yet known to this SDK version. - * - * @param value Wire value sent to or received from the API. - * @return Open enum value wrapping {@code value}. - */ - public static ListTransactionsTypesItem of(String value) { - return new ListTransactionsTypesItem(value); - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static ListTransactionsTypesItem fromValue(String value) { - return value == null ? null : new ListTransactionsTypesItem(value); - } - - @Override - public boolean equals(Object other) { - return this == other - || (other instanceof ListTransactionsTypesItem that && this.value.equals(that.value)); - } - - @Override - public int hashCode() { - return value.hashCode(); - } -} diff --git a/src/main/java/com/sumup/sdk/models/Operator.java b/src/main/java/com/sumup/sdk/models/Operator.java deleted file mode 100644 index 0fba322..0000000 --- a/src/main/java/com/sumup/sdk/models/Operator.java +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import java.util.Objects; - -/** Operator account for a merchant. */ -public record Operator( - com.sumup.sdk.models.OperatorAccountType accountType, - - /** The timestamp of when the operator was created. */ - java.time.OffsetDateTime createdAt, - Boolean disabled, - Integer id, - String nickname, - - /** Permissions assigned to an operator or user. */ - com.sumup.sdk.models.Permissions permissions, - - /** The timestamp of when the operator was last updated. */ - java.time.OffsetDateTime updatedAt, - String username) { - /** - * Creates a builder for Operator. - * - * @return Builder that constructs immutable Operator instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for Operator instances. */ - public static final class Builder { - private com.sumup.sdk.models.OperatorAccountType accountType; - private java.time.OffsetDateTime createdAt; - private Boolean disabled; - private Integer id; - private String nickname; - private com.sumup.sdk.models.Permissions permissions; - private java.time.OffsetDateTime updatedAt; - private String username; - - private Builder() {} - - /** - * Sets the value for {@code accountType}. - * - * @param accountType Value for the accountType field. - * @return This builder instance. - */ - public Builder accountType(com.sumup.sdk.models.OperatorAccountType accountType) { - this.accountType = accountType; - return this; - } - - /** - * Sets the value for {@code createdAt}. - * - * @param createdAt The timestamp of when the operator was created. - * @return This builder instance. - */ - public Builder createdAt(java.time.OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Sets the value for {@code disabled}. - * - * @param disabled Value for the disabled field. - * @return This builder instance. - */ - public Builder disabled(Boolean disabled) { - this.disabled = disabled; - return this; - } - - /** - * Sets the value for {@code id}. - * - * @param id Value for the id field. - * @return This builder instance. - */ - public Builder id(Integer id) { - this.id = id; - return this; - } - - /** - * Sets the value for {@code nickname}. - * - * @param nickname Value for the nickname field. - * @return This builder instance. - */ - public Builder nickname(String nickname) { - this.nickname = nickname; - return this; - } - - /** - * Sets the value for {@code permissions}. - * - * @param permissions Permissions assigned to an operator or user. - * @return This builder instance. - */ - public Builder permissions(com.sumup.sdk.models.Permissions permissions) { - this.permissions = permissions; - return this; - } - - /** - * Sets the value for {@code updatedAt}. - * - * @param updatedAt The timestamp of when the operator was last updated. - * @return This builder instance. - */ - public Builder updatedAt(java.time.OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Sets the value for {@code username}. - * - * @param username Value for the username field. - * @return This builder instance. - */ - public Builder username(String username) { - this.username = username; - return this; - } - - /** - * Builds an immutable Operator instance. - * - * @return Immutable Operator. - */ - public Operator build() { - return new Operator( - Objects.requireNonNull(accountType, "accountType"), - Objects.requireNonNull(createdAt, "createdAt"), - Objects.requireNonNull(disabled, "disabled"), - Objects.requireNonNull(id, "id"), - nickname, - Objects.requireNonNull(permissions, "permissions"), - Objects.requireNonNull(updatedAt, "updatedAt"), - Objects.requireNonNull(username, "username")); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/OperatorAccountType.java b/src/main/java/com/sumup/sdk/models/OperatorAccountType.java deleted file mode 100644 index b7cf2ab..0000000 --- a/src/main/java/com/sumup/sdk/models/OperatorAccountType.java +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; - -public final class OperatorAccountType { - public static final OperatorAccountType OPERATOR = new OperatorAccountType("operator"); - public static final OperatorAccountType NORMAL = new OperatorAccountType("normal"); - - private final String value; - - private OperatorAccountType(String value) { - this.value = Objects.requireNonNull(value, "value"); - } - - /** - * Creates a OperatorAccountType for a value not yet known to this SDK version. - * - * @param value Wire value sent to or received from the API. - * @return Open enum value wrapping {@code value}. - */ - public static OperatorAccountType of(String value) { - return new OperatorAccountType(value); - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static OperatorAccountType fromValue(String value) { - return value == null ? null : new OperatorAccountType(value); - } - - @Override - public boolean equals(Object other) { - return this == other - || (other instanceof OperatorAccountType that && this.value.equals(that.value)); - } - - @Override - public int hashCode() { - return value.hashCode(); - } -} diff --git a/src/main/java/com/sumup/sdk/models/Permissions.java b/src/main/java/com/sumup/sdk/models/Permissions.java deleted file mode 100644 index 978d77a..0000000 --- a/src/main/java/com/sumup/sdk/models/Permissions.java +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import java.util.Objects; - -/** Permissions assigned to an operator or user. */ -public record Permissions( - Boolean admin, - Boolean createMotoPayments, - Boolean createReferral, - Boolean fullTransactionHistoryView, - Boolean refundTransactions) { - /** - * Creates a builder for Permissions. - * - * @return Builder that constructs immutable Permissions instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for Permissions instances. */ - public static final class Builder { - private Boolean admin; - private Boolean createMotoPayments; - private Boolean createReferral; - private Boolean fullTransactionHistoryView; - private Boolean refundTransactions; - - private Builder() {} - - /** - * Sets the value for {@code admin}. - * - * @param admin Value for the admin field. - * @return This builder instance. - */ - public Builder admin(Boolean admin) { - this.admin = admin; - return this; - } - - /** - * Sets the value for {@code createMotoPayments}. - * - * @param createMotoPayments Value for the createMotoPayments field. - * @return This builder instance. - */ - public Builder createMotoPayments(Boolean createMotoPayments) { - this.createMotoPayments = createMotoPayments; - return this; - } - - /** - * Sets the value for {@code createReferral}. - * - * @param createReferral Value for the createReferral field. - * @return This builder instance. - */ - public Builder createReferral(Boolean createReferral) { - this.createReferral = createReferral; - return this; - } - - /** - * Sets the value for {@code fullTransactionHistoryView}. - * - * @param fullTransactionHistoryView Value for the fullTransactionHistoryView field. - * @return This builder instance. - */ - public Builder fullTransactionHistoryView(Boolean fullTransactionHistoryView) { - this.fullTransactionHistoryView = fullTransactionHistoryView; - return this; - } - - /** - * Sets the value for {@code refundTransactions}. - * - * @param refundTransactions Value for the refundTransactions field. - * @return This builder instance. - */ - public Builder refundTransactions(Boolean refundTransactions) { - this.refundTransactions = refundTransactions; - return this; - } - - /** - * Builds an immutable Permissions instance. - * - * @return Immutable Permissions. - */ - public Permissions build() { - return new Permissions( - Objects.requireNonNull(admin, "admin"), - Objects.requireNonNull(createMotoPayments, "createMotoPayments"), - Objects.requireNonNull(createReferral, "createReferral"), - Objects.requireNonNull(fullTransactionHistoryView, "fullTransactionHistoryView"), - Objects.requireNonNull(refundTransactions, "refundTransactions")); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/PersonalIdentifier.java b/src/main/java/com/sumup/sdk/models/PersonalIdentifier.java index e5dc0ba..37b2d1b 100644 --- a/src/main/java/com/sumup/sdk/models/PersonalIdentifier.java +++ b/src/main/java/com/sumup/sdk/models/PersonalIdentifier.java @@ -4,7 +4,7 @@ import java.util.Objects; public record PersonalIdentifier( - /** The unique reference for the personal identifier type. */ + /** The unique reference for the personal identifier type as defined in the country SDK. */ String ref, /** The company identifier value. */ @@ -28,7 +28,8 @@ private Builder() {} /** * Sets the value for {@code ref}. * - * @param ref The unique reference for the personal identifier type. + * @param ref The unique reference for the personal identifier type as defined in the country + * SDK. * @return This builder instance. */ public Builder ref(String ref) { diff --git a/src/main/java/com/sumup/sdk/models/UpdateSubAccountRequest.java b/src/main/java/com/sumup/sdk/models/UpdateSubAccountRequest.java deleted file mode 100644 index 2c634f5..0000000 --- a/src/main/java/com/sumup/sdk/models/UpdateSubAccountRequest.java +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -public record UpdateSubAccountRequest( - Boolean disabled, - String nickname, - String password, - com.sumup.sdk.models.UpdateSubAccountRequestPermissions permissions, - String username) { - /** - * Creates a builder for UpdateSubAccountRequest. - * - * @return Builder that constructs immutable UpdateSubAccountRequest instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for UpdateSubAccountRequest instances. */ - public static final class Builder { - private Boolean disabled; - private String nickname; - private String password; - private com.sumup.sdk.models.UpdateSubAccountRequestPermissions permissions; - private String username; - - private Builder() {} - - /** - * Sets the value for {@code disabled}. - * - * @param disabled Value for the disabled field. - * @return This builder instance. - */ - public Builder disabled(Boolean disabled) { - this.disabled = disabled; - return this; - } - - /** - * Sets the value for {@code nickname}. - * - * @param nickname Value for the nickname field. - * @return This builder instance. - */ - public Builder nickname(String nickname) { - this.nickname = nickname; - return this; - } - - /** - * Sets the value for {@code password}. - * - * @param password Value for the password field. - * @return This builder instance. - */ - public Builder password(String password) { - this.password = password; - return this; - } - - /** - * Sets the value for {@code permissions}. - * - * @param permissions Value for the permissions field. - * @return This builder instance. - */ - public Builder permissions( - com.sumup.sdk.models.UpdateSubAccountRequestPermissions permissions) { - this.permissions = permissions; - return this; - } - - /** - * Sets the value for {@code username}. - * - * @param username Value for the username field. - * @return This builder instance. - */ - public Builder username(String username) { - this.username = username; - return this; - } - - /** - * Builds an immutable UpdateSubAccountRequest instance. - * - * @return Immutable UpdateSubAccountRequest. - */ - public UpdateSubAccountRequest build() { - return new UpdateSubAccountRequest(disabled, nickname, password, permissions, username); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/UpdateSubAccountRequestPermissions.java b/src/main/java/com/sumup/sdk/models/UpdateSubAccountRequestPermissions.java deleted file mode 100644 index 101a3be..0000000 --- a/src/main/java/com/sumup/sdk/models/UpdateSubAccountRequestPermissions.java +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -public record UpdateSubAccountRequestPermissions( - Boolean createMotoPayments, - Boolean createReferral, - Boolean fullTransactionHistoryView, - Boolean refundTransactions) { - /** - * Creates a builder for UpdateSubAccountRequestPermissions. - * - * @return Builder that constructs immutable UpdateSubAccountRequestPermissions instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for UpdateSubAccountRequestPermissions 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 Value for the createMotoPayments field. - * @return This builder instance. - */ - public Builder createMotoPayments(Boolean createMotoPayments) { - this.createMotoPayments = createMotoPayments; - return this; - } - - /** - * Sets the value for {@code createReferral}. - * - * @param createReferral Value for the createReferral field. - * @return This builder instance. - */ - public Builder createReferral(Boolean createReferral) { - this.createReferral = createReferral; - return this; - } - - /** - * Sets the value for {@code fullTransactionHistoryView}. - * - * @param fullTransactionHistoryView Value for the fullTransactionHistoryView field. - * @return This builder instance. - */ - public Builder fullTransactionHistoryView(Boolean fullTransactionHistoryView) { - this.fullTransactionHistoryView = fullTransactionHistoryView; - return this; - } - - /** - * Sets the value for {@code refundTransactions}. - * - * @param refundTransactions Value for the refundTransactions field. - * @return This builder instance. - */ - public Builder refundTransactions(Boolean refundTransactions) { - this.refundTransactions = refundTransactions; - return this; - } - - /** - * Builds an immutable UpdateSubAccountRequestPermissions instance. - * - * @return Immutable UpdateSubAccountRequestPermissions. - */ - public UpdateSubAccountRequestPermissions build() { - return new UpdateSubAccountRequestPermissions( - createMotoPayments, createReferral, fullTransactionHistoryView, refundTransactions); - } - } -}