diff --git a/openapi.json b/openapi.json index 3217c6b..412977f 100755 --- a/openapi.json +++ b/openapi.json @@ -543,10 +543,10 @@ ] } }, - "/v0.1/checkouts/{id}": { + "/v0.1/checkouts/{checkout_id}": { "parameters": [ { - "name": "id", + "name": "checkout_id", "in": "path", "description": "Unique ID of the checkout resource.", "required": true, @@ -1150,14 +1150,14 @@ ] } }, - "/v0.2/checkouts/{id}/apple-pay-session": { + "/v0.2/checkouts/{checkout_id}/apple-pay-session": { "put": { "operationId": "CreateApplePaySession", "summary": "Create an Apple Pay session", "description": "Creates an Apple Pay merchant session for the specified checkout.\n\nUse this endpoint after the customer selects Apple Pay and before calling\n`ApplePaySession.completeMerchantValidation(...)` in the browser.\nSumUp validates the merchant session request and returns the Apple Pay\nsession object that your frontend should pass to Apple's JavaScript API.\n", "parameters": [ { - "name": "id", + "name": "checkout_id", "in": "path", "description": "Unique ID of the checkout resource.", "required": true, @@ -1900,7 +1900,7 @@ ] } }, - "/v1.0/merchants/{merchant_code}/payments/{id}/refunds": { + "/v1.0/merchants/{merchant_code}/payments/{transaction_id}/refunds": { "parameters": [ { "name": "merchant_code", @@ -1913,7 +1913,7 @@ } }, { - "name": "id", + "name": "transaction_id", "in": "path", "description": "Unique ID of the transaction.", "required": true, @@ -2658,14 +2658,14 @@ ] } }, - "/v1.1/receipts/{id}": { + "/v1.1/receipts/{transaction_id}": { "get": { "operationId": "GetReceipt", "summary": "Retrieve receipt details", "description": "Retrieves receipt specific data for a transaction.", "parameters": [ { - "name": "id", + "name": "transaction_id", "in": "path", "description": "SumUp unique transaction ID or transaction code, e.g. TS7HDYLSKD.", "required": true, @@ -4549,14 +4549,14 @@ "UpdateReaderByID": { "operationId": "UpdateReader", "parameters": { - "id": "$response.body#/id" + "reader_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." }, "DeleteReaderByID": { "operationId": "DeleteReader", "parameters": { - "id": "$response.body#/id" + "reader_id": "$response.body#/id" }, "description": "Delete the reader." } @@ -4639,7 +4639,7 @@ ] } }, - "/v0.1/merchants/{merchant_code}/readers/{id}": { + "/v0.1/merchants/{merchant_code}/readers/{reader_id}": { "get": { "operationId": "GetReader", "summary": "Retrieve a Reader", @@ -4677,7 +4677,7 @@ } }, { - "name": "id", + "name": "reader_id", "in": "path", "description": "The unique identifier of the reader.", "required": true, @@ -4757,7 +4757,7 @@ } }, { - "name": "id", + "name": "reader_id", "in": "path", "description": "The unique identifier of the reader.", "required": true, @@ -4830,7 +4830,7 @@ } }, { - "name": "id", + "name": "reader_id", "in": "path", "description": "The unique identifier of the reader.", "required": true, @@ -5403,7 +5403,7 @@ } }, "CheckoutID": { - "name": "id", + "name": "checkout_id", "in": "path", "required": true, "description": "Unique ID of the checkout resource.", @@ -5539,15 +5539,6 @@ "type": "string" } }, - "TxnID": { - "in": "path", - "name": "txn_id", - "required": true, - "description": "Unique ID of the transaction.", - "schema": { - "type": "string" - } - }, "TypesFilter": { "name": "types", "in": "query", @@ -9595,14 +9586,14 @@ "UpdateReaderByID": { "operationId": "UpdateReader", "parameters": { - "id": "$response.body#/id" + "reader_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." }, "DeleteReaderByID": { "operationId": "DeleteReader", "parameters": { - "id": "$response.body#/id" + "reader_id": "$response.body#/id" }, "description": "Delete the reader." } diff --git a/src/SumUp.Tests/ReadersClientTests.cs b/src/SumUp.Tests/ReadersClientTests.cs index 3db1f30..509d31b 100644 --- a/src/SumUp.Tests/ReadersClientTests.cs +++ b/src/SumUp.Tests/ReadersClientTests.cs @@ -256,7 +256,7 @@ public async Task Requests_UseDefaultAccessToken() await client.Readers.GetAsync( merchantCode: "merchant-123", - id: "reader-456", + readerId: "reader-456", requestOptions: null, cancellationToken: CancellationToken.None); @@ -297,7 +297,7 @@ public async Task Requests_CanOverrideAccessTokenPerRequest() await client.Readers.GetAsync( merchantCode: "merchant-123", - id: "reader-456", + readerId: "reader-456", requestOptions: requestOptions, cancellationToken: CancellationToken.None); @@ -372,7 +372,7 @@ public async Task Requests_RespectPerRequestTimeout() await Assert.ThrowsAsync(() => client.Readers.GetAsync( merchantCode: "merchant-123", - id: "reader-456", + readerId: "reader-456", requestOptions: requestOptions, cancellationToken: CancellationToken.None)); } diff --git a/src/SumUp/CheckoutsClient.g.cs b/src/SumUp/CheckoutsClient.g.cs index 3b40acb..24487db 100644 --- a/src/SumUp/CheckoutsClient.g.cs +++ b/src/SumUp/CheckoutsClient.g.cs @@ -158,15 +158,15 @@ public async Task> CreateAsync(CheckoutCreateRequest body, /// Create an Apple Pay session /// /// Creates an Apple Pay merchant session for the specified checkout. Use this endpoint after the customer selects Apple Pay and before calling ApplePaySession.completeMerchantValidation(...) in the browser. SumUp validates the merchant session request and returns the Apple Pay session object that your frontend should pass to Apple's JavaScript API. - /// Unique ID of the checkout resource. + /// Unique ID of the checkout resource. /// The data needed to create an apple pay session for a checkout. /// Optional per-request overrides. /// Token used to cancel the request. - public ApiResponse CreateApplePaySession(string id, CheckoutsCreateApplePaySessionRequest? body = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public ApiResponse CreateApplePaySession(string checkoutId, CheckoutsCreateApplePaySessionRequest? body = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { - var request = _client.CreateRequest(HttpMethod.Put, "/v0.2/checkouts/{id}/apple-pay-session", builder => + var request = _client.CreateRequest(HttpMethod.Put, "/v0.2/checkouts/{checkout_id}/apple-pay-session", builder => { - builder.AddPath("id", id); + builder.AddPath("checkout_id", checkoutId); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); try @@ -217,15 +217,15 @@ public ApiResponse CreateApplePaySession(string id, CheckoutsCreat /// Create an Apple Pay session /// /// Creates an Apple Pay merchant session for the specified checkout. Use this endpoint after the customer selects Apple Pay and before calling ApplePaySession.completeMerchantValidation(...) in the browser. SumUp validates the merchant session request and returns the Apple Pay session object that your frontend should pass to Apple's JavaScript API. - /// Unique ID of the checkout resource. + /// Unique ID of the checkout resource. /// The data needed to create an apple pay session for a checkout. /// Optional per-request overrides. /// Token used to cancel the request. - public async Task> CreateApplePaySessionAsync(string id, CheckoutsCreateApplePaySessionRequest? body = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public async Task> CreateApplePaySessionAsync(string checkoutId, CheckoutsCreateApplePaySessionRequest? body = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { - var request = _client.CreateRequest(HttpMethod.Put, "/v0.2/checkouts/{id}/apple-pay-session", builder => + var request = _client.CreateRequest(HttpMethod.Put, "/v0.2/checkouts/{checkout_id}/apple-pay-session", builder => { - builder.AddPath("id", id); + builder.AddPath("checkout_id", checkoutId); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); try @@ -276,14 +276,14 @@ public async Task> CreateApplePaySessionAsync(string i /// Deactivate a checkout /// /// Deactivates an identified checkout resource. If the checkout has already been processed it can not be deactivated. - /// Unique ID of the checkout resource. + /// Unique ID of the checkout resource. /// Optional per-request overrides. /// Token used to cancel the request. - public ApiResponse Deactivate(string id, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public ApiResponse Deactivate(string checkoutId, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { - var request = _client.CreateRequest(HttpMethod.Delete, "/v0.1/checkouts/{id}", builder => + var request = _client.CreateRequest(HttpMethod.Delete, "/v0.1/checkouts/{checkout_id}", builder => { - builder.AddPath("id", id); + builder.AddPath("checkout_id", checkoutId); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); try @@ -335,14 +335,14 @@ public ApiResponse Deactivate(string id, RequestOptions? requestOption /// Deactivate a checkout /// /// Deactivates an identified checkout resource. If the checkout has already been processed it can not be deactivated. - /// Unique ID of the checkout resource. + /// Unique ID of the checkout resource. /// Optional per-request overrides. /// Token used to cancel the request. - public async Task> DeactivateAsync(string id, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public async Task> DeactivateAsync(string checkoutId, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { - var request = _client.CreateRequest(HttpMethod.Delete, "/v0.1/checkouts/{id}", builder => + var request = _client.CreateRequest(HttpMethod.Delete, "/v0.1/checkouts/{checkout_id}", builder => { - builder.AddPath("id", id); + builder.AddPath("checkout_id", checkoutId); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); try @@ -394,14 +394,14 @@ public async Task> DeactivateAsync(string id, RequestOptio /// Retrieve a checkout /// /// Retrieves an identified checkout resource. Use this request after processing a checkout to confirm its status and inform the end user respectively. - /// Unique ID of the checkout resource. + /// Unique ID of the checkout resource. /// Optional per-request overrides. /// Token used to cancel the request. - public ApiResponse Get(string id, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public ApiResponse Get(string checkoutId, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { - var request = _client.CreateRequest(HttpMethod.Get, "/v0.1/checkouts/{id}", builder => + var request = _client.CreateRequest(HttpMethod.Get, "/v0.1/checkouts/{checkout_id}", builder => { - builder.AddPath("id", id); + builder.AddPath("checkout_id", checkoutId); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); try @@ -448,14 +448,14 @@ public ApiResponse Get(string id, RequestOptions? requestOption /// Retrieve a checkout /// /// Retrieves an identified checkout resource. Use this request after processing a checkout to confirm its status and inform the end user respectively. - /// Unique ID of the checkout resource. + /// Unique ID of the checkout resource. /// Optional per-request overrides. /// Token used to cancel the request. - public async Task> GetAsync(string id, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public async Task> GetAsync(string checkoutId, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { - var request = _client.CreateRequest(HttpMethod.Get, "/v0.1/checkouts/{id}", builder => + var request = _client.CreateRequest(HttpMethod.Get, "/v0.1/checkouts/{checkout_id}", builder => { - builder.AddPath("id", id); + builder.AddPath("checkout_id", checkoutId); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); try @@ -708,15 +708,15 @@ public async Task> Lis /// Process a checkout /// /// 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. Follow this request with Retrieve a checkout to confirm its status. - /// Unique ID of the checkout resource. + /// Unique ID of the checkout resource. /// Details of the payment instrument for processing the checkout. /// Optional per-request overrides. /// Token used to cancel the request. - public ApiResponse Process(string id, ProcessCheckout body, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public ApiResponse Process(string checkoutId, ProcessCheckout body, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { - var request = _client.CreateRequest(HttpMethod.Put, "/v0.1/checkouts/{id}", builder => + var request = _client.CreateRequest(HttpMethod.Put, "/v0.1/checkouts/{checkout_id}", builder => { - builder.AddPath("id", id); + builder.AddPath("checkout_id", checkoutId); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); try @@ -777,15 +777,15 @@ public ApiResponse Process(string id, ProcessCheckout body, Req /// Process a checkout /// /// 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. Follow this request with Retrieve a checkout to confirm its status. - /// Unique ID of the checkout resource. + /// Unique ID of the checkout resource. /// Details of the payment instrument for processing the checkout. /// Optional per-request overrides. /// Token used to cancel the request. - public async Task> ProcessAsync(string id, ProcessCheckout body, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public async Task> ProcessAsync(string checkoutId, ProcessCheckout body, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { - var request = _client.CreateRequest(HttpMethod.Put, "/v0.1/checkouts/{id}", builder => + var request = _client.CreateRequest(HttpMethod.Put, "/v0.1/checkouts/{checkout_id}", builder => { - builder.AddPath("id", id); + builder.AddPath("checkout_id", checkoutId); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); try diff --git a/src/SumUp/ReadersClient.g.cs b/src/SumUp/ReadersClient.g.cs index bdc2e91..98e7b90 100644 --- a/src/SumUp/ReadersClient.g.cs +++ b/src/SumUp/ReadersClient.g.cs @@ -298,15 +298,15 @@ public async Task> CreateCheckoutAsync /// /// Delete a reader. /// Short unique identifier for the merchant. - /// The unique identifier of the reader. + /// The unique identifier of the reader. /// Optional per-request overrides. /// Token used to cancel the request. - public ApiResponse Delete(string merchantCode, string id, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public ApiResponse Delete(string merchantCode, string readerId, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { - var request = _client.CreateRequest(HttpMethod.Delete, "/v0.1/merchants/{merchant_code}/readers/{id}", builder => + var request = _client.CreateRequest(HttpMethod.Delete, "/v0.1/merchants/{merchant_code}/readers/{reader_id}", builder => { builder.AddPath("merchant_code", merchantCode); - builder.AddPath("id", id); + builder.AddPath("reader_id", readerId); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); try @@ -347,15 +347,15 @@ public ApiResponse Delete(string merchantCode, string id, RequestO /// /// Delete a reader. /// Short unique identifier for the merchant. - /// The unique identifier of the reader. + /// The unique identifier of the reader. /// Optional per-request overrides. /// Token used to cancel the request. - public async Task> DeleteAsync(string merchantCode, string id, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public async Task> DeleteAsync(string merchantCode, string readerId, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { - var request = _client.CreateRequest(HttpMethod.Delete, "/v0.1/merchants/{merchant_code}/readers/{id}", builder => + var request = _client.CreateRequest(HttpMethod.Delete, "/v0.1/merchants/{merchant_code}/readers/{reader_id}", builder => { builder.AddPath("merchant_code", merchantCode); - builder.AddPath("id", id); + builder.AddPath("reader_id", readerId); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); try @@ -396,17 +396,17 @@ public async Task> DeleteAsync(string merchantCode, st /// /// Retrieve a Reader. /// Short unique identifier for the merchant. - /// The unique identifier of the reader. + /// The unique identifier of the reader. /// Query and header parameters for the request. /// Optional per-request overrides. /// Token used to cancel the request. - public ApiResponse Get(string merchantCode, string id, ReadersGetOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public ApiResponse Get(string merchantCode, string readerId, ReadersGetOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { var operationOptions = options ?? new ReadersGetOptions(); - var request = _client.CreateRequest(HttpMethod.Get, "/v0.1/merchants/{merchant_code}/readers/{id}", builder => + var request = _client.CreateRequest(HttpMethod.Get, "/v0.1/merchants/{merchant_code}/readers/{reader_id}", builder => { builder.AddPath("merchant_code", merchantCode); - builder.AddPath("id", id); + builder.AddPath("reader_id", readerId); builder.AddHeader("If-Modified-Since", operationOptions.IfModifiedSince); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); @@ -450,17 +450,17 @@ public ApiResponse Get(string merchantCode, string id, ReadersGetOptions /// /// Retrieve a Reader. /// Short unique identifier for the merchant. - /// The unique identifier of the reader. + /// The unique identifier of the reader. /// Query and header parameters for the request. /// Optional per-request overrides. /// Token used to cancel the request. - public async Task> GetAsync(string merchantCode, string id, ReadersGetOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public async Task> GetAsync(string merchantCode, string readerId, ReadersGetOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { var operationOptions = options ?? new ReadersGetOptions(); - var request = _client.CreateRequest(HttpMethod.Get, "/v0.1/merchants/{merchant_code}/readers/{id}", builder => + var request = _client.CreateRequest(HttpMethod.Get, "/v0.1/merchants/{merchant_code}/readers/{reader_id}", builder => { builder.AddPath("merchant_code", merchantCode); - builder.AddPath("id", id); + builder.AddPath("reader_id", readerId); builder.AddHeader("If-Modified-Since", operationOptions.IfModifiedSince); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); @@ -856,16 +856,16 @@ public async Task> TerminateCheckoutAsync(string merch /// /// Update a Reader. /// Short unique identifier for the merchant. - /// The unique identifier of the reader. + /// The unique identifier of the reader. /// Request body payload. /// Optional per-request overrides. /// Token used to cancel the request. - public ApiResponse Update(string merchantCode, string id, ReadersUpdateRequest body, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public ApiResponse Update(string merchantCode, string readerId, ReadersUpdateRequest body, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { - var request = _client.CreateRequest(new HttpMethod("PATCH"), "/v0.1/merchants/{merchant_code}/readers/{id}", builder => + var request = _client.CreateRequest(new HttpMethod("PATCH"), "/v0.1/merchants/{merchant_code}/readers/{reader_id}", builder => { builder.AddPath("merchant_code", merchantCode); - builder.AddPath("id", id); + builder.AddPath("reader_id", readerId); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); try @@ -917,16 +917,16 @@ public ApiResponse Update(string merchantCode, string id, ReadersUpdateR /// /// Update a Reader. /// Short unique identifier for the merchant. - /// The unique identifier of the reader. + /// The unique identifier of the reader. /// Request body payload. /// Optional per-request overrides. /// Token used to cancel the request. - public async Task> UpdateAsync(string merchantCode, string id, ReadersUpdateRequest body, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string merchantCode, string readerId, ReadersUpdateRequest body, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { - var request = _client.CreateRequest(new HttpMethod("PATCH"), "/v0.1/merchants/{merchant_code}/readers/{id}", builder => + var request = _client.CreateRequest(new HttpMethod("PATCH"), "/v0.1/merchants/{merchant_code}/readers/{reader_id}", builder => { builder.AddPath("merchant_code", merchantCode); - builder.AddPath("id", id); + builder.AddPath("reader_id", readerId); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); try diff --git a/src/SumUp/ReceiptsClient.g.cs b/src/SumUp/ReceiptsClient.g.cs index e27f401..b08b142 100644 --- a/src/SumUp/ReceiptsClient.g.cs +++ b/src/SumUp/ReceiptsClient.g.cs @@ -27,16 +27,16 @@ internal ReceiptsClient(ApiClient client) /// Retrieve receipt details /// /// Retrieves receipt specific data for a transaction. - /// SumUp unique transaction ID or transaction code, e.g. TS7HDYLSKD. + /// SumUp unique transaction ID or transaction code, e.g. TS7HDYLSKD. /// Query and header parameters for the request. /// Optional per-request overrides. /// Token used to cancel the request. - public ApiResponse Get(string id, ReceiptsGetOptions options, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public ApiResponse Get(string transactionId, ReceiptsGetOptions options, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { var operationOptions = options; - var request = _client.CreateRequest(HttpMethod.Get, "/v1.1/receipts/{id}", builder => + var request = _client.CreateRequest(HttpMethod.Get, "/v1.1/receipts/{transaction_id}", builder => { - builder.AddPath("id", id); + builder.AddPath("transaction_id", transactionId); builder.AddQuery("mid", operationOptions.Mid); builder.AddQuery("tx_event_id", operationOptions.TxEventId); }); @@ -90,16 +90,16 @@ public ApiResponse Get(string id, ReceiptsGetOptions options, RequestOp /// Retrieve receipt details /// /// Retrieves receipt specific data for a transaction. - /// SumUp unique transaction ID or transaction code, e.g. TS7HDYLSKD. + /// SumUp unique transaction ID or transaction code, e.g. TS7HDYLSKD. /// Query and header parameters for the request. /// Optional per-request overrides. /// Token used to cancel the request. - public async Task> GetAsync(string id, ReceiptsGetOptions options, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public async Task> GetAsync(string transactionId, ReceiptsGetOptions options, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { var operationOptions = options; - var request = _client.CreateRequest(HttpMethod.Get, "/v1.1/receipts/{id}", builder => + var request = _client.CreateRequest(HttpMethod.Get, "/v1.1/receipts/{transaction_id}", builder => { - builder.AddPath("id", id); + builder.AddPath("transaction_id", transactionId); builder.AddQuery("mid", operationOptions.Mid); builder.AddQuery("tx_event_id", operationOptions.TxEventId); }); diff --git a/src/SumUp/TransactionsClient.g.cs b/src/SumUp/TransactionsClient.g.cs index 47d7780..0df1356 100644 --- a/src/SumUp/TransactionsClient.g.cs +++ b/src/SumUp/TransactionsClient.g.cs @@ -287,16 +287,16 @@ public async Task> ListAsync(string mercha /// /// Refunds an identified transaction either in full or partially. /// Merchant code of the account that owns the payment to refund. - /// Unique ID of the transaction. + /// Unique ID of the transaction. /// Optional amount for partial refunds. /// Optional per-request overrides. /// Token used to cancel the request. - public ApiResponse Refund(string merchantCode, string id, TransactionsRefundRequest? body = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public ApiResponse Refund(string merchantCode, string transactionId, TransactionsRefundRequest? body = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { - var request = _client.CreateRequest(HttpMethod.Post, "/v1.0/merchants/{merchant_code}/payments/{id}/refunds", builder => + var request = _client.CreateRequest(HttpMethod.Post, "/v1.0/merchants/{merchant_code}/payments/{transaction_id}/refunds", builder => { builder.AddPath("merchant_code", merchantCode); - builder.AddPath("id", id); + builder.AddPath("transaction_id", transactionId); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); try @@ -346,16 +346,16 @@ public ApiResponse Refund(string merchantCode, string id, Transact /// /// Refunds an identified transaction either in full or partially. /// Merchant code of the account that owns the payment to refund. - /// Unique ID of the transaction. + /// Unique ID of the transaction. /// Optional amount for partial refunds. /// Optional per-request overrides. /// Token used to cancel the request. - public async Task> RefundAsync(string merchantCode, string id, TransactionsRefundRequest? body = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + public async Task> RefundAsync(string merchantCode, string transactionId, TransactionsRefundRequest? body = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) { - var request = _client.CreateRequest(HttpMethod.Post, "/v1.0/merchants/{merchant_code}/payments/{id}/refunds", builder => + var request = _client.CreateRequest(HttpMethod.Post, "/v1.0/merchants/{merchant_code}/payments/{transaction_id}/refunds", builder => { builder.AddPath("merchant_code", merchantCode); - builder.AddPath("id", id); + builder.AddPath("transaction_id", transactionId); }); var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope); try