devdraft 1.0.2 → 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 +155 -253
- 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 -129
- 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 CustomersApi
|
|
14
17
|
attr_accessor :api_client
|
|
15
18
|
|
|
@@ -17,27 +20,27 @@ module DevDraftAI
|
|
|
17
20
|
@api_client = api_client
|
|
18
21
|
end
|
|
19
22
|
# Create a new customer
|
|
20
|
-
# Creates a new customer in the system with their personal and contact information. This endpoint allows you to register new customers and store their details for future transactions. ## Use Cases - Register new customers for payment processing - Store customer information for recurring payments - Maintain customer profiles for transaction history ## Example: Create New Customer ```json { \"
|
|
21
|
-
# @param
|
|
23
|
+
# Creates a new customer in the system with their personal and contact information. This endpoint allows you to register new customers and store their details for future transactions. ## Use Cases - Register new customers for payment processing - Store customer information for recurring payments - Maintain customer profiles for transaction history ## Example: Create New Customer ```json { \"first_name\": \"John\", \"last_name\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone_number\": \"+1-555-123-4567\", \"customer_type\": \"Startup\", \"status\": \"ACTIVE\" } ``` ## Required Fields - `first_name`: Customer's first name (1-100 characters) - `last_name`: Customer's last name (1-100 characters) - `phone_number`: Customer's phone number (max 20 characters) ## Optional Fields - `email`: Valid email address (max 255 characters) - `customer_type`: Type of customer account (Individual, Startup, Small Business, Medium Business, Enterprise, Non-Profit, Government) - `status`: Customer status (ACTIVE, BLACKLISTED, DEACTIVATED)
|
|
24
|
+
# @param create_customer_dto [CreateCustomerDto] Customer creation data
|
|
22
25
|
# @param [Hash] opts the optional parameters
|
|
23
26
|
# @return [nil]
|
|
24
|
-
def customer_controller_create(
|
|
25
|
-
customer_controller_create_with_http_info(
|
|
27
|
+
def customer_controller_create(create_customer_dto, opts = {})
|
|
28
|
+
customer_controller_create_with_http_info(create_customer_dto, opts)
|
|
26
29
|
nil
|
|
27
30
|
end
|
|
28
31
|
|
|
29
32
|
# Create a new customer
|
|
30
|
-
# Creates a new customer in the system with their personal and contact information. This endpoint allows you to register new customers and store their details for future transactions. ## Use Cases - Register new customers for payment processing - Store customer information for recurring payments - Maintain customer profiles for transaction history ## Example: Create New Customer ```json { \"
|
|
31
|
-
# @param
|
|
33
|
+
# Creates a new customer in the system with their personal and contact information. This endpoint allows you to register new customers and store their details for future transactions. ## Use Cases - Register new customers for payment processing - Store customer information for recurring payments - Maintain customer profiles for transaction history ## Example: Create New Customer ```json { \"first_name\": \"John\", \"last_name\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone_number\": \"+1-555-123-4567\", \"customer_type\": \"Startup\", \"status\": \"ACTIVE\" } ``` ## Required Fields - `first_name`: Customer's first name (1-100 characters) - `last_name`: Customer's last name (1-100 characters) - `phone_number`: Customer's phone number (max 20 characters) ## Optional Fields - `email`: Valid email address (max 255 characters) - `customer_type`: Type of customer account (Individual, Startup, Small Business, Medium Business, Enterprise, Non-Profit, Government) - `status`: Customer status (ACTIVE, BLACKLISTED, DEACTIVATED)
|
|
34
|
+
# @param create_customer_dto [CreateCustomerDto] Customer creation data
|
|
32
35
|
# @param [Hash] opts the optional parameters
|
|
33
36
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
34
|
-
def customer_controller_create_with_http_info(
|
|
37
|
+
def customer_controller_create_with_http_info(create_customer_dto, opts = {})
|
|
35
38
|
if @api_client.config.debugging
|
|
36
39
|
@api_client.config.logger.debug 'Calling API: CustomersApi.customer_controller_create ...'
|
|
37
40
|
end
|
|
38
|
-
# verify the required parameter '
|
|
39
|
-
if @api_client.config.client_side_validation &&
|
|
40
|
-
fail ArgumentError, "Missing the required parameter '
|
|
41
|
+
# verify the required parameter 'create_customer_dto' is set
|
|
42
|
+
if @api_client.config.client_side_validation && create_customer_dto.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_customer_dto' when calling CustomersApi.customer_controller_create"
|
|
41
44
|
end
|
|
42
45
|
# resource path
|
|
43
46
|
local_var_path = '/api/v0/customers'
|
|
@@ -48,38 +51,48 @@ module DevDraftAI
|
|
|
48
51
|
# header parameters
|
|
49
52
|
header_params = opts[:header_params] || {}
|
|
50
53
|
# HTTP header 'Content-Type'
|
|
51
|
-
|
|
54
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
55
|
+
if !content_type.nil?
|
|
56
|
+
header_params['Content-Type'] = content_type
|
|
57
|
+
end
|
|
52
58
|
|
|
53
59
|
# form parameters
|
|
54
60
|
form_params = opts[:form_params] || {}
|
|
55
61
|
|
|
56
62
|
# http body (model)
|
|
57
|
-
post_body = opts[:
|
|
63
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_customer_dto)
|
|
64
|
+
|
|
65
|
+
# return_type
|
|
66
|
+
return_type = opts[:debug_return_type]
|
|
58
67
|
|
|
59
|
-
|
|
68
|
+
# auth_names
|
|
69
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
60
70
|
|
|
61
|
-
|
|
62
|
-
|
|
71
|
+
new_options = opts.merge(
|
|
72
|
+
:operation => :"CustomersApi.customer_controller_create",
|
|
63
73
|
:header_params => header_params,
|
|
64
74
|
:query_params => query_params,
|
|
65
75
|
:form_params => form_params,
|
|
66
76
|
:body => post_body,
|
|
67
77
|
:auth_names => auth_names,
|
|
68
|
-
:return_type => return_type
|
|
78
|
+
:return_type => return_type
|
|
79
|
+
)
|
|
69
80
|
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
70
82
|
if @api_client.config.debugging
|
|
71
83
|
@api_client.config.logger.debug "API called: CustomersApi#customer_controller_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
72
84
|
end
|
|
73
85
|
return data, status_code, headers
|
|
74
86
|
end
|
|
87
|
+
|
|
75
88
|
# Get all customers with filters
|
|
76
|
-
# Retrieves a list of customers with optional filtering and pagination. This endpoint allows you to search and filter customers based on various criteria. ## Use Cases - List all customers with pagination - Search customers by name or email - Filter customers by status - Export customer data ## Query Parameters - `skip`: Number of records to skip (default: 0) - `take`: Number of records to take (default: 10) - `status`: Filter by customer status (ACTIVE,
|
|
89
|
+
# Retrieves a list of customers with optional filtering and pagination. This endpoint allows you to search and filter customers based on various criteria. ## Use Cases - List all customers with pagination - Search customers by name or email - Filter customers by status - Export customer data ## Query Parameters - `skip`: Number of records to skip (default: 0, min: 0) - `take`: Number of records to take (default: 10, min: 1, max: 100) - `status`: Filter by customer status (ACTIVE, BLACKLISTED, DEACTIVATED) - `name`: Filter by customer name (partial match, case-insensitive) - `email`: Filter by customer email (exact match, case-insensitive) ## Example Request `GET /api/v0/customers?skip=0&take=20&status=ACTIVE&name=John` ## Example Response ```json { \"data\": [ { \"id\": \"cust_123456\", \"first_name\": \"John\", \"last_name\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone_number\": \"+1-555-123-4567\", \"customer_type\": \"Startup\", \"status\": \"ACTIVE\", \"created_at\": \"2024-03-20T10:00:00Z\", \"updated_at\": \"2024-03-20T10:00:00Z\" } ], \"total\": 100, \"skip\": 0, \"take\": 10 } ```
|
|
77
90
|
# @param [Hash] opts the optional parameters
|
|
78
|
-
# @option opts [
|
|
79
|
-
# @option opts [
|
|
80
|
-
# @option opts [
|
|
81
|
-
# @option opts [
|
|
82
|
-
# @option opts [
|
|
91
|
+
# @option opts [Float] :skip Number of records to skip for pagination (default to 0)
|
|
92
|
+
# @option opts [Float] :take Number of records to return (max 100) (default to 10)
|
|
93
|
+
# @option opts [CustomerStatus] :status Filter customers by status
|
|
94
|
+
# @option opts [String] :name Filter customers by name (partial match, case-insensitive)
|
|
95
|
+
# @option opts [String] :email Filter customers by email (exact match, case-insensitive)
|
|
83
96
|
# @return [nil]
|
|
84
97
|
def customer_controller_find_all(opts = {})
|
|
85
98
|
customer_controller_find_all_with_http_info(opts)
|
|
@@ -87,31 +100,48 @@ module DevDraftAI
|
|
|
87
100
|
end
|
|
88
101
|
|
|
89
102
|
# Get all customers with filters
|
|
90
|
-
# Retrieves a list of customers with optional filtering and pagination. This endpoint allows you to search and filter customers based on various criteria. ## Use Cases - List all customers with pagination - Search customers by name or email - Filter customers by status - Export customer data ## Query Parameters - `skip`: Number of records to skip (default: 0) - `take`: Number of records to take (default: 10) - `status`: Filter by customer status (ACTIVE,
|
|
103
|
+
# Retrieves a list of customers with optional filtering and pagination. This endpoint allows you to search and filter customers based on various criteria. ## Use Cases - List all customers with pagination - Search customers by name or email - Filter customers by status - Export customer data ## Query Parameters - `skip`: Number of records to skip (default: 0, min: 0) - `take`: Number of records to take (default: 10, min: 1, max: 100) - `status`: Filter by customer status (ACTIVE, BLACKLISTED, DEACTIVATED) - `name`: Filter by customer name (partial match, case-insensitive) - `email`: Filter by customer email (exact match, case-insensitive) ## Example Request `GET /api/v0/customers?skip=0&take=20&status=ACTIVE&name=John` ## Example Response ```json { \"data\": [ { \"id\": \"cust_123456\", \"first_name\": \"John\", \"last_name\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone_number\": \"+1-555-123-4567\", \"customer_type\": \"Startup\", \"status\": \"ACTIVE\", \"created_at\": \"2024-03-20T10:00:00Z\", \"updated_at\": \"2024-03-20T10:00:00Z\" } ], \"total\": 100, \"skip\": 0, \"take\": 10 } ```
|
|
91
104
|
# @param [Hash] opts the optional parameters
|
|
92
|
-
# @option opts [
|
|
93
|
-
# @option opts [
|
|
94
|
-
# @option opts [
|
|
95
|
-
# @option opts [
|
|
96
|
-
# @option opts [
|
|
105
|
+
# @option opts [Float] :skip Number of records to skip for pagination (default to 0)
|
|
106
|
+
# @option opts [Float] :take Number of records to return (max 100) (default to 10)
|
|
107
|
+
# @option opts [CustomerStatus] :status Filter customers by status
|
|
108
|
+
# @option opts [String] :name Filter customers by name (partial match, case-insensitive)
|
|
109
|
+
# @option opts [String] :email Filter customers by email (exact match, case-insensitive)
|
|
97
110
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
98
111
|
def customer_controller_find_all_with_http_info(opts = {})
|
|
99
112
|
if @api_client.config.debugging
|
|
100
113
|
@api_client.config.logger.debug 'Calling API: CustomersApi.customer_controller_find_all ...'
|
|
101
114
|
end
|
|
102
|
-
if @api_client.config.client_side_validation && opts[:'
|
|
103
|
-
fail ArgumentError, 'invalid value for "
|
|
115
|
+
if @api_client.config.client_side_validation && !opts[:'skip'].nil? && opts[:'skip'] < 0
|
|
116
|
+
fail ArgumentError, 'invalid value for "opts[:"skip"]" when calling CustomersApi.customer_controller_find_all, must be greater than or equal to 0.'
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if @api_client.config.client_side_validation && !opts[:'take'].nil? && opts[:'take'] > 100
|
|
120
|
+
fail ArgumentError, 'invalid value for "opts[:"take"]" when calling CustomersApi.customer_controller_find_all, must be smaller than or equal to 100.'
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if @api_client.config.client_side_validation && !opts[:'take'].nil? && opts[:'take'] < 1
|
|
124
|
+
fail ArgumentError, 'invalid value for "opts[:"take"]" when calling CustomersApi.customer_controller_find_all, must be greater than or equal to 1.'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length > 100
|
|
128
|
+
fail ArgumentError, 'invalid value for "opts[:"name"]" when calling CustomersApi.customer_controller_find_all, the character length must be smaller than or equal to 100.'
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if @api_client.config.client_side_validation && !opts[:'email'].nil? && opts[:'email'].to_s.length > 255
|
|
132
|
+
fail ArgumentError, 'invalid value for "opts[:"email"]" when calling CustomersApi.customer_controller_find_all, the character length must be smaller than or equal to 255.'
|
|
104
133
|
end
|
|
134
|
+
|
|
105
135
|
# resource path
|
|
106
136
|
local_var_path = '/api/v0/customers'
|
|
107
137
|
|
|
108
138
|
# query parameters
|
|
109
139
|
query_params = opts[:query_params] || {}
|
|
140
|
+
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
|
141
|
+
query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil?
|
|
110
142
|
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
111
143
|
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
112
144
|
query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
|
|
113
|
-
query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil?
|
|
114
|
-
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
|
115
145
|
|
|
116
146
|
# header parameters
|
|
117
147
|
header_params = opts[:header_params] || {}
|
|
@@ -120,27 +150,34 @@ module DevDraftAI
|
|
|
120
150
|
form_params = opts[:form_params] || {}
|
|
121
151
|
|
|
122
152
|
# http body (model)
|
|
123
|
-
post_body = opts[:
|
|
153
|
+
post_body = opts[:debug_body]
|
|
154
|
+
|
|
155
|
+
# return_type
|
|
156
|
+
return_type = opts[:debug_return_type]
|
|
124
157
|
|
|
125
|
-
|
|
158
|
+
# auth_names
|
|
159
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
126
160
|
|
|
127
|
-
|
|
128
|
-
|
|
161
|
+
new_options = opts.merge(
|
|
162
|
+
:operation => :"CustomersApi.customer_controller_find_all",
|
|
129
163
|
:header_params => header_params,
|
|
130
164
|
:query_params => query_params,
|
|
131
165
|
:form_params => form_params,
|
|
132
166
|
:body => post_body,
|
|
133
167
|
:auth_names => auth_names,
|
|
134
|
-
:return_type => return_type
|
|
168
|
+
:return_type => return_type
|
|
169
|
+
)
|
|
135
170
|
|
|
171
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
136
172
|
if @api_client.config.debugging
|
|
137
173
|
@api_client.config.logger.debug "API called: CustomersApi#customer_controller_find_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
138
174
|
end
|
|
139
175
|
return data, status_code, headers
|
|
140
176
|
end
|
|
177
|
+
|
|
141
178
|
# Get a customer by ID
|
|
142
|
-
# Retrieves detailed information about a specific customer. This endpoint allows you to fetch complete customer details including their
|
|
143
|
-
# @param id
|
|
179
|
+
# Retrieves detailed information about a specific customer. This endpoint allows you to fetch complete customer details including their contact information and status. ## Use Cases - View customer details - Verify customer information - Check customer status before processing payments ## Path Parameters - `id`: Customer UUID (required) - Must be a valid UUID format ## Example Request `GET /api/v0/customers/123e4567-e89b-12d3-a456-426614174000` ## Example Response ```json { \"id\": \"cust_123456\", \"first_name\": \"John\", \"last_name\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone_number\": \"+1-555-123-4567\", \"customer_type\": \"Enterprise\", \"status\": \"ACTIVE\", \"last_spent\": 1250.50, \"last_purchase_date\": \"2024-03-15T14:30:00Z\", \"created_at\": \"2024-03-20T10:00:00Z\", \"updated_at\": \"2024-03-20T10:00:00Z\" } ```
|
|
180
|
+
# @param id [String] Customer unique identifier (UUID)
|
|
144
181
|
# @param [Hash] opts the optional parameters
|
|
145
182
|
# @return [nil]
|
|
146
183
|
def customer_controller_find_one(id, opts = {})
|
|
@@ -149,8 +186,8 @@ module DevDraftAI
|
|
|
149
186
|
end
|
|
150
187
|
|
|
151
188
|
# Get a customer by ID
|
|
152
|
-
# Retrieves detailed information about a specific customer. This endpoint allows you to fetch complete customer details including their
|
|
153
|
-
# @param id
|
|
189
|
+
# Retrieves detailed information about a specific customer. This endpoint allows you to fetch complete customer details including their contact information and status. ## Use Cases - View customer details - Verify customer information - Check customer status before processing payments ## Path Parameters - `id`: Customer UUID (required) - Must be a valid UUID format ## Example Request `GET /api/v0/customers/123e4567-e89b-12d3-a456-426614174000` ## Example Response ```json { \"id\": \"cust_123456\", \"first_name\": \"John\", \"last_name\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone_number\": \"+1-555-123-4567\", \"customer_type\": \"Enterprise\", \"status\": \"ACTIVE\", \"last_spent\": 1250.50, \"last_purchase_date\": \"2024-03-15T14:30:00Z\", \"created_at\": \"2024-03-20T10:00:00Z\", \"updated_at\": \"2024-03-20T10:00:00Z\" } ```
|
|
190
|
+
# @param id [String] Customer unique identifier (UUID)
|
|
154
191
|
# @param [Hash] opts the optional parameters
|
|
155
192
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
156
193
|
def customer_controller_find_one_with_http_info(id, opts = {})
|
|
@@ -162,7 +199,7 @@ module DevDraftAI
|
|
|
162
199
|
fail ArgumentError, "Missing the required parameter 'id' when calling CustomersApi.customer_controller_find_one"
|
|
163
200
|
end
|
|
164
201
|
# resource path
|
|
165
|
-
local_var_path = '/api/v0/customers/{id}'.sub('{' + 'id' + '}', id.to_s)
|
|
202
|
+
local_var_path = '/api/v0/customers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
166
203
|
|
|
167
204
|
# query parameters
|
|
168
205
|
query_params = opts[:query_params] || {}
|
|
@@ -174,55 +211,62 @@ module DevDraftAI
|
|
|
174
211
|
form_params = opts[:form_params] || {}
|
|
175
212
|
|
|
176
213
|
# http body (model)
|
|
177
|
-
post_body = opts[:
|
|
214
|
+
post_body = opts[:debug_body]
|
|
178
215
|
|
|
179
|
-
|
|
216
|
+
# return_type
|
|
217
|
+
return_type = opts[:debug_return_type]
|
|
180
218
|
|
|
181
|
-
|
|
182
|
-
|
|
219
|
+
# auth_names
|
|
220
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
221
|
+
|
|
222
|
+
new_options = opts.merge(
|
|
223
|
+
:operation => :"CustomersApi.customer_controller_find_one",
|
|
183
224
|
:header_params => header_params,
|
|
184
225
|
:query_params => query_params,
|
|
185
226
|
:form_params => form_params,
|
|
186
227
|
:body => post_body,
|
|
187
228
|
:auth_names => auth_names,
|
|
188
|
-
:return_type => return_type
|
|
229
|
+
:return_type => return_type
|
|
230
|
+
)
|
|
189
231
|
|
|
232
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
190
233
|
if @api_client.config.debugging
|
|
191
234
|
@api_client.config.logger.debug "API called: CustomersApi#customer_controller_find_one\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
192
235
|
end
|
|
193
236
|
return data, status_code, headers
|
|
194
237
|
end
|
|
238
|
+
|
|
195
239
|
# Update a customer
|
|
196
|
-
# Updates an existing customer's information. This endpoint allows you to modify customer details while preserving their core information. ## Use Cases - Update customer contact information - Change customer
|
|
197
|
-
# @param
|
|
198
|
-
# @param
|
|
240
|
+
# Updates an existing customer's information. This endpoint allows you to modify customer details while preserving their core information. ## Use Cases - Update customer contact information - Change customer type - Modify customer status ## Path Parameters - `id`: Customer UUID (required) - Must be a valid UUID format ## Example Request `PATCH /api/v0/customers/123e4567-e89b-12d3-a456-426614174000` ## Example Request Body ```json { \"first_name\": \"John\", \"last_name\": \"Smith\", \"phone_number\": \"+1-987-654-3210\", \"customer_type\": \"Small Business\" } ``` ## Notes - Only include fields that need to be updated - All fields are optional in updates - Status changes may require additional verification
|
|
241
|
+
# @param id [String] Customer unique identifier (UUID)
|
|
242
|
+
# @param update_customer_dto [UpdateCustomerDto] Customer update data
|
|
199
243
|
# @param [Hash] opts the optional parameters
|
|
200
244
|
# @return [nil]
|
|
201
|
-
def customer_controller_update(
|
|
202
|
-
customer_controller_update_with_http_info(
|
|
245
|
+
def customer_controller_update(id, update_customer_dto, opts = {})
|
|
246
|
+
customer_controller_update_with_http_info(id, update_customer_dto, opts)
|
|
203
247
|
nil
|
|
204
248
|
end
|
|
205
249
|
|
|
206
250
|
# Update a customer
|
|
207
|
-
# Updates an existing customer&#
|
|
208
|
-
# @param
|
|
209
|
-
# @param
|
|
251
|
+
# Updates an existing customer's information. This endpoint allows you to modify customer details while preserving their core information. ## Use Cases - Update customer contact information - Change customer type - Modify customer status ## Path Parameters - `id`: Customer UUID (required) - Must be a valid UUID format ## Example Request `PATCH /api/v0/customers/123e4567-e89b-12d3-a456-426614174000` ## Example Request Body ```json { \"first_name\": \"John\", \"last_name\": \"Smith\", \"phone_number\": \"+1-987-654-3210\", \"customer_type\": \"Small Business\" } ``` ## Notes - Only include fields that need to be updated - All fields are optional in updates - Status changes may require additional verification
|
|
252
|
+
# @param id [String] Customer unique identifier (UUID)
|
|
253
|
+
# @param update_customer_dto [UpdateCustomerDto] Customer update data
|
|
210
254
|
# @param [Hash] opts the optional parameters
|
|
211
255
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
212
|
-
def customer_controller_update_with_http_info(
|
|
256
|
+
def customer_controller_update_with_http_info(id, update_customer_dto, opts = {})
|
|
213
257
|
if @api_client.config.debugging
|
|
214
258
|
@api_client.config.logger.debug 'Calling API: CustomersApi.customer_controller_update ...'
|
|
215
259
|
end
|
|
216
|
-
# verify the required parameter 'body' is set
|
|
217
|
-
if @api_client.config.client_side_validation && body.nil?
|
|
218
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling CustomersApi.customer_controller_update"
|
|
219
|
-
end
|
|
220
260
|
# verify the required parameter 'id' is set
|
|
221
261
|
if @api_client.config.client_side_validation && id.nil?
|
|
222
262
|
fail ArgumentError, "Missing the required parameter 'id' when calling CustomersApi.customer_controller_update"
|
|
223
263
|
end
|
|
264
|
+
# verify the required parameter 'update_customer_dto' is set
|
|
265
|
+
if @api_client.config.client_side_validation && update_customer_dto.nil?
|
|
266
|
+
fail ArgumentError, "Missing the required parameter 'update_customer_dto' when calling CustomersApi.customer_controller_update"
|
|
267
|
+
end
|
|
224
268
|
# resource path
|
|
225
|
-
local_var_path = '/api/v0/customers/{id}'.sub('{' + 'id' + '}', id.to_s)
|
|
269
|
+
local_var_path = '/api/v0/customers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
226
270
|
|
|
227
271
|
# query parameters
|
|
228
272
|
query_params = opts[:query_params] || {}
|
|
@@ -230,25 +274,34 @@ module DevDraftAI
|
|
|
230
274
|
# header parameters
|
|
231
275
|
header_params = opts[:header_params] || {}
|
|
232
276
|
# HTTP header 'Content-Type'
|
|
233
|
-
|
|
277
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
278
|
+
if !content_type.nil?
|
|
279
|
+
header_params['Content-Type'] = content_type
|
|
280
|
+
end
|
|
234
281
|
|
|
235
282
|
# form parameters
|
|
236
283
|
form_params = opts[:form_params] || {}
|
|
237
284
|
|
|
238
285
|
# http body (model)
|
|
239
|
-
post_body = opts[:
|
|
286
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_customer_dto)
|
|
287
|
+
|
|
288
|
+
# return_type
|
|
289
|
+
return_type = opts[:debug_return_type]
|
|
240
290
|
|
|
241
|
-
|
|
291
|
+
# auth_names
|
|
292
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
242
293
|
|
|
243
|
-
|
|
244
|
-
|
|
294
|
+
new_options = opts.merge(
|
|
295
|
+
:operation => :"CustomersApi.customer_controller_update",
|
|
245
296
|
:header_params => header_params,
|
|
246
297
|
:query_params => query_params,
|
|
247
298
|
:form_params => form_params,
|
|
248
299
|
:body => post_body,
|
|
249
300
|
:auth_names => auth_names,
|
|
250
|
-
:return_type => return_type
|
|
301
|
+
:return_type => return_type
|
|
302
|
+
)
|
|
251
303
|
|
|
304
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
252
305
|
if @api_client.config.debugging
|
|
253
306
|
@api_client.config.logger.debug "API called: CustomersApi#customer_controller_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
254
307
|
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 ExchangeRatesApi
|
|
14
17
|
attr_accessor :api_client
|
|
15
18
|
|
|
@@ -42,34 +45,41 @@ module DevDraftAI
|
|
|
42
45
|
# header parameters
|
|
43
46
|
header_params = opts[:header_params] || {}
|
|
44
47
|
# HTTP header 'Accept' (if needed)
|
|
45
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
46
49
|
|
|
47
50
|
# form parameters
|
|
48
51
|
form_params = opts[:form_params] || {}
|
|
49
52
|
|
|
50
53
|
# http body (model)
|
|
51
|
-
post_body = opts[:
|
|
54
|
+
post_body = opts[:debug_body]
|
|
52
55
|
|
|
53
|
-
|
|
56
|
+
# return_type
|
|
57
|
+
return_type = opts[:debug_return_type] || 'ExchangeRateResponseDto'
|
|
54
58
|
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
# auth_names
|
|
60
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
61
|
+
|
|
62
|
+
new_options = opts.merge(
|
|
63
|
+
:operation => :"ExchangeRatesApi.exchange_rate_controller_get_eurto_usd_rate",
|
|
57
64
|
:header_params => header_params,
|
|
58
65
|
:query_params => query_params,
|
|
59
66
|
:form_params => form_params,
|
|
60
67
|
:body => post_body,
|
|
61
68
|
:auth_names => auth_names,
|
|
62
|
-
:return_type => return_type
|
|
69
|
+
:return_type => return_type
|
|
70
|
+
)
|
|
63
71
|
|
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
64
73
|
if @api_client.config.debugging
|
|
65
74
|
@api_client.config.logger.debug "API called: ExchangeRatesApi#exchange_rate_controller_get_eurto_usd_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
66
75
|
end
|
|
67
76
|
return data, status_code, headers
|
|
68
77
|
end
|
|
78
|
+
|
|
69
79
|
# Get exchange rate between specified currencies
|
|
70
80
|
# Retrieves the current exchange rate between two specified currencies. This flexible endpoint allows you to get exchange rates for any supported currency pair: - Supports USD and EUR currency codes - Provides comprehensive rate information - Real-time market data ## Supported Currency Pairs - USD to EUR (USDC to EURC) - EUR to USD (EURC to USDC) ## Query Parameters - **from**: Source currency code (usd, eur) - **to**: Target currency code (usd, eur) ## Use Cases - Flexible exchange rate queries - Multi-currency application support - Dynamic currency conversion calculations - Financial analytics and reporting ## Rate Information All rates are provided with full market context including mid-market, buy, and sell rates.
|
|
71
|
-
# @param from Source currency code (e.g., usd)
|
|
72
|
-
# @param to Target currency code (e.g., eur)
|
|
81
|
+
# @param from [String] Source currency code (e.g., usd)
|
|
82
|
+
# @param to [String] Target currency code (e.g., eur)
|
|
73
83
|
# @param [Hash] opts the optional parameters
|
|
74
84
|
# @return [ExchangeRateResponseDto]
|
|
75
85
|
def exchange_rate_controller_get_exchange_rate(from, to, opts = {})
|
|
@@ -79,8 +89,8 @@ module DevDraftAI
|
|
|
79
89
|
|
|
80
90
|
# Get exchange rate between specified currencies
|
|
81
91
|
# Retrieves the current exchange rate between two specified currencies. This flexible endpoint allows you to get exchange rates for any supported currency pair: - Supports USD and EUR currency codes - Provides comprehensive rate information - Real-time market data ## Supported Currency Pairs - USD to EUR (USDC to EURC) - EUR to USD (EURC to USDC) ## Query Parameters - **from**: Source currency code (usd, eur) - **to**: Target currency code (usd, eur) ## Use Cases - Flexible exchange rate queries - Multi-currency application support - Dynamic currency conversion calculations - Financial analytics and reporting ## Rate Information All rates are provided with full market context including mid-market, buy, and sell rates.
|
|
82
|
-
# @param from Source currency code (e.g., usd)
|
|
83
|
-
# @param to Target currency code (e.g., eur)
|
|
92
|
+
# @param from [String] Source currency code (e.g., usd)
|
|
93
|
+
# @param to [String] Target currency code (e.g., eur)
|
|
84
94
|
# @param [Hash] opts the optional parameters
|
|
85
95
|
# @return [Array<(ExchangeRateResponseDto, Integer, Hash)>] ExchangeRateResponseDto data, response status code and response headers
|
|
86
96
|
def exchange_rate_controller_get_exchange_rate_with_http_info(from, to, opts = {})
|
|
@@ -106,30 +116,37 @@ module DevDraftAI
|
|
|
106
116
|
# header parameters
|
|
107
117
|
header_params = opts[:header_params] || {}
|
|
108
118
|
# HTTP header 'Accept' (if needed)
|
|
109
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
119
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
110
120
|
|
|
111
121
|
# form parameters
|
|
112
122
|
form_params = opts[:form_params] || {}
|
|
113
123
|
|
|
114
124
|
# http body (model)
|
|
115
|
-
post_body = opts[:
|
|
125
|
+
post_body = opts[:debug_body]
|
|
116
126
|
|
|
117
|
-
|
|
127
|
+
# return_type
|
|
128
|
+
return_type = opts[:debug_return_type] || 'ExchangeRateResponseDto'
|
|
118
129
|
|
|
119
|
-
|
|
120
|
-
|
|
130
|
+
# auth_names
|
|
131
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
132
|
+
|
|
133
|
+
new_options = opts.merge(
|
|
134
|
+
:operation => :"ExchangeRatesApi.exchange_rate_controller_get_exchange_rate",
|
|
121
135
|
:header_params => header_params,
|
|
122
136
|
:query_params => query_params,
|
|
123
137
|
:form_params => form_params,
|
|
124
138
|
:body => post_body,
|
|
125
139
|
:auth_names => auth_names,
|
|
126
|
-
:return_type => return_type
|
|
140
|
+
:return_type => return_type
|
|
141
|
+
)
|
|
127
142
|
|
|
143
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
128
144
|
if @api_client.config.debugging
|
|
129
145
|
@api_client.config.logger.debug "API called: ExchangeRatesApi#exchange_rate_controller_get_exchange_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
130
146
|
end
|
|
131
147
|
return data, status_code, headers
|
|
132
148
|
end
|
|
149
|
+
|
|
133
150
|
# Get USD to EUR exchange rate
|
|
134
151
|
# Retrieves the current exchange rate for converting USD to EUR (USDC to EURC). This endpoint provides real-time exchange rate information for stablecoin conversions: - Mid-market rate for reference pricing - Buy rate for actual conversion calculations - Sell rate for reverse conversion scenarios ## Use Cases - Display current exchange rates in dashboards - Calculate conversion amounts for USDC to EURC transfers - Financial reporting and analytics - Real-time pricing for multi-currency operations ## Rate Information - **Mid-market rate**: The theoretical middle rate between buy and sell - **Buy rate**: Rate used when converting FROM USD TO EUR (what you get) - **Sell rate**: Rate used when converting FROM EUR TO USD (what you pay) The rates are updated in real-time and reflect current market conditions.
|
|
135
152
|
# @param [Hash] opts the optional parameters
|
|
@@ -156,25 +173,31 @@ module DevDraftAI
|
|
|
156
173
|
# header parameters
|
|
157
174
|
header_params = opts[:header_params] || {}
|
|
158
175
|
# HTTP header 'Accept' (if needed)
|
|
159
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
176
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
160
177
|
|
|
161
178
|
# form parameters
|
|
162
179
|
form_params = opts[:form_params] || {}
|
|
163
180
|
|
|
164
181
|
# http body (model)
|
|
165
|
-
post_body = opts[:
|
|
182
|
+
post_body = opts[:debug_body]
|
|
183
|
+
|
|
184
|
+
# return_type
|
|
185
|
+
return_type = opts[:debug_return_type] || 'ExchangeRateResponseDto'
|
|
166
186
|
|
|
167
|
-
|
|
187
|
+
# auth_names
|
|
188
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
168
189
|
|
|
169
|
-
|
|
170
|
-
|
|
190
|
+
new_options = opts.merge(
|
|
191
|
+
:operation => :"ExchangeRatesApi.exchange_rate_controller_get_usdto_eur_rate",
|
|
171
192
|
:header_params => header_params,
|
|
172
193
|
:query_params => query_params,
|
|
173
194
|
:form_params => form_params,
|
|
174
195
|
:body => post_body,
|
|
175
196
|
:auth_names => auth_names,
|
|
176
|
-
:return_type => return_type
|
|
197
|
+
:return_type => return_type
|
|
198
|
+
)
|
|
177
199
|
|
|
200
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
178
201
|
if @api_client.config.debugging
|
|
179
202
|
@api_client.config.logger.debug "API called: ExchangeRatesApi#exchange_rate_controller_get_usdto_eur_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
180
203
|
end
|