devdraft 1.0.0

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 (205) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +1246 -0
  4. data/Rakefile +8 -0
  5. data/devdraft_ai_sdk.gemspec +38 -0
  6. data/docs/APIHealthApi.md +87 -0
  7. data/docs/AggregatedBalanceResponse.md +9 -0
  8. data/docs/AllBalancesResponse.md +9 -0
  9. data/docs/AllOfAllBalancesResponseEurc.md +9 -0
  10. data/docs/AllOfAllBalancesResponseUsdc.md +9 -0
  11. data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +6 -0
  12. data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +6 -0
  13. data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +6 -0
  14. data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +6 -0
  15. data/docs/AllOfCreateCustomerDtoStatus.md +6 -0
  16. data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +6 -0
  17. data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +6 -0
  18. data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +6 -0
  19. data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +6 -0
  20. data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +6 -0
  21. data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +6 -0
  22. data/docs/AllOfUpdateCustomerDtoStatus.md +6 -0
  23. data/docs/AppBalancesApi.md +169 -0
  24. data/docs/BridgePaymentRail.md +6 -0
  25. data/docs/CreateBankPaymentIntentDto.md +24 -0
  26. data/docs/CreateCustomerDto.md +12 -0
  27. data/docs/CreateDirectBankTransferDto.md +14 -0
  28. data/docs/CreateDirectWalletTransferDto.md +10 -0
  29. data/docs/CreateInvoiceDto.md +22 -0
  30. data/docs/CreateLiquidationAddressDto.md +21 -0
  31. data/docs/CreatePaymentLinkDto.md +31 -0
  32. data/docs/CreateProductDto.md +18 -0
  33. data/docs/CreateStablePaymentIntentDto.md +21 -0
  34. data/docs/CreateStablecoinConversionDto.md +11 -0
  35. data/docs/CreateTaxInput.md +6 -0
  36. data/docs/CreateWebhookDto.md +11 -0
  37. data/docs/CustomerStatus.md +6 -0
  38. data/docs/CustomersApi.md +250 -0
  39. data/docs/DestinationCurrency.md +6 -0
  40. data/docs/ExchangeRateResponseDto.md +12 -0
  41. data/docs/ExchangeRatesApi.md +176 -0
  42. data/docs/FiatCurrency.md +6 -0
  43. data/docs/HealthResponseDto.md +12 -0
  44. data/docs/InvoiceProductDto.md +8 -0
  45. data/docs/InvoicesApi.md +236 -0
  46. data/docs/LiquidationAddressResponseDto.md +20 -0
  47. data/docs/LiquidationAddressesApi.md +152 -0
  48. data/docs/PaymentIntentsApi.md +127 -0
  49. data/docs/PaymentLinkProductDto.md +8 -0
  50. data/docs/PaymentLinksApi.md +238 -0
  51. data/docs/PaymentRequestDto.md +10 -0
  52. data/docs/PaymentResponseDto.md +11 -0
  53. data/docs/ProductsApi.md +404 -0
  54. data/docs/PublicHealthResponseDto.md +9 -0
  55. data/docs/RefundResponseDto.md +11 -0
  56. data/docs/StableCoinCurrency.md +6 -0
  57. data/docs/TaxesApi.md +292 -0
  58. data/docs/TestPaymentsApi.md +150 -0
  59. data/docs/TransfersApi.md +175 -0
  60. data/docs/UpdateCustomerDto.md +12 -0
  61. data/docs/UpdatePaymentLinkDto.md +6 -0
  62. data/docs/UpdatePreferenceInput.md +6 -0
  63. data/docs/UpdateProductDto.md +18 -0
  64. data/docs/UpdateTaxInput.md +6 -0
  65. data/docs/UpdateWebhookDto.md +11 -0
  66. data/docs/WalletsApi.md +58 -0
  67. data/docs/WebhookResponseDto.md +14 -0
  68. data/docs/WebhooksApi.md +307 -0
  69. data/git_push.sh +44 -0
  70. data/lib/devdraft/api/api_health_api.rb +116 -0
  71. data/lib/devdraft/api/app_balances_api.rb +170 -0
  72. data/lib/devdraft/api/customers_api.rb +258 -0
  73. data/lib/devdraft/api/exchange_rates_api.rb +184 -0
  74. data/lib/devdraft/api/invoices_api.rb +238 -0
  75. data/lib/devdraft/api/liquidation_addresses_api.rb +202 -0
  76. data/lib/devdraft/api/payment_intents_api.rb +150 -0
  77. data/lib/devdraft/api/payment_links_api.rb +240 -0
  78. data/lib/devdraft/api/products_api.rb +518 -0
  79. data/lib/devdraft/api/taxes_api.rb +290 -0
  80. data/lib/devdraft/api/test_payments_api.rb +202 -0
  81. data/lib/devdraft/api/transfers_api.rb +182 -0
  82. data/lib/devdraft/api/wallets_api.rb +66 -0
  83. data/lib/devdraft/api/webhooks_api.rb +310 -0
  84. data/lib/devdraft/api_client.rb +388 -0
  85. data/lib/devdraft/api_error.rb +57 -0
  86. data/lib/devdraft/configuration.rb +219 -0
  87. data/lib/devdraft/models/aggregated_balance_response.rb +278 -0
  88. data/lib/devdraft/models/all_balances_response.rb +242 -0
  89. data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +283 -0
  90. data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +283 -0
  91. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +202 -0
  92. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +202 -0
  93. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +202 -0
  94. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +202 -0
  95. data/lib/devdraft/models/all_of_create_customer_dto_status.rb +202 -0
  96. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +202 -0
  97. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +202 -0
  98. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +202 -0
  99. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +202 -0
  100. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +202 -0
  101. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +202 -0
  102. data/lib/devdraft/models/all_of_update_customer_dto_status.rb +202 -0
  103. data/lib/devdraft/models/bridge_payment_rail.rb +43 -0
  104. data/lib/devdraft/models/create_bank_payment_intent_dto.rb +397 -0
  105. data/lib/devdraft/models/create_customer_dto.rb +308 -0
  106. data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +302 -0
  107. data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +257 -0
  108. data/lib/devdraft/models/create_invoice_dto.rb +474 -0
  109. data/lib/devdraft/models/create_liquidation_address_dto.rb +408 -0
  110. data/lib/devdraft/models/create_payment_link_dto.rb +603 -0
  111. data/lib/devdraft/models/create_product_dto.rb +370 -0
  112. data/lib/devdraft/models/create_stable_payment_intent_dto.rb +362 -0
  113. data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +272 -0
  114. data/lib/devdraft/models/create_tax_input.rb +197 -0
  115. data/lib/devdraft/models/create_webhook_dto.rb +271 -0
  116. data/lib/devdraft/models/customer_status.rb +29 -0
  117. data/lib/devdraft/models/destination_currency.rb +34 -0
  118. data/lib/devdraft/models/exchange_rate_response_dto.rb +282 -0
  119. data/lib/devdraft/models/fiat_currency.rb +29 -0
  120. data/lib/devdraft/models/health_response_dto.rb +333 -0
  121. data/lib/devdraft/models/invoice_product_dto.rb +227 -0
  122. data/lib/devdraft/models/liquidation_address_response_dto.rb +377 -0
  123. data/lib/devdraft/models/payment_link_product_dto.rb +229 -0
  124. data/lib/devdraft/models/payment_request_dto.rb +252 -0
  125. data/lib/devdraft/models/payment_response_dto.rb +272 -0
  126. data/lib/devdraft/models/public_health_response_dto.rb +276 -0
  127. data/lib/devdraft/models/refund_response_dto.rb +272 -0
  128. data/lib/devdraft/models/stable_coin_currency.rb +28 -0
  129. data/lib/devdraft/models/update_customer_dto.rb +293 -0
  130. data/lib/devdraft/models/update_payment_link_dto.rb +197 -0
  131. data/lib/devdraft/models/update_preference_input.rb +197 -0
  132. data/lib/devdraft/models/update_product_dto.rb +355 -0
  133. data/lib/devdraft/models/update_tax_input.rb +197 -0
  134. data/lib/devdraft/models/update_webhook_dto.rb +251 -0
  135. data/lib/devdraft/models/webhook_response_dto.rb +317 -0
  136. data/lib/devdraft/version.rb +14 -0
  137. data/lib/devdraft.rb +101 -0
  138. data/spec/api/api_health_api_spec.rb +54 -0
  139. data/spec/api/app_balances_api_spec.rb +67 -0
  140. data/spec/api/customers_api_spec.rb +87 -0
  141. data/spec/api/exchange_rates_api_spec.rb +69 -0
  142. data/spec/api/invoices_api_spec.rb +80 -0
  143. data/spec/api/liquidation_addresses_api_spec.rb +72 -0
  144. data/spec/api/payment_intents_api_spec.rb +60 -0
  145. data/spec/api/payment_links_api_spec.rb +81 -0
  146. data/spec/api/products_api_spec.rb +130 -0
  147. data/spec/api/taxes_api_spec.rb +91 -0
  148. data/spec/api/test_payments_api_spec.rb +71 -0
  149. data/spec/api/transfers_api_spec.rb +67 -0
  150. data/spec/api/wallets_api_spec.rb +44 -0
  151. data/spec/api/webhooks_api_spec.rb +96 -0
  152. data/spec/api_client_spec.rb +225 -0
  153. data/spec/base_object_spec.rb +109 -0
  154. data/spec/configuration_spec.rb +41 -0
  155. data/spec/models/aggregated_balance_response_spec.rb +56 -0
  156. data/spec/models/all_balances_response_spec.rb +52 -0
  157. data/spec/models/all_of_all_balances_response_eurc_spec.rb +56 -0
  158. data/spec/models/all_of_all_balances_response_usdc_spec.rb +56 -0
  159. data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +34 -0
  160. data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +34 -0
  161. data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +34 -0
  162. data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +34 -0
  163. data/spec/models/all_of_create_customer_dto_status_spec.rb +34 -0
  164. data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +34 -0
  165. data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +34 -0
  166. data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +34 -0
  167. data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +34 -0
  168. data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +34 -0
  169. data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +34 -0
  170. data/spec/models/all_of_update_customer_dto_status_spec.rb +34 -0
  171. data/spec/models/bridge_payment_rail_spec.rb +34 -0
  172. data/spec/models/create_bank_payment_intent_dto_spec.rb +142 -0
  173. data/spec/models/create_customer_dto_spec.rb +74 -0
  174. data/spec/models/create_direct_bank_transfer_dto_spec.rb +82 -0
  175. data/spec/models/create_direct_wallet_transfer_dto_spec.rb +58 -0
  176. data/spec/models/create_invoice_dto_spec.rb +146 -0
  177. data/spec/models/create_liquidation_address_dto_spec.rb +132 -0
  178. data/spec/models/create_payment_link_dto_spec.rb +200 -0
  179. data/spec/models/create_product_dto_spec.rb +110 -0
  180. data/spec/models/create_stable_payment_intent_dto_spec.rb +124 -0
  181. data/spec/models/create_stablecoin_conversion_dto_spec.rb +64 -0
  182. data/spec/models/create_tax_input_spec.rb +34 -0
  183. data/spec/models/create_webhook_dto_spec.rb +64 -0
  184. data/spec/models/customer_status_spec.rb +34 -0
  185. data/spec/models/destination_currency_spec.rb +34 -0
  186. data/spec/models/exchange_rate_response_dto_spec.rb +70 -0
  187. data/spec/models/fiat_currency_spec.rb +34 -0
  188. data/spec/models/health_response_dto_spec.rb +78 -0
  189. data/spec/models/invoice_product_dto_spec.rb +46 -0
  190. data/spec/models/liquidation_address_response_dto_spec.rb +118 -0
  191. data/spec/models/payment_link_product_dto_spec.rb +46 -0
  192. data/spec/models/payment_request_dto_spec.rb +58 -0
  193. data/spec/models/payment_response_dto_spec.rb +64 -0
  194. data/spec/models/public_health_response_dto_spec.rb +56 -0
  195. data/spec/models/refund_response_dto_spec.rb +64 -0
  196. data/spec/models/stable_coin_currency_spec.rb +34 -0
  197. data/spec/models/update_customer_dto_spec.rb +74 -0
  198. data/spec/models/update_payment_link_dto_spec.rb +34 -0
  199. data/spec/models/update_preference_input_spec.rb +34 -0
  200. data/spec/models/update_product_dto_spec.rb +110 -0
  201. data/spec/models/update_tax_input_spec.rb +34 -0
  202. data/spec/models/update_webhook_dto_spec.rb +64 -0
  203. data/spec/models/webhook_response_dto_spec.rb +82 -0
  204. data/spec/spec_helper.rb +110 -0
  205. metadata +375 -0
@@ -0,0 +1,130 @@
1
+ =begin
2
+ #Devdraft AI Payment & Business Management API
3
+
4
+ # A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.65
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+
15
+ # Unit tests for DevDraftAI::ProductsApi
16
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
17
+ # Please update as you see appropriate
18
+ describe 'ProductsApi' do
19
+ before do
20
+ # run before each test
21
+ @instance = DevDraftAI::ProductsApi.new
22
+ end
23
+
24
+ after do
25
+ # run after each test
26
+ end
27
+
28
+ describe 'test an instance of ProductsApi' do
29
+ it 'should create an instance of ProductsApi' do
30
+ expect(@instance).to be_instance_of(DevDraftAI::ProductsApi)
31
+ end
32
+ end
33
+
34
+ # unit tests for product_controller_create
35
+ # Create a new product
36
+ # Creates a new product with optional image uploads. This endpoint allows you to create products with detailed information and multiple images. ## Use Cases - Add new products to your catalog - Create products with multiple images - Set up product pricing and descriptions ## Supported Image Formats - JPEG/JPG - PNG - WebP - Maximum 10 images per product - Maximum file size: 5MB per image ## Example Request (multipart/form-data) ``` name: \"Premium Widget\" description: \"High-quality widget for all your needs\" price: \"99.99\" images: [file1.jpg, file2.jpg] // Optional, up to 10 images ``` ## Required Fields - `name`: Product name - `price`: Product price (decimal number) ## Optional Fields - `description`: Detailed product description - `images`: Product images (up to 10 files)
37
+ # @param name
38
+ # @param description
39
+ # @param price
40
+ # @param currency
41
+ # @param type
42
+ # @param weight
43
+ # @param unit
44
+ # @param quantity
45
+ # @param stock_count
46
+ # @param status
47
+ # @param product_type
48
+ # @param images
49
+ # @param [Hash] opts the optional parameters
50
+ # @return [nil]
51
+ describe 'product_controller_create test' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
+ end
55
+ end
56
+
57
+ # unit tests for product_controller_find_all
58
+ # Get all products
59
+ # Retrieves a list of products with pagination. This endpoint allows you to fetch products with optional pagination. ## Use Cases - List all products - Browse product catalog - Implement product search ## Query Parameters - `skip`: Number of records to skip (default: 0) - `take`: Number of records to take (default: 10) ## Example Response ```json { \"data\": [ { \"id\": \"prod_123456\", \"name\": \"Premium Widget\", \"description\": \"High-quality widget for all your needs\", \"price\": \"99.99\", \"images\": [ \"https://storage.example.com/images/file1.jpg\", \"https://storage.example.com/images/file2.jpg\" ], \"createdAt\": \"2024-03-20T10:00:00Z\" } ], \"total\": 100, \"skip\": 0, \"take\": 10 } ```
60
+ # @param [Hash] opts the optional parameters
61
+ # @option opts [BigDecimal] :skip Number of records to skip
62
+ # @option opts [BigDecimal] :take Number of records to take
63
+ # @return [nil]
64
+ describe 'product_controller_find_all test' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
67
+ end
68
+ end
69
+
70
+ # unit tests for product_controller_find_one
71
+ # Get a product by ID
72
+ # Retrieves detailed information about a specific product. This endpoint allows you to fetch complete product details including all images. ## Use Cases - View product details - Display product information - Check product availability ## Example Response ```json { \"id\": \"prod_123456\", \"name\": \"Premium Widget\", \"description\": \"High-quality widget for all your needs\", \"price\": \"99.99\", \"images\": [ \"https://storage.example.com/images/file1.jpg\", \"https://storage.example.com/images/file2.jpg\" ], \"createdAt\": \"2024-03-20T10:00:00Z\", \"updatedAt\": \"2024-03-20T10:00:00Z\" } ```
73
+ # @param id Product ID
74
+ # @param [Hash] opts the optional parameters
75
+ # @return [nil]
76
+ describe 'product_controller_find_one test' do
77
+ it 'should work' do
78
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
79
+ end
80
+ end
81
+
82
+ # unit tests for product_controller_remove
83
+ # Delete a product
84
+ # Deletes a product and its associated images. This endpoint allows you to remove a product and all its associated data. ## Use Cases - Remove discontinued products - Clean up product catalog - Delete test products ## Notes - This action cannot be undone - All product images will be deleted - Associated data will be removed
85
+ # @param id Product ID
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [nil]
88
+ describe 'product_controller_remove test' do
89
+ it 'should work' do
90
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
91
+ end
92
+ end
93
+
94
+ # unit tests for product_controller_update
95
+ # Update a product
96
+ # Updates an existing product's information and optionally adds new images. This endpoint allows you to modify product details and manage product images. ## Use Cases - Update product information - Change product pricing - Modify product images - Update product description ## Example Request (multipart/form-data) ``` name: \"Updated Premium Widget\" description: \"Updated description\" price: \"129.99\" images: [file1.jpg, file2.jpg] // Optional, up to 10 images ``` ## Notes - Only include fields that need to be updated - New images will replace existing images - Maximum 10 images per product - Images are automatically optimized
97
+ # @param name
98
+ # @param description
99
+ # @param price
100
+ # @param currency
101
+ # @param type
102
+ # @param weight
103
+ # @param unit
104
+ # @param quantity
105
+ # @param stock_count
106
+ # @param status
107
+ # @param product_type
108
+ # @param images
109
+ # @param id Product ID
110
+ # @param [Hash] opts the optional parameters
111
+ # @return [nil]
112
+ describe 'product_controller_update test' do
113
+ it 'should work' do
114
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
115
+ end
116
+ end
117
+
118
+ # unit tests for product_controller_upload_image
119
+ # Upload images for a product
120
+ # Adds new images to an existing product. This endpoint allows you to upload additional images for a product that already exists. ## Use Cases - Add more product images - Update product gallery - Enhance product presentation ## Supported Image Formats - JPEG/JPG - PNG - WebP - Maximum 10 images per upload - Maximum file size: 5MB per image ## Example Request (multipart/form-data) ``` images: [file1.jpg, file2.jpg] // Up to 10 images ``` ## Notes - Images are appended to existing product images - Total images per product cannot exceed 10 - Images are automatically optimized and resized
121
+ # @param id Product ID
122
+ # @param [Hash] opts the optional parameters
123
+ # @return [nil]
124
+ describe 'product_controller_upload_image test' do
125
+ it 'should work' do
126
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
127
+ end
128
+ end
129
+
130
+ end
@@ -0,0 +1,91 @@
1
+ =begin
2
+ #Devdraft AI Payment & Business Management API
3
+
4
+ # A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.65
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+
15
+ # Unit tests for DevDraftAI::TaxesApi
16
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
17
+ # Please update as you see appropriate
18
+ describe 'TaxesApi' do
19
+ before do
20
+ # run before each test
21
+ @instance = DevDraftAI::TaxesApi.new
22
+ end
23
+
24
+ after do
25
+ # run after each test
26
+ end
27
+
28
+ describe 'test an instance of TaxesApi' do
29
+ it 'should create an instance of TaxesApi' do
30
+ expect(@instance).to be_instance_of(DevDraftAI::TaxesApi)
31
+ end
32
+ end
33
+
34
+ # unit tests for tax_controller_create
35
+ # Create a new tax
36
+ # @param body
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [nil]
39
+ describe 'tax_controller_create test' do
40
+ it 'should work' do
41
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
+ end
43
+ end
44
+
45
+ # unit tests for tax_controller_find_all
46
+ # Get all taxes
47
+ # @param [Hash] opts the optional parameters
48
+ # @option opts [String] :skip Number of records to skip
49
+ # @option opts [String] :take Number of records to take
50
+ # @return [nil]
51
+ describe 'tax_controller_find_all test' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
+ end
55
+ end
56
+
57
+ # unit tests for tax_controller_find_one
58
+ # Get a tax by ID
59
+ # @param id Tax ID
60
+ # @param [Hash] opts the optional parameters
61
+ # @return [nil]
62
+ describe 'tax_controller_find_one test' do
63
+ it 'should work' do
64
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
65
+ end
66
+ end
67
+
68
+ # unit tests for tax_controller_remove
69
+ # Delete a tax
70
+ # @param id Tax ID
71
+ # @param [Hash] opts the optional parameters
72
+ # @return [nil]
73
+ describe 'tax_controller_remove test' do
74
+ it 'should work' do
75
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
76
+ end
77
+ end
78
+
79
+ # unit tests for tax_controller_update
80
+ # Update a tax
81
+ # @param body
82
+ # @param id Tax ID
83
+ # @param [Hash] opts the optional parameters
84
+ # @return [nil]
85
+ describe 'tax_controller_update test' do
86
+ it 'should work' do
87
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
88
+ end
89
+ end
90
+
91
+ end
@@ -0,0 +1,71 @@
1
+ =begin
2
+ #Devdraft AI Payment & Business Management API
3
+
4
+ # A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.65
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+
15
+ # Unit tests for DevDraftAI::TestPaymentsApi
16
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
17
+ # Please update as you see appropriate
18
+ describe 'TestPaymentsApi' do
19
+ before do
20
+ # run before each test
21
+ @instance = DevDraftAI::TestPaymentsApi.new
22
+ end
23
+
24
+ after do
25
+ # run after each test
26
+ end
27
+
28
+ describe 'test an instance of TestPaymentsApi' do
29
+ it 'should create an instance of TestPaymentsApi' do
30
+ expect(@instance).to be_instance_of(DevDraftAI::TestPaymentsApi)
31
+ end
32
+ end
33
+
34
+ # unit tests for test_payment_controller_create_payment_v0
35
+ # Process a test payment
36
+ # Creates a new payment. Requires an idempotency key to prevent duplicate payments on retry. ## Idempotency Key Best Practices 1. **Generate unique keys**: Use UUIDs or similar unique identifiers, prefixed with a descriptive operation name 2. **Store keys client-side**: Save the key with the original request so you can retry with the same key 3. **Key format**: Between 6-64 alphanumeric characters 4. **Expiration**: Keys expire after 24 hours by default 5. **Use case**: Perfect for ensuring payment operations are never processed twice, even during network failures ## Example Request (curl) ```bash curl -X POST \\ https://api.example.com/rest-api/v0/test-payment \\ -H 'Content-Type: application/json' \\ -H 'Client-Key: your-api-key' \\ -H 'Client-Secret: your-api-secret' \\ -H 'Idempotency-Key: payment_123456_unique_key' \\ -d '{ \"amount\": 100.00, \"currency\": \"USD\", \"description\": \"Test payment for order #12345\", \"customerId\": \"cus_12345\" }' ``` ## Example Response (First Request) ```json { \"id\": \"pay_abc123xyz456\", \"amount\": 100.00, \"currency\": \"USD\", \"status\": \"succeeded\", \"timestamp\": \"2023-07-01T12:00:00.000Z\" } ``` ## Example Response (Duplicate Request) The exact same response will be returned for any duplicate request with the same idempotency key, without creating a new payment. ## Retry Scenario Example Network failure during payment submission: 1. Client creates payment request with idempotency key: \"payment_123456_unique_key\" 2. Request begins processing, but network connection fails before response received 3. Client retries the exact same request with the same idempotency key 4. Server detects duplicate idempotency key and returns the result of the first request 5. No duplicate payment is created If you retry with same key but different parameters (e.g., different amount), you'll receive a 409 Conflict error.
37
+ # @param body
38
+ # @param idempotency_key Unique key to ensure the request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [PaymentResponseDto]
41
+ describe 'test_payment_controller_create_payment_v0 test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ # unit tests for test_payment_controller_get_payment_v0
48
+ # Get payment details by ID
49
+ # @param id Payment ID
50
+ # @param [Hash] opts the optional parameters
51
+ # @return [PaymentResponseDto]
52
+ describe 'test_payment_controller_get_payment_v0 test' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
+ end
56
+ end
57
+
58
+ # unit tests for test_payment_controller_refund_payment_v0
59
+ # Refund a payment
60
+ # Refunds an existing payment. Requires an idempotency key to prevent duplicate refunds on retry. ## Idempotency Key Benefits for Refunds Refunds are critical financial operations where duplicates can cause serious issues. Using idempotency keys ensures: 1. **Prevent duplicate refunds**: Even if a request times out or fails, retrying with the same key won't issue multiple refunds 2. **Safe retries**: Network failures or timeouts won't risk creating multiple refunds 3. **Consistent response**: Always get the same response for the same operation ## Example Request (curl) ```bash curl -X POST \\ https://api.example.com/rest-api/v0/test-payment/pay_abc123xyz456/refund \\ -H 'Content-Type: application/json' \\ -H 'Client-Key: your-api-key' \\ -H 'Client-Secret: your-api-secret' \\ -H 'Idempotency-Key: refund_123456_unique_key' ``` ## Example Response (First Request) ```json { \"id\": \"ref_xyz789\", \"paymentId\": \"pay_abc123xyz456\", \"amount\": 100.00, \"status\": \"succeeded\", \"timestamp\": \"2023-07-01T14:30:00.000Z\" } ``` ## Example Response (Duplicate Request) The exact same response will be returned for any duplicate request with the same idempotency key, without creating a new refund. ## Idempotency Key Guidelines - Use a unique key for each distinct refund operation - Store keys client-side to ensure you can retry with the same key if needed - Keys expire after 24 hours by default
61
+ # @param id Payment ID to refund
62
+ # @param idempotency_key Unique key to ensure the refund request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
63
+ # @param [Hash] opts the optional parameters
64
+ # @return [RefundResponseDto]
65
+ describe 'test_payment_controller_refund_payment_v0 test' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ end
@@ -0,0 +1,67 @@
1
+ =begin
2
+ #Devdraft AI Payment & Business Management API
3
+
4
+ # A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.65
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+
15
+ # Unit tests for DevDraftAI::TransfersApi
16
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
17
+ # Please update as you see appropriate
18
+ describe 'TransfersApi' do
19
+ before do
20
+ # run before each test
21
+ @instance = DevDraftAI::TransfersApi.new
22
+ end
23
+
24
+ after do
25
+ # run after each test
26
+ end
27
+
28
+ describe 'test an instance of TransfersApi' do
29
+ it 'should create an instance of TransfersApi' do
30
+ expect(@instance).to be_instance_of(DevDraftAI::TransfersApi)
31
+ end
32
+ end
33
+
34
+ # unit tests for transfer_controller_create_direct_bank_transfer
35
+ # Create a direct bank transfer
36
+ # @param body
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [nil]
39
+ describe 'transfer_controller_create_direct_bank_transfer test' do
40
+ it 'should work' do
41
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
+ end
43
+ end
44
+
45
+ # unit tests for transfer_controller_create_direct_wallet_transfer
46
+ # Create a direct wallet transfer
47
+ # @param body
48
+ # @param [Hash] opts the optional parameters
49
+ # @return [nil]
50
+ describe 'transfer_controller_create_direct_wallet_transfer test' do
51
+ it 'should work' do
52
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
53
+ end
54
+ end
55
+
56
+ # unit tests for transfer_controller_create_stablecoin_conversion
57
+ # Create a stablecoin conversion
58
+ # @param body
59
+ # @param [Hash] opts the optional parameters
60
+ # @return [nil]
61
+ describe 'transfer_controller_create_stablecoin_conversion test' do
62
+ it 'should work' do
63
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
64
+ end
65
+ end
66
+
67
+ end
@@ -0,0 +1,44 @@
1
+ =begin
2
+ #Devdraft AI Payment & Business Management API
3
+
4
+ # A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.65
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+
15
+ # Unit tests for DevDraftAI::WalletsApi
16
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
17
+ # Please update as you see appropriate
18
+ describe 'WalletsApi' do
19
+ before do
20
+ # run before each test
21
+ @instance = DevDraftAI::WalletsApi.new
22
+ end
23
+
24
+ after do
25
+ # run after each test
26
+ end
27
+
28
+ describe 'test an instance of WalletsApi' do
29
+ it 'should create an instance of WalletsApi' do
30
+ expect(@instance).to be_instance_of(DevDraftAI::WalletsApi)
31
+ end
32
+ end
33
+
34
+ # unit tests for wallet_controller_get_wallets
35
+ # Get wallets for an app
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [nil]
38
+ describe 'wallet_controller_get_wallets test' do
39
+ it 'should work' do
40
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
41
+ end
42
+ end
43
+
44
+ end
@@ -0,0 +1,96 @@
1
+ =begin
2
+ #Devdraft AI Payment & Business Management API
3
+
4
+ # A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.65
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+
15
+ # Unit tests for DevDraftAI::WebhooksApi
16
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
17
+ # Please update as you see appropriate
18
+ describe 'WebhooksApi' do
19
+ before do
20
+ # run before each test
21
+ @instance = DevDraftAI::WebhooksApi.new
22
+ end
23
+
24
+ after do
25
+ # run after each test
26
+ end
27
+
28
+ describe 'test an instance of WebhooksApi' do
29
+ it 'should create an instance of WebhooksApi' do
30
+ expect(@instance).to be_instance_of(DevDraftAI::WebhooksApi)
31
+ end
32
+ end
33
+
34
+ # unit tests for webhook_controller_create
35
+ # Create a new webhook
36
+ # Creates a new webhook endpoint for receiving event notifications. Requires webhook:create scope.
37
+ # @param body Webhook configuration details
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [WebhookResponseDto]
40
+ describe 'webhook_controller_create test' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ # unit tests for webhook_controller_find_all
47
+ # Get all webhooks
48
+ # Retrieves a list of all webhooks for your application. Requires webhook:read scope.
49
+ # @param [Hash] opts the optional parameters
50
+ # @option opts [BigDecimal] :skip Number of records to skip (default: 0)
51
+ # @option opts [BigDecimal] :take Number of records to return (default: 10)
52
+ # @return [Array<WebhookResponseDto>]
53
+ describe 'webhook_controller_find_all test' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ # unit tests for webhook_controller_find_one
60
+ # Get a webhook by id
61
+ # Retrieves details for a specific webhook. Requires webhook:read scope.
62
+ # @param id Webhook ID
63
+ # @param [Hash] opts the optional parameters
64
+ # @return [WebhookResponseDto]
65
+ describe 'webhook_controller_find_one test' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ # unit tests for webhook_controller_remove
72
+ # Delete a webhook
73
+ # Deletes a webhook configuration. Requires webhook:delete scope.
74
+ # @param id Webhook ID
75
+ # @param [Hash] opts the optional parameters
76
+ # @return [WebhookResponseDto]
77
+ describe 'webhook_controller_remove test' do
78
+ it 'should work' do
79
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
+ end
81
+ end
82
+
83
+ # unit tests for webhook_controller_update
84
+ # Update a webhook
85
+ # Updates an existing webhook configuration. Requires webhook:update scope.
86
+ # @param body Webhook update details
87
+ # @param id Webhook ID
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [WebhookResponseDto]
90
+ describe 'webhook_controller_update test' do
91
+ it 'should work' do
92
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
93
+ end
94
+ end
95
+
96
+ end