devdraft
Advanced tools
+94
| #!/usr/bin/env ruby | ||
| # Example usage of the Devdraft Ruby SDK | ||
| # | ||
| # Installation: | ||
| # gem install devdraft | ||
| # | ||
| # Usage: | ||
| # ruby example.rb | ||
| require 'devdraft' | ||
| # Configure the SDK | ||
| Devdraft.configure do |config| | ||
| # Set your API key (required for authenticated endpoints) | ||
| config.api_key['api_key'] = 'YOUR_API_KEY' | ||
| # Optional: Set a custom base URL if needed | ||
| # config.base_url = 'https://api.devdraft.com' | ||
| # Optional: Enable debug logging | ||
| config.debugging = true | ||
| end | ||
| # Example 1: Health Check | ||
| def check_health | ||
| puts "\n=== Health Check Example ===" | ||
| api_instance = Devdraft::APIHealthApi.new | ||
| begin | ||
| # Public health check (no auth required) | ||
| result = api_instance.health_controller_public_health_check_v0 | ||
| puts "Public Health Check Response:" | ||
| puts result.inspect | ||
| # Authenticated health check | ||
| result = api_instance.health_controller_check_v0 | ||
| puts "\nAuthenticated Health Check Response:" | ||
| puts result.inspect | ||
| rescue => e | ||
| puts "Error during health check: #{e}" | ||
| end | ||
| end | ||
| # Example 2: List Customers | ||
| def list_customers | ||
| puts "\n=== List Customers Example ===" | ||
| api_instance = Devdraft::CustomersApi.new | ||
| begin | ||
| # List customers with pagination | ||
| result = api_instance.customers_controller_list_v0( | ||
| page: 1, | ||
| limit: 10 | ||
| ) | ||
| puts "Customers Response:" | ||
| puts result.inspect | ||
| rescue => e | ||
| puts "Error listing customers: #{e}" | ||
| end | ||
| end | ||
| # Example 3: Create Payment Link | ||
| def create_payment_link | ||
| puts "\n=== Create Payment Link Example ===" | ||
| api_instance = Devdraft::PaymentLinksApi.new | ||
| begin | ||
| # Create a payment link | ||
| payment_link = Devdraft::CreatePaymentLinkDto.new( | ||
| amount: 100.00, | ||
| currency: 'USD', | ||
| description: 'Test Payment Link', | ||
| expires_at: (Time.now + 86400).iso8601 # 24 hours from now | ||
| ) | ||
| result = api_instance.payment_links_controller_create_v0(payment_link) | ||
| puts "Payment Link Created:" | ||
| puts result.inspect | ||
| rescue => e | ||
| puts "Error creating payment link: #{e}" | ||
| end | ||
| end | ||
| # Run examples | ||
| puts "Devdraft Ruby SDK Examples" | ||
| puts "==========================" | ||
| puts "Make sure to set your API key in the configuration block above." | ||
| puts "Running examples..." | ||
| check_health | ||
| list_customers | ||
| create_payment_link | ||
| puts "\nExamples completed!" |
@@ -19,3 +19,3 @@ # -*- encoding: utf-8 -*- | ||
| s.name = "devdraft" | ||
| s.version = DevDraft::VERSION | ||
| s.version = Devdraft::VERSION | ||
| s.platform = Gem::Platform::RUBY | ||
@@ -35,3 +35,3 @@ s.authors = ["Swagger-Codegen"] | ||
| s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? } | ||
| s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? && !f.end_with?('.gem') } | ||
| s.test_files = `find spec/*`.split("\n") | ||
@@ -38,0 +38,0 @@ s.executables = [] |
+1
-1
@@ -12,3 +12,3 @@ #!/bin/sh | ||
| GIT_REPO_ID="devdraft-sdk-ruby" | ||
| RELEASE_NOTE="Initial release: DevDraft Ruby SDK" | ||
| RELEASE_NOTE="Initial release: Devdraft Ruby SDK" | ||
| GIT_REPO_BASE_URL="github.com" | ||
@@ -15,0 +15,0 @@ |
@@ -12,3 +12,3 @@ =begin | ||
| module DevDraftAI | ||
| module Devdraft | ||
| class ApiError < StandardError | ||
@@ -15,0 +15,0 @@ attr_reader :code, :response_headers, :response_body |
@@ -12,3 +12,3 @@ =begin | ||
| module DevDraftAI | ||
| module Devdraft | ||
| class Configuration | ||
@@ -15,0 +15,0 @@ # Defines url scheme |
@@ -12,4 +12,4 @@ =begin | ||
| module DevDraft | ||
| VERSION = '1.0.0' | ||
| module Devdraft | ||
| VERSION = '1.0.1' | ||
| end |
+82
-1084
@@ -1,1119 +0,117 @@ | ||
| # devdraft_ai_sdk | ||
| # Devdraft Ruby SDK | ||
| DevDraftAI - the Ruby gem for the Devdraft AI Payment & Business Management API | ||
| A Ruby client library for the Devdraft Payment & Business Management API. | ||
| A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods. | ||
| This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: | ||
| - API version: 1.0.0 | ||
| - Package version: 1.0.0 | ||
| - Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen | ||
| ## Installation | ||
| ### Build a gem | ||
| Add this line to your application's Gemfile: | ||
| To build the Ruby code into a gem: | ||
| ```ruby | ||
| gem 'devdraft', '~> 1.0.1' | ||
| ``` | ||
| ```shell | ||
| gem build devdraft_ai_sdk.gemspec | ||
| And then execute: | ||
| ```bash | ||
| $ bundle install | ||
| ``` | ||
| Then either install the gem locally: | ||
| ```shell | ||
| gem install ./devdraft_ai_sdk-1.0.0.gem | ||
| Or install it yourself as: | ||
| ```bash | ||
| $ gem install devdraft | ||
| ``` | ||
| (for development, run `gem install --dev ./devdraft_ai_sdk-1.0.0.gem` to install the development dependencies) | ||
| or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). | ||
| ## Usage | ||
| Finally add this to the Gemfile: | ||
| ### Basic Setup | ||
| gem 'devdraft_ai_sdk', '~> 1.0.0' | ||
| ```ruby | ||
| require 'devdraft' | ||
| ### Install from Git | ||
| # Configure the SDK | ||
| Devdraft.configure do |config| | ||
| # Set your API key (required for authenticated endpoints) | ||
| config.api_key['api_key'] = 'YOUR_API_KEY' | ||
| # Optional: Set a custom base URL if needed | ||
| # config.base_url = 'https://api.devdraft.com' | ||
| # Optional: Enable debug logging | ||
| config.debugging = true | ||
| end | ||
| ``` | ||
| If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile: | ||
| ### Examples | ||
| gem 'devdraft_ai_sdk', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git' | ||
| #### Health Check | ||
| ```ruby | ||
| api_instance = Devdraft::APIHealthApi.new | ||
| ### Include the Ruby code directly | ||
| # Public health check (no auth required) | ||
| result = api_instance.health_controller_public_health_check_v0 | ||
| puts result.inspect | ||
| Include the Ruby code directly using `-I` as follows: | ||
| ```shell | ||
| ruby -Ilib script.rb | ||
| # Authenticated health check | ||
| result = api_instance.health_controller_check_v0 | ||
| puts result.inspect | ||
| ``` | ||
| ## Getting Started | ||
| Please follow the [installation](#installation) procedure and then run the following code: | ||
| #### List Customers | ||
| ```ruby | ||
| # Load the gem | ||
| require 'devdraft_ai_sdk' | ||
| api_instance = Devdraft::CustomersApi.new | ||
| api_instance = DevDraftAI::APIHealthApi.new | ||
| # List customers with pagination | ||
| result = api_instance.customers_controller_list_v0( | ||
| page: 1, | ||
| limit: 10 | ||
| ) | ||
| puts result.inspect | ||
| ``` | ||
| begin | ||
| #Authenticated health check endpoint | ||
| result = api_instance.health_controller_check_v0 | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling APIHealthApi->health_controller_check_v0: #{e}" | ||
| end | ||
| #### Create Payment Link | ||
| ```ruby | ||
| api_instance = Devdraft::PaymentLinksApi.new | ||
| api_instance = DevDraftAI::APIHealthApi.new | ||
| # Create a payment link | ||
| payment_link = Devdraft::CreatePaymentLinkDto.new( | ||
| amount: 100.00, | ||
| currency: 'USD', | ||
| description: 'Test Payment Link', | ||
| expires_at: (Time.now + 86400).iso8601 # 24 hours from now | ||
| ) | ||
| begin | ||
| #Public health check endpoint | ||
| result = api_instance.health_controller_public_health_check_v0 | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling APIHealthApi->health_controller_public_health_check_v0: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| result = api_instance.payment_links_controller_create_v0(payment_link) | ||
| puts result.inspect | ||
| ``` | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| ### Available APIs | ||
| api_instance = DevDraftAI::AppBalancesApi.new | ||
| The SDK provides access to the following APIs: | ||
| begin | ||
| #Get all stablecoin balances for an app | ||
| result = api_instance.balance_controller_get_all_balances | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling AppBalancesApi->balance_controller_get_all_balances: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| - `APIHealthApi`: Health check endpoints | ||
| - `AppBalancesApi`: Balance management | ||
| - `CustomersApi`: Customer management | ||
| - `ExchangeRatesApi`: Exchange rate information | ||
| - `InvoicesApi`: Invoice management | ||
| - `LiquidationAddressesApi`: Liquidation address management | ||
| - `PaymentIntentsApi`: Payment intent management | ||
| - `PaymentLinksApi`: Payment link management | ||
| - `ProductsApi`: Product management | ||
| - `TaxesApi`: Tax management | ||
| - `TestPaymentsApi`: Test payment endpoints | ||
| - `TransfersApi`: Transfer management | ||
| - `WalletsApi`: Wallet management | ||
| - `WebhooksApi`: Webhook management | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| ## Development | ||
| api_instance = DevDraftAI::AppBalancesApi.new | ||
| After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. | ||
| begin | ||
| #Get EURC balance for an app | ||
| result = api_instance.balance_controller_get_eurc_balance | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling AppBalancesApi->balance_controller_get_eurc_balance: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| ## Contributing | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| Bug reports and pull requests are welcome on GitHub. | ||
| api_instance = DevDraftAI::AppBalancesApi.new | ||
| ## License | ||
| begin | ||
| #Get USDC balance for an app | ||
| result = api_instance.balance_controller_get_usdc_balance | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling AppBalancesApi->balance_controller_get_usdc_balance: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| The gem is available as open source under the terms of the [Unlicense](http://unlicense.org/). | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::CustomersApi.new | ||
| body = DevDraftAI::CreateCustomerDto.new # CreateCustomerDto | Customer creation data | ||
| begin | ||
| #Create a new customer | ||
| api_instance.customer_controller_create(body) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling CustomersApi->customer_controller_create: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::CustomersApi.new | ||
| opts = { | ||
| status: 'status_example', # String | Filter by customer status | ||
| name: 'name_example', # String | Filter by customer name | ||
| email: 'email_example', # String | Filter by customer email | ||
| take: DevDraftAI::BigDecimal.new, # BigDecimal | Number of records to take | ||
| skip: DevDraftAI::BigDecimal.new # BigDecimal | Number of records to skip | ||
| } | ||
| begin | ||
| #Get all customers with filters | ||
| api_instance.customer_controller_find_all(opts) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling CustomersApi->customer_controller_find_all: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::CustomersApi.new | ||
| id = 'id_example' # String | | ||
| begin | ||
| #Get a customer by ID | ||
| api_instance.customer_controller_find_one(id) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling CustomersApi->customer_controller_find_one: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::CustomersApi.new | ||
| body = DevDraftAI::UpdateCustomerDto.new # UpdateCustomerDto | Customer update data | ||
| id = 'id_example' # String | | ||
| begin | ||
| #Update a customer | ||
| api_instance.customer_controller_update(body, id) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling CustomersApi->customer_controller_update: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::ExchangeRatesApi.new | ||
| begin | ||
| #Get EUR to USD exchange rate | ||
| result = api_instance.exchange_rate_controller_get_eurto_usd_rate | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling ExchangeRatesApi->exchange_rate_controller_get_eurto_usd_rate: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::ExchangeRatesApi.new | ||
| from = 'from_example' # String | Source currency code (e.g., usd) | ||
| to = 'to_example' # String | Target currency code (e.g., eur) | ||
| begin | ||
| #Get exchange rate between specified currencies | ||
| result = api_instance.exchange_rate_controller_get_exchange_rate(from, to) | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling ExchangeRatesApi->exchange_rate_controller_get_exchange_rate: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::ExchangeRatesApi.new | ||
| begin | ||
| #Get USD to EUR exchange rate | ||
| result = api_instance.exchange_rate_controller_get_usdto_eur_rate | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling ExchangeRatesApi->exchange_rate_controller_get_usdto_eur_rate: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::InvoicesApi.new | ||
| body = DevDraftAI::CreateInvoiceDto.new # CreateInvoiceDto | | ||
| begin | ||
| #Create a new invoice | ||
| api_instance.invoice_controller_create(body) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling InvoicesApi->invoice_controller_create: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::InvoicesApi.new | ||
| opts = { | ||
| skip: DevDraftAI::BigDecimal.new, # BigDecimal | Number of records to skip | ||
| take: DevDraftAI::BigDecimal.new # BigDecimal | Number of records to take | ||
| } | ||
| begin | ||
| #Get all invoices | ||
| api_instance.invoice_controller_find_all(opts) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling InvoicesApi->invoice_controller_find_all: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::InvoicesApi.new | ||
| id = 'id_example' # String | Invoice ID | ||
| begin | ||
| #Get an invoice by ID | ||
| api_instance.invoice_controller_find_one(id) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling InvoicesApi->invoice_controller_find_one: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::InvoicesApi.new | ||
| body = DevDraftAI::CreateInvoiceDto.new # CreateInvoiceDto | | ||
| id = 'id_example' # String | Invoice ID | ||
| begin | ||
| #Update an invoice | ||
| api_instance.invoice_controller_update(body, id) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling InvoicesApi->invoice_controller_update: #{e}" | ||
| end | ||
| api_instance = DevDraftAI::LiquidationAddressesApi.new | ||
| body = DevDraftAI::CreateLiquidationAddressDto.new # CreateLiquidationAddressDto | | ||
| customer_id = 'customer_id_example' # String | Unique identifier for the customer | ||
| begin | ||
| #Create a new liquidation address for a customer | ||
| result = api_instance.liquidation_address_controller_create_liquidation_address(body, customer_id) | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling LiquidationAddressesApi->liquidation_address_controller_create_liquidation_address: #{e}" | ||
| end | ||
| api_instance = DevDraftAI::LiquidationAddressesApi.new | ||
| customer_id = 'customer_id_example' # String | Unique identifier for the customer | ||
| liquidation_address_id = 'liquidation_address_id_example' # String | Unique identifier for the liquidation address | ||
| begin | ||
| #Get a specific liquidation address | ||
| result = api_instance.liquidation_address_controller_get_liquidation_address(customer_id, liquidation_address_id) | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling LiquidationAddressesApi->liquidation_address_controller_get_liquidation_address: #{e}" | ||
| end | ||
| api_instance = DevDraftAI::LiquidationAddressesApi.new | ||
| customer_id = 'customer_id_example' # String | Unique identifier for the customer | ||
| begin | ||
| #Get all liquidation addresses for a customer | ||
| result = api_instance.liquidation_address_controller_get_liquidation_addresses(customer_id) | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling LiquidationAddressesApi->liquidation_address_controller_get_liquidation_addresses: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::PaymentIntentsApi.new | ||
| body = DevDraftAI::CreateBankPaymentIntentDto.new # CreateBankPaymentIntentDto | Bank payment intent creation data | ||
| idempotency_key = 'idempotency_key_example' # String | Unique UUID v4 for idempotent requests. Prevents duplicate payments. | ||
| begin | ||
| #Create a bank payment intent | ||
| api_instance.payment_intent_controller_create_bank_payment_intent(body, idempotency_key) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling PaymentIntentsApi->payment_intent_controller_create_bank_payment_intent: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::PaymentIntentsApi.new | ||
| body = DevDraftAI::CreateStablePaymentIntentDto.new # CreateStablePaymentIntentDto | Stable payment intent creation data | ||
| idempotency_key = 'idempotency_key_example' # String | Unique UUID v4 for idempotent requests. Prevents duplicate payments. | ||
| begin | ||
| #Create a stable payment intent | ||
| api_instance.payment_intent_controller_create_stable_payment_intent(body, idempotency_key) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling PaymentIntentsApi->payment_intent_controller_create_stable_payment_intent: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::PaymentLinksApi.new | ||
| body = DevDraftAI::CreatePaymentLinkDto.new # CreatePaymentLinkDto | Payment link creation data | ||
| begin | ||
| #Create a new payment link | ||
| api_instance.payment_links_controller_create(body) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling PaymentLinksApi->payment_links_controller_create: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::PaymentLinksApi.new | ||
| opts = { | ||
| skip: 'skip_example', # String | Number of records to skip (must be non-negative) | ||
| take: 'take_example' # String | Number of records to take (must be positive) | ||
| } | ||
| begin | ||
| #Get all payment links | ||
| api_instance.payment_links_controller_find_all(opts) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling PaymentLinksApi->payment_links_controller_find_all: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::PaymentLinksApi.new | ||
| id = 'id_example' # String | Payment Link ID | ||
| begin | ||
| #Get a payment link by ID | ||
| api_instance.payment_links_controller_find_one(id) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling PaymentLinksApi->payment_links_controller_find_one: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::PaymentLinksApi.new | ||
| body = DevDraftAI::UpdatePaymentLinkDto.new # UpdatePaymentLinkDto | | ||
| id = 'id_example' # String | Payment Link ID | ||
| begin | ||
| #Update a payment link | ||
| api_instance.payment_links_controller_update(body, id) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling PaymentLinksApi->payment_links_controller_update: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::ProductsApi.new | ||
| name = 'name_example' # String | | ||
| description = 'description_example' # String | | ||
| price = DevDraftAI::BigDecimal.new # BigDecimal | | ||
| currency = 'currency_example' # String | | ||
| type = 'type_example' # String | | ||
| weight = DevDraftAI::BigDecimal.new # BigDecimal | | ||
| unit = 'unit_example' # String | | ||
| quantity = DevDraftAI::BigDecimal.new # BigDecimal | | ||
| stock_count = DevDraftAI::BigDecimal.new # BigDecimal | | ||
| status = 'status_example' # String | | ||
| product_type = 'product_type_example' # String | | ||
| images = ['images_example'] # Array<String> | | ||
| begin | ||
| #Create a new product | ||
| api_instance.product_controller_create(name, description, price, currency, type, weight, unit, quantity, stock_count, status, product_type, images) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling ProductsApi->product_controller_create: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::ProductsApi.new | ||
| opts = { | ||
| skip: DevDraftAI::BigDecimal.new, # BigDecimal | Number of records to skip | ||
| take: DevDraftAI::BigDecimal.new # BigDecimal | Number of records to take | ||
| } | ||
| begin | ||
| #Get all products | ||
| api_instance.product_controller_find_all(opts) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling ProductsApi->product_controller_find_all: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::ProductsApi.new | ||
| id = 'id_example' # String | Product ID | ||
| begin | ||
| #Get a product by ID | ||
| api_instance.product_controller_find_one(id) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling ProductsApi->product_controller_find_one: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::ProductsApi.new | ||
| id = 'id_example' # String | Product ID | ||
| begin | ||
| #Delete a product | ||
| api_instance.product_controller_remove(id) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling ProductsApi->product_controller_remove: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::ProductsApi.new | ||
| name = 'name_example' # String | | ||
| description = 'description_example' # String | | ||
| price = DevDraftAI::BigDecimal.new # BigDecimal | | ||
| currency = 'currency_example' # String | | ||
| type = 'type_example' # String | | ||
| weight = DevDraftAI::BigDecimal.new # BigDecimal | | ||
| unit = 'unit_example' # String | | ||
| quantity = DevDraftAI::BigDecimal.new # BigDecimal | | ||
| stock_count = DevDraftAI::BigDecimal.new # BigDecimal | | ||
| status = 'status_example' # String | | ||
| product_type = 'product_type_example' # String | | ||
| images = ['images_example'] # Array<String> | | ||
| id = 'id_example' # String | Product ID | ||
| begin | ||
| #Update a product | ||
| api_instance.product_controller_update(name, description, price, currency, type, weight, unit, quantity, stock_count, status, product_type, images, id) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling ProductsApi->product_controller_update: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::ProductsApi.new | ||
| id = 'id_example' # String | Product ID | ||
| begin | ||
| #Upload images for a product | ||
| api_instance.product_controller_upload_image(id) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling ProductsApi->product_controller_upload_image: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::TaxesApi.new | ||
| body = DevDraftAI::CreateTaxInput.new # CreateTaxInput | | ||
| begin | ||
| #Create a new tax | ||
| api_instance.tax_controller_create(body) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling TaxesApi->tax_controller_create: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::TaxesApi.new | ||
| opts = { | ||
| skip: 'skip_example', # String | Number of records to skip | ||
| take: 'take_example' # String | Number of records to take | ||
| } | ||
| begin | ||
| #Get all taxes | ||
| api_instance.tax_controller_find_all(opts) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling TaxesApi->tax_controller_find_all: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::TaxesApi.new | ||
| id = 'id_example' # String | Tax ID | ||
| begin | ||
| #Get a tax by ID | ||
| api_instance.tax_controller_find_one(id) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling TaxesApi->tax_controller_find_one: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::TaxesApi.new | ||
| id = 'id_example' # String | Tax ID | ||
| begin | ||
| #Delete a tax | ||
| api_instance.tax_controller_remove(id) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling TaxesApi->tax_controller_remove: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::TaxesApi.new | ||
| body = DevDraftAI::UpdateTaxInput.new # UpdateTaxInput | | ||
| id = 'id_example' # String | Tax ID | ||
| begin | ||
| #Update a tax | ||
| api_instance.tax_controller_update(body, id) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling TaxesApi->tax_controller_update: #{e}" | ||
| end | ||
| api_instance = DevDraftAI::TestPaymentsApi.new | ||
| body = DevDraftAI::PaymentRequestDto.new # PaymentRequestDto | | ||
| idempotency_key = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Unique key to ensure the request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response. | ||
| begin | ||
| #Process a test payment | ||
| result = api_instance.test_payment_controller_create_payment_v0(body, idempotency_key) | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling TestPaymentsApi->test_payment_controller_create_payment_v0: #{e}" | ||
| end | ||
| api_instance = DevDraftAI::TestPaymentsApi.new | ||
| id = 'id_example' # String | Payment ID | ||
| begin | ||
| #Get payment details by ID | ||
| result = api_instance.test_payment_controller_get_payment_v0(id) | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling TestPaymentsApi->test_payment_controller_get_payment_v0: #{e}" | ||
| end | ||
| api_instance = DevDraftAI::TestPaymentsApi.new | ||
| id = 'id_example' # String | Payment ID to refund | ||
| idempotency_key = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Unique key to ensure the refund request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response. | ||
| begin | ||
| #Refund a payment | ||
| result = api_instance.test_payment_controller_refund_payment_v0(id, idempotency_key) | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling TestPaymentsApi->test_payment_controller_refund_payment_v0: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::TransfersApi.new | ||
| body = DevDraftAI::CreateDirectBankTransferDto.new # CreateDirectBankTransferDto | | ||
| begin | ||
| #Create a direct bank transfer | ||
| api_instance.transfer_controller_create_direct_bank_transfer(body) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling TransfersApi->transfer_controller_create_direct_bank_transfer: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::TransfersApi.new | ||
| body = DevDraftAI::CreateDirectWalletTransferDto.new # CreateDirectWalletTransferDto | | ||
| begin | ||
| #Create a direct wallet transfer | ||
| api_instance.transfer_controller_create_direct_wallet_transfer(body) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling TransfersApi->transfer_controller_create_direct_wallet_transfer: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::TransfersApi.new | ||
| body = DevDraftAI::CreateStablecoinConversionDto.new # CreateStablecoinConversionDto | | ||
| begin | ||
| #Create a stablecoin conversion | ||
| api_instance.transfer_controller_create_stablecoin_conversion(body) | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling TransfersApi->transfer_controller_create_stablecoin_conversion: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::WalletsApi.new | ||
| begin | ||
| #Get wallets for an app | ||
| api_instance.wallet_controller_get_wallets | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling WalletsApi->wallet_controller_get_wallets: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::WebhooksApi.new | ||
| body = DevDraftAI::CreateWebhookDto.new # CreateWebhookDto | Webhook configuration details | ||
| begin | ||
| #Create a new webhook | ||
| result = api_instance.webhook_controller_create(body) | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling WebhooksApi->webhook_controller_create: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::WebhooksApi.new | ||
| opts = { | ||
| skip: DevDraftAI::BigDecimal.new, # BigDecimal | Number of records to skip (default: 0) | ||
| take: DevDraftAI::BigDecimal.new # BigDecimal | Number of records to return (default: 10) | ||
| } | ||
| begin | ||
| #Get all webhooks | ||
| result = api_instance.webhook_controller_find_all(opts) | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling WebhooksApi->webhook_controller_find_all: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::WebhooksApi.new | ||
| id = 'id_example' # String | Webhook ID | ||
| begin | ||
| #Get a webhook by id | ||
| result = api_instance.webhook_controller_find_one(id) | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling WebhooksApi->webhook_controller_find_one: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::WebhooksApi.new | ||
| id = 'id_example' # String | Webhook ID | ||
| begin | ||
| #Delete a webhook | ||
| result = api_instance.webhook_controller_remove(id) | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling WebhooksApi->webhook_controller_remove: #{e}" | ||
| end | ||
| # Setup authorization | ||
| DevDraftAI.configure do |config| | ||
| # Configure API key authorization: x-client-key | ||
| config.api_key['x-client-key'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-key'] = 'Bearer' | ||
| # Configure API key authorization: x-client-secret | ||
| config.api_key['x-client-secret'] = 'YOUR API KEY' | ||
| # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) | ||
| #config.api_key_prefix['x-client-secret'] = 'Bearer' | ||
| end | ||
| api_instance = DevDraftAI::WebhooksApi.new | ||
| body = DevDraftAI::UpdateWebhookDto.new # UpdateWebhookDto | Webhook update details | ||
| id = 'id_example' # String | Webhook ID | ||
| begin | ||
| #Update a webhook | ||
| result = api_instance.webhook_controller_update(body, id) | ||
| p result | ||
| rescue DevDraftAI::ApiError => e | ||
| puts "Exception when calling WebhooksApi->webhook_controller_update: #{e}" | ||
| end | ||
| ``` | ||
| ## Documentation for API Endpoints | ||
@@ -1120,0 +118,0 @@ |