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.
Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +155 -253
  3. data/Rakefile +2 -0
  4. data/devdraft-1.0.0.gem +0 -0
  5. data/{devdraft_ai_sdk.gemspec → devdraft.gemspec} +15 -11
  6. data/docs/APIHealthApi.md +82 -30
  7. data/docs/AggregatedBalanceResponse.md +19 -6
  8. data/docs/AllBalancesResponse.md +19 -6
  9. data/docs/AppBalancesApi.md +125 -65
  10. data/docs/BridgeFiatPaymentRail.md +15 -0
  11. data/docs/BridgePaymentRail.md +12 -3
  12. data/docs/CreateBankPaymentIntentDto.md +49 -21
  13. data/docs/CreateCustomerDto.md +25 -9
  14. data/docs/CreateDirectBankTransferDto.md +29 -11
  15. data/docs/CreateDirectWalletTransferDto.md +21 -7
  16. data/docs/CreateExternalBankTransferDto.md +40 -0
  17. data/docs/CreateExternalStablecoinTransferDto.md +28 -0
  18. data/docs/CreateInvoiceDto.md +45 -19
  19. data/docs/CreateLiquidationAddressDto.md +43 -18
  20. data/docs/CreatePaymentLinkDto.md +53 -28
  21. data/docs/CreateStablePaymentIntentDto.md +43 -18
  22. data/docs/CreateStablecoinConversionDto.md +23 -8
  23. data/docs/CreateTaxDto.md +26 -0
  24. data/docs/CreateWebhookDto.md +23 -8
  25. data/docs/CustomerStatus.md +12 -3
  26. data/docs/CustomerType.md +15 -0
  27. data/docs/CustomersApi.md +187 -114
  28. data/docs/DestinationCurrency.md +12 -3
  29. data/docs/ExchangeRateResponseDto.md +25 -9
  30. data/docs/ExchangeRatesApi.md +130 -72
  31. data/docs/FiatCurrency.md +12 -3
  32. data/docs/HealthResponseDto.md +25 -9
  33. data/docs/InvoiceProductDto.md +17 -5
  34. data/docs/InvoicesApi.md +177 -104
  35. data/docs/LiquidationAddressResponseDto.md +41 -17
  36. data/docs/LiquidationAddressesApi.md +115 -61
  37. data/docs/PaymentIntentsApi.md +93 -57
  38. data/docs/PaymentLinkProductDto.md +17 -5
  39. data/docs/PaymentLinksApi.md +175 -102
  40. data/docs/PaymentRequestDto.md +21 -7
  41. data/docs/PaymentResponseDto.md +23 -8
  42. data/docs/ProductsApi.md +307 -194
  43. data/docs/PublicHealthResponseDto.md +19 -6
  44. data/docs/RefundResponseDto.md +23 -8
  45. data/docs/StableCoinCurrency.md +12 -3
  46. data/docs/TaxControllerCreate201Response.md +30 -0
  47. data/docs/TaxControllerDeleteWithoutId400Response.md +22 -0
  48. data/docs/TaxControllerUpdateWithoutId400Response.md +22 -0
  49. data/docs/TaxesApi.md +374 -122
  50. data/docs/TestPaymentsApi.md +150 -60
  51. data/docs/TransfersApi.md +274 -72
  52. data/docs/UpdateCustomerDto.md +25 -9
  53. data/docs/UpdateTaxDto.md +26 -0
  54. data/docs/UpdateWebhookDto.md +23 -8
  55. data/docs/WalletsApi.md +44 -24
  56. data/docs/WebhookResponseDto.md +29 -11
  57. data/docs/WebhooksApi.md +225 -134
  58. data/git_push.sh +41 -28
  59. data/lib/devdraft/api/api_health_api.rb +32 -16
  60. data/lib/devdraft/api/app_balances_api.rb +45 -22
  61. data/lib/devdraft/api/customers_api.rb +124 -71
  62. data/lib/devdraft/api/exchange_rates_api.rb +49 -26
  63. data/lib/devdraft/api/invoices_api.rb +89 -53
  64. data/lib/devdraft/api/liquidation_addresses_api.rb +70 -44
  65. data/lib/devdraft/api/payment_intents_api.rb +62 -40
  66. data/lib/devdraft/api/payment_links_api.rb +85 -49
  67. data/lib/devdraft/api/products_api.rb +214 -216
  68. data/lib/devdraft/api/taxes_api.rb +257 -66
  69. data/lib/devdraft/api/test_payments_api.rb +70 -44
  70. data/lib/devdraft/api/transfers_api.rb +206 -46
  71. data/lib/devdraft/api/wallets_api.rb +18 -9
  72. data/lib/devdraft/api/webhooks_api.rb +109 -66
  73. data/lib/devdraft/api_client.rb +76 -71
  74. data/lib/devdraft/api_error.rb +5 -4
  75. data/lib/devdraft/api_model_base.rb +88 -0
  76. data/lib/devdraft/configuration.rb +121 -18
  77. data/lib/devdraft/models/aggregated_balance_response.rb +68 -101
  78. data/lib/devdraft/models/all_balances_response.rb +76 -99
  79. data/lib/devdraft/models/bridge_fiat_payment_rail.rb +45 -0
  80. data/lib/devdraft/models/bridge_payment_rail.rb +36 -24
  81. data/lib/devdraft/models/create_bank_payment_intent_dto.rb +191 -114
  82. data/lib/devdraft/models/create_customer_dto.rb +123 -113
  83. data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +105 -104
  84. data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +89 -100
  85. data/lib/devdraft/models/create_external_bank_transfer_dto.rb +505 -0
  86. data/lib/devdraft/models/create_external_stablecoin_transfer_dto.rb +266 -0
  87. data/lib/devdraft/models/create_invoice_dto.rb +151 -121
  88. data/lib/devdraft/models/create_liquidation_address_dto.rb +195 -115
  89. data/lib/devdraft/models/create_payment_link_dto.rb +192 -214
  90. data/lib/devdraft/models/create_stable_payment_intent_dto.rb +324 -111
  91. data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +102 -101
  92. data/lib/devdraft/models/create_tax_dto.rb +281 -0
  93. data/lib/devdraft/models/create_webhook_dto.rb +104 -101
  94. data/lib/devdraft/models/customer_status.rb +23 -10
  95. data/lib/devdraft/models/customer_type.rb +45 -0
  96. data/lib/devdraft/models/destination_currency.rb +27 -15
  97. data/lib/devdraft/models/exchange_rate_response_dto.rb +103 -102
  98. data/lib/devdraft/models/fiat_currency.rb +22 -10
  99. data/lib/devdraft/models/health_response_dto.rb +99 -106
  100. data/lib/devdraft/models/invoice_product_dto.rb +63 -98
  101. data/lib/devdraft/models/liquidation_address_response_dto.rb +147 -110
  102. data/lib/devdraft/models/payment_link_product_dto.rb +70 -98
  103. data/lib/devdraft/models/payment_request_dto.rb +77 -100
  104. data/lib/devdraft/models/payment_response_dto.rb +102 -101
  105. data/lib/devdraft/models/public_health_response_dto.rb +68 -101
  106. data/lib/devdraft/models/refund_response_dto.rb +102 -101
  107. data/lib/devdraft/models/stable_coin_currency.rb +21 -9
  108. data/lib/devdraft/models/tax_controller_create201_response.rb +201 -0
  109. data/lib/devdraft/models/tax_controller_delete_without_id400_response.rb +165 -0
  110. data/lib/devdraft/models/tax_controller_update_without_id400_response.rb +165 -0
  111. data/lib/devdraft/models/update_customer_dto.rb +117 -113
  112. data/lib/devdraft/models/update_tax_dto.rb +256 -0
  113. data/lib/devdraft/models/update_webhook_dto.rb +70 -101
  114. data/lib/devdraft/models/webhook_response_dto.rb +140 -103
  115. data/lib/devdraft/version.rb +6 -5
  116. data/lib/devdraft.rb +18 -27
  117. data/spec/api/api_health_api_spec.rb +10 -9
  118. data/spec/api/app_balances_api_spec.rb +11 -10
  119. data/spec/api/customers_api_spec.rb +25 -24
  120. data/spec/api/exchange_rates_api_spec.rb +11 -10
  121. data/spec/api/invoices_api_spec.rb +16 -15
  122. data/spec/api/liquidation_addresses_api_spec.rb +13 -12
  123. data/spec/api/payment_intents_api_spec.rb +12 -11
  124. data/spec/api/payment_links_api_spec.rb +14 -13
  125. data/spec/api/products_api_spec.rb +41 -40
  126. data/spec/api/taxes_api_spec.rb +51 -21
  127. data/spec/api/test_payments_api_spec.rb +14 -13
  128. data/spec/api/transfers_api_spec.rb +36 -13
  129. data/spec/api/wallets_api_spec.rb +9 -8
  130. data/spec/api/webhooks_api_spec.rb +20 -19
  131. data/spec/models/aggregated_balance_response_spec.rb +15 -19
  132. data/spec/models/all_balances_response_spec.rb +14 -18
  133. data/spec/models/bridge_fiat_payment_rail_spec.rb +30 -0
  134. data/spec/models/bridge_payment_rail_spec.rb +11 -15
  135. data/spec/models/create_bank_payment_intent_dto_spec.rb +29 -33
  136. data/spec/models/create_customer_dto_spec.rb +17 -25
  137. data/spec/models/create_direct_bank_transfer_dto_spec.rb +19 -23
  138. data/spec/models/create_direct_wallet_transfer_dto_spec.rb +15 -19
  139. data/spec/models/create_external_bank_transfer_dto_spec.rb +102 -0
  140. data/spec/models/create_external_stablecoin_transfer_dto_spec.rb +66 -0
  141. data/spec/models/create_invoice_dto_spec.rb +31 -35
  142. data/spec/models/create_liquidation_address_dto_spec.rb +28 -32
  143. data/spec/models/create_payment_link_dto_spec.rb +34 -76
  144. data/spec/models/create_stable_payment_intent_dto_spec.rb +26 -30
  145. data/spec/models/create_stablecoin_conversion_dto_spec.rb +16 -20
  146. data/spec/models/create_tax_dto_spec.rb +60 -0
  147. data/spec/models/create_webhook_dto_spec.rb +16 -20
  148. data/spec/models/customer_status_spec.rb +11 -15
  149. data/spec/models/customer_type_spec.rb +30 -0
  150. data/spec/models/destination_currency_spec.rb +11 -15
  151. data/spec/models/exchange_rate_response_dto_spec.rb +17 -21
  152. data/spec/models/fiat_currency_spec.rb +11 -15
  153. data/spec/models/health_response_dto_spec.rb +19 -23
  154. data/spec/models/invoice_product_dto_spec.rb +13 -17
  155. data/spec/models/liquidation_address_response_dto_spec.rb +25 -29
  156. data/spec/models/payment_link_product_dto_spec.rb +13 -17
  157. data/spec/models/payment_request_dto_spec.rb +15 -19
  158. data/spec/models/payment_response_dto_spec.rb +16 -20
  159. data/spec/models/public_health_response_dto_spec.rb +15 -19
  160. data/spec/models/refund_response_dto_spec.rb +16 -20
  161. data/spec/models/stable_coin_currency_spec.rb +11 -15
  162. data/spec/models/tax_controller_create201_response_spec.rb +72 -0
  163. data/spec/models/tax_controller_delete_without_id400_response_spec.rb +48 -0
  164. data/spec/models/tax_controller_update_without_id400_response_spec.rb +48 -0
  165. data/spec/models/update_customer_dto_spec.rb +17 -25
  166. data/spec/models/update_tax_dto_spec.rb +60 -0
  167. data/spec/models/update_webhook_dto_spec.rb +16 -20
  168. data/spec/models/webhook_response_dto_spec.rb +19 -23
  169. data/spec/spec_helper.rb +5 -4
  170. metadata +49 -116
  171. data/docs/AllOfAllBalancesResponseEurc.md +0 -9
  172. data/docs/AllOfAllBalancesResponseUsdc.md +0 -9
  173. data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +0 -6
  174. data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +0 -6
  175. data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +0 -6
  176. data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +0 -6
  177. data/docs/AllOfCreateCustomerDtoStatus.md +0 -6
  178. data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +0 -6
  179. data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +0 -6
  180. data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +0 -6
  181. data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +0 -6
  182. data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +0 -6
  183. data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +0 -6
  184. data/docs/AllOfUpdateCustomerDtoStatus.md +0 -6
  185. data/docs/CreateProductDto.md +0 -18
  186. data/docs/CreateTaxInput.md +0 -6
  187. data/docs/UpdatePaymentLinkDto.md +0 -6
  188. data/docs/UpdatePreferenceInput.md +0 -6
  189. data/docs/UpdateProductDto.md +0 -18
  190. data/docs/UpdateTaxInput.md +0 -6
  191. data/example.rb +0 -129
  192. data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +0 -283
  193. data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +0 -283
  194. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +0 -202
  195. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +0 -202
  196. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +0 -202
  197. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +0 -202
  198. data/lib/devdraft/models/all_of_create_customer_dto_status.rb +0 -202
  199. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +0 -202
  200. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +0 -202
  201. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +0 -202
  202. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +0 -202
  203. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +0 -202
  204. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +0 -202
  205. data/lib/devdraft/models/all_of_update_customer_dto_status.rb +0 -202
  206. data/lib/devdraft/models/create_product_dto.rb +0 -370
  207. data/lib/devdraft/models/create_tax_input.rb +0 -197
  208. data/lib/devdraft/models/update_payment_link_dto.rb +0 -197
  209. data/lib/devdraft/models/update_preference_input.rb +0 -197
  210. data/lib/devdraft/models/update_product_dto.rb +0 -355
  211. data/lib/devdraft/models/update_tax_input.rb +0 -197
  212. data/spec/api_client_spec.rb +0 -225
  213. data/spec/base_object_spec.rb +0 -109
  214. data/spec/configuration_spec.rb +0 -41
  215. data/spec/models/all_of_all_balances_response_eurc_spec.rb +0 -56
  216. data/spec/models/all_of_all_balances_response_usdc_spec.rb +0 -56
  217. data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +0 -34
  218. data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +0 -34
  219. data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +0 -34
  220. data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +0 -34
  221. data/spec/models/all_of_create_customer_dto_status_spec.rb +0 -34
  222. data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +0 -34
  223. data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +0 -34
  224. data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +0 -34
  225. data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +0 -34
  226. data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +0 -34
  227. data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +0 -34
  228. data/spec/models/all_of_update_customer_dto_status_spec.rb +0 -34
  229. data/spec/models/create_product_dto_spec.rb +0 -110
  230. data/spec/models/create_tax_input_spec.rb +0 -34
  231. data/spec/models/update_payment_link_dto_spec.rb +0 -34
  232. data/spec/models/update_preference_input_spec.rb +0 -34
  233. data/spec/models/update_product_dto_spec.rb +0 -110
  234. 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 spec version: 1.0.0
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
- module DevDraftAI
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 { \"firstName\": \"John\", \"lastName\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone\": \"+1234567890\", \"address\": { \"street\": \"123 Main St\", \"city\": \"New York\", \"state\": \"NY\", \"zipCode\": \"10001\", \"country\": \"USA\" } } ``` ## Required Fields - `firstName`: Customer's first name - `lastName`: Customer's last name - `email`: Valid email address (must be unique) ## Optional Fields - `phone`: Contact phone number - `address`: Complete address information - `street`: Street address - `city`: City name - `state`: State/province - `zipCode`: Postal/ZIP code - `country`: Country name
21
- # @param body Customer creation data
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(body, opts = {})
25
- customer_controller_create_with_http_info(body, opts)
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 { \"firstName\": \"John\", \"lastName\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone\": \"+1234567890\", \"address\": { \"street\": \"123 Main St\", \"city\": \"New York\", \"state\": \"NY\", \"zipCode\": \"10001\", \"country\": \"USA\" } } ``` ## Required Fields - `firstName`: Customer's first name - `lastName`: Customer's last name - `email`: Valid email address (must be unique) ## Optional Fields - `phone`: Contact phone number - `address`: Complete address information - `street`: Street address - `city`: City name - `state`: State/province - `zipCode`: Postal/ZIP code - `country`: Country name
31
- # @param body Customer creation data
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(body, opts = {})
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 'body' is set
39
- if @api_client.config.client_side_validation && body.nil?
40
- fail ArgumentError, "Missing the required parameter 'body' when calling CustomersApi.customer_controller_create"
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
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
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[:body] || @api_client.object_to_http_body(body)
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
- return_type = opts[:return_type]
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
60
70
 
61
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
62
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
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, INACTIVE, SUSPENDED) - `name`: Filter by customer name (partial match) - `email`: Filter by customer email (exact match) ## Example Response ```json { \"data\": [ { \"id\": \"cust_123456\", \"firstName\": \"John\", \"lastName\": \"Doe\", \"email\": \"john.doe@example.com\", \"status\": \"ACTIVE\", \"createdAt\": \"2024-03-20T10:00:00Z\" } ], \"total\": 100, \"skip\": 0, \"take\": 10 } ```
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 [String] :status Filter by customer status
79
- # @option opts [String] :name Filter by customer name
80
- # @option opts [String] :email Filter by customer email
81
- # @option opts [BigDecimal] :take Number of records to take
82
- # @option opts [BigDecimal] :skip Number of records to skip
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 - &#x60;skip&#x60;: Number of records to skip (default: 0) - &#x60;take&#x60;: Number of records to take (default: 10) - &#x60;status&#x60;: Filter by customer status (ACTIVE, INACTIVE, SUSPENDED) - &#x60;name&#x60;: Filter by customer name (partial match) - &#x60;email&#x60;: Filter by customer email (exact match) ## Example Response &#x60;&#x60;&#x60;json { \&quot;data\&quot;: [ { \&quot;id\&quot;: \&quot;cust_123456\&quot;, \&quot;firstName\&quot;: \&quot;John\&quot;, \&quot;lastName\&quot;: \&quot;Doe\&quot;, \&quot;email\&quot;: \&quot;john.doe@example.com\&quot;, \&quot;status\&quot;: \&quot;ACTIVE\&quot;, \&quot;createdAt\&quot;: \&quot;2024-03-20T10:00:00Z\&quot; } ], \&quot;total\&quot;: 100, \&quot;skip\&quot;: 0, \&quot;take\&quot;: 10 } &#x60;&#x60;&#x60;
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 - &#x60;skip&#x60;: Number of records to skip (default: 0, min: 0) - &#x60;take&#x60;: Number of records to take (default: 10, min: 1, max: 100) - &#x60;status&#x60;: Filter by customer status (ACTIVE, BLACKLISTED, DEACTIVATED) - &#x60;name&#x60;: Filter by customer name (partial match, case-insensitive) - &#x60;email&#x60;: Filter by customer email (exact match, case-insensitive) ## Example Request &#x60;GET /api/v0/customers?skip&#x3D;0&amp;take&#x3D;20&amp;status&#x3D;ACTIVE&amp;name&#x3D;John&#x60; ## Example Response &#x60;&#x60;&#x60;json { \&quot;data\&quot;: [ { \&quot;id\&quot;: \&quot;cust_123456\&quot;, \&quot;first_name\&quot;: \&quot;John\&quot;, \&quot;last_name\&quot;: \&quot;Doe\&quot;, \&quot;email\&quot;: \&quot;john.doe@example.com\&quot;, \&quot;phone_number\&quot;: \&quot;+1-555-123-4567\&quot;, \&quot;customer_type\&quot;: \&quot;Startup\&quot;, \&quot;status\&quot;: \&quot;ACTIVE\&quot;, \&quot;created_at\&quot;: \&quot;2024-03-20T10:00:00Z\&quot;, \&quot;updated_at\&quot;: \&quot;2024-03-20T10:00:00Z\&quot; } ], \&quot;total\&quot;: 100, \&quot;skip\&quot;: 0, \&quot;take\&quot;: 10 } &#x60;&#x60;&#x60;
91
104
  # @param [Hash] opts the optional parameters
92
- # @option opts [String] :status Filter by customer status
93
- # @option opts [String] :name Filter by customer name
94
- # @option opts [String] :email Filter by customer email
95
- # @option opts [BigDecimal] :take Number of records to take
96
- # @option opts [BigDecimal] :skip Number of records to skip
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[:'status'] && !['ACTIVE', 'BLACKLISTED', 'DEACTIVATED'].include?(opts[:'status'])
103
- fail ArgumentError, 'invalid value for "status", must be one of ACTIVE, BLACKLISTED, DEACTIVATED'
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[:body]
153
+ post_body = opts[:debug_body]
154
+
155
+ # return_type
156
+ return_type = opts[:debug_return_type]
124
157
 
125
- return_type = opts[:return_type]
158
+ # auth_names
159
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
126
160
 
127
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
128
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
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 address and contact information. ## Use Cases - View customer details - Verify customer information - Update customer records ## Example Response ```json { \"id\": \"cust_123456\", \"firstName\": \"John\", \"lastName\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone\": \"+1234567890\", \"status\": \"ACTIVE\", \"address\": { \"street\": \"123 Main St\", \"city\": \"New York\", \"state\": \"NY\", \"zipCode\": \"10001\", \"country\": \"USA\" }, \"createdAt\": \"2024-03-20T10:00:00Z\", \"updatedAt\": \"2024-03-20T10:00:00Z\" } ```
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 address and contact information. ## Use Cases - View customer details - Verify customer information - Update customer records ## Example Response &#x60;&#x60;&#x60;json { \&quot;id\&quot;: \&quot;cust_123456\&quot;, \&quot;firstName\&quot;: \&quot;John\&quot;, \&quot;lastName\&quot;: \&quot;Doe\&quot;, \&quot;email\&quot;: \&quot;john.doe@example.com\&quot;, \&quot;phone\&quot;: \&quot;+1234567890\&quot;, \&quot;status\&quot;: \&quot;ACTIVE\&quot;, \&quot;address\&quot;: { \&quot;street\&quot;: \&quot;123 Main St\&quot;, \&quot;city\&quot;: \&quot;New York\&quot;, \&quot;state\&quot;: \&quot;NY\&quot;, \&quot;zipCode\&quot;: \&quot;10001\&quot;, \&quot;country\&quot;: \&quot;USA\&quot; }, \&quot;createdAt\&quot;: \&quot;2024-03-20T10:00:00Z\&quot;, \&quot;updatedAt\&quot;: \&quot;2024-03-20T10:00:00Z\&quot; } &#x60;&#x60;&#x60;
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 - &#x60;id&#x60;: Customer UUID (required) - Must be a valid UUID format ## Example Request &#x60;GET /api/v0/customers/123e4567-e89b-12d3-a456-426614174000&#x60; ## Example Response &#x60;&#x60;&#x60;json { \&quot;id\&quot;: \&quot;cust_123456\&quot;, \&quot;first_name\&quot;: \&quot;John\&quot;, \&quot;last_name\&quot;: \&quot;Doe\&quot;, \&quot;email\&quot;: \&quot;john.doe@example.com\&quot;, \&quot;phone_number\&quot;: \&quot;+1-555-123-4567\&quot;, \&quot;customer_type\&quot;: \&quot;Enterprise\&quot;, \&quot;status\&quot;: \&quot;ACTIVE\&quot;, \&quot;last_spent\&quot;: 1250.50, \&quot;last_purchase_date\&quot;: \&quot;2024-03-15T14:30:00Z\&quot;, \&quot;created_at\&quot;: \&quot;2024-03-20T10:00:00Z\&quot;, \&quot;updated_at\&quot;: \&quot;2024-03-20T10:00:00Z\&quot; } &#x60;&#x60;&#x60;
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[:body]
214
+ post_body = opts[:debug_body]
178
215
 
179
- return_type = opts[:return_type]
216
+ # return_type
217
+ return_type = opts[:debug_return_type]
180
218
 
181
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
182
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
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 address - Modify customer status ## Example Request ```json { \"firstName\": \"John\", \"lastName\": \"Smith\", \"phone\": \"+1987654321\", \"address\": { \"street\": \"456 Oak St\", \"city\": \"Los Angeles\", \"state\": \"CA\", \"zipCode\": \"90001\", \"country\": \"USA\" } } ``` ## Notes - Only include fields that need to be updated - Email address cannot be changed - Status changes may require additional verification
197
- # @param body Customer update data
198
- # @param id
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(body, id, opts = {})
202
- customer_controller_update_with_http_info(body, id, opts)
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&#x27;s information. This endpoint allows you to modify customer details while preserving their core information. ## Use Cases - Update customer contact information - Change customer address - Modify customer status ## Example Request &#x60;&#x60;&#x60;json { \&quot;firstName\&quot;: \&quot;John\&quot;, \&quot;lastName\&quot;: \&quot;Smith\&quot;, \&quot;phone\&quot;: \&quot;+1987654321\&quot;, \&quot;address\&quot;: { \&quot;street\&quot;: \&quot;456 Oak St\&quot;, \&quot;city\&quot;: \&quot;Los Angeles\&quot;, \&quot;state\&quot;: \&quot;CA\&quot;, \&quot;zipCode\&quot;: \&quot;90001\&quot;, \&quot;country\&quot;: \&quot;USA\&quot; } } &#x60;&#x60;&#x60; ## Notes - Only include fields that need to be updated - Email address cannot be changed - Status changes may require additional verification
208
- # @param body Customer update data
209
- # @param id
251
+ # Updates an existing customer&#39;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 - &#x60;id&#x60;: Customer UUID (required) - Must be a valid UUID format ## Example Request &#x60;PATCH /api/v0/customers/123e4567-e89b-12d3-a456-426614174000&#x60; ## Example Request Body &#x60;&#x60;&#x60;json { \&quot;first_name\&quot;: \&quot;John\&quot;, \&quot;last_name\&quot;: \&quot;Smith\&quot;, \&quot;phone_number\&quot;: \&quot;+1-987-654-3210\&quot;, \&quot;customer_type\&quot;: \&quot;Small Business\&quot; } &#x60;&#x60;&#x60; ## 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(body, id, opts = {})
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
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
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[:body] || @api_client.object_to_http_body(body)
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
- return_type = opts[:return_type]
291
+ # auth_names
292
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
242
293
 
243
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
244
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
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 spec version: 1.0.0
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
- module DevDraftAI
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[:body]
54
+ post_body = opts[:debug_body]
52
55
 
53
- return_type = opts[:return_type] || 'ExchangeRateResponseDto'
56
+ # return_type
57
+ return_type = opts[:debug_return_type] || 'ExchangeRateResponseDto'
54
58
 
55
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
56
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
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[:body]
125
+ post_body = opts[:debug_body]
116
126
 
117
- return_type = opts[:return_type] || 'ExchangeRateResponseDto'
127
+ # return_type
128
+ return_type = opts[:debug_return_type] || 'ExchangeRateResponseDto'
118
129
 
119
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
120
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
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[:body]
182
+ post_body = opts[:debug_body]
183
+
184
+ # return_type
185
+ return_type = opts[:debug_return_type] || 'ExchangeRateResponseDto'
166
186
 
167
- return_type = opts[:return_type] || 'ExchangeRateResponseDto'
187
+ # auth_names
188
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
168
189
 
169
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
170
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
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