devdraft 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +160 -191
  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 -94
  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
@@ -1,225 +0,0 @@
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
-
14
- describe DevDraftAI::ApiClient do
15
- context 'initialization' do
16
- context 'URL stuff' do
17
- context 'host' do
18
- it 'removes http from host' do
19
- DevDraftAI.configure { |c| c.host = 'http://example.com' }
20
- expect(DevDraftAI::Configuration.default.host).to eq('example.com')
21
- end
22
-
23
- it 'removes https from host' do
24
- DevDraftAI.configure { |c| c.host = 'https://wookiee.com' }
25
- expect(DevDraftAI::ApiClient.default.config.host).to eq('wookiee.com')
26
- end
27
-
28
- it 'removes trailing path from host' do
29
- DevDraftAI.configure { |c| c.host = 'hobo.com/v4' }
30
- expect(DevDraftAI::Configuration.default.host).to eq('hobo.com')
31
- end
32
- end
33
-
34
- context 'base_path' do
35
- it "prepends a slash to base_path" do
36
- DevDraftAI.configure { |c| c.base_path = 'v4/dog' }
37
- expect(DevDraftAI::Configuration.default.base_path).to eq('/v4/dog')
38
- end
39
-
40
- it "doesn't prepend a slash if one is already there" do
41
- DevDraftAI.configure { |c| c.base_path = '/v4/dog' }
42
- expect(DevDraftAI::Configuration.default.base_path).to eq('/v4/dog')
43
- end
44
-
45
- it "ends up as a blank string if nil" do
46
- DevDraftAI.configure { |c| c.base_path = nil }
47
- expect(DevDraftAI::Configuration.default.base_path).to eq('')
48
- end
49
- end
50
- end
51
- end
52
-
53
- describe 'params_encoding in #build_request' do
54
- let(:config) { DevDraftAI::Configuration.new }
55
- let(:api_client) { DevDraftAI::ApiClient.new(config) }
56
-
57
- it 'defaults to nil' do
58
- expect(DevDraftAI::Configuration.default.params_encoding).to eq(nil)
59
- expect(config.params_encoding).to eq(nil)
60
-
61
- request = api_client.build_request(:get, '/test')
62
- expect(request.options[:params_encoding]).to eq(nil)
63
- end
64
-
65
- it 'can be customized' do
66
- config.params_encoding = :multi
67
- request = api_client.build_request(:get, '/test')
68
- expect(request.options[:params_encoding]).to eq(:multi)
69
- end
70
- end
71
-
72
- describe 'timeout in #build_request' do
73
- let(:config) { DevDraftAI::Configuration.new }
74
- let(:api_client) { DevDraftAI::ApiClient.new(config) }
75
-
76
- it 'defaults to 0' do
77
- expect(DevDraftAI::Configuration.default.timeout).to eq(0)
78
- expect(config.timeout).to eq(0)
79
-
80
- request = api_client.build_request(:get, '/test')
81
- expect(request.options[:timeout]).to eq(0)
82
- end
83
-
84
- it 'can be customized' do
85
- config.timeout = 100
86
- request = api_client.build_request(:get, '/test')
87
- expect(request.options[:timeout]).to eq(100)
88
- end
89
- end
90
-
91
- describe '#deserialize' do
92
- it "handles Array<Integer>" do
93
- api_client = DevDraftAI::ApiClient.new
94
- headers = { 'Content-Type' => 'application/json' }
95
- response = double('response', headers: headers, body: '[12, 34]')
96
- data = api_client.deserialize(response, 'Array<Integer>')
97
- expect(data).to be_instance_of(Array)
98
- expect(data).to eq([12, 34])
99
- end
100
-
101
- it 'handles Array<Array<Integer>>' do
102
- api_client = DevDraftAI::ApiClient.new
103
- headers = { 'Content-Type' => 'application/json' }
104
- response = double('response', headers: headers, body: '[[12, 34], [56]]')
105
- data = api_client.deserialize(response, 'Array<Array<Integer>>')
106
- expect(data).to be_instance_of(Array)
107
- expect(data).to eq([[12, 34], [56]])
108
- end
109
-
110
- it 'handles Hash<String, String>' do
111
- api_client = DevDraftAI::ApiClient.new
112
- headers = { 'Content-Type' => 'application/json' }
113
- response = double('response', headers: headers, body: '{"message": "Hello"}')
114
- data = api_client.deserialize(response, 'Hash<String, String>')
115
- expect(data).to be_instance_of(Hash)
116
- expect(data).to eq(:message => 'Hello')
117
- end
118
- end
119
-
120
- describe "#object_to_hash" do
121
- it 'ignores nils and includes empty arrays' do
122
- # uncomment below to test object_to_hash for model
123
- # api_client = DevDraftAI::ApiClient.new
124
- # _model = DevDraftAI::ModelName.new
125
- # update the model attribute below
126
- # _model.id = 1
127
- # update the expected value (hash) below
128
- # expected = {id: 1, name: '', tags: []}
129
- # expect(api_client.object_to_hash(_model)).to eq(expected)
130
- end
131
- end
132
-
133
- describe '#build_collection_param' do
134
- let(:param) { ['aa', 'bb', 'cc'] }
135
- let(:api_client) { DevDraftAI::ApiClient.new }
136
-
137
- it 'works for csv' do
138
- expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
139
- end
140
-
141
- it 'works for ssv' do
142
- expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
143
- end
144
-
145
- it 'works for tsv' do
146
- expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
147
- end
148
-
149
- it 'works for pipes' do
150
- expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
151
- end
152
-
153
- it 'works for multi' do
154
- expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
155
- end
156
-
157
- it 'fails for invalid collection format' do
158
- expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
159
- end
160
- end
161
-
162
- describe '#json_mime?' do
163
- let(:api_client) { DevDraftAI::ApiClient.new }
164
-
165
- it 'works' do
166
- expect(api_client.json_mime?(nil)).to eq false
167
- expect(api_client.json_mime?('')).to eq false
168
-
169
- expect(api_client.json_mime?('application/json')).to eq true
170
- expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
171
- expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
172
-
173
- expect(api_client.json_mime?('application/xml')).to eq false
174
- expect(api_client.json_mime?('text/plain')).to eq false
175
- expect(api_client.json_mime?('application/jsonp')).to eq false
176
- end
177
- end
178
-
179
- describe '#select_header_accept' do
180
- let(:api_client) { DevDraftAI::ApiClient.new }
181
-
182
- it 'works' do
183
- expect(api_client.select_header_accept(nil)).to be_nil
184
- expect(api_client.select_header_accept([])).to be_nil
185
-
186
- expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
187
- expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
188
- expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
189
-
190
- expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
191
- expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
192
- end
193
- end
194
-
195
- describe '#select_header_content_type' do
196
- let(:api_client) { DevDraftAI::ApiClient.new }
197
-
198
- it 'works' do
199
- expect(api_client.select_header_content_type(nil)).to eq('application/json')
200
- expect(api_client.select_header_content_type([])).to eq('application/json')
201
-
202
- expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
203
- expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
204
- expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
205
- expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
206
- expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
207
- end
208
- end
209
-
210
- describe '#sanitize_filename' do
211
- let(:api_client) { DevDraftAI::ApiClient.new }
212
-
213
- it 'works' do
214
- expect(api_client.sanitize_filename('sun')).to eq('sun')
215
- expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
216
- expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
217
- expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
218
- expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
219
- expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
220
- expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
221
- expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
222
- expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
223
- end
224
- end
225
- end
@@ -1,109 +0,0 @@
1
- require 'spec_helper'
2
-
3
- class ArrayMapObject < Petstore::Category
4
- attr_accessor :int_arr, :pet_arr, :int_map, :pet_map, :int_arr_map, :pet_arr_map, :boolean_true_arr, :boolean_false_arr
5
-
6
- def self.attribute_map
7
- {
8
- :int_arr => :int_arr,
9
- :pet_arr => :pet_arr,
10
- :int_map => :int_map,
11
- :pet_map => :pet_map,
12
- :int_arr_map => :int_arr_map,
13
- :pet_arr_map => :pet_arr_map,
14
- :boolean_true_arr => :boolean_true_arr,
15
- :boolean_false_arr => :boolean_false_arr,
16
- }
17
- end
18
-
19
- def self.swagger_types
20
- {
21
- :int_arr => :'Array<Integer>',
22
- :pet_arr => :'Array<Pet>',
23
- :int_map => :'Hash<String, Integer>',
24
- :pet_map => :'Hash<String, Pet>',
25
- :int_arr_map => :'Hash<String, Array<Integer>>',
26
- :pet_arr_map => :'Hash<String, Array<Pet>>',
27
- :boolean_true_arr => :'Array<BOOLEAN>',
28
- :boolean_false_arr => :'Array<BOOLEAN>',
29
- }
30
- end
31
- end
32
-
33
- describe 'BaseObject' do
34
- describe 'boolean values' do
35
- let(:obj) { Petstore::Cat.new({declawed: false}) }
36
-
37
- it 'should have values set' do
38
- expect(obj.declawed).not_to be_nil
39
- expect(obj.declawed).to eq(false)
40
- end
41
- end
42
-
43
- describe 'array and map properties' do
44
- let(:obj) { ArrayMapObject.new }
45
-
46
- let(:data) do
47
- {int_arr: [123, 456],
48
- pet_arr: [{name: 'Kitty'}],
49
- int_map: {'int' => 123},
50
- pet_map: {'pet' => {name: 'Kitty'}},
51
- int_arr_map: {'int_arr' => [123, 456]},
52
- pet_arr_map: {'pet_arr' => [{name: 'Kitty'}]},
53
- boolean_true_arr: [true, "true", "TruE", 1, "y", "yes", "1", "t", "T"],
54
- boolean_false_arr: [false, "", 0, "0", "f", nil, "null"],
55
- }
56
- end
57
-
58
- it 'works for #build_from_hash' do
59
- obj.build_from_hash(data)
60
-
61
- expect(obj.int_arr).to match_array([123, 456])
62
-
63
- expect(obj.pet_arr).to be_instance_of(Array)
64
- expect(obj.pet_arr).to be_instance_of(1)
65
-
66
- pet = obj.pet_arr.first
67
- expect(pet).to be_instance_of(Petstore::Pet)
68
- expect(pet.name).to eq('Kitty')
69
-
70
- expect(obj.int_map).to be_instance_of(Hash)
71
- expect(obj.int_map).to eq({'int' => 123})
72
-
73
- expect(obj.pet_map).to be_instance_of(Hash)
74
- pet = obj.pet_map['pet']
75
- expect(pet).to be_instance_of(Petstore::Pet)
76
- expect(pet.name).to eq('Kitty')
77
-
78
- expect(obj.int_arr_map).to be_instance_of(Hash)
79
- arr = obj.int_arr_map['int_arr']
80
- expect(arr).to match_array([123, 456])
81
-
82
- expect(obj.pet_arr_map).to be_instance_of(Hash)
83
- arr = obj.pet_arr_map['pet_arr']
84
- expect(arr).to be_instance_of(Array)
85
- expect(arr.size).to eq(1)
86
- pet = arr.first
87
- expect(pet).to be_instance_of(Petstore::Pet)
88
- expect(pet.name).to eq('Kitty')
89
-
90
- expect(obj.boolean_true_arr).to be_instance_of(Array)
91
- obj.boolean_true_arr.each do |b|
92
- expect(b).to eq(true)
93
- end
94
-
95
- expect(obj.boolean_false_arr).to be_instance_of(Array)
96
- obj.boolean_false_arr.each do |b|
97
- expect(b).to eq(false)
98
- end
99
- end
100
-
101
- it 'works for #to_hash' do
102
- obj.build_from_hash(data)
103
- expect_data = data.dup
104
- expect_data[:boolean_true_arr].map! {true}
105
- expect_data[:boolean_false_arr].map! {false}
106
- expect(obj.to_hash).to eq(expect_data)
107
- end
108
- end
109
- end
@@ -1,41 +0,0 @@
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
-
14
- describe DevDraftAI::Configuration do
15
- let(:config) { DevDraftAI::Configuration.default }
16
-
17
- before(:each) do
18
- # uncomment below to setup host and base_path
19
- # require 'URI'
20
- # uri = URI.parse("https://api.devdraft.ai")
21
- # DevDraftAI.configure do |c|
22
- # c.host = uri.host
23
- # c.base_path = uri.path
24
- # end
25
- end
26
-
27
- describe '#base_url' do
28
- it 'should have the default value' do
29
- # uncomment below to test default value of the base path
30
- # expect(config.base_url).to eq("https://api.devdraft.ai")
31
- end
32
-
33
- it 'should remove trailing slashes' do
34
- [nil, '', '/', '//'].each do |base_path|
35
- config.base_path = base_path
36
- # uncomment below to test trailing slashes
37
- # expect(config.base_url).to eq("https://api.devdraft.ai")
38
- end
39
- end
40
- end
41
- end
@@ -1,56 +0,0 @@
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
- require 'date'
15
-
16
- # Unit tests for DevDraftAI::AllOfAllBalancesResponseEurc
17
- # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
- # Please update as you see appropriate
19
- describe 'AllOfAllBalancesResponseEurc' do
20
- before do
21
- # run before each test
22
- @instance = DevDraftAI::AllOfAllBalancesResponseEurc.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of AllOfAllBalancesResponseEurc' do
30
- it 'should create an instance of AllOfAllBalancesResponseEurc' do
31
- expect(@instance).to be_instance_of(DevDraftAI::AllOfAllBalancesResponseEurc)
32
- end
33
- end
34
- describe 'test attribute "currency"' do
35
- it 'should work' do
36
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["usdc", "eurc"])
38
- # validator.allowable_values.each do |value|
39
- # expect { @instance.currency = value }.not_to raise_error
40
- # end
41
- end
42
- end
43
-
44
- describe 'test attribute "total_balance"' do
45
- it 'should work' do
46
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
47
- end
48
- end
49
-
50
- describe 'test attribute "balances"' 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
- end
@@ -1,56 +0,0 @@
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
- require 'date'
15
-
16
- # Unit tests for DevDraftAI::AllOfAllBalancesResponseUsdc
17
- # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
- # Please update as you see appropriate
19
- describe 'AllOfAllBalancesResponseUsdc' do
20
- before do
21
- # run before each test
22
- @instance = DevDraftAI::AllOfAllBalancesResponseUsdc.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of AllOfAllBalancesResponseUsdc' do
30
- it 'should create an instance of AllOfAllBalancesResponseUsdc' do
31
- expect(@instance).to be_instance_of(DevDraftAI::AllOfAllBalancesResponseUsdc)
32
- end
33
- end
34
- describe 'test attribute "currency"' do
35
- it 'should work' do
36
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["usdc", "eurc"])
38
- # validator.allowable_values.each do |value|
39
- # expect { @instance.currency = value }.not_to raise_error
40
- # end
41
- end
42
- end
43
-
44
- describe 'test attribute "total_balance"' do
45
- it 'should work' do
46
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
47
- end
48
- end
49
-
50
- describe 'test attribute "balances"' 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
- end
@@ -1,34 +0,0 @@
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
- require 'date'
15
-
16
- # Unit tests for DevDraftAI::AllOfCreateBankPaymentIntentDtoDestinationCurrency
17
- # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
- # Please update as you see appropriate
19
- describe 'AllOfCreateBankPaymentIntentDtoDestinationCurrency' do
20
- before do
21
- # run before each test
22
- @instance = DevDraftAI::AllOfCreateBankPaymentIntentDtoDestinationCurrency.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of AllOfCreateBankPaymentIntentDtoDestinationCurrency' do
30
- it 'should create an instance of AllOfCreateBankPaymentIntentDtoDestinationCurrency' do
31
- expect(@instance).to be_instance_of(DevDraftAI::AllOfCreateBankPaymentIntentDtoDestinationCurrency)
32
- end
33
- end
34
- end
@@ -1,34 +0,0 @@
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
- require 'date'
15
-
16
- # Unit tests for DevDraftAI::AllOfCreateBankPaymentIntentDtoDestinationNetwork
17
- # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
- # Please update as you see appropriate
19
- describe 'AllOfCreateBankPaymentIntentDtoDestinationNetwork' do
20
- before do
21
- # run before each test
22
- @instance = DevDraftAI::AllOfCreateBankPaymentIntentDtoDestinationNetwork.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of AllOfCreateBankPaymentIntentDtoDestinationNetwork' do
30
- it 'should create an instance of AllOfCreateBankPaymentIntentDtoDestinationNetwork' do
31
- expect(@instance).to be_instance_of(DevDraftAI::AllOfCreateBankPaymentIntentDtoDestinationNetwork)
32
- end
33
- end
34
- end
@@ -1,34 +0,0 @@
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
- require 'date'
15
-
16
- # Unit tests for DevDraftAI::AllOfCreateBankPaymentIntentDtoSourceCurrency
17
- # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
- # Please update as you see appropriate
19
- describe 'AllOfCreateBankPaymentIntentDtoSourceCurrency' do
20
- before do
21
- # run before each test
22
- @instance = DevDraftAI::AllOfCreateBankPaymentIntentDtoSourceCurrency.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of AllOfCreateBankPaymentIntentDtoSourceCurrency' do
30
- it 'should create an instance of AllOfCreateBankPaymentIntentDtoSourceCurrency' do
31
- expect(@instance).to be_instance_of(DevDraftAI::AllOfCreateBankPaymentIntentDtoSourceCurrency)
32
- end
33
- end
34
- end
@@ -1,34 +0,0 @@
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
- require 'date'
15
-
16
- # Unit tests for DevDraftAI::AllOfCreateBankPaymentIntentDtoSourcePaymentRail
17
- # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
- # Please update as you see appropriate
19
- describe 'AllOfCreateBankPaymentIntentDtoSourcePaymentRail' do
20
- before do
21
- # run before each test
22
- @instance = DevDraftAI::AllOfCreateBankPaymentIntentDtoSourcePaymentRail.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of AllOfCreateBankPaymentIntentDtoSourcePaymentRail' do
30
- it 'should create an instance of AllOfCreateBankPaymentIntentDtoSourcePaymentRail' do
31
- expect(@instance).to be_instance_of(DevDraftAI::AllOfCreateBankPaymentIntentDtoSourcePaymentRail)
32
- end
33
- end
34
- end
@@ -1,34 +0,0 @@
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
- require 'date'
15
-
16
- # Unit tests for DevDraftAI::AllOfCreateCustomerDtoStatus
17
- # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
- # Please update as you see appropriate
19
- describe 'AllOfCreateCustomerDtoStatus' do
20
- before do
21
- # run before each test
22
- @instance = DevDraftAI::AllOfCreateCustomerDtoStatus.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of AllOfCreateCustomerDtoStatus' do
30
- it 'should create an instance of AllOfCreateCustomerDtoStatus' do
31
- expect(@instance).to be_instance_of(DevDraftAI::AllOfCreateCustomerDtoStatus)
32
- end
33
- end
34
- end