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/CustomersApi.md
CHANGED
|
@@ -1,55 +1,75 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Devdraft::CustomersApi
|
|
2
2
|
|
|
3
3
|
All URIs are relative to *https://api.devdraft.ai*
|
|
4
4
|
|
|
5
|
-
Method | HTTP request | Description
|
|
6
|
-
|
|
7
|
-
[**customer_controller_create**](CustomersApi.md#customer_controller_create) | **POST** /api/v0/customers | Create a new customer
|
|
8
|
-
[**customer_controller_find_all**](CustomersApi.md#customer_controller_find_all) | **GET** /api/v0/customers | Get all customers with filters
|
|
9
|
-
[**customer_controller_find_one**](CustomersApi.md#customer_controller_find_one) | **GET** /api/v0/customers/{id} | Get a customer by ID
|
|
10
|
-
[**customer_controller_update**](CustomersApi.md#customer_controller_update) | **PATCH** /api/v0/customers/{id} | Update a customer
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**customer_controller_create**](CustomersApi.md#customer_controller_create) | **POST** /api/v0/customers | Create a new customer |
|
|
8
|
+
| [**customer_controller_find_all**](CustomersApi.md#customer_controller_find_all) | **GET** /api/v0/customers | Get all customers with filters |
|
|
9
|
+
| [**customer_controller_find_one**](CustomersApi.md#customer_controller_find_one) | **GET** /api/v0/customers/{id} | Get a customer by ID |
|
|
10
|
+
| [**customer_controller_update**](CustomersApi.md#customer_controller_update) | **PATCH** /api/v0/customers/{id} | Update a customer |
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
|
|
13
|
+
## customer_controller_create
|
|
14
|
+
|
|
15
|
+
> customer_controller_create(create_customer_dto)
|
|
14
16
|
|
|
15
17
|
Create a new customer
|
|
16
18
|
|
|
17
|
-
Creates a new customer in the system with their personal and contact information. This endpoint allows you to register new customers and store their details for future transactions. ## Use Cases - Register new customers for payment processing - Store customer information for recurring payments - Maintain customer profiles for transaction history ## Example: Create New Customer ```json { \"
|
|
19
|
+
Creates a new customer in the system with their personal and contact information. This endpoint allows you to register new customers and store their details for future transactions. ## Use Cases - Register new customers for payment processing - Store customer information for recurring payments - Maintain customer profiles for transaction history ## Example: Create New Customer ```json { \"first_name\": \"John\", \"last_name\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone_number\": \"+1-555-123-4567\", \"customer_type\": \"Startup\", \"status\": \"ACTIVE\" } ``` ## Required Fields - `first_name`: Customer's first name (1-100 characters) - `last_name`: Customer's last name (1-100 characters) - `phone_number`: Customer's phone number (max 20 characters) ## Optional Fields - `email`: Valid email address (max 255 characters) - `customer_type`: Type of customer account (Individual, Startup, Small Business, Medium Business, Enterprise, Non-Profit, Government) - `status`: Customer status (ACTIVE, BLACKLISTED, DEACTIVATED)
|
|
20
|
+
|
|
21
|
+
### Examples
|
|
18
22
|
|
|
19
|
-
### Example
|
|
20
23
|
```ruby
|
|
21
|
-
|
|
22
|
-
require '
|
|
24
|
+
require 'time'
|
|
25
|
+
require 'devdraft'
|
|
23
26
|
# setup authorization
|
|
24
|
-
|
|
27
|
+
Devdraft.configure do |config|
|
|
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
|
+
|
|
25
33
|
# Configure API key authorization: x-client-key
|
|
26
34
|
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
27
35
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
28
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
36
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
37
|
+
end
|
|
29
38
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
api_instance = Devdraft::CustomersApi.new
|
|
40
|
+
create_customer_dto = Devdraft::CreateCustomerDto.new({first_name: 'John', last_name: 'Doe', phone_number: '+1-555-123-4567'}) # CreateCustomerDto | Customer creation data
|
|
41
|
+
|
|
42
|
+
begin
|
|
43
|
+
# Create a new customer
|
|
44
|
+
api_instance.customer_controller_create(create_customer_dto)
|
|
45
|
+
rescue Devdraft::ApiError => e
|
|
46
|
+
puts "Error when calling CustomersApi->customer_controller_create: #{e}"
|
|
34
47
|
end
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
#### Using the customer_controller_create_with_http_info variant
|
|
35
51
|
|
|
36
|
-
|
|
37
|
-
body = DevDraftAI::CreateCustomerDto.new # CreateCustomerDto | Customer creation data
|
|
52
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
38
53
|
|
|
54
|
+
> <Array(nil, Integer, Hash)> customer_controller_create_with_http_info(create_customer_dto)
|
|
39
55
|
|
|
56
|
+
```ruby
|
|
40
57
|
begin
|
|
41
|
-
#Create a new customer
|
|
42
|
-
api_instance.
|
|
43
|
-
|
|
44
|
-
|
|
58
|
+
# Create a new customer
|
|
59
|
+
data, status_code, headers = api_instance.customer_controller_create_with_http_info(create_customer_dto)
|
|
60
|
+
p status_code # => 2xx
|
|
61
|
+
p headers # => { ... }
|
|
62
|
+
p data # => nil
|
|
63
|
+
rescue Devdraft::ApiError => e
|
|
64
|
+
puts "Error when calling CustomersApi->customer_controller_create_with_http_info: #{e}"
|
|
45
65
|
end
|
|
46
66
|
```
|
|
47
67
|
|
|
48
68
|
### Parameters
|
|
49
69
|
|
|
50
|
-
Name | Type | Description
|
|
51
|
-
|
|
52
|
-
**
|
|
70
|
+
| Name | Type | Description | Notes |
|
|
71
|
+
| ---- | ---- | ----------- | ----- |
|
|
72
|
+
| **create_customer_dto** | [**CreateCustomerDto**](CreateCustomerDto.md) | Customer creation data | |
|
|
53
73
|
|
|
54
74
|
### Return type
|
|
55
75
|
|
|
@@ -57,65 +77,84 @@ nil (empty response body)
|
|
|
57
77
|
|
|
58
78
|
### Authorization
|
|
59
79
|
|
|
60
|
-
[x-client-
|
|
80
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
61
81
|
|
|
62
82
|
### HTTP request headers
|
|
63
83
|
|
|
64
|
-
|
|
65
|
-
|
|
84
|
+
- **Content-Type**: application/json
|
|
85
|
+
- **Accept**: Not defined
|
|
66
86
|
|
|
67
87
|
|
|
88
|
+
## customer_controller_find_all
|
|
68
89
|
|
|
69
|
-
# **customer_controller_find_all**
|
|
70
90
|
> customer_controller_find_all(opts)
|
|
71
91
|
|
|
72
92
|
Get all customers with filters
|
|
73
93
|
|
|
74
|
-
Retrieves a list of customers with optional filtering and pagination. This endpoint allows you to search and filter customers based on various criteria. ## Use Cases - List all customers with pagination - Search customers by name or email - Filter customers by status - Export customer data ## Query Parameters - `skip`: Number of records to skip (default: 0) - `take`: Number of records to take (default: 10) - `status`: Filter by customer status (ACTIVE,
|
|
94
|
+
Retrieves a list of customers with optional filtering and pagination. This endpoint allows you to search and filter customers based on various criteria. ## Use Cases - List all customers with pagination - Search customers by name or email - Filter customers by status - Export customer data ## Query Parameters - `skip`: Number of records to skip (default: 0, min: 0) - `take`: Number of records to take (default: 10, min: 1, max: 100) - `status`: Filter by customer status (ACTIVE, BLACKLISTED, DEACTIVATED) - `name`: Filter by customer name (partial match, case-insensitive) - `email`: Filter by customer email (exact match, case-insensitive) ## Example Request `GET /api/v0/customers?skip=0&take=20&status=ACTIVE&name=John` ## Example Response ```json { \"data\": [ { \"id\": \"cust_123456\", \"first_name\": \"John\", \"last_name\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone_number\": \"+1-555-123-4567\", \"customer_type\": \"Startup\", \"status\": \"ACTIVE\", \"created_at\": \"2024-03-20T10:00:00Z\", \"updated_at\": \"2024-03-20T10:00:00Z\" } ], \"total\": 100, \"skip\": 0, \"take\": 10 } ```
|
|
95
|
+
|
|
96
|
+
### Examples
|
|
75
97
|
|
|
76
|
-
### Example
|
|
77
98
|
```ruby
|
|
78
|
-
|
|
79
|
-
require '
|
|
99
|
+
require 'time'
|
|
100
|
+
require 'devdraft'
|
|
80
101
|
# setup authorization
|
|
81
|
-
|
|
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
|
-
|
|
102
|
+
Devdraft.configure do |config|
|
|
87
103
|
# Configure API key authorization: x-client-secret
|
|
88
104
|
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
89
105
|
# 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'
|
|
106
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
107
|
+
|
|
108
|
+
# Configure API key authorization: x-client-key
|
|
109
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
110
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
111
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
91
112
|
end
|
|
92
113
|
|
|
93
|
-
api_instance =
|
|
94
|
-
opts = {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
114
|
+
api_instance = Devdraft::CustomersApi.new
|
|
115
|
+
opts = {
|
|
116
|
+
skip: 0, # Float | Number of records to skip for pagination
|
|
117
|
+
take: 10, # Float | Number of records to return (max 100)
|
|
118
|
+
status: Devdraft::CustomerStatus::ACTIVE, # CustomerStatus | Filter customers by status
|
|
119
|
+
name: 'John', # String | Filter customers by name (partial match, case-insensitive)
|
|
120
|
+
email: 'john.doe@example.com' # String | Filter customers by email (exact match, case-insensitive)
|
|
100
121
|
}
|
|
101
122
|
|
|
102
123
|
begin
|
|
103
|
-
#Get all customers with filters
|
|
124
|
+
# Get all customers with filters
|
|
104
125
|
api_instance.customer_controller_find_all(opts)
|
|
105
|
-
rescue
|
|
106
|
-
puts "
|
|
126
|
+
rescue Devdraft::ApiError => e
|
|
127
|
+
puts "Error when calling CustomersApi->customer_controller_find_all: #{e}"
|
|
128
|
+
end
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
#### Using the customer_controller_find_all_with_http_info variant
|
|
132
|
+
|
|
133
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
134
|
+
|
|
135
|
+
> <Array(nil, Integer, Hash)> customer_controller_find_all_with_http_info(opts)
|
|
136
|
+
|
|
137
|
+
```ruby
|
|
138
|
+
begin
|
|
139
|
+
# Get all customers with filters
|
|
140
|
+
data, status_code, headers = api_instance.customer_controller_find_all_with_http_info(opts)
|
|
141
|
+
p status_code # => 2xx
|
|
142
|
+
p headers # => { ... }
|
|
143
|
+
p data # => nil
|
|
144
|
+
rescue Devdraft::ApiError => e
|
|
145
|
+
puts "Error when calling CustomersApi->customer_controller_find_all_with_http_info: #{e}"
|
|
107
146
|
end
|
|
108
147
|
```
|
|
109
148
|
|
|
110
149
|
### Parameters
|
|
111
150
|
|
|
112
|
-
Name | Type | Description
|
|
113
|
-
|
|
114
|
-
**
|
|
115
|
-
**
|
|
116
|
-
**
|
|
117
|
-
**
|
|
118
|
-
**
|
|
151
|
+
| Name | Type | Description | Notes |
|
|
152
|
+
| ---- | ---- | ----------- | ----- |
|
|
153
|
+
| **skip** | **Float** | Number of records to skip for pagination | [optional][default to 0] |
|
|
154
|
+
| **take** | **Float** | Number of records to return (max 100) | [optional][default to 10] |
|
|
155
|
+
| **status** | [**CustomerStatus**](.md) | Filter customers by status | [optional] |
|
|
156
|
+
| **name** | **String** | Filter customers by name (partial match, case-insensitive) | [optional] |
|
|
157
|
+
| **email** | **String** | Filter customers by email (exact match, case-insensitive) | [optional] |
|
|
119
158
|
|
|
120
159
|
### Return type
|
|
121
160
|
|
|
@@ -123,56 +162,74 @@ nil (empty response body)
|
|
|
123
162
|
|
|
124
163
|
### Authorization
|
|
125
164
|
|
|
126
|
-
[x-client-
|
|
165
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
127
166
|
|
|
128
167
|
### HTTP request headers
|
|
129
168
|
|
|
130
|
-
|
|
131
|
-
|
|
169
|
+
- **Content-Type**: Not defined
|
|
170
|
+
- **Accept**: Not defined
|
|
132
171
|
|
|
133
172
|
|
|
173
|
+
## customer_controller_find_one
|
|
134
174
|
|
|
135
|
-
# **customer_controller_find_one**
|
|
136
175
|
> customer_controller_find_one(id)
|
|
137
176
|
|
|
138
177
|
Get a customer by ID
|
|
139
178
|
|
|
140
|
-
Retrieves detailed information about a specific customer. This endpoint allows you to fetch complete customer details including their
|
|
179
|
+
Retrieves detailed information about a specific customer. This endpoint allows you to fetch complete customer details including their contact information and status. ## Use Cases - View customer details - Verify customer information - Check customer status before processing payments ## Path Parameters - `id`: Customer UUID (required) - Must be a valid UUID format ## Example Request `GET /api/v0/customers/123e4567-e89b-12d3-a456-426614174000` ## Example Response ```json { \"id\": \"cust_123456\", \"first_name\": \"John\", \"last_name\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone_number\": \"+1-555-123-4567\", \"customer_type\": \"Enterprise\", \"status\": \"ACTIVE\", \"last_spent\": 1250.50, \"last_purchase_date\": \"2024-03-15T14:30:00Z\", \"created_at\": \"2024-03-20T10:00:00Z\", \"updated_at\": \"2024-03-20T10:00:00Z\" } ```
|
|
180
|
+
|
|
181
|
+
### Examples
|
|
141
182
|
|
|
142
|
-
### Example
|
|
143
183
|
```ruby
|
|
144
|
-
|
|
145
|
-
require '
|
|
184
|
+
require 'time'
|
|
185
|
+
require 'devdraft'
|
|
146
186
|
# setup authorization
|
|
147
|
-
|
|
187
|
+
Devdraft.configure do |config|
|
|
188
|
+
# Configure API key authorization: x-client-secret
|
|
189
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
190
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
191
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
192
|
+
|
|
148
193
|
# Configure API key authorization: x-client-key
|
|
149
194
|
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
150
195
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
151
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
196
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
197
|
+
end
|
|
152
198
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
199
|
+
api_instance = Devdraft::CustomersApi.new
|
|
200
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Customer unique identifier (UUID)
|
|
201
|
+
|
|
202
|
+
begin
|
|
203
|
+
# Get a customer by ID
|
|
204
|
+
api_instance.customer_controller_find_one(id)
|
|
205
|
+
rescue Devdraft::ApiError => e
|
|
206
|
+
puts "Error when calling CustomersApi->customer_controller_find_one: #{e}"
|
|
157
207
|
end
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
#### Using the customer_controller_find_one_with_http_info variant
|
|
158
211
|
|
|
159
|
-
|
|
160
|
-
id = 'id_example' # String |
|
|
212
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
161
213
|
|
|
214
|
+
> <Array(nil, Integer, Hash)> customer_controller_find_one_with_http_info(id)
|
|
162
215
|
|
|
216
|
+
```ruby
|
|
163
217
|
begin
|
|
164
|
-
#Get a customer by ID
|
|
165
|
-
api_instance.
|
|
166
|
-
|
|
167
|
-
|
|
218
|
+
# Get a customer by ID
|
|
219
|
+
data, status_code, headers = api_instance.customer_controller_find_one_with_http_info(id)
|
|
220
|
+
p status_code # => 2xx
|
|
221
|
+
p headers # => { ... }
|
|
222
|
+
p data # => nil
|
|
223
|
+
rescue Devdraft::ApiError => e
|
|
224
|
+
puts "Error when calling CustomersApi->customer_controller_find_one_with_http_info: #{e}"
|
|
168
225
|
end
|
|
169
226
|
```
|
|
170
227
|
|
|
171
228
|
### Parameters
|
|
172
229
|
|
|
173
|
-
Name | Type | Description
|
|
174
|
-
|
|
175
|
-
**id** | **String
|
|
230
|
+
| Name | Type | Description | Notes |
|
|
231
|
+
| ---- | ---- | ----------- | ----- |
|
|
232
|
+
| **id** | **String** | Customer unique identifier (UUID) | |
|
|
176
233
|
|
|
177
234
|
### Return type
|
|
178
235
|
|
|
@@ -180,58 +237,76 @@ nil (empty response body)
|
|
|
180
237
|
|
|
181
238
|
### Authorization
|
|
182
239
|
|
|
183
|
-
[x-client-
|
|
240
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
184
241
|
|
|
185
242
|
### HTTP request headers
|
|
186
243
|
|
|
187
|
-
|
|
188
|
-
|
|
244
|
+
- **Content-Type**: Not defined
|
|
245
|
+
- **Accept**: Not defined
|
|
189
246
|
|
|
190
247
|
|
|
248
|
+
## customer_controller_update
|
|
191
249
|
|
|
192
|
-
|
|
193
|
-
> customer_controller_update(bodyid)
|
|
250
|
+
> customer_controller_update(id, update_customer_dto)
|
|
194
251
|
|
|
195
252
|
Update a customer
|
|
196
253
|
|
|
197
|
-
Updates an existing customer's information. This endpoint allows you to modify customer details while preserving their core information. ## Use Cases - Update customer contact information - Change customer
|
|
254
|
+
Updates an existing customer's information. This endpoint allows you to modify customer details while preserving their core information. ## Use Cases - Update customer contact information - Change customer type - Modify customer status ## Path Parameters - `id`: Customer UUID (required) - Must be a valid UUID format ## Example Request `PATCH /api/v0/customers/123e4567-e89b-12d3-a456-426614174000` ## Example Request Body ```json { \"first_name\": \"John\", \"last_name\": \"Smith\", \"phone_number\": \"+1-987-654-3210\", \"customer_type\": \"Small Business\" } ``` ## Notes - Only include fields that need to be updated - All fields are optional in updates - Status changes may require additional verification
|
|
255
|
+
|
|
256
|
+
### Examples
|
|
198
257
|
|
|
199
|
-
### Example
|
|
200
258
|
```ruby
|
|
201
|
-
|
|
202
|
-
require '
|
|
259
|
+
require 'time'
|
|
260
|
+
require 'devdraft'
|
|
203
261
|
# setup authorization
|
|
204
|
-
|
|
262
|
+
Devdraft.configure do |config|
|
|
263
|
+
# Configure API key authorization: x-client-secret
|
|
264
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
265
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
266
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
267
|
+
|
|
205
268
|
# Configure API key authorization: x-client-key
|
|
206
269
|
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
207
270
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
208
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
271
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
272
|
+
end
|
|
209
273
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
274
|
+
api_instance = Devdraft::CustomersApi.new
|
|
275
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Customer unique identifier (UUID)
|
|
276
|
+
update_customer_dto = Devdraft::UpdateCustomerDto.new # UpdateCustomerDto | Customer update data
|
|
277
|
+
|
|
278
|
+
begin
|
|
279
|
+
# Update a customer
|
|
280
|
+
api_instance.customer_controller_update(id, update_customer_dto)
|
|
281
|
+
rescue Devdraft::ApiError => e
|
|
282
|
+
puts "Error when calling CustomersApi->customer_controller_update: #{e}"
|
|
214
283
|
end
|
|
284
|
+
```
|
|
215
285
|
|
|
216
|
-
|
|
217
|
-
body = DevDraftAI::UpdateCustomerDto.new # UpdateCustomerDto | Customer update data
|
|
218
|
-
id = 'id_example' # String |
|
|
286
|
+
#### Using the customer_controller_update_with_http_info variant
|
|
219
287
|
|
|
288
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
220
289
|
|
|
290
|
+
> <Array(nil, Integer, Hash)> customer_controller_update_with_http_info(id, update_customer_dto)
|
|
291
|
+
|
|
292
|
+
```ruby
|
|
221
293
|
begin
|
|
222
|
-
#Update a customer
|
|
223
|
-
api_instance.
|
|
224
|
-
|
|
225
|
-
|
|
294
|
+
# Update a customer
|
|
295
|
+
data, status_code, headers = api_instance.customer_controller_update_with_http_info(id, update_customer_dto)
|
|
296
|
+
p status_code # => 2xx
|
|
297
|
+
p headers # => { ... }
|
|
298
|
+
p data # => nil
|
|
299
|
+
rescue Devdraft::ApiError => e
|
|
300
|
+
puts "Error when calling CustomersApi->customer_controller_update_with_http_info: #{e}"
|
|
226
301
|
end
|
|
227
302
|
```
|
|
228
303
|
|
|
229
304
|
### Parameters
|
|
230
305
|
|
|
231
|
-
Name | Type | Description
|
|
232
|
-
|
|
233
|
-
**
|
|
234
|
-
**
|
|
306
|
+
| Name | Type | Description | Notes |
|
|
307
|
+
| ---- | ---- | ----------- | ----- |
|
|
308
|
+
| **id** | **String** | Customer unique identifier (UUID) | |
|
|
309
|
+
| **update_customer_dto** | [**UpdateCustomerDto**](UpdateCustomerDto.md) | Customer update data | |
|
|
235
310
|
|
|
236
311
|
### Return type
|
|
237
312
|
|
|
@@ -239,12 +314,10 @@ nil (empty response body)
|
|
|
239
314
|
|
|
240
315
|
### Authorization
|
|
241
316
|
|
|
242
|
-
[x-client-
|
|
317
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
243
318
|
|
|
244
319
|
### HTTP request headers
|
|
245
320
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
321
|
+
- **Content-Type**: application/json
|
|
322
|
+
- **Accept**: Not defined
|
|
250
323
|
|
data/docs/DestinationCurrency.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Devdraft::DestinationCurrency
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
|
|
8
|
+
## Example
|
|
9
|
+
|
|
10
|
+
```ruby
|
|
11
|
+
require 'devdraft'
|
|
12
|
+
|
|
13
|
+
instance = Devdraft::DestinationCurrency.new()
|
|
14
|
+
```
|
|
6
15
|
|
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Devdraft::ExchangeRateResponseDto
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
**
|
|
8
|
-
**
|
|
9
|
-
**
|
|
10
|
-
**
|
|
11
|
-
**
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **from** | **String** | Source currency code (USD for USDC) | |
|
|
8
|
+
| **to** | **String** | Target currency code (EUR for EURC) | |
|
|
9
|
+
| **midmarket_rate** | **String** | Mid-market exchange rate from source to target currency | |
|
|
10
|
+
| **buy_rate** | **String** | Rate for buying target currency (what you get when converting from source to target) | |
|
|
11
|
+
| **sell_rate** | **String** | Rate for selling target currency (what you pay when converting from target to source) | |
|
|
12
|
+
| **timestamp** | **String** | Timestamp when the exchange rate was last updated | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'devdraft'
|
|
18
|
+
|
|
19
|
+
instance = Devdraft::ExchangeRateResponseDto.new(
|
|
20
|
+
from: usd,
|
|
21
|
+
to: eur,
|
|
22
|
+
midmarket_rate: 0.85000,
|
|
23
|
+
buy_rate: 0.84500,
|
|
24
|
+
sell_rate: 0.85500,
|
|
25
|
+
timestamp: 2024-01-15T10:30:00Z
|
|
26
|
+
)
|
|
27
|
+
```
|
|
12
28
|
|