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.
- checksums.yaml +4 -4
- data/README.md +160 -191
- 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 -94
- 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/TaxesApi.md
CHANGED
|
@@ -1,54 +1,151 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Devdraft::TaxesApi
|
|
2
2
|
|
|
3
3
|
All URIs are relative to *https://api.devdraft.ai*
|
|
4
4
|
|
|
5
|
-
Method | HTTP request | Description
|
|
6
|
-
|
|
7
|
-
[**tax_controller_create**](TaxesApi.md#tax_controller_create) | **POST** /api/v0/taxes | Create a new tax
|
|
8
|
-
[**
|
|
9
|
-
[**
|
|
10
|
-
[**
|
|
11
|
-
[**
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**tax_controller_create**](TaxesApi.md#tax_controller_create) | **POST** /api/v0/taxes | Create a new tax |
|
|
8
|
+
| [**tax_controller_delete_without_id**](TaxesApi.md#tax_controller_delete_without_id) | **DELETE** /api/v0/taxes | Tax ID required for deletion |
|
|
9
|
+
| [**tax_controller_find_all**](TaxesApi.md#tax_controller_find_all) | **GET** /api/v0/taxes | Get all taxes with filters |
|
|
10
|
+
| [**tax_controller_find_one**](TaxesApi.md#tax_controller_find_one) | **GET** /api/v0/taxes/{id} | Get a tax by ID |
|
|
11
|
+
| [**tax_controller_remove**](TaxesApi.md#tax_controller_remove) | **DELETE** /api/v0/taxes/{id} | Delete a tax |
|
|
12
|
+
| [**tax_controller_update**](TaxesApi.md#tax_controller_update) | **PUT** /api/v0/taxes/{id} | Update a tax |
|
|
13
|
+
| [**tax_controller_update_without_id**](TaxesApi.md#tax_controller_update_without_id) | **PUT** /api/v0/taxes | Tax ID required for updates |
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
|
|
16
|
+
## tax_controller_create
|
|
17
|
+
|
|
18
|
+
> <TaxControllerCreate201Response> tax_controller_create(create_tax_dto)
|
|
15
19
|
|
|
16
20
|
Create a new tax
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
Creates a new tax rate that can be applied to products, invoices, and payment links. ## Use Cases - Set up sales tax for different regions - Create VAT rates for international customers - Configure state and local tax rates - Manage tax compliance requirements ## Example: Create Basic Sales Tax ```json { \"name\": \"Sales Tax\", \"description\": \"Standard sales tax for retail transactions\", \"percentage\": 8.5, \"active\": true } ``` ## Required Fields - `name`: Tax name for identification (1-100 characters) - `percentage`: Tax rate percentage (0-100) ## Optional Fields - `description`: Explanation of what this tax covers (max 255 characters) - `active`: Whether this tax is currently active (default: true) - `appIds`: Array of app IDs where this tax should be available
|
|
23
|
+
|
|
24
|
+
### Examples
|
|
25
|
+
|
|
19
26
|
```ruby
|
|
20
|
-
|
|
21
|
-
require '
|
|
27
|
+
require 'time'
|
|
28
|
+
require 'devdraft'
|
|
22
29
|
# setup authorization
|
|
23
|
-
|
|
30
|
+
Devdraft.configure do |config|
|
|
31
|
+
# Configure API key authorization: x-client-secret
|
|
32
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
33
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
34
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
35
|
+
|
|
24
36
|
# Configure API key authorization: x-client-key
|
|
25
37
|
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
26
38
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
27
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
39
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
api_instance = Devdraft::TaxesApi.new
|
|
43
|
+
create_tax_dto = Devdraft::CreateTaxDto.new({name: 'Sales Tax', percentage: 8.5}) # CreateTaxDto | Tax creation data
|
|
44
|
+
|
|
45
|
+
begin
|
|
46
|
+
# Create a new tax
|
|
47
|
+
result = api_instance.tax_controller_create(create_tax_dto)
|
|
48
|
+
p result
|
|
49
|
+
rescue Devdraft::ApiError => e
|
|
50
|
+
puts "Error when calling TaxesApi->tax_controller_create: #{e}"
|
|
51
|
+
end
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
#### Using the tax_controller_create_with_http_info variant
|
|
55
|
+
|
|
56
|
+
This returns an Array which contains the response data, status code and headers.
|
|
57
|
+
|
|
58
|
+
> <Array(<TaxControllerCreate201Response>, Integer, Hash)> tax_controller_create_with_http_info(create_tax_dto)
|
|
59
|
+
|
|
60
|
+
```ruby
|
|
61
|
+
begin
|
|
62
|
+
# Create a new tax
|
|
63
|
+
data, status_code, headers = api_instance.tax_controller_create_with_http_info(create_tax_dto)
|
|
64
|
+
p status_code # => 2xx
|
|
65
|
+
p headers # => { ... }
|
|
66
|
+
p data # => <TaxControllerCreate201Response>
|
|
67
|
+
rescue Devdraft::ApiError => e
|
|
68
|
+
puts "Error when calling TaxesApi->tax_controller_create_with_http_info: #{e}"
|
|
69
|
+
end
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Parameters
|
|
73
|
+
|
|
74
|
+
| Name | Type | Description | Notes |
|
|
75
|
+
| ---- | ---- | ----------- | ----- |
|
|
76
|
+
| **create_tax_dto** | [**CreateTaxDto**](CreateTaxDto.md) | Tax creation data | |
|
|
77
|
+
|
|
78
|
+
### Return type
|
|
79
|
+
|
|
80
|
+
[**TaxControllerCreate201Response**](TaxControllerCreate201Response.md)
|
|
81
|
+
|
|
82
|
+
### Authorization
|
|
83
|
+
|
|
84
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
85
|
+
|
|
86
|
+
### HTTP request headers
|
|
87
|
+
|
|
88
|
+
- **Content-Type**: application/json
|
|
89
|
+
- **Accept**: application/json
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## tax_controller_delete_without_id
|
|
93
|
+
|
|
94
|
+
> tax_controller_delete_without_id
|
|
95
|
+
|
|
96
|
+
Tax ID required for deletion
|
|
97
|
+
|
|
98
|
+
This endpoint requires a tax ID in the URL path. Use DELETE /api/v0/taxes/{id} instead.
|
|
99
|
+
|
|
100
|
+
### Examples
|
|
28
101
|
|
|
102
|
+
```ruby
|
|
103
|
+
require 'time'
|
|
104
|
+
require 'devdraft'
|
|
105
|
+
# setup authorization
|
|
106
|
+
Devdraft.configure do |config|
|
|
29
107
|
# Configure API key authorization: x-client-secret
|
|
30
108
|
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
31
109
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
32
|
-
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
110
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
111
|
+
|
|
112
|
+
# Configure API key authorization: x-client-key
|
|
113
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
114
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
115
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
api_instance = Devdraft::TaxesApi.new
|
|
119
|
+
|
|
120
|
+
begin
|
|
121
|
+
# Tax ID required for deletion
|
|
122
|
+
api_instance.tax_controller_delete_without_id
|
|
123
|
+
rescue Devdraft::ApiError => e
|
|
124
|
+
puts "Error when calling TaxesApi->tax_controller_delete_without_id: #{e}"
|
|
33
125
|
end
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
#### Using the tax_controller_delete_without_id_with_http_info variant
|
|
34
129
|
|
|
35
|
-
|
|
36
|
-
body = DevDraftAI::CreateTaxInput.new # CreateTaxInput |
|
|
130
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
37
131
|
|
|
132
|
+
> <Array(nil, Integer, Hash)> tax_controller_delete_without_id_with_http_info
|
|
38
133
|
|
|
134
|
+
```ruby
|
|
39
135
|
begin
|
|
40
|
-
#
|
|
41
|
-
api_instance.
|
|
42
|
-
|
|
43
|
-
|
|
136
|
+
# Tax ID required for deletion
|
|
137
|
+
data, status_code, headers = api_instance.tax_controller_delete_without_id_with_http_info
|
|
138
|
+
p status_code # => 2xx
|
|
139
|
+
p headers # => { ... }
|
|
140
|
+
p data # => nil
|
|
141
|
+
rescue Devdraft::ApiError => e
|
|
142
|
+
puts "Error when calling TaxesApi->tax_controller_delete_without_id_with_http_info: #{e}"
|
|
44
143
|
end
|
|
45
144
|
```
|
|
46
145
|
|
|
47
146
|
### Parameters
|
|
48
147
|
|
|
49
|
-
|
|
50
|
-
------------- | ------------- | ------------- | -------------
|
|
51
|
-
**body** | [**CreateTaxInput**](CreateTaxInput.md)| |
|
|
148
|
+
This endpoint does not need any parameter.
|
|
52
149
|
|
|
53
150
|
### Return type
|
|
54
151
|
|
|
@@ -56,57 +153,82 @@ nil (empty response body)
|
|
|
56
153
|
|
|
57
154
|
### Authorization
|
|
58
155
|
|
|
59
|
-
[x-client-
|
|
156
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
60
157
|
|
|
61
158
|
### HTTP request headers
|
|
62
159
|
|
|
63
|
-
|
|
64
|
-
|
|
160
|
+
- **Content-Type**: Not defined
|
|
161
|
+
- **Accept**: application/json
|
|
65
162
|
|
|
66
163
|
|
|
164
|
+
## tax_controller_find_all
|
|
67
165
|
|
|
68
|
-
# **tax_controller_find_all**
|
|
69
166
|
> tax_controller_find_all(opts)
|
|
70
167
|
|
|
71
|
-
Get all taxes
|
|
168
|
+
Get all taxes with filters
|
|
169
|
+
|
|
170
|
+
Retrieves a list of taxes with optional filtering and pagination. ## Use Cases - List all available tax rates - Search taxes by name - Filter active/inactive taxes - Export tax configuration ## Query Parameters - `skip`: Number of records to skip (default: 0, min: 0) - `take`: Number of records to return (default: 10, min: 1, max: 100) - `name`: Filter taxes by name (partial match, case-insensitive) - `active`: Filter by active status (true/false) ## Example Request `GET /api/v0/taxes?skip=0&take=20&active=true&name=Sales` ## Example Response ```json [ { \"id\": \"tax_123456\", \"name\": \"Sales Tax\", \"description\": \"Standard sales tax for retail transactions\", \"percentage\": 8.5, \"active\": true, \"created_at\": \"2024-03-20T10:00:00Z\", \"updated_at\": \"2024-03-20T10:00:00Z\" } ] ```
|
|
171
|
+
|
|
172
|
+
### Examples
|
|
72
173
|
|
|
73
|
-
### Example
|
|
74
174
|
```ruby
|
|
75
|
-
|
|
76
|
-
require '
|
|
175
|
+
require 'time'
|
|
176
|
+
require 'devdraft'
|
|
77
177
|
# setup authorization
|
|
78
|
-
|
|
79
|
-
# Configure API key authorization: x-client-key
|
|
80
|
-
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
81
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
82
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
83
|
-
|
|
178
|
+
Devdraft.configure do |config|
|
|
84
179
|
# Configure API key authorization: x-client-secret
|
|
85
180
|
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
86
181
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
87
|
-
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
182
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
183
|
+
|
|
184
|
+
# Configure API key authorization: x-client-key
|
|
185
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
186
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
187
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
88
188
|
end
|
|
89
189
|
|
|
90
|
-
api_instance =
|
|
91
|
-
opts = {
|
|
92
|
-
skip:
|
|
93
|
-
take:
|
|
190
|
+
api_instance = Devdraft::TaxesApi.new
|
|
191
|
+
opts = {
|
|
192
|
+
skip: 0, # Float | Number of records to skip for pagination
|
|
193
|
+
take: 10, # Float | Number of records to return (max 100)
|
|
194
|
+
name: 'Sales', # String | Filter taxes by name (partial match, case-insensitive)
|
|
195
|
+
active: true # Boolean | Filter by active status
|
|
94
196
|
}
|
|
95
197
|
|
|
96
198
|
begin
|
|
97
|
-
#Get all taxes
|
|
199
|
+
# Get all taxes with filters
|
|
98
200
|
api_instance.tax_controller_find_all(opts)
|
|
99
|
-
rescue
|
|
100
|
-
puts "
|
|
201
|
+
rescue Devdraft::ApiError => e
|
|
202
|
+
puts "Error when calling TaxesApi->tax_controller_find_all: #{e}"
|
|
203
|
+
end
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
#### Using the tax_controller_find_all_with_http_info variant
|
|
207
|
+
|
|
208
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
209
|
+
|
|
210
|
+
> <Array(nil, Integer, Hash)> tax_controller_find_all_with_http_info(opts)
|
|
211
|
+
|
|
212
|
+
```ruby
|
|
213
|
+
begin
|
|
214
|
+
# Get all taxes with filters
|
|
215
|
+
data, status_code, headers = api_instance.tax_controller_find_all_with_http_info(opts)
|
|
216
|
+
p status_code # => 2xx
|
|
217
|
+
p headers # => { ... }
|
|
218
|
+
p data # => nil
|
|
219
|
+
rescue Devdraft::ApiError => e
|
|
220
|
+
puts "Error when calling TaxesApi->tax_controller_find_all_with_http_info: #{e}"
|
|
101
221
|
end
|
|
102
222
|
```
|
|
103
223
|
|
|
104
224
|
### Parameters
|
|
105
225
|
|
|
106
|
-
Name | Type | Description
|
|
107
|
-
|
|
108
|
-
**skip** | **
|
|
109
|
-
**take** | **
|
|
226
|
+
| Name | Type | Description | Notes |
|
|
227
|
+
| ---- | ---- | ----------- | ----- |
|
|
228
|
+
| **skip** | **Float** | Number of records to skip for pagination | [optional][default to 0] |
|
|
229
|
+
| **take** | **Float** | Number of records to return (max 100) | [optional][default to 10] |
|
|
230
|
+
| **name** | **String** | Filter taxes by name (partial match, case-insensitive) | [optional] |
|
|
231
|
+
| **active** | **Boolean** | Filter by active status | [optional] |
|
|
110
232
|
|
|
111
233
|
### Return type
|
|
112
234
|
|
|
@@ -114,54 +236,74 @@ nil (empty response body)
|
|
|
114
236
|
|
|
115
237
|
### Authorization
|
|
116
238
|
|
|
117
|
-
[x-client-
|
|
239
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
118
240
|
|
|
119
241
|
### HTTP request headers
|
|
120
242
|
|
|
121
|
-
|
|
122
|
-
|
|
243
|
+
- **Content-Type**: Not defined
|
|
244
|
+
- **Accept**: Not defined
|
|
123
245
|
|
|
124
246
|
|
|
247
|
+
## tax_controller_find_one
|
|
125
248
|
|
|
126
|
-
# **tax_controller_find_one**
|
|
127
249
|
> tax_controller_find_one(id)
|
|
128
250
|
|
|
129
251
|
Get a tax by ID
|
|
130
252
|
|
|
131
|
-
|
|
253
|
+
Retrieves detailed information about a specific tax. ## Use Cases - View tax details - Verify tax configuration - Check tax status before applying to products ## Path Parameters - `id`: Tax UUID (required) - Must be a valid UUID format ## Example Request `GET /api/v0/taxes/123e4567-e89b-12d3-a456-426614174000` ## Example Response ```json { \"id\": \"tax_123456\", \"name\": \"Sales Tax\", \"description\": \"Standard sales tax for retail transactions\", \"percentage\": 8.5, \"active\": true, \"created_at\": \"2024-03-20T10:00:00Z\", \"updated_at\": \"2024-03-20T10:00:00Z\" } ```
|
|
254
|
+
|
|
255
|
+
### Examples
|
|
256
|
+
|
|
132
257
|
```ruby
|
|
133
|
-
|
|
134
|
-
require '
|
|
258
|
+
require 'time'
|
|
259
|
+
require 'devdraft'
|
|
135
260
|
# setup authorization
|
|
136
|
-
|
|
261
|
+
Devdraft.configure do |config|
|
|
262
|
+
# Configure API key authorization: x-client-secret
|
|
263
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
264
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
265
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
266
|
+
|
|
137
267
|
# Configure API key authorization: x-client-key
|
|
138
268
|
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
139
269
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
140
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
270
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
271
|
+
end
|
|
141
272
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
273
|
+
api_instance = Devdraft::TaxesApi.new
|
|
274
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Tax unique identifier (UUID)
|
|
275
|
+
|
|
276
|
+
begin
|
|
277
|
+
# Get a tax by ID
|
|
278
|
+
api_instance.tax_controller_find_one(id)
|
|
279
|
+
rescue Devdraft::ApiError => e
|
|
280
|
+
puts "Error when calling TaxesApi->tax_controller_find_one: #{e}"
|
|
146
281
|
end
|
|
282
|
+
```
|
|
147
283
|
|
|
148
|
-
|
|
149
|
-
id = 'id_example' # String | Tax ID
|
|
284
|
+
#### Using the tax_controller_find_one_with_http_info variant
|
|
150
285
|
|
|
286
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
151
287
|
|
|
288
|
+
> <Array(nil, Integer, Hash)> tax_controller_find_one_with_http_info(id)
|
|
289
|
+
|
|
290
|
+
```ruby
|
|
152
291
|
begin
|
|
153
|
-
#Get a tax by ID
|
|
154
|
-
api_instance.
|
|
155
|
-
|
|
156
|
-
|
|
292
|
+
# Get a tax by ID
|
|
293
|
+
data, status_code, headers = api_instance.tax_controller_find_one_with_http_info(id)
|
|
294
|
+
p status_code # => 2xx
|
|
295
|
+
p headers # => { ... }
|
|
296
|
+
p data # => nil
|
|
297
|
+
rescue Devdraft::ApiError => e
|
|
298
|
+
puts "Error when calling TaxesApi->tax_controller_find_one_with_http_info: #{e}"
|
|
157
299
|
end
|
|
158
300
|
```
|
|
159
301
|
|
|
160
302
|
### Parameters
|
|
161
303
|
|
|
162
|
-
Name | Type | Description
|
|
163
|
-
|
|
164
|
-
**id** | **String
|
|
304
|
+
| Name | Type | Description | Notes |
|
|
305
|
+
| ---- | ---- | ----------- | ----- |
|
|
306
|
+
| **id** | **String** | Tax unique identifier (UUID) | |
|
|
165
307
|
|
|
166
308
|
### Return type
|
|
167
309
|
|
|
@@ -169,54 +311,74 @@ nil (empty response body)
|
|
|
169
311
|
|
|
170
312
|
### Authorization
|
|
171
313
|
|
|
172
|
-
[x-client-
|
|
314
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
173
315
|
|
|
174
316
|
### HTTP request headers
|
|
175
317
|
|
|
176
|
-
|
|
177
|
-
|
|
318
|
+
- **Content-Type**: Not defined
|
|
319
|
+
- **Accept**: Not defined
|
|
178
320
|
|
|
179
321
|
|
|
322
|
+
## tax_controller_remove
|
|
180
323
|
|
|
181
|
-
# **tax_controller_remove**
|
|
182
324
|
> tax_controller_remove(id)
|
|
183
325
|
|
|
184
326
|
Delete a tax
|
|
185
327
|
|
|
186
|
-
|
|
328
|
+
Deletes an existing tax. ## Use Cases - Remove obsolete tax rates - Clean up unused taxes - Comply with regulatory changes ## Path Parameters - `id`: Tax UUID (required) - Must be a valid UUID format ## Example Request `DELETE /api/v0/taxes/123e4567-e89b-12d3-a456-426614174000` ## Warning This action cannot be undone. Consider deactivating the tax instead of deleting it if it has been used in transactions.
|
|
329
|
+
|
|
330
|
+
### Examples
|
|
331
|
+
|
|
187
332
|
```ruby
|
|
188
|
-
|
|
189
|
-
require '
|
|
333
|
+
require 'time'
|
|
334
|
+
require 'devdraft'
|
|
190
335
|
# setup authorization
|
|
191
|
-
|
|
336
|
+
Devdraft.configure do |config|
|
|
337
|
+
# Configure API key authorization: x-client-secret
|
|
338
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
339
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
340
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
341
|
+
|
|
192
342
|
# Configure API key authorization: x-client-key
|
|
193
343
|
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
194
344
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
195
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
345
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
346
|
+
end
|
|
196
347
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
348
|
+
api_instance = Devdraft::TaxesApi.new
|
|
349
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Tax unique identifier (UUID)
|
|
350
|
+
|
|
351
|
+
begin
|
|
352
|
+
# Delete a tax
|
|
353
|
+
api_instance.tax_controller_remove(id)
|
|
354
|
+
rescue Devdraft::ApiError => e
|
|
355
|
+
puts "Error when calling TaxesApi->tax_controller_remove: #{e}"
|
|
201
356
|
end
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
#### Using the tax_controller_remove_with_http_info variant
|
|
202
360
|
|
|
203
|
-
|
|
204
|
-
id = 'id_example' # String | Tax ID
|
|
361
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
205
362
|
|
|
363
|
+
> <Array(nil, Integer, Hash)> tax_controller_remove_with_http_info(id)
|
|
206
364
|
|
|
365
|
+
```ruby
|
|
207
366
|
begin
|
|
208
|
-
#Delete a tax
|
|
209
|
-
api_instance.
|
|
210
|
-
|
|
211
|
-
|
|
367
|
+
# Delete a tax
|
|
368
|
+
data, status_code, headers = api_instance.tax_controller_remove_with_http_info(id)
|
|
369
|
+
p status_code # => 2xx
|
|
370
|
+
p headers # => { ... }
|
|
371
|
+
p data # => nil
|
|
372
|
+
rescue Devdraft::ApiError => e
|
|
373
|
+
puts "Error when calling TaxesApi->tax_controller_remove_with_http_info: #{e}"
|
|
212
374
|
end
|
|
213
375
|
```
|
|
214
376
|
|
|
215
377
|
### Parameters
|
|
216
378
|
|
|
217
|
-
Name | Type | Description
|
|
218
|
-
|
|
219
|
-
**id** | **String
|
|
379
|
+
| Name | Type | Description | Notes |
|
|
380
|
+
| ---- | ---- | ----------- | ----- |
|
|
381
|
+
| **id** | **String** | Tax unique identifier (UUID) | |
|
|
220
382
|
|
|
221
383
|
### Return type
|
|
222
384
|
|
|
@@ -224,56 +386,148 @@ nil (empty response body)
|
|
|
224
386
|
|
|
225
387
|
### Authorization
|
|
226
388
|
|
|
227
|
-
[x-client-
|
|
389
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
228
390
|
|
|
229
391
|
### HTTP request headers
|
|
230
392
|
|
|
231
|
-
|
|
232
|
-
|
|
393
|
+
- **Content-Type**: Not defined
|
|
394
|
+
- **Accept**: Not defined
|
|
233
395
|
|
|
234
396
|
|
|
397
|
+
## tax_controller_update
|
|
235
398
|
|
|
236
|
-
|
|
237
|
-
> tax_controller_update(bodyid)
|
|
399
|
+
> tax_controller_update(id, update_tax_dto)
|
|
238
400
|
|
|
239
401
|
Update a tax
|
|
240
402
|
|
|
241
|
-
|
|
403
|
+
Updates an existing tax's information. ## Use Cases - Modify tax percentage rates - Update tax descriptions - Activate/deactivate taxes - Change tax names ## Path Parameters - `id`: Tax UUID (required) - Must be a valid UUID format ## Example Request `PUT /api/v0/taxes/123e4567-e89b-12d3-a456-426614174000` ## Example Request Body ```json { \"name\": \"Updated Sales Tax\", \"description\": \"Updated sales tax rate\", \"percentage\": 9.0, \"active\": true } ``` ## Notes - Only include fields that need to be updated - All fields are optional in updates - Percentage changes affect future calculations only
|
|
404
|
+
|
|
405
|
+
### Examples
|
|
406
|
+
|
|
242
407
|
```ruby
|
|
243
|
-
|
|
244
|
-
require '
|
|
408
|
+
require 'time'
|
|
409
|
+
require 'devdraft'
|
|
245
410
|
# setup authorization
|
|
246
|
-
|
|
411
|
+
Devdraft.configure do |config|
|
|
412
|
+
# Configure API key authorization: x-client-secret
|
|
413
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
414
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
415
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
416
|
+
|
|
247
417
|
# Configure API key authorization: x-client-key
|
|
248
418
|
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
249
419
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
250
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
420
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
api_instance = Devdraft::TaxesApi.new
|
|
424
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Tax unique identifier (UUID)
|
|
425
|
+
update_tax_dto = Devdraft::UpdateTaxDto.new # UpdateTaxDto | Tax update data - only include fields you want to update
|
|
426
|
+
|
|
427
|
+
begin
|
|
428
|
+
# Update a tax
|
|
429
|
+
api_instance.tax_controller_update(id, update_tax_dto)
|
|
430
|
+
rescue Devdraft::ApiError => e
|
|
431
|
+
puts "Error when calling TaxesApi->tax_controller_update: #{e}"
|
|
432
|
+
end
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
#### Using the tax_controller_update_with_http_info variant
|
|
436
|
+
|
|
437
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
438
|
+
|
|
439
|
+
> <Array(nil, Integer, Hash)> tax_controller_update_with_http_info(id, update_tax_dto)
|
|
251
440
|
|
|
441
|
+
```ruby
|
|
442
|
+
begin
|
|
443
|
+
# Update a tax
|
|
444
|
+
data, status_code, headers = api_instance.tax_controller_update_with_http_info(id, update_tax_dto)
|
|
445
|
+
p status_code # => 2xx
|
|
446
|
+
p headers # => { ... }
|
|
447
|
+
p data # => nil
|
|
448
|
+
rescue Devdraft::ApiError => e
|
|
449
|
+
puts "Error when calling TaxesApi->tax_controller_update_with_http_info: #{e}"
|
|
450
|
+
end
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
### Parameters
|
|
454
|
+
|
|
455
|
+
| Name | Type | Description | Notes |
|
|
456
|
+
| ---- | ---- | ----------- | ----- |
|
|
457
|
+
| **id** | **String** | Tax unique identifier (UUID) | |
|
|
458
|
+
| **update_tax_dto** | [**UpdateTaxDto**](UpdateTaxDto.md) | Tax update data - only include fields you want to update | |
|
|
459
|
+
|
|
460
|
+
### Return type
|
|
461
|
+
|
|
462
|
+
nil (empty response body)
|
|
463
|
+
|
|
464
|
+
### Authorization
|
|
465
|
+
|
|
466
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
467
|
+
|
|
468
|
+
### HTTP request headers
|
|
469
|
+
|
|
470
|
+
- **Content-Type**: application/json
|
|
471
|
+
- **Accept**: Not defined
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
## tax_controller_update_without_id
|
|
475
|
+
|
|
476
|
+
> tax_controller_update_without_id
|
|
477
|
+
|
|
478
|
+
Tax ID required for updates
|
|
479
|
+
|
|
480
|
+
This endpoint requires a tax ID in the URL path. Use PUT /api/v0/taxes/{id} instead.
|
|
481
|
+
|
|
482
|
+
### Examples
|
|
483
|
+
|
|
484
|
+
```ruby
|
|
485
|
+
require 'time'
|
|
486
|
+
require 'devdraft'
|
|
487
|
+
# setup authorization
|
|
488
|
+
Devdraft.configure do |config|
|
|
252
489
|
# Configure API key authorization: x-client-secret
|
|
253
490
|
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
254
491
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
255
|
-
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
492
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
493
|
+
|
|
494
|
+
# Configure API key authorization: x-client-key
|
|
495
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
496
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
497
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
256
498
|
end
|
|
257
499
|
|
|
258
|
-
api_instance =
|
|
259
|
-
body = DevDraftAI::UpdateTaxInput.new # UpdateTaxInput |
|
|
260
|
-
id = 'id_example' # String | Tax ID
|
|
500
|
+
api_instance = Devdraft::TaxesApi.new
|
|
261
501
|
|
|
502
|
+
begin
|
|
503
|
+
# Tax ID required for updates
|
|
504
|
+
api_instance.tax_controller_update_without_id
|
|
505
|
+
rescue Devdraft::ApiError => e
|
|
506
|
+
puts "Error when calling TaxesApi->tax_controller_update_without_id: #{e}"
|
|
507
|
+
end
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
#### Using the tax_controller_update_without_id_with_http_info variant
|
|
511
|
+
|
|
512
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
262
513
|
|
|
514
|
+
> <Array(nil, Integer, Hash)> tax_controller_update_without_id_with_http_info
|
|
515
|
+
|
|
516
|
+
```ruby
|
|
263
517
|
begin
|
|
264
|
-
#
|
|
265
|
-
api_instance.
|
|
266
|
-
|
|
267
|
-
|
|
518
|
+
# Tax ID required for updates
|
|
519
|
+
data, status_code, headers = api_instance.tax_controller_update_without_id_with_http_info
|
|
520
|
+
p status_code # => 2xx
|
|
521
|
+
p headers # => { ... }
|
|
522
|
+
p data # => nil
|
|
523
|
+
rescue Devdraft::ApiError => e
|
|
524
|
+
puts "Error when calling TaxesApi->tax_controller_update_without_id_with_http_info: #{e}"
|
|
268
525
|
end
|
|
269
526
|
```
|
|
270
527
|
|
|
271
528
|
### Parameters
|
|
272
529
|
|
|
273
|
-
|
|
274
|
-
------------- | ------------- | ------------- | -------------
|
|
275
|
-
**body** | [**UpdateTaxInput**](UpdateTaxInput.md)| |
|
|
276
|
-
**id** | **String**| Tax ID |
|
|
530
|
+
This endpoint does not need any parameter.
|
|
277
531
|
|
|
278
532
|
### Return type
|
|
279
533
|
|
|
@@ -281,12 +535,10 @@ nil (empty response body)
|
|
|
281
535
|
|
|
282
536
|
### Authorization
|
|
283
537
|
|
|
284
|
-
[x-client-
|
|
538
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
285
539
|
|
|
286
540
|
### HTTP request headers
|
|
287
541
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
542
|
+
- **Content-Type**: Not defined
|
|
543
|
+
- **Accept**: application/json
|
|
292
544
|
|