devdraft 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +155 -253
- data/Rakefile +2 -0
- data/devdraft-1.0.0.gem +0 -0
- data/{devdraft_ai_sdk.gemspec → devdraft.gemspec} +15 -11
- data/docs/APIHealthApi.md +82 -30
- data/docs/AggregatedBalanceResponse.md +19 -6
- data/docs/AllBalancesResponse.md +19 -6
- data/docs/AppBalancesApi.md +125 -65
- data/docs/BridgeFiatPaymentRail.md +15 -0
- data/docs/BridgePaymentRail.md +12 -3
- data/docs/CreateBankPaymentIntentDto.md +49 -21
- data/docs/CreateCustomerDto.md +25 -9
- data/docs/CreateDirectBankTransferDto.md +29 -11
- data/docs/CreateDirectWalletTransferDto.md +21 -7
- data/docs/CreateExternalBankTransferDto.md +40 -0
- data/docs/CreateExternalStablecoinTransferDto.md +28 -0
- data/docs/CreateInvoiceDto.md +45 -19
- data/docs/CreateLiquidationAddressDto.md +43 -18
- data/docs/CreatePaymentLinkDto.md +53 -28
- data/docs/CreateStablePaymentIntentDto.md +43 -18
- data/docs/CreateStablecoinConversionDto.md +23 -8
- data/docs/CreateTaxDto.md +26 -0
- data/docs/CreateWebhookDto.md +23 -8
- data/docs/CustomerStatus.md +12 -3
- data/docs/CustomerType.md +15 -0
- data/docs/CustomersApi.md +187 -114
- data/docs/DestinationCurrency.md +12 -3
- data/docs/ExchangeRateResponseDto.md +25 -9
- data/docs/ExchangeRatesApi.md +130 -72
- data/docs/FiatCurrency.md +12 -3
- data/docs/HealthResponseDto.md +25 -9
- data/docs/InvoiceProductDto.md +17 -5
- data/docs/InvoicesApi.md +177 -104
- data/docs/LiquidationAddressResponseDto.md +41 -17
- data/docs/LiquidationAddressesApi.md +115 -61
- data/docs/PaymentIntentsApi.md +93 -57
- data/docs/PaymentLinkProductDto.md +17 -5
- data/docs/PaymentLinksApi.md +175 -102
- data/docs/PaymentRequestDto.md +21 -7
- data/docs/PaymentResponseDto.md +23 -8
- data/docs/ProductsApi.md +307 -194
- data/docs/PublicHealthResponseDto.md +19 -6
- data/docs/RefundResponseDto.md +23 -8
- data/docs/StableCoinCurrency.md +12 -3
- data/docs/TaxControllerCreate201Response.md +30 -0
- data/docs/TaxControllerDeleteWithoutId400Response.md +22 -0
- data/docs/TaxControllerUpdateWithoutId400Response.md +22 -0
- data/docs/TaxesApi.md +374 -122
- data/docs/TestPaymentsApi.md +150 -60
- data/docs/TransfersApi.md +274 -72
- data/docs/UpdateCustomerDto.md +25 -9
- data/docs/UpdateTaxDto.md +26 -0
- data/docs/UpdateWebhookDto.md +23 -8
- data/docs/WalletsApi.md +44 -24
- data/docs/WebhookResponseDto.md +29 -11
- data/docs/WebhooksApi.md +225 -134
- data/git_push.sh +41 -28
- data/lib/devdraft/api/api_health_api.rb +32 -16
- data/lib/devdraft/api/app_balances_api.rb +45 -22
- data/lib/devdraft/api/customers_api.rb +124 -71
- data/lib/devdraft/api/exchange_rates_api.rb +49 -26
- data/lib/devdraft/api/invoices_api.rb +89 -53
- data/lib/devdraft/api/liquidation_addresses_api.rb +70 -44
- data/lib/devdraft/api/payment_intents_api.rb +62 -40
- data/lib/devdraft/api/payment_links_api.rb +85 -49
- data/lib/devdraft/api/products_api.rb +214 -216
- data/lib/devdraft/api/taxes_api.rb +257 -66
- data/lib/devdraft/api/test_payments_api.rb +70 -44
- data/lib/devdraft/api/transfers_api.rb +206 -46
- data/lib/devdraft/api/wallets_api.rb +18 -9
- data/lib/devdraft/api/webhooks_api.rb +109 -66
- data/lib/devdraft/api_client.rb +76 -71
- data/lib/devdraft/api_error.rb +5 -4
- data/lib/devdraft/api_model_base.rb +88 -0
- data/lib/devdraft/configuration.rb +121 -18
- data/lib/devdraft/models/aggregated_balance_response.rb +68 -101
- data/lib/devdraft/models/all_balances_response.rb +76 -99
- data/lib/devdraft/models/bridge_fiat_payment_rail.rb +45 -0
- data/lib/devdraft/models/bridge_payment_rail.rb +36 -24
- data/lib/devdraft/models/create_bank_payment_intent_dto.rb +191 -114
- data/lib/devdraft/models/create_customer_dto.rb +123 -113
- data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +105 -104
- data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +89 -100
- data/lib/devdraft/models/create_external_bank_transfer_dto.rb +505 -0
- data/lib/devdraft/models/create_external_stablecoin_transfer_dto.rb +266 -0
- data/lib/devdraft/models/create_invoice_dto.rb +151 -121
- data/lib/devdraft/models/create_liquidation_address_dto.rb +195 -115
- data/lib/devdraft/models/create_payment_link_dto.rb +192 -214
- data/lib/devdraft/models/create_stable_payment_intent_dto.rb +324 -111
- data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +102 -101
- data/lib/devdraft/models/create_tax_dto.rb +281 -0
- data/lib/devdraft/models/create_webhook_dto.rb +104 -101
- data/lib/devdraft/models/customer_status.rb +23 -10
- data/lib/devdraft/models/customer_type.rb +45 -0
- data/lib/devdraft/models/destination_currency.rb +27 -15
- data/lib/devdraft/models/exchange_rate_response_dto.rb +103 -102
- data/lib/devdraft/models/fiat_currency.rb +22 -10
- data/lib/devdraft/models/health_response_dto.rb +99 -106
- data/lib/devdraft/models/invoice_product_dto.rb +63 -98
- data/lib/devdraft/models/liquidation_address_response_dto.rb +147 -110
- data/lib/devdraft/models/payment_link_product_dto.rb +70 -98
- data/lib/devdraft/models/payment_request_dto.rb +77 -100
- data/lib/devdraft/models/payment_response_dto.rb +102 -101
- data/lib/devdraft/models/public_health_response_dto.rb +68 -101
- data/lib/devdraft/models/refund_response_dto.rb +102 -101
- data/lib/devdraft/models/stable_coin_currency.rb +21 -9
- data/lib/devdraft/models/tax_controller_create201_response.rb +201 -0
- data/lib/devdraft/models/tax_controller_delete_without_id400_response.rb +165 -0
- data/lib/devdraft/models/tax_controller_update_without_id400_response.rb +165 -0
- data/lib/devdraft/models/update_customer_dto.rb +117 -113
- data/lib/devdraft/models/update_tax_dto.rb +256 -0
- data/lib/devdraft/models/update_webhook_dto.rb +70 -101
- data/lib/devdraft/models/webhook_response_dto.rb +140 -103
- data/lib/devdraft/version.rb +6 -5
- data/lib/devdraft.rb +18 -27
- data/spec/api/api_health_api_spec.rb +10 -9
- data/spec/api/app_balances_api_spec.rb +11 -10
- data/spec/api/customers_api_spec.rb +25 -24
- data/spec/api/exchange_rates_api_spec.rb +11 -10
- data/spec/api/invoices_api_spec.rb +16 -15
- data/spec/api/liquidation_addresses_api_spec.rb +13 -12
- data/spec/api/payment_intents_api_spec.rb +12 -11
- data/spec/api/payment_links_api_spec.rb +14 -13
- data/spec/api/products_api_spec.rb +41 -40
- data/spec/api/taxes_api_spec.rb +51 -21
- data/spec/api/test_payments_api_spec.rb +14 -13
- data/spec/api/transfers_api_spec.rb +36 -13
- data/spec/api/wallets_api_spec.rb +9 -8
- data/spec/api/webhooks_api_spec.rb +20 -19
- data/spec/models/aggregated_balance_response_spec.rb +15 -19
- data/spec/models/all_balances_response_spec.rb +14 -18
- data/spec/models/bridge_fiat_payment_rail_spec.rb +30 -0
- data/spec/models/bridge_payment_rail_spec.rb +11 -15
- data/spec/models/create_bank_payment_intent_dto_spec.rb +29 -33
- data/spec/models/create_customer_dto_spec.rb +17 -25
- data/spec/models/create_direct_bank_transfer_dto_spec.rb +19 -23
- data/spec/models/create_direct_wallet_transfer_dto_spec.rb +15 -19
- data/spec/models/create_external_bank_transfer_dto_spec.rb +102 -0
- data/spec/models/create_external_stablecoin_transfer_dto_spec.rb +66 -0
- data/spec/models/create_invoice_dto_spec.rb +31 -35
- data/spec/models/create_liquidation_address_dto_spec.rb +28 -32
- data/spec/models/create_payment_link_dto_spec.rb +34 -76
- data/spec/models/create_stable_payment_intent_dto_spec.rb +26 -30
- data/spec/models/create_stablecoin_conversion_dto_spec.rb +16 -20
- data/spec/models/create_tax_dto_spec.rb +60 -0
- data/spec/models/create_webhook_dto_spec.rb +16 -20
- data/spec/models/customer_status_spec.rb +11 -15
- data/spec/models/customer_type_spec.rb +30 -0
- data/spec/models/destination_currency_spec.rb +11 -15
- data/spec/models/exchange_rate_response_dto_spec.rb +17 -21
- data/spec/models/fiat_currency_spec.rb +11 -15
- data/spec/models/health_response_dto_spec.rb +19 -23
- data/spec/models/invoice_product_dto_spec.rb +13 -17
- data/spec/models/liquidation_address_response_dto_spec.rb +25 -29
- data/spec/models/payment_link_product_dto_spec.rb +13 -17
- data/spec/models/payment_request_dto_spec.rb +15 -19
- data/spec/models/payment_response_dto_spec.rb +16 -20
- data/spec/models/public_health_response_dto_spec.rb +15 -19
- data/spec/models/refund_response_dto_spec.rb +16 -20
- data/spec/models/stable_coin_currency_spec.rb +11 -15
- data/spec/models/tax_controller_create201_response_spec.rb +72 -0
- data/spec/models/tax_controller_delete_without_id400_response_spec.rb +48 -0
- data/spec/models/tax_controller_update_without_id400_response_spec.rb +48 -0
- data/spec/models/update_customer_dto_spec.rb +17 -25
- data/spec/models/update_tax_dto_spec.rb +60 -0
- data/spec/models/update_webhook_dto_spec.rb +16 -20
- data/spec/models/webhook_response_dto_spec.rb +19 -23
- data/spec/spec_helper.rb +5 -4
- metadata +49 -116
- data/docs/AllOfAllBalancesResponseEurc.md +0 -9
- data/docs/AllOfAllBalancesResponseUsdc.md +0 -9
- data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +0 -6
- data/docs/AllOfCreateCustomerDtoStatus.md +0 -6
- data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +0 -6
- data/docs/AllOfUpdateCustomerDtoStatus.md +0 -6
- data/docs/CreateProductDto.md +0 -18
- data/docs/CreateTaxInput.md +0 -6
- data/docs/UpdatePaymentLinkDto.md +0 -6
- data/docs/UpdatePreferenceInput.md +0 -6
- data/docs/UpdateProductDto.md +0 -18
- data/docs/UpdateTaxInput.md +0 -6
- data/example.rb +0 -129
- data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +0 -283
- data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +0 -283
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +0 -202
- data/lib/devdraft/models/all_of_create_customer_dto_status.rb +0 -202
- data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +0 -202
- data/lib/devdraft/models/all_of_update_customer_dto_status.rb +0 -202
- data/lib/devdraft/models/create_product_dto.rb +0 -370
- data/lib/devdraft/models/create_tax_input.rb +0 -197
- data/lib/devdraft/models/update_payment_link_dto.rb +0 -197
- data/lib/devdraft/models/update_preference_input.rb +0 -197
- data/lib/devdraft/models/update_product_dto.rb +0 -355
- data/lib/devdraft/models/update_tax_input.rb +0 -197
- data/spec/api_client_spec.rb +0 -225
- data/spec/base_object_spec.rb +0 -109
- data/spec/configuration_spec.rb +0 -41
- data/spec/models/all_of_all_balances_response_eurc_spec.rb +0 -56
- data/spec/models/all_of_all_balances_response_usdc_spec.rb +0 -56
- data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +0 -34
- data/spec/models/all_of_create_customer_dto_status_spec.rb +0 -34
- data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +0 -34
- data/spec/models/all_of_update_customer_dto_status_spec.rb +0 -34
- data/spec/models/create_product_dto_spec.rb +0 -110
- data/spec/models/create_tax_input_spec.rb +0 -34
- data/spec/models/update_payment_link_dto_spec.rb +0 -34
- data/spec/models/update_preference_input_spec.rb +0 -34
- data/spec/models/update_product_dto_spec.rb +0 -110
- data/spec/models/update_tax_input_spec.rb +0 -34
data/docs/InvoicesApi.md
CHANGED
|
@@ -1,53 +1,73 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Devdraft::InvoicesApi
|
|
2
2
|
|
|
3
3
|
All URIs are relative to *https://api.devdraft.ai*
|
|
4
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
|
|
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
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
|
|
13
|
+
## invoice_controller_create
|
|
14
|
+
|
|
15
|
+
> invoice_controller_create(create_invoice_dto)
|
|
14
16
|
|
|
15
17
|
Create a new invoice
|
|
16
18
|
|
|
17
|
-
###
|
|
19
|
+
### Examples
|
|
20
|
+
|
|
18
21
|
```ruby
|
|
19
|
-
|
|
20
|
-
require '
|
|
22
|
+
require 'time'
|
|
23
|
+
require 'devdraft'
|
|
21
24
|
# setup authorization
|
|
22
|
-
|
|
25
|
+
Devdraft.configure do |config|
|
|
26
|
+
# Configure API key authorization: x-client-secret
|
|
27
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
28
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
29
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
30
|
+
|
|
23
31
|
# Configure API key authorization: x-client-key
|
|
24
32
|
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
25
33
|
# 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'
|
|
34
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
35
|
+
end
|
|
27
36
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
api_instance = Devdraft::InvoicesApi.new
|
|
38
|
+
create_invoice_dto = Devdraft::CreateInvoiceDto.new({name: 'name_example', email: 'email_example', customer_id: 'customer_id_example', currency: 'usdc', items: 3.56, due_date: Time.now, delivery: 'EMAIL', payment_link: false, payment_methods: ['ACH'], status: 'DRAFT', partial_payment: false}) # CreateInvoiceDto |
|
|
39
|
+
|
|
40
|
+
begin
|
|
41
|
+
# Create a new invoice
|
|
42
|
+
api_instance.invoice_controller_create(create_invoice_dto)
|
|
43
|
+
rescue Devdraft::ApiError => e
|
|
44
|
+
puts "Error when calling InvoicesApi->invoice_controller_create: #{e}"
|
|
32
45
|
end
|
|
46
|
+
```
|
|
33
47
|
|
|
34
|
-
|
|
35
|
-
body = DevDraftAI::CreateInvoiceDto.new # CreateInvoiceDto |
|
|
48
|
+
#### Using the invoice_controller_create_with_http_info variant
|
|
36
49
|
|
|
50
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
37
51
|
|
|
52
|
+
> <Array(nil, Integer, Hash)> invoice_controller_create_with_http_info(create_invoice_dto)
|
|
53
|
+
|
|
54
|
+
```ruby
|
|
38
55
|
begin
|
|
39
|
-
#Create a new invoice
|
|
40
|
-
api_instance.
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
# Create a new invoice
|
|
57
|
+
data, status_code, headers = api_instance.invoice_controller_create_with_http_info(create_invoice_dto)
|
|
58
|
+
p status_code # => 2xx
|
|
59
|
+
p headers # => { ... }
|
|
60
|
+
p data # => nil
|
|
61
|
+
rescue Devdraft::ApiError => e
|
|
62
|
+
puts "Error when calling InvoicesApi->invoice_controller_create_with_http_info: #{e}"
|
|
43
63
|
end
|
|
44
64
|
```
|
|
45
65
|
|
|
46
66
|
### Parameters
|
|
47
67
|
|
|
48
|
-
Name | Type | Description
|
|
49
|
-
|
|
50
|
-
**
|
|
68
|
+
| Name | Type | Description | Notes |
|
|
69
|
+
| ---- | ---- | ----------- | ----- |
|
|
70
|
+
| **create_invoice_dto** | [**CreateInvoiceDto**](CreateInvoiceDto.md) | | |
|
|
51
71
|
|
|
52
72
|
### Return type
|
|
53
73
|
|
|
@@ -55,57 +75,76 @@ nil (empty response body)
|
|
|
55
75
|
|
|
56
76
|
### Authorization
|
|
57
77
|
|
|
58
|
-
[x-client-
|
|
78
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
59
79
|
|
|
60
80
|
### HTTP request headers
|
|
61
81
|
|
|
62
|
-
|
|
63
|
-
|
|
82
|
+
- **Content-Type**: application/json
|
|
83
|
+
- **Accept**: Not defined
|
|
64
84
|
|
|
65
85
|
|
|
86
|
+
## invoice_controller_find_all
|
|
66
87
|
|
|
67
|
-
# **invoice_controller_find_all**
|
|
68
88
|
> invoice_controller_find_all(opts)
|
|
69
89
|
|
|
70
90
|
Get all invoices
|
|
71
91
|
|
|
72
|
-
###
|
|
92
|
+
### Examples
|
|
93
|
+
|
|
73
94
|
```ruby
|
|
74
|
-
|
|
75
|
-
require '
|
|
95
|
+
require 'time'
|
|
96
|
+
require 'devdraft'
|
|
76
97
|
# setup authorization
|
|
77
|
-
|
|
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
|
-
|
|
98
|
+
Devdraft.configure do |config|
|
|
83
99
|
# Configure API key authorization: x-client-secret
|
|
84
100
|
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
85
101
|
# 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'
|
|
102
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
103
|
+
|
|
104
|
+
# Configure API key authorization: x-client-key
|
|
105
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
106
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
107
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
87
108
|
end
|
|
88
109
|
|
|
89
|
-
api_instance =
|
|
90
|
-
opts = {
|
|
91
|
-
skip:
|
|
92
|
-
take:
|
|
110
|
+
api_instance = Devdraft::InvoicesApi.new
|
|
111
|
+
opts = {
|
|
112
|
+
skip: 8.14, # Float | Number of records to skip
|
|
113
|
+
take: 8.14 # Float | Number of records to take
|
|
93
114
|
}
|
|
94
115
|
|
|
95
116
|
begin
|
|
96
|
-
#Get all invoices
|
|
117
|
+
# Get all invoices
|
|
97
118
|
api_instance.invoice_controller_find_all(opts)
|
|
98
|
-
rescue
|
|
99
|
-
puts "
|
|
119
|
+
rescue Devdraft::ApiError => e
|
|
120
|
+
puts "Error when calling InvoicesApi->invoice_controller_find_all: #{e}"
|
|
121
|
+
end
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
#### Using the invoice_controller_find_all_with_http_info variant
|
|
125
|
+
|
|
126
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
127
|
+
|
|
128
|
+
> <Array(nil, Integer, Hash)> invoice_controller_find_all_with_http_info(opts)
|
|
129
|
+
|
|
130
|
+
```ruby
|
|
131
|
+
begin
|
|
132
|
+
# Get all invoices
|
|
133
|
+
data, status_code, headers = api_instance.invoice_controller_find_all_with_http_info(opts)
|
|
134
|
+
p status_code # => 2xx
|
|
135
|
+
p headers # => { ... }
|
|
136
|
+
p data # => nil
|
|
137
|
+
rescue Devdraft::ApiError => e
|
|
138
|
+
puts "Error when calling InvoicesApi->invoice_controller_find_all_with_http_info: #{e}"
|
|
100
139
|
end
|
|
101
140
|
```
|
|
102
141
|
|
|
103
142
|
### Parameters
|
|
104
143
|
|
|
105
|
-
Name | Type | Description
|
|
106
|
-
|
|
107
|
-
**skip** | **
|
|
108
|
-
**take** | **
|
|
144
|
+
| Name | Type | Description | Notes |
|
|
145
|
+
| ---- | ---- | ----------- | ----- |
|
|
146
|
+
| **skip** | **Float** | Number of records to skip | [optional] |
|
|
147
|
+
| **take** | **Float** | Number of records to take | [optional] |
|
|
109
148
|
|
|
110
149
|
### Return type
|
|
111
150
|
|
|
@@ -113,54 +152,72 @@ nil (empty response body)
|
|
|
113
152
|
|
|
114
153
|
### Authorization
|
|
115
154
|
|
|
116
|
-
[x-client-
|
|
155
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
117
156
|
|
|
118
157
|
### HTTP request headers
|
|
119
158
|
|
|
120
|
-
|
|
121
|
-
|
|
159
|
+
- **Content-Type**: Not defined
|
|
160
|
+
- **Accept**: Not defined
|
|
122
161
|
|
|
123
162
|
|
|
163
|
+
## invoice_controller_find_one
|
|
124
164
|
|
|
125
|
-
# **invoice_controller_find_one**
|
|
126
165
|
> invoice_controller_find_one(id)
|
|
127
166
|
|
|
128
167
|
Get an invoice by ID
|
|
129
168
|
|
|
130
|
-
###
|
|
169
|
+
### Examples
|
|
170
|
+
|
|
131
171
|
```ruby
|
|
132
|
-
|
|
133
|
-
require '
|
|
172
|
+
require 'time'
|
|
173
|
+
require 'devdraft'
|
|
134
174
|
# setup authorization
|
|
135
|
-
|
|
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
|
-
|
|
175
|
+
Devdraft.configure do |config|
|
|
141
176
|
# Configure API key authorization: x-client-secret
|
|
142
177
|
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
143
178
|
# 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'
|
|
179
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
180
|
+
|
|
181
|
+
# Configure API key authorization: x-client-key
|
|
182
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
183
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
184
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
145
185
|
end
|
|
146
186
|
|
|
147
|
-
api_instance =
|
|
187
|
+
api_instance = Devdraft::InvoicesApi.new
|
|
148
188
|
id = 'id_example' # String | Invoice ID
|
|
149
189
|
|
|
150
|
-
|
|
151
190
|
begin
|
|
152
|
-
#Get an invoice by ID
|
|
191
|
+
# Get an invoice by ID
|
|
153
192
|
api_instance.invoice_controller_find_one(id)
|
|
154
|
-
rescue
|
|
155
|
-
puts "
|
|
193
|
+
rescue Devdraft::ApiError => e
|
|
194
|
+
puts "Error when calling InvoicesApi->invoice_controller_find_one: #{e}"
|
|
195
|
+
end
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
#### Using the invoice_controller_find_one_with_http_info variant
|
|
199
|
+
|
|
200
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
201
|
+
|
|
202
|
+
> <Array(nil, Integer, Hash)> invoice_controller_find_one_with_http_info(id)
|
|
203
|
+
|
|
204
|
+
```ruby
|
|
205
|
+
begin
|
|
206
|
+
# Get an invoice by ID
|
|
207
|
+
data, status_code, headers = api_instance.invoice_controller_find_one_with_http_info(id)
|
|
208
|
+
p status_code # => 2xx
|
|
209
|
+
p headers # => { ... }
|
|
210
|
+
p data # => nil
|
|
211
|
+
rescue Devdraft::ApiError => e
|
|
212
|
+
puts "Error when calling InvoicesApi->invoice_controller_find_one_with_http_info: #{e}"
|
|
156
213
|
end
|
|
157
214
|
```
|
|
158
215
|
|
|
159
216
|
### Parameters
|
|
160
217
|
|
|
161
|
-
Name | Type | Description
|
|
162
|
-
|
|
163
|
-
**id** | **String
|
|
218
|
+
| Name | Type | Description | Notes |
|
|
219
|
+
| ---- | ---- | ----------- | ----- |
|
|
220
|
+
| **id** | **String** | Invoice ID | |
|
|
164
221
|
|
|
165
222
|
### Return type
|
|
166
223
|
|
|
@@ -168,56 +225,74 @@ nil (empty response body)
|
|
|
168
225
|
|
|
169
226
|
### Authorization
|
|
170
227
|
|
|
171
|
-
[x-client-
|
|
228
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
172
229
|
|
|
173
230
|
### HTTP request headers
|
|
174
231
|
|
|
175
|
-
|
|
176
|
-
|
|
232
|
+
- **Content-Type**: Not defined
|
|
233
|
+
- **Accept**: Not defined
|
|
177
234
|
|
|
178
235
|
|
|
236
|
+
## invoice_controller_update
|
|
179
237
|
|
|
180
|
-
|
|
181
|
-
> invoice_controller_update(bodyid)
|
|
238
|
+
> invoice_controller_update(id, create_invoice_dto)
|
|
182
239
|
|
|
183
240
|
Update an invoice
|
|
184
241
|
|
|
185
|
-
###
|
|
242
|
+
### Examples
|
|
243
|
+
|
|
186
244
|
```ruby
|
|
187
|
-
|
|
188
|
-
require '
|
|
245
|
+
require 'time'
|
|
246
|
+
require 'devdraft'
|
|
189
247
|
# setup authorization
|
|
190
|
-
|
|
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
|
-
|
|
248
|
+
Devdraft.configure do |config|
|
|
196
249
|
# Configure API key authorization: x-client-secret
|
|
197
250
|
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
198
251
|
# 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'
|
|
252
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
253
|
+
|
|
254
|
+
# Configure API key authorization: x-client-key
|
|
255
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
256
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
257
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
200
258
|
end
|
|
201
259
|
|
|
202
|
-
api_instance =
|
|
203
|
-
body = DevDraftAI::CreateInvoiceDto.new # CreateInvoiceDto |
|
|
260
|
+
api_instance = Devdraft::InvoicesApi.new
|
|
204
261
|
id = 'id_example' # String | Invoice ID
|
|
262
|
+
create_invoice_dto = Devdraft::CreateInvoiceDto.new({name: 'name_example', email: 'email_example', customer_id: 'customer_id_example', currency: 'usdc', items: 3.56, due_date: Time.now, delivery: 'EMAIL', payment_link: false, payment_methods: ['ACH'], status: 'DRAFT', partial_payment: false}) # CreateInvoiceDto |
|
|
205
263
|
|
|
264
|
+
begin
|
|
265
|
+
# Update an invoice
|
|
266
|
+
api_instance.invoice_controller_update(id, create_invoice_dto)
|
|
267
|
+
rescue Devdraft::ApiError => e
|
|
268
|
+
puts "Error when calling InvoicesApi->invoice_controller_update: #{e}"
|
|
269
|
+
end
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
#### Using the invoice_controller_update_with_http_info variant
|
|
273
|
+
|
|
274
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
206
275
|
|
|
276
|
+
> <Array(nil, Integer, Hash)> invoice_controller_update_with_http_info(id, create_invoice_dto)
|
|
277
|
+
|
|
278
|
+
```ruby
|
|
207
279
|
begin
|
|
208
|
-
#Update an invoice
|
|
209
|
-
api_instance.
|
|
210
|
-
|
|
211
|
-
|
|
280
|
+
# Update an invoice
|
|
281
|
+
data, status_code, headers = api_instance.invoice_controller_update_with_http_info(id, create_invoice_dto)
|
|
282
|
+
p status_code # => 2xx
|
|
283
|
+
p headers # => { ... }
|
|
284
|
+
p data # => nil
|
|
285
|
+
rescue Devdraft::ApiError => e
|
|
286
|
+
puts "Error when calling InvoicesApi->invoice_controller_update_with_http_info: #{e}"
|
|
212
287
|
end
|
|
213
288
|
```
|
|
214
289
|
|
|
215
290
|
### Parameters
|
|
216
291
|
|
|
217
|
-
Name | Type | Description
|
|
218
|
-
|
|
219
|
-
**
|
|
220
|
-
**
|
|
292
|
+
| Name | Type | Description | Notes |
|
|
293
|
+
| ---- | ---- | ----------- | ----- |
|
|
294
|
+
| **id** | **String** | Invoice ID | |
|
|
295
|
+
| **create_invoice_dto** | [**CreateInvoiceDto**](CreateInvoiceDto.md) | | |
|
|
221
296
|
|
|
222
297
|
### Return type
|
|
223
298
|
|
|
@@ -225,12 +300,10 @@ nil (empty response body)
|
|
|
225
300
|
|
|
226
301
|
### Authorization
|
|
227
302
|
|
|
228
|
-
[x-client-
|
|
303
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
229
304
|
|
|
230
305
|
### HTTP request headers
|
|
231
306
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
307
|
+
- **Content-Type**: application/json
|
|
308
|
+
- **Accept**: Not defined
|
|
236
309
|
|
|
@@ -1,20 +1,44 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Devdraft::LiquidationAddressResponseDto
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
**
|
|
8
|
-
**
|
|
9
|
-
**
|
|
10
|
-
**
|
|
11
|
-
**
|
|
12
|
-
**
|
|
13
|
-
**
|
|
14
|
-
**
|
|
15
|
-
**
|
|
16
|
-
**
|
|
17
|
-
**
|
|
18
|
-
**
|
|
19
|
-
**
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | Unique identifier for the liquidation address | |
|
|
8
|
+
| **state** | **String** | Current state of the liquidation address | |
|
|
9
|
+
| **customer_id** | **String** | Customer ID this liquidation address belongs to | |
|
|
10
|
+
| **chain** | **String** | Blockchain chain | |
|
|
11
|
+
| **currency** | **String** | Currency | |
|
|
12
|
+
| **address** | **String** | Liquidation address | |
|
|
13
|
+
| **external_account_id** | **String** | External account ID | [optional] |
|
|
14
|
+
| **prefunded_account_id** | **String** | Prefunded account ID | [optional] |
|
|
15
|
+
| **bridge_wallet_id** | **String** | Bridge wallet ID | [optional] |
|
|
16
|
+
| **destination_payment_rail** | **String** | Destination payment rail | [optional] |
|
|
17
|
+
| **destination_currency** | **String** | Destination currency | [optional] |
|
|
18
|
+
| **custom_developer_fee_percent** | **String** | Custom developer fee percent | [optional] |
|
|
19
|
+
| **created_at** | **String** | Creation timestamp | |
|
|
20
|
+
| **updated_at** | **String** | Last update timestamp | |
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
require 'devdraft'
|
|
26
|
+
|
|
27
|
+
instance = Devdraft::LiquidationAddressResponseDto.new(
|
|
28
|
+
id: la_generated_id_123,
|
|
29
|
+
state: active,
|
|
30
|
+
customer_id: cust_123,
|
|
31
|
+
chain: ethereum,
|
|
32
|
+
currency: usdc,
|
|
33
|
+
address: 0x4d0280da2f2fDA5103914bCc5aad114743152A9c,
|
|
34
|
+
external_account_id: null,
|
|
35
|
+
prefunded_account_id: null,
|
|
36
|
+
bridge_wallet_id: null,
|
|
37
|
+
destination_payment_rail: null,
|
|
38
|
+
destination_currency: null,
|
|
39
|
+
custom_developer_fee_percent: null,
|
|
40
|
+
created_at: null,
|
|
41
|
+
updated_at: null
|
|
42
|
+
)
|
|
43
|
+
```
|
|
20
44
|
|