diff --git a/openapi.json b/openapi.json index cbc44bff..8785736a 100755 --- a/openapi.json +++ b/openapi.json @@ -1092,13 +1092,6 @@ "currency": { "$ref": "#/components/schemas/Currency" }, - "pay_to_email": { - "description": "Email address of the registered user (merchant) to whom the payment is made.", - "type": "string", - "format": "email", - "deprecated": true, - "x-deprecation-notice": "`pay_to_email` is deprecated, use `merchant_code` instead." - }, "merchant_code": { "description": "Unique identifying code of the merchant profile.", "type": "string" @@ -2029,6 +2022,22 @@ "schema": { "type": "string" } + }, + { + "name": "foreign_transaction_id", + "in": "query", + "description": "External/foreign transaction id (passed by clients).", + "schema": { + "type": "string" + } + }, + { + "name": "client_transaction_id", + "in": "query", + "description": "Client transaction id.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4147,7 +4156,7 @@ { "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.\n", + "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" } @@ -4257,7 +4266,7 @@ } }, "403": { - "description": "error response for compat API calls", + "description": "Error response for compat API calls.", "content": { "application/json": { "schema": { @@ -4295,6 +4304,7 @@ { "name": "operator_id", "in": "path", + "description": "The unique identifier for the operator.", "required": true, "schema": { "type": "integer", @@ -4304,7 +4314,7 @@ ], "responses": { "200": { - "description": "Operator.", + "description": "Information about the requested operator.", "content": { "application/json": { "schema": { @@ -4340,6 +4350,7 @@ { "name": "operator_id", "in": "path", + "description": "The unique identifier for the operator.", "required": true, "schema": { "type": "integer", @@ -4435,11 +4446,13 @@ }, "delete": { "operationId": "DeactivateSubAccount", - "summary": "Disable an operator", + "summary": "Disable an operator.", + "description": "Disable the specified operator for the merchant account.", "parameters": [ { "name": "operator_id", "in": "path", + "description": "The unique identifier for the operator.", "required": true, "schema": { "type": "integer", @@ -4526,6 +4539,14 @@ "schema": { "type": "boolean" } + }, + { + "name": "resource.name", + "in": "query", + "description": "Filter memberships by the name of the resource the membership is in.", + "schema": { + "type": "string" + } } ], "responses": { @@ -5610,14 +5631,14 @@ "parameters": { "id": "$response.body#/id" }, - "description": "Update the reader object. This can be used to set a name after using this endpoint to verify the pairing code.\n" + "description": "Update the reader object. This can be used to set a name after using this endpoint to verify the pairing code." }, "DeleteReaderByID": { "operationId": "DeleteReader", "parameters": { "id": "$response.body#/id" }, - "description": "Delete the reader.\n" + "description": "Delete the reader." } } } @@ -5699,7 +5720,7 @@ ], "responses": { "200": { - "description": "Returns a Reader object for a valid identifier.\n", + "description": "Returns a Reader object for a valid identifier.", "content": { "application/json": { "schema": { @@ -5708,11 +5729,8 @@ } } }, - "400": { - "description": "Malformed request." - }, "404": { - "description": "The requested Reader resource does not exists.\n" + "description": "The requested Reader resource does not exists." } }, "security": [ @@ -6553,13 +6571,6 @@ "currency": { "$ref": "#/components/schemas/Currency" }, - "pay_to_email": { - "description": "Email address of the registered user (merchant) to whom the payment is made.", - "type": "string", - "format": "email", - "deprecated": true, - "x-deprecation-notice": "`pay_to_email` is deprecated, use `merchant_code` instead." - }, "merchant_code": { "description": "Unique identifying code of the merchant profile.", "type": "string" @@ -6648,13 +6659,6 @@ "description": "Unique identifying code of the merchant profile.", "type": "string" }, - "pay_to_email": { - "description": "Email address of the registered user (merchant) to whom the payment is made.", - "type": "string", - "format": "email", - "deprecated": true, - "x-deprecation-notice": "`pay_to_email` is deprecated, use `merchant_code` instead." - }, "description": { "description": "Short description of the checkout visible in the SumUp dashboard. The description can contribute to reporting, allowing easier identification of a checkout.", "type": "string" @@ -8528,6 +8532,7 @@ "format": "date-time" }, "Operator": { + "description": "Operator account for a merchant.", "type": "object", "properties": { "id": { @@ -8579,7 +8584,7 @@ ] }, "CompatError": { - "description": "Error", + "description": "Error object for compat API calls.", "type": "object", "properties": { "error_code": { @@ -9097,7 +9102,7 @@ "maxLength": 500 }, "ReaderStatus": { - "description": "The status of the reader object gives information about the current state of the reader.\n\nPossible values:\n\n- `unknown` - The reader status is unknown.\n- `processing` - The reader is created and waits for the physical device to confirm the pairing.\n- `paired` - The reader is paired with a merchant account and can be used with SumUp APIs.\n- `expired` - The pairing is expired and no longer usable with the account. The resource needs to get recreated", + "description": "The status of the reader object gives information about the current state of the reader.\n\nPossible values:\n\n- `unknown` - The reader status is unknown.\n- `processing` - The reader is created and waits for the physical device to confirm the pairing.\n- `paired` - The reader is paired with a merchant account and can be used with SumUp APIs.\n- `expired` - The pairing is expired and no longer usable with the account. The resource needs to get recreated.", "type": "string", "example": "paired", "enum": [ @@ -9108,7 +9113,7 @@ ] }, "ReaderDevice": { - "description": "Information about the underlying physical device.\n", + "description": "Information about the underlying physical device.", "type": "object", "properties": { "identifier": { @@ -9517,14 +9522,14 @@ "parameters": { "id": "$response.body#/id" }, - "description": "Update the reader object. This can be used to set a name after using this endpoint to verify the pairing code.\n" + "description": "Update the reader object. This can be used to set a name after using this endpoint to verify the pairing code." }, "DeleteReaderByID": { "operationId": "DeleteReader", "parameters": { "id": "$response.body#/id" }, - "description": "Delete the reader.\n" + "description": "Delete the reader." } }, "requestBodies": { @@ -10268,7 +10273,7 @@ } }, "CompatErrorResponse": { - "description": "error response for compat API calls", + "description": "Error response for compat API calls.", "content": { "application/json": { "schema": { @@ -10484,7 +10489,7 @@ }, { "name": "Readers", - "description": "A reader represents a device that accepts payments. You can use the SumUp Solo to accept in-person payments.\n", + "description": "A reader represents a device that accepts payments. You can use the SumUp Solo to accept in-person payments.", "x-core-objects": [ { "$ref": "#/components/schemas/Reader" diff --git a/openapi.yaml b/openapi.yaml index ea95063a..b0fe8323 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -773,12 +773,6 @@ paths: format: float currency: $ref: '#/components/schemas/Currency' - pay_to_email: - description: Email address of the registered user (merchant) to whom the payment is made. - type: string - format: email - deprecated: true - x-deprecation-notice: '`pay_to_email` is deprecated, use `merchant_code` instead.' merchant_code: description: Unique identifying code of the merchant profile. type: string @@ -1382,6 +1376,16 @@ paths: required: false schema: type: string + - name: foreign_transaction_id + in: query + description: External/foreign transaction id (passed by clients). + schema: + type: string + - name: client_transaction_id + in: query + description: Client transaction id. + schema: + type: string responses: '200': description: OK @@ -2783,7 +2787,7 @@ paths: parameters: - name: query in: query - description: | + description: |- Search query used to filter users that match given query term. Current implementation allow querying only over the email address. @@ -2858,7 +2862,7 @@ paths: schema: $ref: '#/components/schemas/Operator' '403': - description: error response for compat API calls + description: Error response for compat API calls. content: application/json: schema: @@ -2881,13 +2885,14 @@ paths: parameters: - name: operator_id in: path + description: The unique identifier for the operator. required: true schema: type: integer format: int32 responses: '200': - description: Operator. + description: Information about the requested operator. content: application/json: schema: @@ -2909,6 +2914,7 @@ paths: parameters: - name: operator_id in: path + description: The unique identifier for the operator. required: true schema: type: integer @@ -2969,10 +2975,12 @@ paths: x-scopes: [] delete: operationId: DeactivateSubAccount - summary: Disable an operator + summary: Disable an operator. + description: Disable the specified operator for the merchant account. parameters: - name: operator_id in: path + description: The unique identifier for the operator. required: true schema: type: integer @@ -3033,6 +3041,11 @@ paths: description: Filter memberships by the sandbox status of the resource the membership is in. schema: type: boolean + - name: resource.name + in: query + description: Filter memberships by the name of the resource the membership is in. + schema: + type: string responses: '200': description: Returns a list of Membership objects. @@ -3733,14 +3746,12 @@ paths: operationId: UpdateReader parameters: id: $response.body#/id - description: | - Update the reader object. This can be used to set a name after using this endpoint to verify the pairing code. + description: Update the reader object. This can be used to set a name after using this endpoint to verify the pairing code. DeleteReaderByID: operationId: DeleteReader parameters: id: $response.body#/id - description: | - Delete the reader. + description: Delete the reader. security: - apiKey: [] - oauth2: @@ -3795,17 +3806,13 @@ paths: $ref: '#/components/schemas/ReaderID' responses: '200': - description: | - Returns a Reader object for a valid identifier. + description: Returns a Reader object for a valid identifier. content: application/json: schema: $ref: '#/components/schemas/Reader' - '400': - description: Malformed request. '404': - description: | - The requested Reader resource does not exists. + description: The requested Reader resource does not exists. security: - apiKey: [] - oauth2: @@ -4446,12 +4453,6 @@ components: example: 10.1 currency: $ref: '#/components/schemas/Currency' - pay_to_email: - description: Email address of the registered user (merchant) to whom the payment is made. - type: string - format: email - deprecated: true - x-deprecation-notice: '`pay_to_email` is deprecated, use `merchant_code` instead.' merchant_code: description: Unique identifying code of the merchant profile. type: string @@ -4517,12 +4518,6 @@ components: merchant_code: description: Unique identifying code of the merchant profile. type: string - pay_to_email: - description: Email address of the registered user (merchant) to whom the payment is made. - type: string - format: email - deprecated: true - x-deprecation-notice: '`pay_to_email` is deprecated, use `merchant_code` instead.' description: description: 'Short description of the checkout visible in the SumUp dashboard. The description can contribute to reporting, allowing easier identification of a checkout.' type: string @@ -5915,6 +5910,7 @@ components: type: string format: date-time Operator: + description: Operator account for a merchant. type: object properties: id: @@ -5954,7 +5950,7 @@ components: - permissions - account_type CompatError: - description: Error + description: Error object for compat API calls. type: object properties: error_code: @@ -6370,7 +6366,7 @@ components: - `unknown` - The reader status is unknown. - `processing` - The reader is created and waits for the physical device to confirm the pairing. - `paired` - The reader is paired with a merchant account and can be used with SumUp APIs. - - `expired` - The pairing is expired and no longer usable with the account. The resource needs to get recreated + - `expired` - The pairing is expired and no longer usable with the account. The resource needs to get recreated. type: string example: paired enum: @@ -6379,8 +6375,7 @@ components: - paired - expired ReaderDevice: - description: | - Information about the underlying physical device. + description: Information about the underlying physical device. type: object properties: identifier: @@ -6684,14 +6679,12 @@ components: operationId: UpdateReader parameters: id: $response.body#/id - description: | - Update the reader object. This can be used to set a name after using this endpoint to verify the pairing code. + description: Update the reader object. This can be used to set a name after using this endpoint to verify the pairing code. DeleteReaderByID: operationId: DeleteReader parameters: id: $response.body#/id - description: | - Delete the reader. + description: Delete the reader. requestBodies: BankAccounts: content: @@ -7223,7 +7216,7 @@ components: error_code: CHECKOUT_PROCESSED message: Checkout is already processed CompatErrorResponse: - description: error response for compat API calls + description: Error response for compat API calls. content: application/json: schema: @@ -7370,8 +7363,7 @@ tags: - $ref: '#/components/schemas/Role' x-beta: true - name: Readers - description: | - A reader represents a device that accepts payments. You can use the SumUp Solo to accept in-person payments. + description: A reader represents a device that accepts payments. You can use the SumUp Solo to accept in-person payments. x-core-objects: - $ref: '#/components/schemas/Reader' x-beta: true diff --git a/pyproject.toml b/pyproject.toml index 6a8e11fd..9af15f3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ dev = [ [project.urls] Homepage = "https://github.com/sumup/sumup-py" Issues = "https://github.com/sumup/sumup-py/issues" -"Source Code" = "https://github.com/sumup/stripe-py" +"Source Code" = "https://github.com/sumup/sumup-py" [tool.ruff] line-length = 100 diff --git a/sumup/checkouts/resource.py b/sumup/checkouts/resource.py index 7f5b6f94..58836c64 100755 --- a/sumup/checkouts/resource.py +++ b/sumup/checkouts/resource.py @@ -149,13 +149,6 @@ class CreateCheckoutBody(pydantic.BaseModel): Read only """ - pay_to_email: typing.Optional[str] = None - """ - Email address of the registered user (merchant) to whom the payment is made. - Format: email - Deprecated: `pay_to_email` is deprecated, use `merchant_code` instead. - """ - purpose: typing.Optional[CreateCheckoutBodyPurpose] = None """ Purpose of the checkout. @@ -426,13 +419,6 @@ class DeactivateCheckout200Response(pydantic.BaseModel): Merchant name """ - pay_to_email: typing.Optional[str] = None - """ - Email address of the registered user (merchant) to whom the payment is made. - Format: email - Deprecated: `pay_to_email` is deprecated, use `merchant_code` instead. - """ - purpose: typing.Optional[DeactivateCheckout200ResponsePurpose] = None """ Purpose of the checkout creation initially diff --git a/sumup/checkouts/types.py b/sumup/checkouts/types.py index 36c877bf..0fbe594a 100755 --- a/sumup/checkouts/types.py +++ b/sumup/checkouts/types.py @@ -322,13 +322,6 @@ class Checkout(pydantic.BaseModel): Unique identifying code of the merchant profile. """ - pay_to_email: typing.Optional[str] = None - """ - Email address of the registered user (merchant) to whom the payment is made. - Format: email - Deprecated: `pay_to_email` is deprecated, use `merchant_code` instead. - """ - return_url: typing.Optional[str] = None """ URL to which the SumUp platform sends the processing status of the payment checkout. @@ -532,13 +525,6 @@ class CheckoutCreateRequest(pydantic.BaseModel): Read only """ - pay_to_email: typing.Optional[str] = None - """ - Email address of the registered user (merchant) to whom the payment is made. - Format: email - Deprecated: `pay_to_email` is deprecated, use `merchant_code` instead. - """ - purpose: typing.Optional[CheckoutCreateRequestPurpose] = None """ Purpose of the checkout. @@ -729,13 +715,6 @@ class CheckoutSuccess(pydantic.BaseModel): Name of the merchant """ - pay_to_email: typing.Optional[str] = None - """ - Email address of the registered user (merchant) to whom the payment is made. - Format: email - Deprecated: `pay_to_email` is deprecated, use `merchant_code` instead. - """ - payment_instrument: typing.Optional[CheckoutSuccessPaymentInstrument] = None """ Object containing token information for the specified payment instrument diff --git a/sumup/memberships/resource.py b/sumup/memberships/resource.py index 197c7135..3a61121a 100755 --- a/sumup/memberships/resource.py +++ b/sumup/memberships/resource.py @@ -23,6 +23,8 @@ class ListMembershipsParams(pydantic.BaseModel): resource_attributes_sandbox: typing.Optional[bool] = None + resource_name: typing.Optional[str] = None + class ListMemberships200Response(pydantic.BaseModel): """ diff --git a/sumup/readers/types.py b/sumup/readers/types.py index 84735177..9aaca007 100755 --- a/sumup/readers/types.py +++ b/sumup/readers/types.py @@ -205,7 +205,7 @@ class Reader(pydantic.BaseModel): - `unknown` - The reader status is unknown. - `processing` - The reader is created and waits for the physical device to confirm the pairing. - `paired` - The reader is paired with a merchant account and can be used with SumUp APIs. - - `expired` - The pairing is expired and no longer usable with the account. The resource needs to get recreated + - `expired` - The pairing is expired and no longer usable with the account. The resource needs to get recreated. """ updated_at: datetime diff --git a/sumup/subaccounts/resource.py b/sumup/subaccounts/resource.py index f84874a4..0f5eebeb 100755 --- a/sumup/subaccounts/resource.py +++ b/sumup/subaccounts/resource.py @@ -180,7 +180,9 @@ def deactivate_sub_account( self, operator_id: int, headers: typing.Optional[HeaderTypes] = None ) -> Operator: """ - Disable an operator + Disable an operator. + + Disable the specified operator for the merchant account. """ resp = self._client.delete( f"/v0.1/me/accounts/{operator_id}", @@ -276,7 +278,9 @@ async def deactivate_sub_account( self, operator_id: int, headers: typing.Optional[HeaderTypes] = None ) -> Operator: """ - Disable an operator + Disable an operator. + + Disable the specified operator for the merchant account. """ resp = await self._client.delete( f"/v0.1/me/accounts/{operator_id}", diff --git a/sumup/subaccounts/types.py b/sumup/subaccounts/types.py index daafd4dc..c270fe0c 100755 --- a/sumup/subaccounts/types.py +++ b/sumup/subaccounts/types.py @@ -35,7 +35,7 @@ class Permissions(pydantic.BaseModel): class Operator(pydantic.BaseModel): """ - Operator is a schema definition. + Operator account for a merchant. """ account_type: OperatorAccountType @@ -69,7 +69,7 @@ class Operator(pydantic.BaseModel): class CompatError(pydantic.BaseModel): """ - Error + Error object for compat API calls. """ error_code: str diff --git a/sumup/transactions/resource.py b/sumup/transactions/resource.py index 432409c3..02efdf9a 100755 --- a/sumup/transactions/resource.py +++ b/sumup/transactions/resource.py @@ -27,6 +27,10 @@ class GetTransactionV21Params(pydantic.BaseModel): GetTransactionV21Params: query parameters for GetTransactionV2.1 """ + client_transaction_id: typing.Optional[str] = None + + foreign_transaction_id: typing.Optional[str] = None + id: typing.Optional[str] = None internal_id: typing.Optional[str] = None