coinbase-sdk 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 82ed68757d7f8c6d946fed0b3220fe8657d07926bef5f90c50bb279ebb035087
4
- data.tar.gz: 3b1df1f99ac447f197d0b636ca3d617c670142a42159a42f12a9c60fb2982c0e
3
+ metadata.gz: c52613ebb145609813f96508c0eff76721ee6afebf3f3207394dad4c91b51635
4
+ data.tar.gz: d7f86c6cfbc02b6dd8866717cc9a89439b81da9ae8838dc34855dd10bf9f3fa9
5
5
  SHA512:
6
- metadata.gz: 0d943a6ff62431d82b72f58ed48fa13f48297c57ef39e7d9efc3afe45141a8d85ffc327f5fbaba9f250c366d398e1961cc61ec2619f3ae7cdaff8012664b6f18
7
- data.tar.gz: 391942f2797f2c5e8bed4adeff0cfb159f5f8bea90ad4bdebc61a5904929687bbcf73006e14ad1c5f5d9e3d8fb4ee57cbd33ac84af21928fd7b6685004aed63b
6
+ metadata.gz: 6fa544e18af4ad42457ec8615e7a6e652fb15e1ae00cfa14924dcb86c53aab1ba90b21a8e1b7b29f193b1e0039d030cba1f45631b8dac23b287617105b88478b
7
+ data.tar.gz: 3625e897b9681e208cd921e8118275bd012996c17fb62fc235eac8624e6742ce18cff8d8177a1d379bfb5fa71ebec3db02a70d2bb683aeb067ccac7f89345945
@@ -79,11 +79,13 @@ module Coinbase
79
79
  # default address. If a String, interprets it as the address ID.
80
80
  # @return [Coinbase::Transfer] The Transfer object.
81
81
  def transfer(amount, asset_id, destination)
82
+ asset = Asset.fetch(network_id, asset_id)
83
+
82
84
  destination_address, destination_network = destination_address_and_network(destination)
83
85
 
84
- validate_can_transfer!(amount, asset_id, destination_network)
86
+ validate_can_transfer!(amount, asset, destination_network)
85
87
 
86
- transfer = create_transfer(amount, asset_id, destination_address)
88
+ transfer = create_transfer(amount, asset, destination_address)
87
89
 
88
90
  # If a server signer is managing keys, it will sign and broadcast the underlying transfer transaction out of band.
89
91
  return transfer if Coinbase.use_server_signer?
@@ -98,9 +100,12 @@ module Coinbase
98
100
  # @param to_asset_id [Symbol] The ID of the Asset to trade to. For Ether, :eth, :gwei, and :wei are supported.
99
101
  # @return [Coinbase::Trade] The Trade object.
100
102
  def trade(amount, from_asset_id, to_asset_id)
101
- validate_can_trade!(amount, from_asset_id, to_asset_id)
103
+ from_asset = Asset.fetch(network_id, from_asset_id)
104
+ to_asset = Asset.fetch(network_id, to_asset_id)
105
+
106
+ validate_can_trade!(amount, from_asset)
102
107
 
103
- trade = create_trade(amount, from_asset_id, to_asset_id)
108
+ trade = create_trade(amount, from_asset, to_asset)
104
109
 
105
110
  # NOTE: Trading does not yet support server signers at this point.
106
111
 
@@ -192,25 +197,23 @@ module Coinbase
192
197
  [destination, network_id]
193
198
  end
194
199
 
195
- def validate_can_transfer!(amount, asset_id, destination_network_id)
200
+ def validate_can_transfer!(amount, asset, destination_network_id)
196
201
  raise 'Cannot transfer from address without private key loaded' unless can_sign? || Coinbase.use_server_signer?
197
202
 
198
- raise ArgumentError, "Unsupported asset: #{asset_id}" unless Coinbase::Asset.supported?(asset_id)
199
-
200
203
  raise ArgumentError, 'Transfer must be on the same Network' unless destination_network_id == network_id
201
204
 
202
- current_balance = balance(asset_id)
205
+ current_balance = balance(asset.asset_id)
203
206
 
204
207
  return unless current_balance < amount
205
208
 
206
209
  raise ArgumentError, "Insufficient funds: #{amount} requested, but only #{current_balance} available"
207
210
  end
208
211
 
209
- def create_transfer(amount, asset_id, destination)
212
+ def create_transfer(amount, asset, destination)
210
213
  create_transfer_request = {
211
- amount: Coinbase::Asset.to_atomic_amount(amount, asset_id).to_i.to_s,
214
+ amount: asset.to_atomic_amount(amount).to_i.to_s,
212
215
  network_id: network_id,
213
- asset_id: Coinbase::Asset.primary_denomination(asset_id).to_s,
216
+ asset_id: asset.primary_denomination.to_s,
214
217
  destination: destination
215
218
  }
216
219
 
@@ -229,24 +232,21 @@ module Coinbase
229
232
  Coinbase::Transfer.new(transfer_model)
230
233
  end
231
234
 
232
- def validate_can_trade!(amount, from_asset_id, to_asset_id)
235
+ def validate_can_trade!(amount, from_asset)
233
236
  raise 'Cannot trade from address without private key loaded' unless can_sign?
234
237
 
235
- raise ArgumentError, "Unsupported from asset: #{from_asset_id}" unless Coinbase::Asset.supported?(from_asset_id)
236
- raise ArgumentError, "Unsupported to asset: #{to_asset_id}" unless Coinbase::Asset.supported?(to_asset_id)
237
-
238
- current_balance = balance(from_asset_id)
238
+ current_balance = balance(from_asset.asset_id)
239
239
 
240
240
  return unless current_balance < amount
241
241
 
242
242
  raise ArgumentError, "Insufficient funds: #{amount} requested, but only #{current_balance} available"
243
243
  end
244
244
 
245
- def create_trade(amount, from_asset_id, to_asset_id)
245
+ def create_trade(amount, from_asset, to_asset)
246
246
  create_trade_request = {
247
- amount: Coinbase::Asset.to_atomic_amount(amount, from_asset_id).to_i.to_s,
248
- from_asset_id: Coinbase::Asset.primary_denomination(from_asset_id).to_s,
249
- to_asset_id: Coinbase::Asset.primary_denomination(to_asset_id).to_s
247
+ amount: from_asset.to_atomic_amount(amount).to_i.to_s,
248
+ from_asset_id: from_asset.primary_denomination.to_s,
249
+ to_asset_id: to_asset.primary_denomination.to_s
250
250
  }
251
251
 
252
252
  trade_model = Coinbase.call_api do
@@ -3,98 +3,108 @@
3
3
  module Coinbase
4
4
  # A representation of an Asset.
5
5
  class Asset
6
- # Retuns whether the provided asset ID is supported.
7
- # @param asset_id [Symbol] The Asset ID
8
- # @return [Boolean] Whether the Asset ID is supported
9
- def self.supported?(asset_id)
10
- !!Coinbase::SUPPORTED_ASSET_IDS[asset_id]
11
- end
6
+ class << self
7
+ # Returns the primary denomination for the provided Asset ID.
8
+ # For assets with multiple denominations, e.g. eth can also be denominated in wei and gwei,
9
+ # this method will return the primary denomination.
10
+ # e.g. eth.
11
+ # @param asset_id [Symbol] The Asset ID
12
+ # @return [Symbol] The primary denomination for the Asset ID
13
+ def primary_denomination(asset_id)
14
+ return :eth if %i[wei gwei].include?(asset_id)
12
15
 
13
- # Converts the amount of the Asset to the atomic units of the primary denomination of the Asset.
14
- # @param amount [Integer, Float, BigDecimal] The amount to normalize
15
- # @param asset_id [Symbol] The ID of the Asset being transferred
16
- # @return [BigDecimal] The normalized amount in atomic units
17
- def self.to_atomic_amount(amount, asset_id)
18
- case asset_id
19
- when :eth
20
- amount * BigDecimal(Coinbase::WEI_PER_ETHER.to_s)
21
- when :gwei
22
- amount * BigDecimal(Coinbase::WEI_PER_GWEI.to_s)
23
- when :usdc
24
- amount * BigDecimal(Coinbase::ATOMIC_UNITS_PER_USDC.to_s)
25
- when :weth
26
- amount * BigDecimal(Coinbase::WEI_PER_ETHER)
27
- else
28
- amount
16
+ asset_id
29
17
  end
30
- end
31
18
 
32
- # Converts an amount from the atomic value of the primary denomination of the provided Asset ID
33
- # to whole units of the specified asset ID.
34
- # @param atomic_amount [BigDecimal] The amount in atomic units
35
- # @param asset_id [Symbol] The Asset ID
36
- # @return [BigDecimal] The amount in whole units of the specified asset ID
37
- def self.from_atomic_amount(atomic_amount, asset_id)
38
- case asset_id
39
- when :eth
40
- atomic_amount / BigDecimal(Coinbase::WEI_PER_ETHER.to_s)
41
- when :gwei
42
- atomic_amount / BigDecimal(Coinbase::WEI_PER_GWEI.to_s)
43
- when :usdc
44
- atomic_amount / BigDecimal(Coinbase::ATOMIC_UNITS_PER_USDC.to_s)
45
- when :weth
46
- atomic_amount / BigDecimal(Coinbase::WEI_PER_ETHER)
47
- else
48
- atomic_amount
19
+ def from_model(asset_model, asset_id: nil)
20
+ raise unless asset_model.is_a?(Coinbase::Client::Asset)
21
+
22
+ decimals = asset_model.decimals
23
+
24
+ # Handle the non-primary denomination case at the asset level.
25
+ # TODO: Push this logic down to the backend.
26
+ if asset_id && asset_id != Coinbase.to_sym(asset_model.asset_id)
27
+ case asset_id
28
+ when :gwei
29
+ decimals = GWEI_DECIMALS
30
+ when :wei
31
+ decimals = 0
32
+ else
33
+ raise ArgumentError, "Unsupported asset ID: #{asset_id}"
34
+ end
35
+ end
36
+
37
+ new(
38
+ network_id: Coinbase.to_sym(asset_model.network_id),
39
+ asset_id: asset_id || Coinbase.to_sym(asset_model.asset_id),
40
+ address_id: asset_model.contract_address,
41
+ decimals: decimals
42
+ )
49
43
  end
50
- end
51
44
 
52
- # Returns the primary denomination for the provided Asset ID.
53
- # For assets with multiple denominations, e.g. eth can also be denominated in wei and gwei,
54
- # this method will return the primary denomination.
55
- # e.g. eth.
56
- # @param asset_id [Symbol] The Asset ID
57
- # @return [Symbol] The primary denomination for the Asset ID
58
- def self.primary_denomination(asset_id)
59
- return :eth if %i[wei gwei].include?(asset_id)
45
+ # Fetches the Asset with the provided Asset ID.
46
+ # @param asset_id [Symbol] The Asset ID
47
+ # @return [Coinbase::Asset] The Asset
48
+ def fetch(network_id, asset_id)
49
+ asset_model = Coinbase.call_api do
50
+ assets_api.get_asset(
51
+ Coinbase.normalize_network(network_id),
52
+ primary_denomination(asset_id).to_s
53
+ )
54
+ end
60
55
 
61
- asset_id
62
- end
56
+ from_model(asset_model, asset_id: asset_id)
57
+ end
63
58
 
64
- def self.from_model(asset_model)
65
- raise unless asset_model.is_a?(Coinbase::Client::Asset)
59
+ private
66
60
 
67
- new(
68
- network_id: Coinbase.to_sym(asset_model.network_id),
69
- asset_id: Coinbase.to_sym(asset_model.asset_id),
70
- address_id: asset_model.contract_address,
71
- decimals: asset_model.decimals
72
- )
61
+ def assets_api
62
+ Coinbase::Client::AssetsApi.new(Coinbase.configuration.api_client)
63
+ end
73
64
  end
74
65
 
75
66
  # Returns a new Asset object. Do not use this method. Instead, use the Asset constants defined in
76
67
  # the Coinbase module.
77
68
  # @param network_id [Symbol] The ID of the Network to which the Asset belongs
78
69
  # @param asset_id [Symbol] The Asset ID
79
- # @param display_name [String] (Optional) The Asset's display name
80
70
  # @param address_id [String] (Optional) The Asset's address ID, if one exists
81
71
  # @param decimals [Integer] (Optional) The number of decimal places the Asset uses
82
- def initialize(network_id:, asset_id:, display_name: nil, address_id: nil, decimals: nil)
72
+ def initialize(network_id:, asset_id:, decimals:, address_id: nil)
83
73
  @network_id = network_id
84
74
  @asset_id = asset_id
85
- @display_name = display_name
86
75
  @address_id = address_id
87
76
  @decimals = decimals
88
77
  end
89
78
 
90
- attr_reader :network_id, :asset_id, :display_name, :address_id, :decimals
79
+ attr_reader :network_id, :asset_id, :address_id, :decimals
80
+
81
+ # Converts the amount of the Asset from atomic to whole units.
82
+ # @param atomic_amount [Integer, Float, BigDecimal] The atomic amount to convert to whole units.
83
+ # @return [BigDecimal] The amount in whole units
84
+ def from_atomic_amount(atomic_amount)
85
+ BigDecimal(atomic_amount) / BigDecimal(10).power(decimals)
86
+ end
87
+
88
+ # Converts the amount of the Asset from whole to atomic units.
89
+ # @param whole_amount [Integer, Float, BigDecimal] The whole amount to convert to atomic units.
90
+ # @return [BigDecimal] The amount in atomic units
91
+ def to_atomic_amount(whole_amount)
92
+ whole_amount * BigDecimal(10).power(decimals)
93
+ end
94
+
95
+ # Returns the primary denomination for the Asset.
96
+ # For `gwei` and `wei` the primary denomination is `eth`.
97
+ # For all other assets, the primary denomination is the same asset ID.
98
+ # @return [Symbol] The primary denomination for the Asset
99
+ def primary_denomination
100
+ self.class.primary_denomination(asset_id)
101
+ end
91
102
 
92
103
  # Returns a string representation of the Asset.
93
104
  # @return [String] a string representation of the Asset
94
105
  def to_s
95
- "Coinbase::Asset{network_id: '#{network_id}', asset_id: '#{asset_id}', display_name: '#{display_name}'" +
96
- (address_id.nil? ? '}' : ", address_id: '#{address_id}'}") +
97
- (decimals.nil? ? '}' : ", decimals: '#{decimals}'}")
106
+ "Coinbase::Asset{network_id: '#{network_id}', asset_id: '#{asset_id}', decimals: '#{decimals}'" \
107
+ "#{address_id.nil? ? '' : ", address_id: '#{address_id}'"}}"
98
108
  end
99
109
 
100
110
  # Same as to_s.
@@ -7,9 +7,9 @@ module Coinbase
7
7
  # @param balance_model [Coinbase::Client::Balance] The balance fetched from the API.
8
8
  # @return [Balance] The converted Balance object.
9
9
  def self.from_model(balance_model)
10
- asset_id = Coinbase.to_sym(balance_model.asset.asset_id.downcase)
10
+ asset = Coinbase::Asset.from_model(balance_model.asset)
11
11
 
12
- from_model_and_asset_id(balance_model, asset_id)
12
+ new(amount: asset.from_atomic_amount(balance_model.amount), asset: asset)
13
13
  end
14
14
 
15
15
  # Converts a Coinbase::Client::Balance model and asset ID to a Coinbase::Balance
@@ -19,8 +19,11 @@ module Coinbase
19
19
  # @param asset_id [Symbol] The Asset ID of the denomination we want returned.
20
20
  # @return [Balance] The converted Balance object.
21
21
  def self.from_model_and_asset_id(balance_model, asset_id)
22
+ asset = Coinbase::Asset.from_model(balance_model.asset, asset_id: asset_id)
23
+
22
24
  new(
23
- amount: Coinbase::Asset.from_atomic_amount(BigDecimal(balance_model.amount), asset_id),
25
+ amount: asset.from_atomic_amount(balance_model.amount),
26
+ asset: asset,
24
27
  asset_id: asset_id
25
28
  )
26
29
  end
@@ -29,12 +32,13 @@ module Coinbase
29
32
  # Balance.from_model_and_asset_id.
30
33
  # @param amount [BigDecimal] The amount of the Asset
31
34
  # @param asset_id [Symbol] The Asset ID
32
- def initialize(amount:, asset_id:)
35
+ def initialize(amount:, asset:, asset_id: nil)
33
36
  @amount = amount
34
- @asset_id = asset_id
37
+ @asset = asset
38
+ @asset_id = asset_id || asset.asset_id
35
39
  end
36
40
 
37
- attr_reader :amount, :asset_id
41
+ attr_reader :amount, :asset, :asset_id
38
42
 
39
43
  # Returns a string representation of the Balance.
40
44
  # @return [String] a string representation of the Balance
@@ -0,0 +1,91 @@
1
+ =begin
2
+ #Coinbase Platform API
3
+
4
+ #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
+
6
+ The version of the OpenAPI document: 0.0.1-alpha
7
+ Contact: yuga.cohler@coinbase.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.5.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Coinbase::Client
16
+ class AssetsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get the asset for the specified asset ID.
23
+ # Get the asset for the specified asset ID.
24
+ # @param network_id [String] The ID of the blockchain network
25
+ # @param asset_id [String] The ID of the asset to fetch
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [Asset]
28
+ def get_asset(network_id, asset_id, opts = {})
29
+ data, _status_code, _headers = get_asset_with_http_info(network_id, asset_id, opts)
30
+ data
31
+ end
32
+
33
+ # Get the asset for the specified asset ID.
34
+ # Get the asset for the specified asset ID.
35
+ # @param network_id [String] The ID of the blockchain network
36
+ # @param asset_id [String] The ID of the asset to fetch
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(Asset, Integer, Hash)>] Asset data, response status code and response headers
39
+ def get_asset_with_http_info(network_id, asset_id, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: AssetsApi.get_asset ...'
42
+ end
43
+ # verify the required parameter 'network_id' is set
44
+ if @api_client.config.client_side_validation && network_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'network_id' when calling AssetsApi.get_asset"
46
+ end
47
+ # verify the required parameter 'asset_id' is set
48
+ if @api_client.config.client_side_validation && asset_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.get_asset"
50
+ end
51
+ # resource path
52
+ local_var_path = '/v1/networks/{network_id}/assets/{asset_id}'.sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
+
62
+ # form parameters
63
+ form_params = opts[:form_params] || {}
64
+
65
+ # http body (model)
66
+ post_body = opts[:debug_body]
67
+
68
+ # return_type
69
+ return_type = opts[:debug_return_type] || 'Asset'
70
+
71
+ # auth_names
72
+ auth_names = opts[:debug_auth_names] || []
73
+
74
+ new_options = opts.merge(
75
+ :operation => :"AssetsApi.get_asset",
76
+ :header_params => header_params,
77
+ :query_params => query_params,
78
+ :form_params => form_params,
79
+ :body => post_body,
80
+ :auth_names => auth_names,
81
+ :return_type => return_type
82
+ )
83
+
84
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: AssetsApi#get_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+ end
91
+ end
@@ -0,0 +1,97 @@
1
+ =begin
2
+ #Coinbase Platform API
3
+
4
+ #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
+
6
+ The version of the OpenAPI document: 0.0.1-alpha
7
+ Contact: yuga.cohler@coinbase.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.5.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Coinbase::Client
16
+ class BalancesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get the balance of an asset in an external address
23
+ # Get the balance of an asset in an external address
24
+ # @param network_id [String] The ID of the blockchain network
25
+ # @param address_id [String] The ID of the address to fetch the balance for
26
+ # @param asset_id [String] The ID of the asset to fetch the balance for
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [Balance]
29
+ def get_external_address_balance(network_id, address_id, asset_id, opts = {})
30
+ data, _status_code, _headers = get_external_address_balance_with_http_info(network_id, address_id, asset_id, opts)
31
+ data
32
+ end
33
+
34
+ # Get the balance of an asset in an external address
35
+ # Get the balance of an asset in an external address
36
+ # @param network_id [String] The ID of the blockchain network
37
+ # @param address_id [String] The ID of the address to fetch the balance for
38
+ # @param asset_id [String] The ID of the asset to fetch the balance for
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<(Balance, Integer, Hash)>] Balance data, response status code and response headers
41
+ def get_external_address_balance_with_http_info(network_id, address_id, asset_id, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: BalancesApi.get_external_address_balance ...'
44
+ end
45
+ # verify the required parameter 'network_id' is set
46
+ if @api_client.config.client_side_validation && network_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'network_id' when calling BalancesApi.get_external_address_balance"
48
+ end
49
+ # verify the required parameter 'address_id' is set
50
+ if @api_client.config.client_side_validation && address_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling BalancesApi.get_external_address_balance"
52
+ end
53
+ # verify the required parameter 'asset_id' is set
54
+ if @api_client.config.client_side_validation && asset_id.nil?
55
+ fail ArgumentError, "Missing the required parameter 'asset_id' when calling BalancesApi.get_external_address_balance"
56
+ end
57
+ # resource path
58
+ local_var_path = '/v1/networks/{network_id}/addresses/{address_id}/balances/{asset_id}'.sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
59
+
60
+ # query parameters
61
+ query_params = opts[:query_params] || {}
62
+
63
+ # header parameters
64
+ header_params = opts[:header_params] || {}
65
+ # HTTP header 'Accept' (if needed)
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
67
+
68
+ # form parameters
69
+ form_params = opts[:form_params] || {}
70
+
71
+ # http body (model)
72
+ post_body = opts[:debug_body]
73
+
74
+ # return_type
75
+ return_type = opts[:debug_return_type] || 'Balance'
76
+
77
+ # auth_names
78
+ auth_names = opts[:debug_auth_names] || []
79
+
80
+ new_options = opts.merge(
81
+ :operation => :"BalancesApi.get_external_address_balance",
82
+ :header_params => header_params,
83
+ :query_params => query_params,
84
+ :form_params => form_params,
85
+ :body => post_body,
86
+ :auth_names => auth_names,
87
+ :return_type => return_type
88
+ )
89
+
90
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug "API called: BalancesApi#get_external_address_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
+ end
94
+ return data, status_code, headers
95
+ end
96
+ end
97
+ end