devdraft 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +160 -191
- data/Rakefile +2 -0
- data/devdraft-1.0.0.gem +0 -0
- data/{devdraft_ai_sdk.gemspec → devdraft.gemspec} +15 -11
- data/docs/APIHealthApi.md +82 -30
- data/docs/AggregatedBalanceResponse.md +19 -6
- data/docs/AllBalancesResponse.md +19 -6
- data/docs/AppBalancesApi.md +125 -65
- data/docs/BridgeFiatPaymentRail.md +15 -0
- data/docs/BridgePaymentRail.md +12 -3
- data/docs/CreateBankPaymentIntentDto.md +49 -21
- data/docs/CreateCustomerDto.md +25 -9
- data/docs/CreateDirectBankTransferDto.md +29 -11
- data/docs/CreateDirectWalletTransferDto.md +21 -7
- data/docs/CreateExternalBankTransferDto.md +40 -0
- data/docs/CreateExternalStablecoinTransferDto.md +28 -0
- data/docs/CreateInvoiceDto.md +45 -19
- data/docs/CreateLiquidationAddressDto.md +43 -18
- data/docs/CreatePaymentLinkDto.md +53 -28
- data/docs/CreateStablePaymentIntentDto.md +43 -18
- data/docs/CreateStablecoinConversionDto.md +23 -8
- data/docs/CreateTaxDto.md +26 -0
- data/docs/CreateWebhookDto.md +23 -8
- data/docs/CustomerStatus.md +12 -3
- data/docs/CustomerType.md +15 -0
- data/docs/CustomersApi.md +187 -114
- data/docs/DestinationCurrency.md +12 -3
- data/docs/ExchangeRateResponseDto.md +25 -9
- data/docs/ExchangeRatesApi.md +130 -72
- data/docs/FiatCurrency.md +12 -3
- data/docs/HealthResponseDto.md +25 -9
- data/docs/InvoiceProductDto.md +17 -5
- data/docs/InvoicesApi.md +177 -104
- data/docs/LiquidationAddressResponseDto.md +41 -17
- data/docs/LiquidationAddressesApi.md +115 -61
- data/docs/PaymentIntentsApi.md +93 -57
- data/docs/PaymentLinkProductDto.md +17 -5
- data/docs/PaymentLinksApi.md +175 -102
- data/docs/PaymentRequestDto.md +21 -7
- data/docs/PaymentResponseDto.md +23 -8
- data/docs/ProductsApi.md +307 -194
- data/docs/PublicHealthResponseDto.md +19 -6
- data/docs/RefundResponseDto.md +23 -8
- data/docs/StableCoinCurrency.md +12 -3
- data/docs/TaxControllerCreate201Response.md +30 -0
- data/docs/TaxControllerDeleteWithoutId400Response.md +22 -0
- data/docs/TaxControllerUpdateWithoutId400Response.md +22 -0
- data/docs/TaxesApi.md +374 -122
- data/docs/TestPaymentsApi.md +150 -60
- data/docs/TransfersApi.md +274 -72
- data/docs/UpdateCustomerDto.md +25 -9
- data/docs/UpdateTaxDto.md +26 -0
- data/docs/UpdateWebhookDto.md +23 -8
- data/docs/WalletsApi.md +44 -24
- data/docs/WebhookResponseDto.md +29 -11
- data/docs/WebhooksApi.md +225 -134
- data/git_push.sh +41 -28
- data/lib/devdraft/api/api_health_api.rb +32 -16
- data/lib/devdraft/api/app_balances_api.rb +45 -22
- data/lib/devdraft/api/customers_api.rb +124 -71
- data/lib/devdraft/api/exchange_rates_api.rb +49 -26
- data/lib/devdraft/api/invoices_api.rb +89 -53
- data/lib/devdraft/api/liquidation_addresses_api.rb +70 -44
- data/lib/devdraft/api/payment_intents_api.rb +62 -40
- data/lib/devdraft/api/payment_links_api.rb +85 -49
- data/lib/devdraft/api/products_api.rb +214 -216
- data/lib/devdraft/api/taxes_api.rb +257 -66
- data/lib/devdraft/api/test_payments_api.rb +70 -44
- data/lib/devdraft/api/transfers_api.rb +206 -46
- data/lib/devdraft/api/wallets_api.rb +18 -9
- data/lib/devdraft/api/webhooks_api.rb +109 -66
- data/lib/devdraft/api_client.rb +76 -71
- data/lib/devdraft/api_error.rb +5 -4
- data/lib/devdraft/api_model_base.rb +88 -0
- data/lib/devdraft/configuration.rb +121 -18
- data/lib/devdraft/models/aggregated_balance_response.rb +68 -101
- data/lib/devdraft/models/all_balances_response.rb +76 -99
- data/lib/devdraft/models/bridge_fiat_payment_rail.rb +45 -0
- data/lib/devdraft/models/bridge_payment_rail.rb +36 -24
- data/lib/devdraft/models/create_bank_payment_intent_dto.rb +191 -114
- data/lib/devdraft/models/create_customer_dto.rb +123 -113
- data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +105 -104
- data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +89 -100
- data/lib/devdraft/models/create_external_bank_transfer_dto.rb +505 -0
- data/lib/devdraft/models/create_external_stablecoin_transfer_dto.rb +266 -0
- data/lib/devdraft/models/create_invoice_dto.rb +151 -121
- data/lib/devdraft/models/create_liquidation_address_dto.rb +195 -115
- data/lib/devdraft/models/create_payment_link_dto.rb +192 -214
- data/lib/devdraft/models/create_stable_payment_intent_dto.rb +324 -111
- data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +102 -101
- data/lib/devdraft/models/create_tax_dto.rb +281 -0
- data/lib/devdraft/models/create_webhook_dto.rb +104 -101
- data/lib/devdraft/models/customer_status.rb +23 -10
- data/lib/devdraft/models/customer_type.rb +45 -0
- data/lib/devdraft/models/destination_currency.rb +27 -15
- data/lib/devdraft/models/exchange_rate_response_dto.rb +103 -102
- data/lib/devdraft/models/fiat_currency.rb +22 -10
- data/lib/devdraft/models/health_response_dto.rb +99 -106
- data/lib/devdraft/models/invoice_product_dto.rb +63 -98
- data/lib/devdraft/models/liquidation_address_response_dto.rb +147 -110
- data/lib/devdraft/models/payment_link_product_dto.rb +70 -98
- data/lib/devdraft/models/payment_request_dto.rb +77 -100
- data/lib/devdraft/models/payment_response_dto.rb +102 -101
- data/lib/devdraft/models/public_health_response_dto.rb +68 -101
- data/lib/devdraft/models/refund_response_dto.rb +102 -101
- data/lib/devdraft/models/stable_coin_currency.rb +21 -9
- data/lib/devdraft/models/tax_controller_create201_response.rb +201 -0
- data/lib/devdraft/models/tax_controller_delete_without_id400_response.rb +165 -0
- data/lib/devdraft/models/tax_controller_update_without_id400_response.rb +165 -0
- data/lib/devdraft/models/update_customer_dto.rb +117 -113
- data/lib/devdraft/models/update_tax_dto.rb +256 -0
- data/lib/devdraft/models/update_webhook_dto.rb +70 -101
- data/lib/devdraft/models/webhook_response_dto.rb +140 -103
- data/lib/devdraft/version.rb +6 -5
- data/lib/devdraft.rb +18 -27
- data/spec/api/api_health_api_spec.rb +10 -9
- data/spec/api/app_balances_api_spec.rb +11 -10
- data/spec/api/customers_api_spec.rb +25 -24
- data/spec/api/exchange_rates_api_spec.rb +11 -10
- data/spec/api/invoices_api_spec.rb +16 -15
- data/spec/api/liquidation_addresses_api_spec.rb +13 -12
- data/spec/api/payment_intents_api_spec.rb +12 -11
- data/spec/api/payment_links_api_spec.rb +14 -13
- data/spec/api/products_api_spec.rb +41 -40
- data/spec/api/taxes_api_spec.rb +51 -21
- data/spec/api/test_payments_api_spec.rb +14 -13
- data/spec/api/transfers_api_spec.rb +36 -13
- data/spec/api/wallets_api_spec.rb +9 -8
- data/spec/api/webhooks_api_spec.rb +20 -19
- data/spec/models/aggregated_balance_response_spec.rb +15 -19
- data/spec/models/all_balances_response_spec.rb +14 -18
- data/spec/models/bridge_fiat_payment_rail_spec.rb +30 -0
- data/spec/models/bridge_payment_rail_spec.rb +11 -15
- data/spec/models/create_bank_payment_intent_dto_spec.rb +29 -33
- data/spec/models/create_customer_dto_spec.rb +17 -25
- data/spec/models/create_direct_bank_transfer_dto_spec.rb +19 -23
- data/spec/models/create_direct_wallet_transfer_dto_spec.rb +15 -19
- data/spec/models/create_external_bank_transfer_dto_spec.rb +102 -0
- data/spec/models/create_external_stablecoin_transfer_dto_spec.rb +66 -0
- data/spec/models/create_invoice_dto_spec.rb +31 -35
- data/spec/models/create_liquidation_address_dto_spec.rb +28 -32
- data/spec/models/create_payment_link_dto_spec.rb +34 -76
- data/spec/models/create_stable_payment_intent_dto_spec.rb +26 -30
- data/spec/models/create_stablecoin_conversion_dto_spec.rb +16 -20
- data/spec/models/create_tax_dto_spec.rb +60 -0
- data/spec/models/create_webhook_dto_spec.rb +16 -20
- data/spec/models/customer_status_spec.rb +11 -15
- data/spec/models/customer_type_spec.rb +30 -0
- data/spec/models/destination_currency_spec.rb +11 -15
- data/spec/models/exchange_rate_response_dto_spec.rb +17 -21
- data/spec/models/fiat_currency_spec.rb +11 -15
- data/spec/models/health_response_dto_spec.rb +19 -23
- data/spec/models/invoice_product_dto_spec.rb +13 -17
- data/spec/models/liquidation_address_response_dto_spec.rb +25 -29
- data/spec/models/payment_link_product_dto_spec.rb +13 -17
- data/spec/models/payment_request_dto_spec.rb +15 -19
- data/spec/models/payment_response_dto_spec.rb +16 -20
- data/spec/models/public_health_response_dto_spec.rb +15 -19
- data/spec/models/refund_response_dto_spec.rb +16 -20
- data/spec/models/stable_coin_currency_spec.rb +11 -15
- data/spec/models/tax_controller_create201_response_spec.rb +72 -0
- data/spec/models/tax_controller_delete_without_id400_response_spec.rb +48 -0
- data/spec/models/tax_controller_update_without_id400_response_spec.rb +48 -0
- data/spec/models/update_customer_dto_spec.rb +17 -25
- data/spec/models/update_tax_dto_spec.rb +60 -0
- data/spec/models/update_webhook_dto_spec.rb +16 -20
- data/spec/models/webhook_response_dto_spec.rb +19 -23
- data/spec/spec_helper.rb +5 -4
- metadata +49 -116
- data/docs/AllOfAllBalancesResponseEurc.md +0 -9
- data/docs/AllOfAllBalancesResponseUsdc.md +0 -9
- data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +0 -6
- data/docs/AllOfCreateCustomerDtoStatus.md +0 -6
- data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +0 -6
- data/docs/AllOfUpdateCustomerDtoStatus.md +0 -6
- data/docs/CreateProductDto.md +0 -18
- data/docs/CreateTaxInput.md +0 -6
- data/docs/UpdatePaymentLinkDto.md +0 -6
- data/docs/UpdatePreferenceInput.md +0 -6
- data/docs/UpdateProductDto.md +0 -18
- data/docs/UpdateTaxInput.md +0 -6
- data/example.rb +0 -94
- data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +0 -283
- data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +0 -283
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +0 -202
- data/lib/devdraft/models/all_of_create_customer_dto_status.rb +0 -202
- data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +0 -202
- data/lib/devdraft/models/all_of_update_customer_dto_status.rb +0 -202
- data/lib/devdraft/models/create_product_dto.rb +0 -370
- data/lib/devdraft/models/create_tax_input.rb +0 -197
- data/lib/devdraft/models/update_payment_link_dto.rb +0 -197
- data/lib/devdraft/models/update_preference_input.rb +0 -197
- data/lib/devdraft/models/update_product_dto.rb +0 -355
- data/lib/devdraft/models/update_tax_input.rb +0 -197
- data/spec/api_client_spec.rb +0 -225
- data/spec/base_object_spec.rb +0 -109
- data/spec/configuration_spec.rb +0 -41
- data/spec/models/all_of_all_balances_response_eurc_spec.rb +0 -56
- data/spec/models/all_of_all_balances_response_usdc_spec.rb +0 -56
- data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +0 -34
- data/spec/models/all_of_create_customer_dto_status_spec.rb +0 -34
- data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +0 -34
- data/spec/models/all_of_update_customer_dto_status_spec.rb +0 -34
- data/spec/models/create_product_dto_spec.rb +0 -110
- data/spec/models/create_tax_input_spec.rb +0 -34
- data/spec/models/update_payment_link_dto_spec.rb +0 -34
- data/spec/models/update_preference_input_spec.rb +0 -34
- data/spec/models/update_product_dto_spec.rb +0 -110
- data/spec/models/update_tax_input_spec.rb +0 -34
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
# A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
|
|
5
5
|
|
|
6
|
-
OpenAPI
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0
|
|
7
10
|
|
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 3.0.65
|
|
10
11
|
=end
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Devdraft
|
|
13
16
|
class TestPaymentsApi
|
|
14
17
|
attr_accessor :api_client
|
|
15
18
|
|
|
@@ -18,33 +21,33 @@ module DevDraftAI
|
|
|
18
21
|
end
|
|
19
22
|
# Process a test payment
|
|
20
23
|
# Creates a new payment. Requires an idempotency key to prevent duplicate payments on retry. ## Idempotency Key Best Practices 1. **Generate unique keys**: Use UUIDs or similar unique identifiers, prefixed with a descriptive operation name 2. **Store keys client-side**: Save the key with the original request so you can retry with the same key 3. **Key format**: Between 6-64 alphanumeric characters 4. **Expiration**: Keys expire after 24 hours by default 5. **Use case**: Perfect for ensuring payment operations are never processed twice, even during network failures ## Example Request (curl) ```bash curl -X POST \\ https://api.example.com/rest-api/v0/test-payment \\ -H 'Content-Type: application/json' \\ -H 'Client-Key: your-api-key' \\ -H 'Client-Secret: your-api-secret' \\ -H 'Idempotency-Key: payment_123456_unique_key' \\ -d '{ \"amount\": 100.00, \"currency\": \"USD\", \"description\": \"Test payment for order #12345\", \"customerId\": \"cus_12345\" }' ``` ## Example Response (First Request) ```json { \"id\": \"pay_abc123xyz456\", \"amount\": 100.00, \"currency\": \"USD\", \"status\": \"succeeded\", \"timestamp\": \"2023-07-01T12:00:00.000Z\" } ``` ## Example Response (Duplicate Request) The exact same response will be returned for any duplicate request with the same idempotency key, without creating a new payment. ## Retry Scenario Example Network failure during payment submission: 1. Client creates payment request with idempotency key: \"payment_123456_unique_key\" 2. Request begins processing, but network connection fails before response received 3. Client retries the exact same request with the same idempotency key 4. Server detects duplicate idempotency key and returns the result of the first request 5. No duplicate payment is created If you retry with same key but different parameters (e.g., different amount), you'll receive a 409 Conflict error.
|
|
21
|
-
# @param
|
|
22
|
-
# @param
|
|
24
|
+
# @param idempotency_key [String] Unique key to ensure the request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
|
|
25
|
+
# @param payment_request_dto [PaymentRequestDto]
|
|
23
26
|
# @param [Hash] opts the optional parameters
|
|
24
27
|
# @return [PaymentResponseDto]
|
|
25
|
-
def test_payment_controller_create_payment_v0(
|
|
26
|
-
data, _status_code, _headers = test_payment_controller_create_payment_v0_with_http_info(
|
|
28
|
+
def test_payment_controller_create_payment_v0(idempotency_key, payment_request_dto, opts = {})
|
|
29
|
+
data, _status_code, _headers = test_payment_controller_create_payment_v0_with_http_info(idempotency_key, payment_request_dto, opts)
|
|
27
30
|
data
|
|
28
31
|
end
|
|
29
32
|
|
|
30
33
|
# Process a test payment
|
|
31
|
-
# Creates a new payment. Requires an idempotency key to prevent duplicate payments on retry. ## Idempotency Key Best Practices 1. **Generate unique keys**: Use UUIDs or similar unique identifiers, prefixed with a descriptive operation name 2. **Store keys client-side**: Save the key with the original request so you can retry with the same key 3. **Key format**: Between 6-64 alphanumeric characters 4. **Expiration**: Keys expire after 24 hours by default 5. **Use case**: Perfect for ensuring payment operations are never processed twice, even during network failures ## Example Request (curl) ```bash curl -X POST \\ https://api.example.com/rest-api/v0/test-payment \\ -H &#
|
|
32
|
-
# @param
|
|
33
|
-
# @param
|
|
34
|
+
# Creates a new payment. Requires an idempotency key to prevent duplicate payments on retry. ## Idempotency Key Best Practices 1. **Generate unique keys**: Use UUIDs or similar unique identifiers, prefixed with a descriptive operation name 2. **Store keys client-side**: Save the key with the original request so you can retry with the same key 3. **Key format**: Between 6-64 alphanumeric characters 4. **Expiration**: Keys expire after 24 hours by default 5. **Use case**: Perfect for ensuring payment operations are never processed twice, even during network failures ## Example Request (curl) ```bash curl -X POST \\ https://api.example.com/rest-api/v0/test-payment \\ -H 'Content-Type: application/json' \\ -H 'Client-Key: your-api-key' \\ -H 'Client-Secret: your-api-secret' \\ -H 'Idempotency-Key: payment_123456_unique_key' \\ -d '{ \"amount\": 100.00, \"currency\": \"USD\", \"description\": \"Test payment for order #12345\", \"customerId\": \"cus_12345\" }' ``` ## Example Response (First Request) ```json { \"id\": \"pay_abc123xyz456\", \"amount\": 100.00, \"currency\": \"USD\", \"status\": \"succeeded\", \"timestamp\": \"2023-07-01T12:00:00.000Z\" } ``` ## Example Response (Duplicate Request) The exact same response will be returned for any duplicate request with the same idempotency key, without creating a new payment. ## Retry Scenario Example Network failure during payment submission: 1. Client creates payment request with idempotency key: \"payment_123456_unique_key\" 2. Request begins processing, but network connection fails before response received 3. Client retries the exact same request with the same idempotency key 4. Server detects duplicate idempotency key and returns the result of the first request 5. No duplicate payment is created If you retry with same key but different parameters (e.g., different amount), you'll receive a 409 Conflict error.
|
|
35
|
+
# @param idempotency_key [String] Unique key to ensure the request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
|
|
36
|
+
# @param payment_request_dto [PaymentRequestDto]
|
|
34
37
|
# @param [Hash] opts the optional parameters
|
|
35
38
|
# @return [Array<(PaymentResponseDto, Integer, Hash)>] PaymentResponseDto data, response status code and response headers
|
|
36
|
-
def test_payment_controller_create_payment_v0_with_http_info(
|
|
39
|
+
def test_payment_controller_create_payment_v0_with_http_info(idempotency_key, payment_request_dto, opts = {})
|
|
37
40
|
if @api_client.config.debugging
|
|
38
41
|
@api_client.config.logger.debug 'Calling API: TestPaymentsApi.test_payment_controller_create_payment_v0 ...'
|
|
39
42
|
end
|
|
40
|
-
# verify the required parameter 'body' is set
|
|
41
|
-
if @api_client.config.client_side_validation && body.nil?
|
|
42
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling TestPaymentsApi.test_payment_controller_create_payment_v0"
|
|
43
|
-
end
|
|
44
43
|
# verify the required parameter 'idempotency_key' is set
|
|
45
44
|
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
46
45
|
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling TestPaymentsApi.test_payment_controller_create_payment_v0"
|
|
47
46
|
end
|
|
47
|
+
# verify the required parameter 'payment_request_dto' is set
|
|
48
|
+
if @api_client.config.client_side_validation && payment_request_dto.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'payment_request_dto' when calling TestPaymentsApi.test_payment_controller_create_payment_v0"
|
|
50
|
+
end
|
|
48
51
|
# resource path
|
|
49
52
|
local_var_path = '/api/v0/test-payment'
|
|
50
53
|
|
|
@@ -54,35 +57,45 @@ module DevDraftAI
|
|
|
54
57
|
# header parameters
|
|
55
58
|
header_params = opts[:header_params] || {}
|
|
56
59
|
# HTTP header 'Accept' (if needed)
|
|
57
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
58
61
|
# HTTP header 'Content-Type'
|
|
59
|
-
|
|
62
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
63
|
+
if !content_type.nil?
|
|
64
|
+
header_params['Content-Type'] = content_type
|
|
65
|
+
end
|
|
60
66
|
header_params[:'idempotency-key'] = idempotency_key
|
|
61
67
|
|
|
62
68
|
# form parameters
|
|
63
69
|
form_params = opts[:form_params] || {}
|
|
64
70
|
|
|
65
71
|
# http body (model)
|
|
66
|
-
post_body = opts[:
|
|
72
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_request_dto)
|
|
67
73
|
|
|
68
|
-
|
|
74
|
+
# return_type
|
|
75
|
+
return_type = opts[:debug_return_type] || 'PaymentResponseDto'
|
|
69
76
|
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
# auth_names
|
|
78
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
79
|
+
|
|
80
|
+
new_options = opts.merge(
|
|
81
|
+
:operation => :"TestPaymentsApi.test_payment_controller_create_payment_v0",
|
|
72
82
|
:header_params => header_params,
|
|
73
83
|
:query_params => query_params,
|
|
74
84
|
:form_params => form_params,
|
|
75
85
|
:body => post_body,
|
|
76
86
|
:auth_names => auth_names,
|
|
77
|
-
:return_type => return_type
|
|
87
|
+
:return_type => return_type
|
|
88
|
+
)
|
|
78
89
|
|
|
90
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
79
91
|
if @api_client.config.debugging
|
|
80
92
|
@api_client.config.logger.debug "API called: TestPaymentsApi#test_payment_controller_create_payment_v0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
93
|
end
|
|
82
94
|
return data, status_code, headers
|
|
83
95
|
end
|
|
96
|
+
|
|
84
97
|
# Get payment details by ID
|
|
85
|
-
# @param id Payment ID
|
|
98
|
+
# @param id [String] Payment ID
|
|
86
99
|
# @param [Hash] opts the optional parameters
|
|
87
100
|
# @return [PaymentResponseDto]
|
|
88
101
|
def test_payment_controller_get_payment_v0(id, opts = {})
|
|
@@ -91,7 +104,7 @@ module DevDraftAI
|
|
|
91
104
|
end
|
|
92
105
|
|
|
93
106
|
# Get payment details by ID
|
|
94
|
-
# @param id Payment ID
|
|
107
|
+
# @param id [String] Payment ID
|
|
95
108
|
# @param [Hash] opts the optional parameters
|
|
96
109
|
# @return [Array<(PaymentResponseDto, Integer, Hash)>] PaymentResponseDto data, response status code and response headers
|
|
97
110
|
def test_payment_controller_get_payment_v0_with_http_info(id, opts = {})
|
|
@@ -103,7 +116,7 @@ module DevDraftAI
|
|
|
103
116
|
fail ArgumentError, "Missing the required parameter 'id' when calling TestPaymentsApi.test_payment_controller_get_payment_v0"
|
|
104
117
|
end
|
|
105
118
|
# resource path
|
|
106
|
-
local_var_path = '/api/v0/test-payment/{id}'.sub('{' + 'id' + '}', id.to_s)
|
|
119
|
+
local_var_path = '/api/v0/test-payment/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
107
120
|
|
|
108
121
|
# query parameters
|
|
109
122
|
query_params = opts[:query_params] || {}
|
|
@@ -111,34 +124,41 @@ module DevDraftAI
|
|
|
111
124
|
# header parameters
|
|
112
125
|
header_params = opts[:header_params] || {}
|
|
113
126
|
# HTTP header 'Accept' (if needed)
|
|
114
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
127
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
115
128
|
|
|
116
129
|
# form parameters
|
|
117
130
|
form_params = opts[:form_params] || {}
|
|
118
131
|
|
|
119
132
|
# http body (model)
|
|
120
|
-
post_body = opts[:
|
|
133
|
+
post_body = opts[:debug_body]
|
|
134
|
+
|
|
135
|
+
# return_type
|
|
136
|
+
return_type = opts[:debug_return_type] || 'PaymentResponseDto'
|
|
121
137
|
|
|
122
|
-
|
|
138
|
+
# auth_names
|
|
139
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
123
140
|
|
|
124
|
-
|
|
125
|
-
|
|
141
|
+
new_options = opts.merge(
|
|
142
|
+
:operation => :"TestPaymentsApi.test_payment_controller_get_payment_v0",
|
|
126
143
|
:header_params => header_params,
|
|
127
144
|
:query_params => query_params,
|
|
128
145
|
:form_params => form_params,
|
|
129
146
|
:body => post_body,
|
|
130
147
|
:auth_names => auth_names,
|
|
131
|
-
:return_type => return_type
|
|
148
|
+
:return_type => return_type
|
|
149
|
+
)
|
|
132
150
|
|
|
151
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
133
152
|
if @api_client.config.debugging
|
|
134
153
|
@api_client.config.logger.debug "API called: TestPaymentsApi#test_payment_controller_get_payment_v0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
135
154
|
end
|
|
136
155
|
return data, status_code, headers
|
|
137
156
|
end
|
|
157
|
+
|
|
138
158
|
# Refund a payment
|
|
139
159
|
# Refunds an existing payment. Requires an idempotency key to prevent duplicate refunds on retry. ## Idempotency Key Benefits for Refunds Refunds are critical financial operations where duplicates can cause serious issues. Using idempotency keys ensures: 1. **Prevent duplicate refunds**: Even if a request times out or fails, retrying with the same key won't issue multiple refunds 2. **Safe retries**: Network failures or timeouts won't risk creating multiple refunds 3. **Consistent response**: Always get the same response for the same operation ## Example Request (curl) ```bash curl -X POST \\ https://api.example.com/rest-api/v0/test-payment/pay_abc123xyz456/refund \\ -H 'Content-Type: application/json' \\ -H 'Client-Key: your-api-key' \\ -H 'Client-Secret: your-api-secret' \\ -H 'Idempotency-Key: refund_123456_unique_key' ``` ## Example Response (First Request) ```json { \"id\": \"ref_xyz789\", \"paymentId\": \"pay_abc123xyz456\", \"amount\": 100.00, \"status\": \"succeeded\", \"timestamp\": \"2023-07-01T14:30:00.000Z\" } ``` ## Example Response (Duplicate Request) The exact same response will be returned for any duplicate request with the same idempotency key, without creating a new refund. ## Idempotency Key Guidelines - Use a unique key for each distinct refund operation - Store keys client-side to ensure you can retry with the same key if needed - Keys expire after 24 hours by default
|
|
140
|
-
# @param id Payment ID to refund
|
|
141
|
-
# @param idempotency_key Unique key to ensure the refund request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
|
|
160
|
+
# @param id [String] Payment ID to refund
|
|
161
|
+
# @param idempotency_key [String] Unique key to ensure the refund request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
|
|
142
162
|
# @param [Hash] opts the optional parameters
|
|
143
163
|
# @return [RefundResponseDto]
|
|
144
164
|
def test_payment_controller_refund_payment_v0(id, idempotency_key, opts = {})
|
|
@@ -147,9 +167,9 @@ module DevDraftAI
|
|
|
147
167
|
end
|
|
148
168
|
|
|
149
169
|
# Refund a payment
|
|
150
|
-
# Refunds an existing payment. Requires an idempotency key to prevent duplicate refunds on retry. ## Idempotency Key Benefits for Refunds Refunds are critical financial operations where duplicates can cause serious issues. Using idempotency keys ensures: 1. **Prevent duplicate refunds**: Even if a request times out or fails, retrying with the same key won&#
|
|
151
|
-
# @param id Payment ID to refund
|
|
152
|
-
# @param idempotency_key Unique key to ensure the refund request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
|
|
170
|
+
# Refunds an existing payment. Requires an idempotency key to prevent duplicate refunds on retry. ## Idempotency Key Benefits for Refunds Refunds are critical financial operations where duplicates can cause serious issues. Using idempotency keys ensures: 1. **Prevent duplicate refunds**: Even if a request times out or fails, retrying with the same key won't issue multiple refunds 2. **Safe retries**: Network failures or timeouts won't risk creating multiple refunds 3. **Consistent response**: Always get the same response for the same operation ## Example Request (curl) ```bash curl -X POST \\ https://api.example.com/rest-api/v0/test-payment/pay_abc123xyz456/refund \\ -H 'Content-Type: application/json' \\ -H 'Client-Key: your-api-key' \\ -H 'Client-Secret: your-api-secret' \\ -H 'Idempotency-Key: refund_123456_unique_key' ``` ## Example Response (First Request) ```json { \"id\": \"ref_xyz789\", \"paymentId\": \"pay_abc123xyz456\", \"amount\": 100.00, \"status\": \"succeeded\", \"timestamp\": \"2023-07-01T14:30:00.000Z\" } ``` ## Example Response (Duplicate Request) The exact same response will be returned for any duplicate request with the same idempotency key, without creating a new refund. ## Idempotency Key Guidelines - Use a unique key for each distinct refund operation - Store keys client-side to ensure you can retry with the same key if needed - Keys expire after 24 hours by default
|
|
171
|
+
# @param id [String] Payment ID to refund
|
|
172
|
+
# @param idempotency_key [String] Unique key to ensure the refund request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
|
|
153
173
|
# @param [Hash] opts the optional parameters
|
|
154
174
|
# @return [Array<(RefundResponseDto, Integer, Hash)>] RefundResponseDto data, response status code and response headers
|
|
155
175
|
def test_payment_controller_refund_payment_v0_with_http_info(id, idempotency_key, opts = {})
|
|
@@ -165,7 +185,7 @@ module DevDraftAI
|
|
|
165
185
|
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling TestPaymentsApi.test_payment_controller_refund_payment_v0"
|
|
166
186
|
end
|
|
167
187
|
# resource path
|
|
168
|
-
local_var_path = '/api/v0/test-payment/{id}/refund'.sub('{' + 'id' + '}', id.to_s)
|
|
188
|
+
local_var_path = '/api/v0/test-payment/{id}/refund'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
169
189
|
|
|
170
190
|
# query parameters
|
|
171
191
|
query_params = opts[:query_params] || {}
|
|
@@ -173,26 +193,32 @@ module DevDraftAI
|
|
|
173
193
|
# header parameters
|
|
174
194
|
header_params = opts[:header_params] || {}
|
|
175
195
|
# HTTP header 'Accept' (if needed)
|
|
176
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
196
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
177
197
|
header_params[:'idempotency-key'] = idempotency_key
|
|
178
198
|
|
|
179
199
|
# form parameters
|
|
180
200
|
form_params = opts[:form_params] || {}
|
|
181
201
|
|
|
182
202
|
# http body (model)
|
|
183
|
-
post_body = opts[:
|
|
203
|
+
post_body = opts[:debug_body]
|
|
204
|
+
|
|
205
|
+
# return_type
|
|
206
|
+
return_type = opts[:debug_return_type] || 'RefundResponseDto'
|
|
184
207
|
|
|
185
|
-
|
|
208
|
+
# auth_names
|
|
209
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
186
210
|
|
|
187
|
-
|
|
188
|
-
|
|
211
|
+
new_options = opts.merge(
|
|
212
|
+
:operation => :"TestPaymentsApi.test_payment_controller_refund_payment_v0",
|
|
189
213
|
:header_params => header_params,
|
|
190
214
|
:query_params => query_params,
|
|
191
215
|
:form_params => form_params,
|
|
192
216
|
:body => post_body,
|
|
193
217
|
:auth_names => auth_names,
|
|
194
|
-
:return_type => return_type
|
|
218
|
+
:return_type => return_type
|
|
219
|
+
)
|
|
195
220
|
|
|
221
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
196
222
|
if @api_client.config.debugging
|
|
197
223
|
@api_client.config.logger.debug "API called: TestPaymentsApi#test_payment_controller_refund_payment_v0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
198
224
|
end
|
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
# A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
|
|
5
5
|
|
|
6
|
-
OpenAPI
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0
|
|
7
10
|
|
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 3.0.65
|
|
10
11
|
=end
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Devdraft
|
|
13
16
|
class TransfersApi
|
|
14
17
|
attr_accessor :api_client
|
|
15
18
|
|
|
@@ -17,25 +20,25 @@ module DevDraftAI
|
|
|
17
20
|
@api_client = api_client
|
|
18
21
|
end
|
|
19
22
|
# Create a direct bank transfer
|
|
20
|
-
# @param
|
|
23
|
+
# @param create_direct_bank_transfer_dto [CreateDirectBankTransferDto]
|
|
21
24
|
# @param [Hash] opts the optional parameters
|
|
22
25
|
# @return [nil]
|
|
23
|
-
def transfer_controller_create_direct_bank_transfer(
|
|
24
|
-
transfer_controller_create_direct_bank_transfer_with_http_info(
|
|
26
|
+
def transfer_controller_create_direct_bank_transfer(create_direct_bank_transfer_dto, opts = {})
|
|
27
|
+
transfer_controller_create_direct_bank_transfer_with_http_info(create_direct_bank_transfer_dto, opts)
|
|
25
28
|
nil
|
|
26
29
|
end
|
|
27
30
|
|
|
28
31
|
# Create a direct bank transfer
|
|
29
|
-
# @param
|
|
32
|
+
# @param create_direct_bank_transfer_dto [CreateDirectBankTransferDto]
|
|
30
33
|
# @param [Hash] opts the optional parameters
|
|
31
34
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
32
|
-
def transfer_controller_create_direct_bank_transfer_with_http_info(
|
|
35
|
+
def transfer_controller_create_direct_bank_transfer_with_http_info(create_direct_bank_transfer_dto, opts = {})
|
|
33
36
|
if @api_client.config.debugging
|
|
34
37
|
@api_client.config.logger.debug 'Calling API: TransfersApi.transfer_controller_create_direct_bank_transfer ...'
|
|
35
38
|
end
|
|
36
|
-
# verify the required parameter '
|
|
37
|
-
if @api_client.config.client_side_validation &&
|
|
38
|
-
fail ArgumentError, "Missing the required parameter '
|
|
39
|
+
# verify the required parameter 'create_direct_bank_transfer_dto' is set
|
|
40
|
+
if @api_client.config.client_side_validation && create_direct_bank_transfer_dto.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'create_direct_bank_transfer_dto' when calling TransfersApi.transfer_controller_create_direct_bank_transfer"
|
|
39
42
|
end
|
|
40
43
|
# resource path
|
|
41
44
|
local_var_path = '/api/v0/transfers/direct-bank'
|
|
@@ -46,50 +49,60 @@ module DevDraftAI
|
|
|
46
49
|
# header parameters
|
|
47
50
|
header_params = opts[:header_params] || {}
|
|
48
51
|
# HTTP header 'Content-Type'
|
|
49
|
-
|
|
52
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
53
|
+
if !content_type.nil?
|
|
54
|
+
header_params['Content-Type'] = content_type
|
|
55
|
+
end
|
|
50
56
|
|
|
51
57
|
# form parameters
|
|
52
58
|
form_params = opts[:form_params] || {}
|
|
53
59
|
|
|
54
60
|
# http body (model)
|
|
55
|
-
post_body = opts[:
|
|
61
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_direct_bank_transfer_dto)
|
|
56
62
|
|
|
57
|
-
|
|
63
|
+
# return_type
|
|
64
|
+
return_type = opts[:debug_return_type]
|
|
58
65
|
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
# auth_names
|
|
67
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
68
|
+
|
|
69
|
+
new_options = opts.merge(
|
|
70
|
+
:operation => :"TransfersApi.transfer_controller_create_direct_bank_transfer",
|
|
61
71
|
:header_params => header_params,
|
|
62
72
|
:query_params => query_params,
|
|
63
73
|
:form_params => form_params,
|
|
64
74
|
:body => post_body,
|
|
65
75
|
:auth_names => auth_names,
|
|
66
|
-
:return_type => return_type
|
|
76
|
+
:return_type => return_type
|
|
77
|
+
)
|
|
67
78
|
|
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
68
80
|
if @api_client.config.debugging
|
|
69
81
|
@api_client.config.logger.debug "API called: TransfersApi#transfer_controller_create_direct_bank_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
70
82
|
end
|
|
71
83
|
return data, status_code, headers
|
|
72
84
|
end
|
|
85
|
+
|
|
73
86
|
# Create a direct wallet transfer
|
|
74
|
-
# @param
|
|
87
|
+
# @param create_direct_wallet_transfer_dto [CreateDirectWalletTransferDto]
|
|
75
88
|
# @param [Hash] opts the optional parameters
|
|
76
89
|
# @return [nil]
|
|
77
|
-
def transfer_controller_create_direct_wallet_transfer(
|
|
78
|
-
transfer_controller_create_direct_wallet_transfer_with_http_info(
|
|
90
|
+
def transfer_controller_create_direct_wallet_transfer(create_direct_wallet_transfer_dto, opts = {})
|
|
91
|
+
transfer_controller_create_direct_wallet_transfer_with_http_info(create_direct_wallet_transfer_dto, opts)
|
|
79
92
|
nil
|
|
80
93
|
end
|
|
81
94
|
|
|
82
95
|
# Create a direct wallet transfer
|
|
83
|
-
# @param
|
|
96
|
+
# @param create_direct_wallet_transfer_dto [CreateDirectWalletTransferDto]
|
|
84
97
|
# @param [Hash] opts the optional parameters
|
|
85
98
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
86
|
-
def transfer_controller_create_direct_wallet_transfer_with_http_info(
|
|
99
|
+
def transfer_controller_create_direct_wallet_transfer_with_http_info(create_direct_wallet_transfer_dto, opts = {})
|
|
87
100
|
if @api_client.config.debugging
|
|
88
101
|
@api_client.config.logger.debug 'Calling API: TransfersApi.transfer_controller_create_direct_wallet_transfer ...'
|
|
89
102
|
end
|
|
90
|
-
# verify the required parameter '
|
|
91
|
-
if @api_client.config.client_side_validation &&
|
|
92
|
-
fail ArgumentError, "Missing the required parameter '
|
|
103
|
+
# verify the required parameter 'create_direct_wallet_transfer_dto' is set
|
|
104
|
+
if @api_client.config.client_side_validation && create_direct_wallet_transfer_dto.nil?
|
|
105
|
+
fail ArgumentError, "Missing the required parameter 'create_direct_wallet_transfer_dto' when calling TransfersApi.transfer_controller_create_direct_wallet_transfer"
|
|
93
106
|
end
|
|
94
107
|
# resource path
|
|
95
108
|
local_var_path = '/api/v0/transfers/direct-wallet'
|
|
@@ -100,50 +113,188 @@ module DevDraftAI
|
|
|
100
113
|
# header parameters
|
|
101
114
|
header_params = opts[:header_params] || {}
|
|
102
115
|
# HTTP header 'Content-Type'
|
|
103
|
-
|
|
116
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
117
|
+
if !content_type.nil?
|
|
118
|
+
header_params['Content-Type'] = content_type
|
|
119
|
+
end
|
|
104
120
|
|
|
105
121
|
# form parameters
|
|
106
122
|
form_params = opts[:form_params] || {}
|
|
107
123
|
|
|
108
124
|
# http body (model)
|
|
109
|
-
post_body = opts[:
|
|
125
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_direct_wallet_transfer_dto)
|
|
110
126
|
|
|
111
|
-
|
|
127
|
+
# return_type
|
|
128
|
+
return_type = opts[:debug_return_type]
|
|
112
129
|
|
|
113
|
-
|
|
114
|
-
|
|
130
|
+
# auth_names
|
|
131
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
132
|
+
|
|
133
|
+
new_options = opts.merge(
|
|
134
|
+
:operation => :"TransfersApi.transfer_controller_create_direct_wallet_transfer",
|
|
115
135
|
:header_params => header_params,
|
|
116
136
|
:query_params => query_params,
|
|
117
137
|
:form_params => form_params,
|
|
118
138
|
:body => post_body,
|
|
119
139
|
:auth_names => auth_names,
|
|
120
|
-
:return_type => return_type
|
|
140
|
+
:return_type => return_type
|
|
141
|
+
)
|
|
121
142
|
|
|
143
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
122
144
|
if @api_client.config.debugging
|
|
123
145
|
@api_client.config.logger.debug "API called: TransfersApi#transfer_controller_create_direct_wallet_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
124
146
|
end
|
|
125
147
|
return data, status_code, headers
|
|
126
148
|
end
|
|
149
|
+
|
|
150
|
+
# Create an external bank transfer
|
|
151
|
+
# @param create_external_bank_transfer_dto [CreateExternalBankTransferDto]
|
|
152
|
+
# @param [Hash] opts the optional parameters
|
|
153
|
+
# @return [nil]
|
|
154
|
+
def transfer_controller_create_external_bank_transfer(create_external_bank_transfer_dto, opts = {})
|
|
155
|
+
transfer_controller_create_external_bank_transfer_with_http_info(create_external_bank_transfer_dto, opts)
|
|
156
|
+
nil
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Create an external bank transfer
|
|
160
|
+
# @param create_external_bank_transfer_dto [CreateExternalBankTransferDto]
|
|
161
|
+
# @param [Hash] opts the optional parameters
|
|
162
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
163
|
+
def transfer_controller_create_external_bank_transfer_with_http_info(create_external_bank_transfer_dto, opts = {})
|
|
164
|
+
if @api_client.config.debugging
|
|
165
|
+
@api_client.config.logger.debug 'Calling API: TransfersApi.transfer_controller_create_external_bank_transfer ...'
|
|
166
|
+
end
|
|
167
|
+
# verify the required parameter 'create_external_bank_transfer_dto' is set
|
|
168
|
+
if @api_client.config.client_side_validation && create_external_bank_transfer_dto.nil?
|
|
169
|
+
fail ArgumentError, "Missing the required parameter 'create_external_bank_transfer_dto' when calling TransfersApi.transfer_controller_create_external_bank_transfer"
|
|
170
|
+
end
|
|
171
|
+
# resource path
|
|
172
|
+
local_var_path = '/api/v0/transfers/external-bank-transfer'
|
|
173
|
+
|
|
174
|
+
# query parameters
|
|
175
|
+
query_params = opts[:query_params] || {}
|
|
176
|
+
|
|
177
|
+
# header parameters
|
|
178
|
+
header_params = opts[:header_params] || {}
|
|
179
|
+
# HTTP header 'Content-Type'
|
|
180
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
181
|
+
if !content_type.nil?
|
|
182
|
+
header_params['Content-Type'] = content_type
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# form parameters
|
|
186
|
+
form_params = opts[:form_params] || {}
|
|
187
|
+
|
|
188
|
+
# http body (model)
|
|
189
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_external_bank_transfer_dto)
|
|
190
|
+
|
|
191
|
+
# return_type
|
|
192
|
+
return_type = opts[:debug_return_type]
|
|
193
|
+
|
|
194
|
+
# auth_names
|
|
195
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
196
|
+
|
|
197
|
+
new_options = opts.merge(
|
|
198
|
+
:operation => :"TransfersApi.transfer_controller_create_external_bank_transfer",
|
|
199
|
+
:header_params => header_params,
|
|
200
|
+
:query_params => query_params,
|
|
201
|
+
:form_params => form_params,
|
|
202
|
+
:body => post_body,
|
|
203
|
+
:auth_names => auth_names,
|
|
204
|
+
:return_type => return_type
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
208
|
+
if @api_client.config.debugging
|
|
209
|
+
@api_client.config.logger.debug "API called: TransfersApi#transfer_controller_create_external_bank_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
210
|
+
end
|
|
211
|
+
return data, status_code, headers
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Create an external stablecoin transfer
|
|
215
|
+
# @param create_external_stablecoin_transfer_dto [CreateExternalStablecoinTransferDto]
|
|
216
|
+
# @param [Hash] opts the optional parameters
|
|
217
|
+
# @return [nil]
|
|
218
|
+
def transfer_controller_create_external_stablecoin_transfer(create_external_stablecoin_transfer_dto, opts = {})
|
|
219
|
+
transfer_controller_create_external_stablecoin_transfer_with_http_info(create_external_stablecoin_transfer_dto, opts)
|
|
220
|
+
nil
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Create an external stablecoin transfer
|
|
224
|
+
# @param create_external_stablecoin_transfer_dto [CreateExternalStablecoinTransferDto]
|
|
225
|
+
# @param [Hash] opts the optional parameters
|
|
226
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
227
|
+
def transfer_controller_create_external_stablecoin_transfer_with_http_info(create_external_stablecoin_transfer_dto, opts = {})
|
|
228
|
+
if @api_client.config.debugging
|
|
229
|
+
@api_client.config.logger.debug 'Calling API: TransfersApi.transfer_controller_create_external_stablecoin_transfer ...'
|
|
230
|
+
end
|
|
231
|
+
# verify the required parameter 'create_external_stablecoin_transfer_dto' is set
|
|
232
|
+
if @api_client.config.client_side_validation && create_external_stablecoin_transfer_dto.nil?
|
|
233
|
+
fail ArgumentError, "Missing the required parameter 'create_external_stablecoin_transfer_dto' when calling TransfersApi.transfer_controller_create_external_stablecoin_transfer"
|
|
234
|
+
end
|
|
235
|
+
# resource path
|
|
236
|
+
local_var_path = '/api/v0/transfers/external-stablecoin-transfer'
|
|
237
|
+
|
|
238
|
+
# query parameters
|
|
239
|
+
query_params = opts[:query_params] || {}
|
|
240
|
+
|
|
241
|
+
# header parameters
|
|
242
|
+
header_params = opts[:header_params] || {}
|
|
243
|
+
# HTTP header 'Content-Type'
|
|
244
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
245
|
+
if !content_type.nil?
|
|
246
|
+
header_params['Content-Type'] = content_type
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# form parameters
|
|
250
|
+
form_params = opts[:form_params] || {}
|
|
251
|
+
|
|
252
|
+
# http body (model)
|
|
253
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_external_stablecoin_transfer_dto)
|
|
254
|
+
|
|
255
|
+
# return_type
|
|
256
|
+
return_type = opts[:debug_return_type]
|
|
257
|
+
|
|
258
|
+
# auth_names
|
|
259
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
260
|
+
|
|
261
|
+
new_options = opts.merge(
|
|
262
|
+
:operation => :"TransfersApi.transfer_controller_create_external_stablecoin_transfer",
|
|
263
|
+
:header_params => header_params,
|
|
264
|
+
:query_params => query_params,
|
|
265
|
+
:form_params => form_params,
|
|
266
|
+
:body => post_body,
|
|
267
|
+
:auth_names => auth_names,
|
|
268
|
+
:return_type => return_type
|
|
269
|
+
)
|
|
270
|
+
|
|
271
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
272
|
+
if @api_client.config.debugging
|
|
273
|
+
@api_client.config.logger.debug "API called: TransfersApi#transfer_controller_create_external_stablecoin_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
274
|
+
end
|
|
275
|
+
return data, status_code, headers
|
|
276
|
+
end
|
|
277
|
+
|
|
127
278
|
# Create a stablecoin conversion
|
|
128
|
-
# @param
|
|
279
|
+
# @param create_stablecoin_conversion_dto [CreateStablecoinConversionDto]
|
|
129
280
|
# @param [Hash] opts the optional parameters
|
|
130
281
|
# @return [nil]
|
|
131
|
-
def transfer_controller_create_stablecoin_conversion(
|
|
132
|
-
transfer_controller_create_stablecoin_conversion_with_http_info(
|
|
282
|
+
def transfer_controller_create_stablecoin_conversion(create_stablecoin_conversion_dto, opts = {})
|
|
283
|
+
transfer_controller_create_stablecoin_conversion_with_http_info(create_stablecoin_conversion_dto, opts)
|
|
133
284
|
nil
|
|
134
285
|
end
|
|
135
286
|
|
|
136
287
|
# Create a stablecoin conversion
|
|
137
|
-
# @param
|
|
288
|
+
# @param create_stablecoin_conversion_dto [CreateStablecoinConversionDto]
|
|
138
289
|
# @param [Hash] opts the optional parameters
|
|
139
290
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
140
|
-
def transfer_controller_create_stablecoin_conversion_with_http_info(
|
|
291
|
+
def transfer_controller_create_stablecoin_conversion_with_http_info(create_stablecoin_conversion_dto, opts = {})
|
|
141
292
|
if @api_client.config.debugging
|
|
142
293
|
@api_client.config.logger.debug 'Calling API: TransfersApi.transfer_controller_create_stablecoin_conversion ...'
|
|
143
294
|
end
|
|
144
|
-
# verify the required parameter '
|
|
145
|
-
if @api_client.config.client_side_validation &&
|
|
146
|
-
fail ArgumentError, "Missing the required parameter '
|
|
295
|
+
# verify the required parameter 'create_stablecoin_conversion_dto' is set
|
|
296
|
+
if @api_client.config.client_side_validation && create_stablecoin_conversion_dto.nil?
|
|
297
|
+
fail ArgumentError, "Missing the required parameter 'create_stablecoin_conversion_dto' when calling TransfersApi.transfer_controller_create_stablecoin_conversion"
|
|
147
298
|
end
|
|
148
299
|
# resource path
|
|
149
300
|
local_var_path = '/api/v0/transfers/stablecoin-conversion'
|
|
@@ -154,25 +305,34 @@ module DevDraftAI
|
|
|
154
305
|
# header parameters
|
|
155
306
|
header_params = opts[:header_params] || {}
|
|
156
307
|
# HTTP header 'Content-Type'
|
|
157
|
-
|
|
308
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
309
|
+
if !content_type.nil?
|
|
310
|
+
header_params['Content-Type'] = content_type
|
|
311
|
+
end
|
|
158
312
|
|
|
159
313
|
# form parameters
|
|
160
314
|
form_params = opts[:form_params] || {}
|
|
161
315
|
|
|
162
316
|
# http body (model)
|
|
163
|
-
post_body = opts[:
|
|
317
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_stablecoin_conversion_dto)
|
|
318
|
+
|
|
319
|
+
# return_type
|
|
320
|
+
return_type = opts[:debug_return_type]
|
|
164
321
|
|
|
165
|
-
|
|
322
|
+
# auth_names
|
|
323
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
166
324
|
|
|
167
|
-
|
|
168
|
-
|
|
325
|
+
new_options = opts.merge(
|
|
326
|
+
:operation => :"TransfersApi.transfer_controller_create_stablecoin_conversion",
|
|
169
327
|
:header_params => header_params,
|
|
170
328
|
:query_params => query_params,
|
|
171
329
|
:form_params => form_params,
|
|
172
330
|
:body => post_body,
|
|
173
331
|
:auth_names => auth_names,
|
|
174
|
-
:return_type => return_type
|
|
332
|
+
:return_type => return_type
|
|
333
|
+
)
|
|
175
334
|
|
|
335
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
176
336
|
if @api_client.config.debugging
|
|
177
337
|
@api_client.config.logger.debug "API called: TransfersApi#transfer_controller_create_stablecoin_conversion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
178
338
|
end
|