diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index a585467e..5c9c7574 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -8226,7 +8226,7 @@ const ( ``` -## type [TransactionsClient]() +## type [TransactionsClient]() TransactionsClient provides access to the Transactions API. @@ -8245,7 +8245,7 @@ type TransactionsClient struct { ``` -### func [NewTransactionsClient]() +### func [NewTransactionsClient]() ```go func NewTransactionsClient(c *client.Client) *TransactionsClient @@ -8254,7 +8254,7 @@ func NewTransactionsClient(c *client.Client) *TransactionsClient -### func \(\*TransactionsClient\) [Get]() +### func \(\*TransactionsClient\) [Get]() ```go func (c *TransactionsClient) Get(ctx context.Context, merchantCode string, params TransactionsGetParams) (*TransactionFull, error) @@ -8263,7 +8263,7 @@ func (c *TransactionsClient) Get(ctx context.Context, merchantCode string, param 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\` -### func \(\*TransactionsClient\) [List]() +### func \(\*TransactionsClient\) [List]() ```go func (c *TransactionsClient) List(ctx context.Context, merchantCode string, params TransactionsListParams) (*TransactionsListResponse, error) @@ -8274,7 +8274,7 @@ Lists transaction history for the merchant, with optional filters for payment ty To request another page, use the query string from the relevant link's \`href\` with this history endpoint. Use \`changes\_since\` when retrieving transactions modified since a previous synchronization, including transactions created earlier whose status has changed. -### func \(\*TransactionsClient\) [Refund]() +### func \(\*TransactionsClient\) [Refund]() ```go func (c *TransactionsClient) Refund(ctx context.Context, merchantCode string, transactionID string, body TransactionsRefundParams) (*TransactionsRefundResponse, error) @@ -8285,7 +8285,7 @@ Refunds a transaction identified by its SumUp transaction ID. Omit the request b Retrieve the transaction afterwards to inspect its refunded amount and refund events. The transaction must be eligible for a refund; see the error responses for invalid amounts, permissions, and processing failures. -## type [TransactionsGetParams]() +## type [TransactionsGetParams]() TransactionsGetParams are query parameters for GetTransactionV2.1. @@ -8303,7 +8303,7 @@ type TransactionsGetParams struct { ``` -### func \(\*TransactionsGetParams\) [QueryValues]() +### func \(\*TransactionsGetParams\) [QueryValues]() ```go func (p *TransactionsGetParams) QueryValues() url.Values @@ -8327,7 +8327,7 @@ type TransactionsHistoryLink struct { ``` -## type [TransactionsListOrder]() +## type [TransactionsListOrder]() TransactionsListOrder is a schema definition. Default: ascending @@ -8345,7 +8345,7 @@ const ( ``` -## type [TransactionsListParams]() +## type [TransactionsListParams]() TransactionsListParams are query parameters for ListTransactionsV2.1. @@ -8390,7 +8390,7 @@ type TransactionsListParams struct { ``` -### func \(\*TransactionsListParams\) [QueryValues]() +### func \(\*TransactionsListParams\) [QueryValues]() ```go func (p *TransactionsListParams) QueryValues() url.Values @@ -8399,7 +8399,7 @@ func (p *TransactionsListParams) QueryValues() url.Values QueryValues converts [TransactionsListParams](<#TransactionsListParams>) into \[url.Values\]. -## type [TransactionsListResponse]() +## type [TransactionsListResponse]() TransactionsListResponse is a schema definition. @@ -8413,7 +8413,7 @@ type TransactionsListResponse struct { ``` -## type [TransactionsListStatusesItem]() +## type [TransactionsListStatusesItem]() TransactionsListStatusesItem is a schema definition. @@ -8434,7 +8434,7 @@ const ( ``` -## type [TransactionsListTypesItem]() +## type [TransactionsListTypesItem]() TransactionsListTypesItem is a schema definition. @@ -8453,21 +8453,22 @@ const ( ``` -## type [TransactionsRefundParams]() +## type [TransactionsRefundParams]() Optional amount for partial refunds of transactions. ```go type TransactionsRefundParams struct { - // Amount to refund in major units of the transaction's currency, for example `5` for EUR 5.00. It must be + // Amount to refund in minor units of the transaction's currency, for example `500` for EUR 5.00. It must be // greater than zero and cannot exceed the amount eligible for a refund. Eligibility depends on the transaction and // country/currency rules. If omitted, the system requests a full refund. - Amount *float32 `json:"amount,omitempty"` + // Min: 0 + Amount *int `json:"amount,omitempty"` } ``` -## type [TransactionsRefundResponse]() +## type [TransactionsRefundResponse]() TransactionsRefundResponse is a schema definition. diff --git a/openapi.json b/openapi.json index 67b90679..a841579e 100644 --- a/openapi.json +++ b/openapi.json @@ -2363,10 +2363,10 @@ "description": "Optional amount for partial refunds of transactions.", "properties": { "amount": { - "type": "number", - "format": "float", - "description": "Amount to refund in major units of the transaction's currency, for example `5` for EUR 5.00. It must be greater than zero and cannot exceed the amount eligible for a refund. Eligibility depends on the transaction and country/currency rules. If omitted, the system requests a full refund.", - "example": 5 + "type": "integer", + "description": "Amount to refund in minor units of the transaction's currency, for example `500` for EUR 5.00. It must be greater than zero and cannot exceed the amount eligible for a refund. Eligibility depends on the transaction and country/currency rules. If omitted, the system requests a full refund.", + "example": 500, + "minimum": 0 } } }, @@ -2378,7 +2378,7 @@ "PartialRefund": { "summary": "Partial refund", "value": { - "amount": 24.42 + "amount": 2442 } } } @@ -14104,10 +14104,10 @@ "description": "Optional amount for partial refunds of transactions.", "properties": { "amount": { - "type": "number", - "format": "float", - "description": "Amount to refund in major units of the transaction's currency, for example `5` for EUR 5.00. It must be greater than zero and cannot exceed the amount eligible for a refund. Eligibility depends on the transaction and country/currency rules. If omitted, the system requests a full refund.", - "example": 5 + "type": "integer", + "description": "Amount to refund in minor units of the transaction's currency, for example `500` for EUR 5.00. It must be greater than zero and cannot exceed the amount eligible for a refund. Eligibility depends on the transaction and country/currency rules. If omitted, the system requests a full refund.", + "example": 500, + "minimum": 0 } } }, @@ -14119,7 +14119,7 @@ "PartialRefund": { "summary": "Partial refund", "value": { - "amount": 24.42 + "amount": 2442 } } } diff --git a/transactions.go b/transactions.go index e0c58026..1bf44917 100755 --- a/transactions.go +++ b/transactions.go @@ -600,10 +600,11 @@ type TransactionsHistoryLink struct { // Optional amount for partial refunds of transactions. type TransactionsRefundParams struct { - // Amount to refund in major units of the transaction's currency, for example `5` for EUR 5.00. It must be + // Amount to refund in minor units of the transaction's currency, for example `500` for EUR 5.00. It must be // greater than zero and cannot exceed the amount eligible for a refund. Eligibility depends on the transaction and // country/currency rules. If omitted, the system requests a full refund. - Amount *float32 `json:"amount,omitempty"` + // Min: 0 + Amount *int `json:"amount,omitempty"` } // TransactionsListOrder is a schema definition.