class CryptoApis::InformativeApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/crypto_apis/api/informative_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

get_wallet_asset_details(blockchain, network, wallet_id, opts = {}) click to toggle source

Get Wallet Asset Details Through this endpoint customers can obtain details about a specific Wallet/Vault. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param wallet_id [String] Defines the unique ID of the Wallet. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @return [GetWalletAssetDetailsR]

# File lib/crypto_apis/api/informative_api.rb, line 30
def get_wallet_asset_details(blockchain, network, wallet_id, opts = {})
  data, _status_code, _headers = get_wallet_asset_details_with_http_info(blockchain, network, wallet_id, opts)
  data
end
get_wallet_asset_details_with_http_info(blockchain, network, wallet_id, opts = {}) click to toggle source

Get Wallet Asset Details Through this endpoint customers can obtain details about a specific Wallet/Vault. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param wallet_id [String] Defines the unique ID of the Wallet. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @return [Array<(GetWalletAssetDetailsR, Integer, Hash)>] GetWalletAssetDetailsR data, response status code and response headers

# File lib/crypto_apis/api/informative_api.rb, line 43
def get_wallet_asset_details_with_http_info(blockchain, network, wallet_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InformativeApi.get_wallet_asset_details ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling InformativeApi.get_wallet_asset_details"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling InformativeApi.get_wallet_asset_details"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'wallet_id' is set
  if @api_client.config.client_side_validation && wallet_id.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_id' when calling InformativeApi.get_wallet_asset_details"
  end
  # resource path
  local_var_path = '/wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'walletId' + '}', CGI.escape(wallet_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetWalletAssetDetailsR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"InformativeApi.get_wallet_asset_details",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InformativeApi#get_wallet_asset_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_deposit_addresses(blockchain, network, wallet_id, opts = {}) click to toggle source

List Deposit Addresses Through this endpoint customers can pull a list of Deposit/Receiving Addresses they have already generated. {note}Please note that listing data from the same type will apply pagination on the results.{/note} @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param wallet_id [String] Represents the unique ID of the specific Wallet. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @return [ListDepositAddressesR]

# File lib/crypto_apis/api/informative_api.rb, line 118
def list_deposit_addresses(blockchain, network, wallet_id, opts = {})
  data, _status_code, _headers = list_deposit_addresses_with_http_info(blockchain, network, wallet_id, opts)
  data
end
list_deposit_addresses_with_http_info(blockchain, network, wallet_id, opts = {}) click to toggle source

List Deposit Addresses Through this endpoint customers can pull a list of Deposit/Receiving Addresses they have already generated. {note}Please note that listing data from the same type will apply pagination on the results.{/note} @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param wallet_id [String] Represents the unique ID of the specific Wallet. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @return [Array<(ListDepositAddressesR, Integer, Hash)>] ListDepositAddressesR data, response status code and response headers

# File lib/crypto_apis/api/informative_api.rb, line 131
def list_deposit_addresses_with_http_info(blockchain, network, wallet_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InformativeApi.list_deposit_addresses ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling InformativeApi.list_deposit_addresses"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling InformativeApi.list_deposit_addresses"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'wallet_id' is set
  if @api_client.config.client_side_validation && wallet_id.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_id' when calling InformativeApi.list_deposit_addresses"
  end
  # resource path
  local_var_path = '/wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'walletId' + '}', CGI.escape(wallet_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListDepositAddressesR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"InformativeApi.list_deposit_addresses",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InformativeApi#list_deposit_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_supported_tokens(blockchain, network, opts = {}) click to toggle source

List Supported Tokens Through this endpoint customers can obtain information on multiple tokens at once. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. (default to 50) @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0) @return [ListSupportedTokensR]

# File lib/crypto_apis/api/informative_api.rb, line 207
def list_supported_tokens(blockchain, network, opts = {})
  data, _status_code, _headers = list_supported_tokens_with_http_info(blockchain, network, opts)
  data
end
list_supported_tokens_with_http_info(blockchain, network, opts = {}) click to toggle source

List Supported Tokens Through this endpoint customers can obtain information on multiple tokens at once. @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet&quot; is the live network with actual data while networks like "testnet&quot;, "ropsten&quot;, "rinkeby&quot; are test networks. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user. @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. @return [Array<(ListSupportedTokensR, Integer, Hash)>] ListSupportedTokensR data, response status code and response headers

# File lib/crypto_apis/api/informative_api.rb, line 221
def list_supported_tokens_with_http_info(blockchain, network, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InformativeApi.list_supported_tokens ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling InformativeApi.list_supported_tokens"
  end
  # verify enum value
  allowable_values = ["bitcoin", "ethereum"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling InformativeApi.list_supported_tokens"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/wallet-as-a-service/info/{blockchain}/{network}/supported-tokens'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListSupportedTokensR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"InformativeApi.list_supported_tokens",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InformativeApi#list_supported_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end