From bc2dde548a2f500e6dd864a4750c6dd7bf16e3fb Mon Sep 17 00:00:00 2001 From: appscisumup Date: Mon, 15 Dec 2025 10:15:49 +0000 Subject: [PATCH 1/3] chore: synced local 'openapi.json' with remote 'specs/openapi.json' --- openapi.json | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/openapi.json b/openapi.json index f83117e2..4e64257d 100755 --- a/openapi.json +++ b/openapi.json @@ -184,6 +184,7 @@ "description": "Creates a new payment checkout resource. The unique `checkout_reference` created by this request, is used for further manipulation of the checkout.\n\nFor 3DS checkouts, add the `redirect_url` parameter to your request body schema.\n\nFollow by processing a checkout to charge the provided payment instrument.\n", "requestBody": { "description": "", + "required": true, "content": { "application/json": { "schema": { @@ -658,6 +659,7 @@ "description": "Processing a checkout will attempt to charge the provided payment instrument for the amount of the specified checkout resource initiated in the `Create a checkout` endpoint.\n\nFollow this request with `Retrieve a checkout` to confirm its status.\n", "requestBody": { "description": "Details of the payment instrument for processing the checkout.", + "required": true, "content": { "application/json": { "schema": { @@ -1190,6 +1192,7 @@ "description": "Creates a new saved customer resource which you can later manipulate and save payment instruments to.", "requestBody": { "description": "Details of the customer.", + "required": true, "content": { "application/json": { "schema": { @@ -1429,6 +1432,7 @@ "description": "Updates an identified saved customer resource's personal details.\n\nThe request only overwrites the parameters included in the request, all other parameters will remain with their initially assigned values.\n", "requestBody": { "description": "", + "required": true, "content": { "application/json": { "schema": { @@ -3784,6 +3788,23 @@ "schema": { "$ref": "#/components/schemas/ResourceType" } + }, + { + "name": "roles", + "in": "query", + "description": "Filter the returned memberships by role.", + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "role_employee", + "role_accountant" + ] + }, + "explode": true, + "style": "form" } ], "responses": { @@ -6652,7 +6673,8 @@ "enum": [ "PENDING", "FAILED", - "PAID" + "PAID", + "EXPIRED" ] }, "date": { @@ -8213,10 +8235,11 @@ "type": "string", "enum": [ "none", + "na", "signature", - "offline pin", - "online pin", - "offline pin + signature", + "offline PIN", + "online PIN", + "offline PIN + signature", "confirmation code verified" ] }, @@ -8531,9 +8554,7 @@ "description": "Object attributes that are modifiable only by SumUp applications.", "type": "object", "example": {}, - "additionalProperties": { - "maxLength": 256 - } + "additionalProperties": true }, "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.", @@ -10637,6 +10658,7 @@ } }, "CheckoutCreate": { + "required": true, "content": { "application/json": { "schema": { @@ -10686,6 +10708,7 @@ } }, "CheckoutProcess": { + "required": true, "description": "Details of the payment instrument for processing the checkout.", "content": { "application/json": { @@ -10776,6 +10799,7 @@ } }, "CustomerCreate": { + "required": true, "description": "Details of the customer.", "content": { "application/json": { @@ -10786,6 +10810,7 @@ } }, "CustomerUpdate": { + "required": true, "content": { "application/json": { "schema": { From ab7d632fc14bdd3d6bcf4885e28708a1cd0b27be Mon Sep 17 00:00:00 2001 From: appscisumup Date: Mon, 15 Dec 2025 10:15:49 +0000 Subject: [PATCH 2/3] chore: synced local 'openapi.yaml' with remote 'specs/openapi.yaml' --- openapi.yaml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 7bc811c6..5b2d18d7 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -125,6 +125,7 @@ paths: Follow by processing a checkout to charge the provided payment instrument. requestBody: description: '' + required: true content: application/json: schema: @@ -458,6 +459,7 @@ paths: Follow this request with `Retrieve a checkout` to confirm its status. requestBody: description: Details of the payment instrument for processing the checkout. + required: true content: application/json: schema: @@ -833,6 +835,7 @@ paths: description: Creates a new saved customer resource which you can later manipulate and save payment instruments to. requestBody: description: Details of the customer. + required: true content: application/json: schema: @@ -986,6 +989,7 @@ paths: The request only overwrites the parameters included in the request, all other parameters will remain with their initially assigned values. requestBody: description: '' + required: true content: application/json: schema: @@ -2527,6 +2531,18 @@ paths: When filtering by parent both `resource.parent.id` and `resource.parent.type` must be present. schema: $ref: '#/components/schemas/ResourceType' + - name: roles + in: query + description: Filter the returned memberships by role. + schema: + type: array + items: + type: string + example: + - role_employee + - role_accountant + explode: true + style: form responses: '200': description: Returns a list of Membership objects. @@ -4465,6 +4481,7 @@ components: - PENDING - FAILED - PAID + - EXPIRED date: description: 'Date and time of the creation of the payment checkout. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.' type: string @@ -5600,10 +5617,11 @@ components: type: string enum: - none + - na - signature - - offline pin - - online pin - - offline pin + signature + - offline PIN + - online PIN + - offline PIN + signature - confirmation code verified card: $ref: '#/components/schemas/CardResponse' @@ -5837,8 +5855,7 @@ components: description: Object attributes that are modifiable only by SumUp applications. type: object example: {} - additionalProperties: - maxLength: 256 + additionalProperties: true CountryCode: description: |- An [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) @@ -7582,6 +7599,7 @@ components: schema: $ref: '#/components/schemas/BankAccountPayload' CheckoutCreate: + required: true content: application/json: schema: @@ -7620,6 +7638,7 @@ components: merchant_code: MH4H92C7 redirect_url: 'https://mysite.com/completed_purchase' CheckoutProcess: + required: true description: Details of the payment instrument for processing the checkout. content: application/json: @@ -7687,12 +7706,14 @@ components: address: country: BE CustomerCreate: + required: true description: Details of the customer. content: application/json: schema: $ref: '#/components/schemas/Customer' CustomerUpdate: + required: true content: application/json: schema: From 23fe08330ef36503e72697172b096d972fcc0f09 Mon Sep 17 00:00:00 2001 From: "sumup-bot[bot]" <241716704+sumup-bot[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 10:17:04 +0000 Subject: [PATCH 3/3] chore: generate code --- sumup/checkouts/types.py | 4 ++-- sumup/memberships/resource.py | 2 ++ sumup/transactions/types.py | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sumup/checkouts/types.py b/sumup/checkouts/types.py index ba7c4dbd..0b07303d 100755 --- a/sumup/checkouts/types.py +++ b/sumup/checkouts/types.py @@ -185,7 +185,7 @@ class TransactionCheckoutInfo(pydantic.BaseModel): """ -CheckoutStatus = typing.Literal["FAILED", "PAID", "PENDING"] +CheckoutStatus = typing.Literal["EXPIRED", "FAILED", "PAID", "PENDING"] CheckoutTransactionStatus = typing.Literal["CANCELLED", "FAILED", "PENDING", "SUCCESSFUL"] @@ -564,7 +564,7 @@ class CheckoutCreateRequest(pydantic.BaseModel): """ -CheckoutSuccessStatus = typing.Literal["FAILED", "PAID", "PENDING"] +CheckoutSuccessStatus = typing.Literal["EXPIRED", "FAILED", "PAID", "PENDING"] CheckoutSuccessTransactionStatus = typing.Literal["CANCELLED", "FAILED", "PENDING", "SUCCESSFUL"] diff --git a/sumup/memberships/resource.py b/sumup/memberships/resource.py index 1d14593c..7634a2d7 100755 --- a/sumup/memberships/resource.py +++ b/sumup/memberships/resource.py @@ -72,6 +72,8 @@ class ListMembershipsParams(pydantic.BaseModel): * `organization` - organization(s) """ + roles: typing.Optional[list[str]] = None + status: typing.Optional[MembershipStatus] = None """ The status of the membership. diff --git a/sumup/transactions/types.py b/sumup/transactions/types.py index 8f88a208..8a58b295 100755 --- a/sumup/transactions/types.py +++ b/sumup/transactions/types.py @@ -472,10 +472,11 @@ class Event(pydantic.BaseModel): TransactionFullVerificationMethod = typing.Literal[ "confirmation code verified", + "na", "none", - "offline pin", - "offline pin + signature", - "online pin", + "offline PIN", + "offline PIN + signature", + "online PIN", "signature", ]