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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +1246 -0
- data/Rakefile +8 -0
- data/devdraft_ai_sdk.gemspec +38 -0
- data/docs/APIHealthApi.md +87 -0
- data/docs/AggregatedBalanceResponse.md +9 -0
- data/docs/AllBalancesResponse.md +9 -0
- data/docs/AllOfAllBalancesResponseEurc.md +9 -0
- data/docs/AllOfAllBalancesResponseUsdc.md +9 -0
- data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +6 -0
- data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +6 -0
- data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +6 -0
- data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +6 -0
- data/docs/AllOfCreateCustomerDtoStatus.md +6 -0
- data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +6 -0
- data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +6 -0
- data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +6 -0
- data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +6 -0
- data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +6 -0
- data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +6 -0
- data/docs/AllOfUpdateCustomerDtoStatus.md +6 -0
- data/docs/AppBalancesApi.md +169 -0
- data/docs/BridgePaymentRail.md +6 -0
- data/docs/CreateBankPaymentIntentDto.md +24 -0
- data/docs/CreateCustomerDto.md +12 -0
- data/docs/CreateDirectBankTransferDto.md +14 -0
- data/docs/CreateDirectWalletTransferDto.md +10 -0
- data/docs/CreateInvoiceDto.md +22 -0
- data/docs/CreateLiquidationAddressDto.md +21 -0
- data/docs/CreatePaymentLinkDto.md +31 -0
- data/docs/CreateProductDto.md +18 -0
- data/docs/CreateStablePaymentIntentDto.md +21 -0
- data/docs/CreateStablecoinConversionDto.md +11 -0
- data/docs/CreateTaxInput.md +6 -0
- data/docs/CreateWebhookDto.md +11 -0
- data/docs/CustomerStatus.md +6 -0
- data/docs/CustomersApi.md +250 -0
- data/docs/DestinationCurrency.md +6 -0
- data/docs/ExchangeRateResponseDto.md +12 -0
- data/docs/ExchangeRatesApi.md +176 -0
- data/docs/FiatCurrency.md +6 -0
- data/docs/HealthResponseDto.md +12 -0
- data/docs/InvoiceProductDto.md +8 -0
- data/docs/InvoicesApi.md +236 -0
- data/docs/LiquidationAddressResponseDto.md +20 -0
- data/docs/LiquidationAddressesApi.md +152 -0
- data/docs/PaymentIntentsApi.md +127 -0
- data/docs/PaymentLinkProductDto.md +8 -0
- data/docs/PaymentLinksApi.md +238 -0
- data/docs/PaymentRequestDto.md +10 -0
- data/docs/PaymentResponseDto.md +11 -0
- data/docs/ProductsApi.md +404 -0
- data/docs/PublicHealthResponseDto.md +9 -0
- data/docs/RefundResponseDto.md +11 -0
- data/docs/StableCoinCurrency.md +6 -0
- data/docs/TaxesApi.md +292 -0
- data/docs/TestPaymentsApi.md +150 -0
- data/docs/TransfersApi.md +175 -0
- data/docs/UpdateCustomerDto.md +12 -0
- data/docs/UpdatePaymentLinkDto.md +6 -0
- data/docs/UpdatePreferenceInput.md +6 -0
- data/docs/UpdateProductDto.md +18 -0
- data/docs/UpdateTaxInput.md +6 -0
- data/docs/UpdateWebhookDto.md +11 -0
- data/docs/WalletsApi.md +58 -0
- data/docs/WebhookResponseDto.md +14 -0
- data/docs/WebhooksApi.md +307 -0
- data/git_push.sh +44 -0
- data/lib/devdraft/api/api_health_api.rb +116 -0
- data/lib/devdraft/api/app_balances_api.rb +170 -0
- data/lib/devdraft/api/customers_api.rb +258 -0
- data/lib/devdraft/api/exchange_rates_api.rb +184 -0
- data/lib/devdraft/api/invoices_api.rb +238 -0
- data/lib/devdraft/api/liquidation_addresses_api.rb +202 -0
- data/lib/devdraft/api/payment_intents_api.rb +150 -0
- data/lib/devdraft/api/payment_links_api.rb +240 -0
- data/lib/devdraft/api/products_api.rb +518 -0
- data/lib/devdraft/api/taxes_api.rb +290 -0
- data/lib/devdraft/api/test_payments_api.rb +202 -0
- data/lib/devdraft/api/transfers_api.rb +182 -0
- data/lib/devdraft/api/wallets_api.rb +66 -0
- data/lib/devdraft/api/webhooks_api.rb +310 -0
- data/lib/devdraft/api_client.rb +388 -0
- data/lib/devdraft/api_error.rb +57 -0
- data/lib/devdraft/configuration.rb +219 -0
- data/lib/devdraft/models/aggregated_balance_response.rb +278 -0
- data/lib/devdraft/models/all_balances_response.rb +242 -0
- data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +283 -0
- data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +283 -0
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +202 -0
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +202 -0
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +202 -0
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +202 -0
- data/lib/devdraft/models/all_of_create_customer_dto_status.rb +202 -0
- data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +202 -0
- data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +202 -0
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +202 -0
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +202 -0
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +202 -0
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +202 -0
- data/lib/devdraft/models/all_of_update_customer_dto_status.rb +202 -0
- data/lib/devdraft/models/bridge_payment_rail.rb +43 -0
- data/lib/devdraft/models/create_bank_payment_intent_dto.rb +397 -0
- data/lib/devdraft/models/create_customer_dto.rb +308 -0
- data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +302 -0
- data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +257 -0
- data/lib/devdraft/models/create_invoice_dto.rb +474 -0
- data/lib/devdraft/models/create_liquidation_address_dto.rb +408 -0
- data/lib/devdraft/models/create_payment_link_dto.rb +603 -0
- data/lib/devdraft/models/create_product_dto.rb +370 -0
- data/lib/devdraft/models/create_stable_payment_intent_dto.rb +362 -0
- data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +272 -0
- data/lib/devdraft/models/create_tax_input.rb +197 -0
- data/lib/devdraft/models/create_webhook_dto.rb +271 -0
- data/lib/devdraft/models/customer_status.rb +29 -0
- data/lib/devdraft/models/destination_currency.rb +34 -0
- data/lib/devdraft/models/exchange_rate_response_dto.rb +282 -0
- data/lib/devdraft/models/fiat_currency.rb +29 -0
- data/lib/devdraft/models/health_response_dto.rb +333 -0
- data/lib/devdraft/models/invoice_product_dto.rb +227 -0
- data/lib/devdraft/models/liquidation_address_response_dto.rb +377 -0
- data/lib/devdraft/models/payment_link_product_dto.rb +229 -0
- data/lib/devdraft/models/payment_request_dto.rb +252 -0
- data/lib/devdraft/models/payment_response_dto.rb +272 -0
- data/lib/devdraft/models/public_health_response_dto.rb +276 -0
- data/lib/devdraft/models/refund_response_dto.rb +272 -0
- data/lib/devdraft/models/stable_coin_currency.rb +28 -0
- data/lib/devdraft/models/update_customer_dto.rb +293 -0
- data/lib/devdraft/models/update_payment_link_dto.rb +197 -0
- data/lib/devdraft/models/update_preference_input.rb +197 -0
- data/lib/devdraft/models/update_product_dto.rb +355 -0
- data/lib/devdraft/models/update_tax_input.rb +197 -0
- data/lib/devdraft/models/update_webhook_dto.rb +251 -0
- data/lib/devdraft/models/webhook_response_dto.rb +317 -0
- data/lib/devdraft/version.rb +14 -0
- data/lib/devdraft.rb +101 -0
- data/spec/api/api_health_api_spec.rb +54 -0
- data/spec/api/app_balances_api_spec.rb +67 -0
- data/spec/api/customers_api_spec.rb +87 -0
- data/spec/api/exchange_rates_api_spec.rb +69 -0
- data/spec/api/invoices_api_spec.rb +80 -0
- data/spec/api/liquidation_addresses_api_spec.rb +72 -0
- data/spec/api/payment_intents_api_spec.rb +60 -0
- data/spec/api/payment_links_api_spec.rb +81 -0
- data/spec/api/products_api_spec.rb +130 -0
- data/spec/api/taxes_api_spec.rb +91 -0
- data/spec/api/test_payments_api_spec.rb +71 -0
- data/spec/api/transfers_api_spec.rb +67 -0
- data/spec/api/wallets_api_spec.rb +44 -0
- data/spec/api/webhooks_api_spec.rb +96 -0
- data/spec/api_client_spec.rb +225 -0
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +41 -0
- data/spec/models/aggregated_balance_response_spec.rb +56 -0
- data/spec/models/all_balances_response_spec.rb +52 -0
- data/spec/models/all_of_all_balances_response_eurc_spec.rb +56 -0
- data/spec/models/all_of_all_balances_response_usdc_spec.rb +56 -0
- data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +34 -0
- data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +34 -0
- data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +34 -0
- data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +34 -0
- data/spec/models/all_of_create_customer_dto_status_spec.rb +34 -0
- data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +34 -0
- data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +34 -0
- data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +34 -0
- data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +34 -0
- data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +34 -0
- data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +34 -0
- data/spec/models/all_of_update_customer_dto_status_spec.rb +34 -0
- data/spec/models/bridge_payment_rail_spec.rb +34 -0
- data/spec/models/create_bank_payment_intent_dto_spec.rb +142 -0
- data/spec/models/create_customer_dto_spec.rb +74 -0
- data/spec/models/create_direct_bank_transfer_dto_spec.rb +82 -0
- data/spec/models/create_direct_wallet_transfer_dto_spec.rb +58 -0
- data/spec/models/create_invoice_dto_spec.rb +146 -0
- data/spec/models/create_liquidation_address_dto_spec.rb +132 -0
- data/spec/models/create_payment_link_dto_spec.rb +200 -0
- data/spec/models/create_product_dto_spec.rb +110 -0
- data/spec/models/create_stable_payment_intent_dto_spec.rb +124 -0
- data/spec/models/create_stablecoin_conversion_dto_spec.rb +64 -0
- data/spec/models/create_tax_input_spec.rb +34 -0
- data/spec/models/create_webhook_dto_spec.rb +64 -0
- data/spec/models/customer_status_spec.rb +34 -0
- data/spec/models/destination_currency_spec.rb +34 -0
- data/spec/models/exchange_rate_response_dto_spec.rb +70 -0
- data/spec/models/fiat_currency_spec.rb +34 -0
- data/spec/models/health_response_dto_spec.rb +78 -0
- data/spec/models/invoice_product_dto_spec.rb +46 -0
- data/spec/models/liquidation_address_response_dto_spec.rb +118 -0
- data/spec/models/payment_link_product_dto_spec.rb +46 -0
- data/spec/models/payment_request_dto_spec.rb +58 -0
- data/spec/models/payment_response_dto_spec.rb +64 -0
- data/spec/models/public_health_response_dto_spec.rb +56 -0
- data/spec/models/refund_response_dto_spec.rb +64 -0
- data/spec/models/stable_coin_currency_spec.rb +34 -0
- data/spec/models/update_customer_dto_spec.rb +74 -0
- data/spec/models/update_payment_link_dto_spec.rb +34 -0
- data/spec/models/update_preference_input_spec.rb +34 -0
- data/spec/models/update_product_dto_spec.rb +110 -0
- data/spec/models/update_tax_input_spec.rb +34 -0
- data/spec/models/update_webhook_dto_spec.rb +64 -0
- data/spec/models/webhook_response_dto_spec.rb +82 -0
- data/spec/spec_helper.rb +110 -0
- metadata +375 -0
data/docs/InvoicesApi.md
ADDED
@@ -0,0 +1,236 @@
|
|
1
|
+
# DevDraftAI::InvoicesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.devdraft.ai*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**invoice_controller_create**](InvoicesApi.md#invoice_controller_create) | **POST** /api/v0/invoices | Create a new invoice
|
8
|
+
[**invoice_controller_find_all**](InvoicesApi.md#invoice_controller_find_all) | **GET** /api/v0/invoices | Get all invoices
|
9
|
+
[**invoice_controller_find_one**](InvoicesApi.md#invoice_controller_find_one) | **GET** /api/v0/invoices/{id} | Get an invoice by ID
|
10
|
+
[**invoice_controller_update**](InvoicesApi.md#invoice_controller_update) | **PUT** /api/v0/invoices/{id} | Update an invoice
|
11
|
+
|
12
|
+
# **invoice_controller_create**
|
13
|
+
> invoice_controller_create(body)
|
14
|
+
|
15
|
+
Create a new invoice
|
16
|
+
|
17
|
+
### Example
|
18
|
+
```ruby
|
19
|
+
# load the gem
|
20
|
+
require 'devdraft_ai_sdk'
|
21
|
+
# setup authorization
|
22
|
+
DevDraftAI.configure do |config|
|
23
|
+
# Configure API key authorization: x-client-key
|
24
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
25
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
26
|
+
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
27
|
+
|
28
|
+
# Configure API key authorization: x-client-secret
|
29
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
30
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
31
|
+
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
32
|
+
end
|
33
|
+
|
34
|
+
api_instance = DevDraftAI::InvoicesApi.new
|
35
|
+
body = DevDraftAI::CreateInvoiceDto.new # CreateInvoiceDto |
|
36
|
+
|
37
|
+
|
38
|
+
begin
|
39
|
+
#Create a new invoice
|
40
|
+
api_instance.invoice_controller_create(body)
|
41
|
+
rescue DevDraftAI::ApiError => e
|
42
|
+
puts "Exception when calling InvoicesApi->invoice_controller_create: #{e}"
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
46
|
+
### Parameters
|
47
|
+
|
48
|
+
Name | Type | Description | Notes
|
49
|
+
------------- | ------------- | ------------- | -------------
|
50
|
+
**body** | [**CreateInvoiceDto**](CreateInvoiceDto.md)| |
|
51
|
+
|
52
|
+
### Return type
|
53
|
+
|
54
|
+
nil (empty response body)
|
55
|
+
|
56
|
+
### Authorization
|
57
|
+
|
58
|
+
[x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
|
59
|
+
|
60
|
+
### HTTP request headers
|
61
|
+
|
62
|
+
- **Content-Type**: application/json
|
63
|
+
- **Accept**: Not defined
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
# **invoice_controller_find_all**
|
68
|
+
> invoice_controller_find_all(opts)
|
69
|
+
|
70
|
+
Get all invoices
|
71
|
+
|
72
|
+
### Example
|
73
|
+
```ruby
|
74
|
+
# load the gem
|
75
|
+
require 'devdraft_ai_sdk'
|
76
|
+
# setup authorization
|
77
|
+
DevDraftAI.configure do |config|
|
78
|
+
# Configure API key authorization: x-client-key
|
79
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
80
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
81
|
+
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
82
|
+
|
83
|
+
# Configure API key authorization: x-client-secret
|
84
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
85
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
86
|
+
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
87
|
+
end
|
88
|
+
|
89
|
+
api_instance = DevDraftAI::InvoicesApi.new
|
90
|
+
opts = {
|
91
|
+
skip: DevDraftAI::BigDecimal.new, # BigDecimal | Number of records to skip
|
92
|
+
take: DevDraftAI::BigDecimal.new # BigDecimal | Number of records to take
|
93
|
+
}
|
94
|
+
|
95
|
+
begin
|
96
|
+
#Get all invoices
|
97
|
+
api_instance.invoice_controller_find_all(opts)
|
98
|
+
rescue DevDraftAI::ApiError => e
|
99
|
+
puts "Exception when calling InvoicesApi->invoice_controller_find_all: #{e}"
|
100
|
+
end
|
101
|
+
```
|
102
|
+
|
103
|
+
### Parameters
|
104
|
+
|
105
|
+
Name | Type | Description | Notes
|
106
|
+
------------- | ------------- | ------------- | -------------
|
107
|
+
**skip** | **BigDecimal**| Number of records to skip | [optional]
|
108
|
+
**take** | **BigDecimal**| Number of records to take | [optional]
|
109
|
+
|
110
|
+
### Return type
|
111
|
+
|
112
|
+
nil (empty response body)
|
113
|
+
|
114
|
+
### Authorization
|
115
|
+
|
116
|
+
[x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
|
117
|
+
|
118
|
+
### HTTP request headers
|
119
|
+
|
120
|
+
- **Content-Type**: Not defined
|
121
|
+
- **Accept**: Not defined
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
# **invoice_controller_find_one**
|
126
|
+
> invoice_controller_find_one(id)
|
127
|
+
|
128
|
+
Get an invoice by ID
|
129
|
+
|
130
|
+
### Example
|
131
|
+
```ruby
|
132
|
+
# load the gem
|
133
|
+
require 'devdraft_ai_sdk'
|
134
|
+
# setup authorization
|
135
|
+
DevDraftAI.configure do |config|
|
136
|
+
# Configure API key authorization: x-client-key
|
137
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
138
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
139
|
+
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
140
|
+
|
141
|
+
# Configure API key authorization: x-client-secret
|
142
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
143
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
144
|
+
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
145
|
+
end
|
146
|
+
|
147
|
+
api_instance = DevDraftAI::InvoicesApi.new
|
148
|
+
id = 'id_example' # String | Invoice ID
|
149
|
+
|
150
|
+
|
151
|
+
begin
|
152
|
+
#Get an invoice by ID
|
153
|
+
api_instance.invoice_controller_find_one(id)
|
154
|
+
rescue DevDraftAI::ApiError => e
|
155
|
+
puts "Exception when calling InvoicesApi->invoice_controller_find_one: #{e}"
|
156
|
+
end
|
157
|
+
```
|
158
|
+
|
159
|
+
### Parameters
|
160
|
+
|
161
|
+
Name | Type | Description | Notes
|
162
|
+
------------- | ------------- | ------------- | -------------
|
163
|
+
**id** | **String**| Invoice ID |
|
164
|
+
|
165
|
+
### Return type
|
166
|
+
|
167
|
+
nil (empty response body)
|
168
|
+
|
169
|
+
### Authorization
|
170
|
+
|
171
|
+
[x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
|
172
|
+
|
173
|
+
### HTTP request headers
|
174
|
+
|
175
|
+
- **Content-Type**: Not defined
|
176
|
+
- **Accept**: Not defined
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
# **invoice_controller_update**
|
181
|
+
> invoice_controller_update(bodyid)
|
182
|
+
|
183
|
+
Update an invoice
|
184
|
+
|
185
|
+
### Example
|
186
|
+
```ruby
|
187
|
+
# load the gem
|
188
|
+
require 'devdraft_ai_sdk'
|
189
|
+
# setup authorization
|
190
|
+
DevDraftAI.configure do |config|
|
191
|
+
# Configure API key authorization: x-client-key
|
192
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
193
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
194
|
+
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
195
|
+
|
196
|
+
# Configure API key authorization: x-client-secret
|
197
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
198
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
199
|
+
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
200
|
+
end
|
201
|
+
|
202
|
+
api_instance = DevDraftAI::InvoicesApi.new
|
203
|
+
body = DevDraftAI::CreateInvoiceDto.new # CreateInvoiceDto |
|
204
|
+
id = 'id_example' # String | Invoice ID
|
205
|
+
|
206
|
+
|
207
|
+
begin
|
208
|
+
#Update an invoice
|
209
|
+
api_instance.invoice_controller_update(bodyid)
|
210
|
+
rescue DevDraftAI::ApiError => e
|
211
|
+
puts "Exception when calling InvoicesApi->invoice_controller_update: #{e}"
|
212
|
+
end
|
213
|
+
```
|
214
|
+
|
215
|
+
### Parameters
|
216
|
+
|
217
|
+
Name | Type | Description | Notes
|
218
|
+
------------- | ------------- | ------------- | -------------
|
219
|
+
**body** | [**CreateInvoiceDto**](CreateInvoiceDto.md)| |
|
220
|
+
**id** | **String**| Invoice ID |
|
221
|
+
|
222
|
+
### Return type
|
223
|
+
|
224
|
+
nil (empty response body)
|
225
|
+
|
226
|
+
### Authorization
|
227
|
+
|
228
|
+
[x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
|
229
|
+
|
230
|
+
### HTTP request headers
|
231
|
+
|
232
|
+
- **Content-Type**: application/json
|
233
|
+
- **Accept**: Not defined
|
234
|
+
|
235
|
+
|
236
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# DevDraftAI::LiquidationAddressResponseDto
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **String** | Unique identifier for the liquidation address |
|
7
|
+
**state** | **String** | Current state of the liquidation address |
|
8
|
+
**customer_id** | **String** | Customer ID this liquidation address belongs to |
|
9
|
+
**chain** | **String** | Blockchain chain |
|
10
|
+
**currency** | **String** | Currency |
|
11
|
+
**address** | **String** | Liquidation address |
|
12
|
+
**external_account_id** | **String** | External account ID | [optional]
|
13
|
+
**prefunded_account_id** | **String** | Prefunded account ID | [optional]
|
14
|
+
**bridge_wallet_id** | **String** | Bridge wallet ID | [optional]
|
15
|
+
**destination_payment_rail** | **String** | Destination payment rail | [optional]
|
16
|
+
**destination_currency** | **String** | Destination currency | [optional]
|
17
|
+
**custom_developer_fee_percent** | **String** | Custom developer fee percent | [optional]
|
18
|
+
**created_at** | **String** | Creation timestamp |
|
19
|
+
**updated_at** | **String** | Last update timestamp |
|
20
|
+
|
@@ -0,0 +1,152 @@
|
|
1
|
+
# DevDraftAI::LiquidationAddressesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.devdraft.ai*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**liquidation_address_controller_create_liquidation_address**](LiquidationAddressesApi.md#liquidation_address_controller_create_liquidation_address) | **POST** /api/v0/customers/{customerId}/liquidation_addresses | Create a new liquidation address for a customer
|
8
|
+
[**liquidation_address_controller_get_liquidation_address**](LiquidationAddressesApi.md#liquidation_address_controller_get_liquidation_address) | **GET** /api/v0/customers/{customerId}/liquidation_addresses/{liquidationAddressId} | Get a specific liquidation address
|
9
|
+
[**liquidation_address_controller_get_liquidation_addresses**](LiquidationAddressesApi.md#liquidation_address_controller_get_liquidation_addresses) | **GET** /api/v0/customers/{customerId}/liquidation_addresses | Get all liquidation addresses for a customer
|
10
|
+
|
11
|
+
# **liquidation_address_controller_create_liquidation_address**
|
12
|
+
> LiquidationAddressResponseDto liquidation_address_controller_create_liquidation_address(bodycustomer_id)
|
13
|
+
|
14
|
+
Create a new liquidation address for a customer
|
15
|
+
|
16
|
+
Create a new liquidation address for a customer. Liquidation addresses allow customers to automatically liquidate cryptocurrency holdings to fiat or other stablecoins based on configured parameters. **Required fields:** - chain: Blockchain network (ethereum, polygon, arbitrum, base) - currency: Stablecoin currency (usdc, eurc, dai, pyusd, usdt) - address: Valid blockchain address **At least one destination must be specified:** - external_account_id: External bank account - prefunded_account_id: Developer's prefunded account - bridge_wallet_id: Bridge wallet - destination_address: Crypto wallet address **Payment Rails:** Different payment rails have different requirements: - ACH: Requires external_account_id, supports destination_ach_reference - SEPA: Requires external_account_id, supports destination_sepa_reference - Wire: Requires external_account_id, supports destination_wire_message - Crypto: Requires destination_address, supports destination_blockchain_memo
|
17
|
+
|
18
|
+
### Example
|
19
|
+
```ruby
|
20
|
+
# load the gem
|
21
|
+
require 'devdraft_ai_sdk'
|
22
|
+
|
23
|
+
api_instance = DevDraftAI::LiquidationAddressesApi.new
|
24
|
+
body = DevDraftAI::CreateLiquidationAddressDto.new # CreateLiquidationAddressDto |
|
25
|
+
customer_id = 'customer_id_example' # String | Unique identifier for the customer
|
26
|
+
|
27
|
+
|
28
|
+
begin
|
29
|
+
#Create a new liquidation address for a customer
|
30
|
+
result = api_instance.liquidation_address_controller_create_liquidation_address(bodycustomer_id)
|
31
|
+
p result
|
32
|
+
rescue DevDraftAI::ApiError => e
|
33
|
+
puts "Exception when calling LiquidationAddressesApi->liquidation_address_controller_create_liquidation_address: #{e}"
|
34
|
+
end
|
35
|
+
```
|
36
|
+
|
37
|
+
### Parameters
|
38
|
+
|
39
|
+
Name | Type | Description | Notes
|
40
|
+
------------- | ------------- | ------------- | -------------
|
41
|
+
**body** | [**CreateLiquidationAddressDto**](CreateLiquidationAddressDto.md)| |
|
42
|
+
**customer_id** | **String**| Unique identifier for the customer |
|
43
|
+
|
44
|
+
### Return type
|
45
|
+
|
46
|
+
[**LiquidationAddressResponseDto**](LiquidationAddressResponseDto.md)
|
47
|
+
|
48
|
+
### Authorization
|
49
|
+
|
50
|
+
No authorization required
|
51
|
+
|
52
|
+
### HTTP request headers
|
53
|
+
|
54
|
+
- **Content-Type**: application/json
|
55
|
+
- **Accept**: application/json
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
# **liquidation_address_controller_get_liquidation_address**
|
60
|
+
> LiquidationAddressResponseDto liquidation_address_controller_get_liquidation_address(customer_id, liquidation_address_id)
|
61
|
+
|
62
|
+
Get a specific liquidation address
|
63
|
+
|
64
|
+
Retrieve a specific liquidation address by its ID for a given customer.
|
65
|
+
|
66
|
+
### Example
|
67
|
+
```ruby
|
68
|
+
# load the gem
|
69
|
+
require 'devdraft_ai_sdk'
|
70
|
+
|
71
|
+
api_instance = DevDraftAI::LiquidationAddressesApi.new
|
72
|
+
customer_id = 'customer_id_example' # String | Unique identifier for the customer
|
73
|
+
liquidation_address_id = 'liquidation_address_id_example' # String | Unique identifier for the liquidation address
|
74
|
+
|
75
|
+
|
76
|
+
begin
|
77
|
+
#Get a specific liquidation address
|
78
|
+
result = api_instance.liquidation_address_controller_get_liquidation_address(customer_id, liquidation_address_id)
|
79
|
+
p result
|
80
|
+
rescue DevDraftAI::ApiError => e
|
81
|
+
puts "Exception when calling LiquidationAddressesApi->liquidation_address_controller_get_liquidation_address: #{e}"
|
82
|
+
end
|
83
|
+
```
|
84
|
+
|
85
|
+
### Parameters
|
86
|
+
|
87
|
+
Name | Type | Description | Notes
|
88
|
+
------------- | ------------- | ------------- | -------------
|
89
|
+
**customer_id** | **String**| Unique identifier for the customer |
|
90
|
+
**liquidation_address_id** | **String**| Unique identifier for the liquidation address |
|
91
|
+
|
92
|
+
### Return type
|
93
|
+
|
94
|
+
[**LiquidationAddressResponseDto**](LiquidationAddressResponseDto.md)
|
95
|
+
|
96
|
+
### Authorization
|
97
|
+
|
98
|
+
No authorization required
|
99
|
+
|
100
|
+
### HTTP request headers
|
101
|
+
|
102
|
+
- **Content-Type**: Not defined
|
103
|
+
- **Accept**: application/json
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
# **liquidation_address_controller_get_liquidation_addresses**
|
108
|
+
> Array<LiquidationAddressResponseDto> liquidation_address_controller_get_liquidation_addresses(customer_id)
|
109
|
+
|
110
|
+
Get all liquidation addresses for a customer
|
111
|
+
|
112
|
+
Retrieve all liquidation addresses associated with a specific customer.
|
113
|
+
|
114
|
+
### Example
|
115
|
+
```ruby
|
116
|
+
# load the gem
|
117
|
+
require 'devdraft_ai_sdk'
|
118
|
+
|
119
|
+
api_instance = DevDraftAI::LiquidationAddressesApi.new
|
120
|
+
customer_id = 'customer_id_example' # String | Unique identifier for the customer
|
121
|
+
|
122
|
+
|
123
|
+
begin
|
124
|
+
#Get all liquidation addresses for a customer
|
125
|
+
result = api_instance.liquidation_address_controller_get_liquidation_addresses(customer_id)
|
126
|
+
p result
|
127
|
+
rescue DevDraftAI::ApiError => e
|
128
|
+
puts "Exception when calling LiquidationAddressesApi->liquidation_address_controller_get_liquidation_addresses: #{e}"
|
129
|
+
end
|
130
|
+
```
|
131
|
+
|
132
|
+
### Parameters
|
133
|
+
|
134
|
+
Name | Type | Description | Notes
|
135
|
+
------------- | ------------- | ------------- | -------------
|
136
|
+
**customer_id** | **String**| Unique identifier for the customer |
|
137
|
+
|
138
|
+
### Return type
|
139
|
+
|
140
|
+
[**Array<LiquidationAddressResponseDto>**](LiquidationAddressResponseDto.md)
|
141
|
+
|
142
|
+
### Authorization
|
143
|
+
|
144
|
+
No authorization required
|
145
|
+
|
146
|
+
### HTTP request headers
|
147
|
+
|
148
|
+
- **Content-Type**: Not defined
|
149
|
+
- **Accept**: application/json
|
150
|
+
|
151
|
+
|
152
|
+
|
@@ -0,0 +1,127 @@
|
|
1
|
+
# DevDraftAI::PaymentIntentsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.devdraft.ai*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**payment_intent_controller_create_bank_payment_intent**](PaymentIntentsApi.md#payment_intent_controller_create_bank_payment_intent) | **POST** /api/v0/payment-intents/bank | Create a bank payment intent
|
8
|
+
[**payment_intent_controller_create_stable_payment_intent**](PaymentIntentsApi.md#payment_intent_controller_create_stable_payment_intent) | **POST** /api/v0/payment-intents/stablecoin | Create a stable payment intent
|
9
|
+
|
10
|
+
# **payment_intent_controller_create_bank_payment_intent**
|
11
|
+
> payment_intent_controller_create_bank_payment_intent(bodyidempotency_key)
|
12
|
+
|
13
|
+
Create a bank payment intent
|
14
|
+
|
15
|
+
Creates a new bank payment intent for fiat-to-stablecoin transfers. This endpoint allows you to create payment intents for bank transfers (ACH, Wire, SEPA) that convert to stablecoins. Perfect for onboarding users from traditional banking to crypto. ## Supported Payment Rails - **ACH_PUSH**: US bank transfers (same-day or standard) - **WIRE**: International wire transfers - **SEPA**: European bank transfers ## Use Cases - USD bank account to USDC conversion - EUR bank account to EURC conversion - MXN bank account to stablecoin conversion - Flexible amount payment intents for variable pricing ## Supported Source Currencies - **USD**: US Dollar - **EUR**: Euro - **MXN**: Mexican Peso ## Example: USD Bank to USDC ```json { \"sourcePaymentRail\": \"ach_push\", \"sourceCurrency\": \"usd\", \"destinationCurrency\": \"usdc\", \"destinationNetwork\": \"ethereum\", \"destinationAddress\": \"0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8e1\", \"amount\": \"1000.00\", \"customer_first_name\": \"John\", \"customer_last_name\": \"Doe\", \"customer_email\": \"john.doe@example.com\", \"ach_reference\": \"INV12345\" } ``` ## Reference Fields Use appropriate reference fields based on the payment rail: - `ach_reference`: For ACH transfers (max 10 chars, alphanumeric + spaces) - `wire_message`: For wire transfers (max 256 chars) - `sepa_reference`: For SEPA transfers (6-140 chars, specific character set) ## Idempotency Include an `idempotency-key` header with a unique UUID v4 to prevent duplicate payments. Subsequent requests with the same key will return the original response.
|
16
|
+
|
17
|
+
### Example
|
18
|
+
```ruby
|
19
|
+
# load the gem
|
20
|
+
require 'devdraft_ai_sdk'
|
21
|
+
# setup authorization
|
22
|
+
DevDraftAI.configure do |config|
|
23
|
+
# Configure API key authorization: x-client-key
|
24
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
25
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
26
|
+
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
27
|
+
|
28
|
+
# Configure API key authorization: x-client-secret
|
29
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
30
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
31
|
+
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
32
|
+
end
|
33
|
+
|
34
|
+
api_instance = DevDraftAI::PaymentIntentsApi.new
|
35
|
+
body = DevDraftAI::CreateBankPaymentIntentDto.new # CreateBankPaymentIntentDto | Bank payment intent creation data
|
36
|
+
idempotency_key = 'idempotency_key_example' # String | Unique UUID v4 for idempotent requests. Prevents duplicate payments.
|
37
|
+
|
38
|
+
|
39
|
+
begin
|
40
|
+
#Create a bank payment intent
|
41
|
+
api_instance.payment_intent_controller_create_bank_payment_intent(bodyidempotency_key)
|
42
|
+
rescue DevDraftAI::ApiError => e
|
43
|
+
puts "Exception when calling PaymentIntentsApi->payment_intent_controller_create_bank_payment_intent: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
### Parameters
|
48
|
+
|
49
|
+
Name | Type | Description | Notes
|
50
|
+
------------- | ------------- | ------------- | -------------
|
51
|
+
**body** | [**CreateBankPaymentIntentDto**](CreateBankPaymentIntentDto.md)| Bank payment intent creation data |
|
52
|
+
**idempotency_key** | **String**| Unique UUID v4 for idempotent requests. Prevents duplicate payments. |
|
53
|
+
|
54
|
+
### Return type
|
55
|
+
|
56
|
+
nil (empty response body)
|
57
|
+
|
58
|
+
### Authorization
|
59
|
+
|
60
|
+
[x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
|
61
|
+
|
62
|
+
### HTTP request headers
|
63
|
+
|
64
|
+
- **Content-Type**: application/json
|
65
|
+
- **Accept**: application/json
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
# **payment_intent_controller_create_stable_payment_intent**
|
70
|
+
> payment_intent_controller_create_stable_payment_intent(bodyidempotency_key)
|
71
|
+
|
72
|
+
Create a stable payment intent
|
73
|
+
|
74
|
+
Creates a new stable payment intent for stablecoin-to-stablecoin transfers. This endpoint allows you to create payment intents for transfers between different stablecoins and networks. Perfect for cross-chain stablecoin swaps and conversions. ## Use Cases - USDC to EURC conversions - Cross-chain stablecoin transfers (e.g., Ethereum USDC to Polygon USDC) - Flexible amount payment intents for dynamic pricing ## Example: USDC to EURC Conversion ```json { \"sourceCurrency\": \"usdc\", \"sourceNetwork\": \"ethereum\", \"destinationCurrency\": \"eurc\", \"destinationNetwork\": \"polygon\", \"destinationAddress\": \"0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8e1\", \"amount\": \"100.00\", \"customer_first_name\": \"John\", \"customer_last_name\": \"Doe\", \"customer_email\": \"john.doe@example.com\" } ``` ## Flexible Amount Payments Omit the `amount` field to create a flexible payment intent where users can specify the amount during payment. ## Idempotency Include an `idempotency-key` header with a unique UUID v4 to prevent duplicate payments. Subsequent requests with the same key will return the original response.
|
75
|
+
|
76
|
+
### Example
|
77
|
+
```ruby
|
78
|
+
# load the gem
|
79
|
+
require 'devdraft_ai_sdk'
|
80
|
+
# setup authorization
|
81
|
+
DevDraftAI.configure do |config|
|
82
|
+
# Configure API key authorization: x-client-key
|
83
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
84
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
85
|
+
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
86
|
+
|
87
|
+
# Configure API key authorization: x-client-secret
|
88
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
89
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
90
|
+
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
91
|
+
end
|
92
|
+
|
93
|
+
api_instance = DevDraftAI::PaymentIntentsApi.new
|
94
|
+
body = DevDraftAI::CreateStablePaymentIntentDto.new # CreateStablePaymentIntentDto | Stable payment intent creation data
|
95
|
+
idempotency_key = 'idempotency_key_example' # String | Unique UUID v4 for idempotent requests. Prevents duplicate payments.
|
96
|
+
|
97
|
+
|
98
|
+
begin
|
99
|
+
#Create a stable payment intent
|
100
|
+
api_instance.payment_intent_controller_create_stable_payment_intent(bodyidempotency_key)
|
101
|
+
rescue DevDraftAI::ApiError => e
|
102
|
+
puts "Exception when calling PaymentIntentsApi->payment_intent_controller_create_stable_payment_intent: #{e}"
|
103
|
+
end
|
104
|
+
```
|
105
|
+
|
106
|
+
### Parameters
|
107
|
+
|
108
|
+
Name | Type | Description | Notes
|
109
|
+
------------- | ------------- | ------------- | -------------
|
110
|
+
**body** | [**CreateStablePaymentIntentDto**](CreateStablePaymentIntentDto.md)| Stable payment intent creation data |
|
111
|
+
**idempotency_key** | **String**| Unique UUID v4 for idempotent requests. Prevents duplicate payments. |
|
112
|
+
|
113
|
+
### Return type
|
114
|
+
|
115
|
+
nil (empty response body)
|
116
|
+
|
117
|
+
### Authorization
|
118
|
+
|
119
|
+
[x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
|
120
|
+
|
121
|
+
### HTTP request headers
|
122
|
+
|
123
|
+
- **Content-Type**: application/json
|
124
|
+
- **Accept**: application/json
|
125
|
+
|
126
|
+
|
127
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# DevDraftAI::PaymentLinkProductDto
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**product_id** | **String** | UUID of the product to include in this payment link. Must be a valid product from your catalog. |
|
7
|
+
**quantity** | **Integer** | Quantity of this product to include. Must be at least 1. | [default to 1]
|
8
|
+
|