Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 32 additions & 7 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -6652,7 +6673,8 @@
"enum": [
"PENDING",
"FAILED",
"PAID"
"PAID",
"EXPIRED"
]
},
"date": {
Expand Down Expand Up @@ -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"
]
},
Expand Down Expand Up @@ -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.",
Expand Down Expand Up @@ -10637,6 +10658,7 @@
}
},
"CheckoutCreate": {
"required": true,
"content": {
"application/json": {
"schema": {
Expand Down Expand Up @@ -10686,6 +10708,7 @@
}
},
"CheckoutProcess": {
"required": true,
"description": "Details of the payment instrument for processing the checkout.",
"content": {
"application/json": {
Expand Down Expand Up @@ -10776,6 +10799,7 @@
}
},
"CustomerCreate": {
"required": true,
"description": "Details of the customer.",
"content": {
"application/json": {
Expand All @@ -10786,6 +10810,7 @@
}
},
"CustomerUpdate": {
"required": true,
"content": {
"application/json": {
"schema": {
Expand Down
31 changes: 26 additions & 5 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ paths:
Follow by processing a checkout to charge the provided payment instrument.
requestBody:
description: ''
required: true
content:
application/json:
schema:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -7582,6 +7599,7 @@ components:
schema:
$ref: '#/components/schemas/BankAccountPayload'
CheckoutCreate:
required: true
content:
application/json:
schema:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions sumup/checkouts/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down Expand Up @@ -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"]

Expand Down
2 changes: 2 additions & 0 deletions sumup/memberships/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 4 additions & 3 deletions sumup/transactions/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]

Expand Down
Loading