coinbase-sdk 0.3.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/lib/coinbase/address/wallet_address.rb +10 -2
  3. data/lib/coinbase/address.rb +5 -1
  4. data/lib/coinbase/client/api/addresses_api.rb +10 -10
  5. data/lib/coinbase/client/api/assets_api.rb +2 -2
  6. data/lib/coinbase/client/api/balance_history_api.rb +107 -0
  7. data/lib/coinbase/client/api/contract_events_api.rb +4 -4
  8. data/lib/coinbase/client/api/contract_invocations_api.rb +5 -5
  9. data/lib/coinbase/client/api/external_addresses_api.rb +5 -90
  10. data/lib/coinbase/client/api/networks_api.rb +2 -2
  11. data/lib/coinbase/client/api/server_signers_api.rb +7 -7
  12. data/lib/coinbase/client/api/stake_api.rb +6 -6
  13. data/lib/coinbase/client/api/trades_api.rb +5 -5
  14. data/lib/coinbase/client/api/transfers_api.rb +5 -5
  15. data/lib/coinbase/client/api/validators_api.rb +7 -7
  16. data/lib/coinbase/client/api/wallet_stake_api.rb +4 -4
  17. data/lib/coinbase/client/api/wallets_api.rb +10 -10
  18. data/lib/coinbase/client/api/webhooks_api.rb +5 -5
  19. data/lib/coinbase/client/api_client.rb +30 -24
  20. data/lib/coinbase/client/api_error.rb +1 -1
  21. data/lib/coinbase/client/configuration.rb +1 -1
  22. data/lib/coinbase/client/models/address.rb +1 -1
  23. data/lib/coinbase/client/models/address_balance_list.rb +1 -1
  24. data/lib/coinbase/client/models/address_historical_balance_list.rb +1 -1
  25. data/lib/coinbase/client/models/address_list.rb +1 -1
  26. data/lib/coinbase/client/models/address_transaction_list.rb +1 -1
  27. data/lib/coinbase/client/models/asset.rb +1 -1
  28. data/lib/coinbase/client/models/balance.rb +1 -1
  29. data/lib/coinbase/client/models/broadcast_contract_invocation_request.rb +1 -1
  30. data/lib/coinbase/client/models/broadcast_staking_operation_request.rb +1 -1
  31. data/lib/coinbase/client/models/broadcast_trade_request.rb +1 -1
  32. data/lib/coinbase/client/models/broadcast_transfer_request.rb +1 -1
  33. data/lib/coinbase/client/models/build_staking_operation_request.rb +1 -1
  34. data/lib/coinbase/client/models/contract_event.rb +1 -1
  35. data/lib/coinbase/client/models/contract_event_list.rb +1 -1
  36. data/lib/coinbase/client/models/contract_invocation.rb +19 -2
  37. data/lib/coinbase/client/models/contract_invocation_list.rb +1 -1
  38. data/lib/coinbase/client/models/create_address_request.rb +1 -1
  39. data/lib/coinbase/client/models/create_contract_invocation_request.rb +15 -5
  40. data/lib/coinbase/client/models/create_payload_signature_request.rb +1 -1
  41. data/lib/coinbase/client/models/create_server_signer_request.rb +1 -1
  42. data/lib/coinbase/client/models/create_staking_operation_request.rb +1 -1
  43. data/lib/coinbase/client/models/create_trade_request.rb +1 -1
  44. data/lib/coinbase/client/models/create_transfer_request.rb +2 -2
  45. data/lib/coinbase/client/models/create_wallet_request.rb +1 -1
  46. data/lib/coinbase/client/models/create_wallet_request_wallet.rb +1 -1
  47. data/lib/coinbase/client/models/create_webhook_request.rb +1 -1
  48. data/lib/coinbase/client/models/erc20_transfer_event.rb +336 -0
  49. data/lib/coinbase/client/models/{user.rb → erc721_transfer_event.rb} +130 -25
  50. data/lib/coinbase/client/models/error.rb +15 -5
  51. data/lib/coinbase/client/models/ethereum_transaction.rb +1 -1
  52. data/lib/coinbase/client/models/ethereum_transaction_access.rb +1 -1
  53. data/lib/coinbase/client/models/ethereum_transaction_access_list.rb +1 -1
  54. data/lib/coinbase/client/models/ethereum_transaction_flattened_trace.rb +1 -1
  55. data/lib/coinbase/client/models/ethereum_validator_metadata.rb +1 -1
  56. data/lib/coinbase/client/models/faucet_transaction.rb +1 -1
  57. data/lib/coinbase/client/models/feature_set.rb +1 -1
  58. data/lib/coinbase/client/models/fetch_historical_staking_balances200_response.rb +1 -1
  59. data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +1 -1
  60. data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +1 -1
  61. data/lib/coinbase/client/models/get_staking_context_request.rb +1 -1
  62. data/lib/coinbase/client/models/historical_balance.rb +1 -1
  63. data/lib/coinbase/client/models/network.rb +1 -1
  64. data/lib/coinbase/client/models/network_identifier.rb +3 -2
  65. data/lib/coinbase/client/models/payload_signature.rb +1 -1
  66. data/lib/coinbase/client/models/payload_signature_list.rb +1 -1
  67. data/lib/coinbase/client/models/seed_creation_event.rb +1 -1
  68. data/lib/coinbase/client/models/seed_creation_event_result.rb +1 -1
  69. data/lib/coinbase/client/models/server_signer.rb +1 -1
  70. data/lib/coinbase/client/models/server_signer_event.rb +1 -1
  71. data/lib/coinbase/client/models/server_signer_event_event.rb +1 -1
  72. data/lib/coinbase/client/models/server_signer_event_list.rb +1 -1
  73. data/lib/coinbase/client/models/server_signer_list.rb +1 -1
  74. data/lib/coinbase/client/models/signature_creation_event.rb +1 -1
  75. data/lib/coinbase/client/models/signature_creation_event_result.rb +1 -1
  76. data/lib/coinbase/client/models/signed_voluntary_exit_message_metadata.rb +1 -1
  77. data/lib/coinbase/client/models/sponsored_send.rb +1 -1
  78. data/lib/coinbase/client/models/staking_balance.rb +1 -1
  79. data/lib/coinbase/client/models/staking_context.rb +1 -1
  80. data/lib/coinbase/client/models/staking_context_context.rb +1 -1
  81. data/lib/coinbase/client/models/staking_operation.rb +1 -1
  82. data/lib/coinbase/client/models/staking_operation_metadata.rb +1 -1
  83. data/lib/coinbase/client/models/staking_reward.rb +1 -1
  84. data/lib/coinbase/client/models/staking_reward_format.rb +1 -1
  85. data/lib/coinbase/client/models/staking_reward_usd_value.rb +1 -1
  86. data/lib/coinbase/client/models/trade.rb +1 -1
  87. data/lib/coinbase/client/models/trade_list.rb +1 -1
  88. data/lib/coinbase/client/models/transaction.rb +1 -1
  89. data/lib/coinbase/client/models/transaction_content.rb +1 -1
  90. data/lib/coinbase/client/models/transaction_type.rb +1 -1
  91. data/lib/coinbase/client/models/transfer.rb +1 -1
  92. data/lib/coinbase/client/models/transfer_list.rb +1 -1
  93. data/lib/coinbase/client/models/update_webhook_request.rb +1 -1
  94. data/lib/coinbase/client/models/validator.rb +1 -1
  95. data/lib/coinbase/client/models/validator_details.rb +1 -1
  96. data/lib/coinbase/client/models/validator_list.rb +1 -1
  97. data/lib/coinbase/client/models/validator_status.rb +1 -1
  98. data/lib/coinbase/client/models/wallet.rb +1 -1
  99. data/lib/coinbase/client/models/wallet_list.rb +1 -1
  100. data/lib/coinbase/client/models/webhook.rb +1 -1
  101. data/lib/coinbase/client/models/webhook_event_filter.rb +4 -4
  102. data/lib/coinbase/client/models/webhook_event_type.rb +1 -1
  103. data/lib/coinbase/client/models/webhook_list.rb +1 -1
  104. data/lib/coinbase/client/version.rb +1 -1
  105. data/lib/coinbase/client.rb +4 -3
  106. data/lib/coinbase/contract_invocation.rb +26 -1
  107. data/lib/coinbase/version.rb +1 -1
  108. metadata +5 -5
  109. data/lib/coinbase/client/api/users_api.rb +0 -79
  110. data/lib/coinbase/client/models/feature.rb +0 -43
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d296ec1c6b60e1074b171eb5d32135a3942be0266348e42e101290b283039b9d
4
- data.tar.gz: 1d0115be59726c67bb29e0b6415e1e20c211a82a2d8330490c56e8e0255e3f74
3
+ metadata.gz: b34f214c1b2a2802d9e6e08dd9cef8867a2b29636c933496b32e7336d898738a
4
+ data.tar.gz: a9d1dc3bf9e257f7432832ec3c70d165d09cc1c477c0d5ad4f34c54aba8e4e1f
5
5
  SHA512:
6
- metadata.gz: 53d7ed283905e7336527d319b1a5ec025a912fc6f90beadd4de75aefaf8774d93d17a4767e40b04a4a45b306c99d11ec3f08cb64c1a78d503dd2a2b8fc1e1e1d
7
- data.tar.gz: 46ae9c2699993a68c51cb5a1941733810429372c5cb41e08ccb1e4f0628f3366b8862604235d376970120057252a35ea77c9ef64ad9581b7925ead4bc5d8d979
6
+ metadata.gz: 4b2fc3edabfb7edd418e8f5be3e25b0701266206cc012bfb56c6e05b2879baac542ab636c21b80ac71d7871e62cf289c43618c6d5e51ec100cdfb9b49777963d
7
+ data.tar.gz: 37fea814fa12745645084442e21e1c443b57d78d24e9b314dc11e6921f590d8b4485b8ea6f774816bf851d8ec70e141ea1240fa9b2fa8f322867eb5a229e7260
@@ -101,9 +101,14 @@ module Coinbase
101
101
  # @param method [String] The method to invoke on the contract.
102
102
  # @param args [Hash] The arguments to pass to the contract method.
103
103
  # The keys should be the argument names, and the values should be the argument values.
104
+ # @param amount [Integer, Float, BigDecimal] (Optional) The amount of the native Asset
105
+ # to send to a payable contract method.
106
+ # @param asset_id [Symbol] (Optional) The ID of the Asset to send to a payable contract method.
107
+ # The Asset must be a denomination of the native Asset. For Ethereum, :eth, :gwei, and :wei are supported.
104
108
  # @return [Coinbase::ContractInvocation] The contract invocation object.
105
- def invoke_contract(contract_address:, abi:, method:, args:)
109
+ def invoke_contract(contract_address:, abi:, method:, args:, amount: nil, asset_id: nil)
106
110
  ensure_can_sign!
111
+ ensure_sufficient_balance!(amount, asset_id) if amount && asset_id
107
112
 
108
113
  invocation = ContractInvocation.create(
109
114
  address_id: id,
@@ -111,7 +116,10 @@ module Coinbase
111
116
  contract_address: contract_address,
112
117
  abi: abi,
113
118
  method: method,
114
- args: args
119
+ args: args,
120
+ amount: amount,
121
+ asset_id: asset_id,
122
+ network: network
115
123
  )
116
124
 
117
125
  # If a server signer is managing keys, it will sign and broadcast the underlying transaction out of band.
@@ -248,12 +248,16 @@ module Coinbase
248
248
  @addresses_api ||= Coinbase::Client::ExternalAddressesApi.new(Coinbase.configuration.api_client)
249
249
  end
250
250
 
251
+ def balance_history_api
252
+ @balance_history_api ||= Coinbase::Client::BalanceHistoryApi.new(Coinbase.configuration.api_client)
253
+ end
254
+
251
255
  def stake_api
252
256
  @stake_api ||= Coinbase::Client::StakeApi.new(Coinbase.configuration.api_client)
253
257
  end
254
258
 
255
259
  def list_page(asset_id, page)
256
- addresses_api.list_address_historical_balance(
260
+ balance_history_api.list_address_historical_balance(
257
261
  network.normalized_id,
258
262
  id,
259
263
  Coinbase::Asset.primary_denomination(asset_id).to_s,
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -53,7 +53,7 @@ module Coinbase::Client
53
53
  # header parameters
54
54
  header_params = opts[:header_params] || {}
55
55
  # HTTP header 'Accept' (if needed)
56
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
57
57
  # HTTP header 'Content-Type'
58
58
  content_type = @api_client.select_header_content_type(['application/json'])
59
59
  if !content_type.nil?
@@ -129,7 +129,7 @@ module Coinbase::Client
129
129
  # header parameters
130
130
  header_params = opts[:header_params] || {}
131
131
  # HTTP header 'Accept' (if needed)
132
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
132
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
133
133
  # HTTP header 'Content-Type'
134
134
  content_type = @api_client.select_header_content_type(['application/json'])
135
135
  if !content_type.nil?
@@ -203,7 +203,7 @@ module Coinbase::Client
203
203
  # header parameters
204
204
  header_params = opts[:header_params] || {}
205
205
  # HTTP header 'Accept' (if needed)
206
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
206
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
207
207
 
208
208
  # form parameters
209
209
  form_params = opts[:form_params] || {}
@@ -278,7 +278,7 @@ module Coinbase::Client
278
278
  # header parameters
279
279
  header_params = opts[:header_params] || {}
280
280
  # HTTP header 'Accept' (if needed)
281
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
281
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
282
282
 
283
283
  # form parameters
284
284
  form_params = opts[:form_params] || {}
@@ -353,7 +353,7 @@ module Coinbase::Client
353
353
  # header parameters
354
354
  header_params = opts[:header_params] || {}
355
355
  # HTTP header 'Accept' (if needed)
356
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
356
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
357
357
 
358
358
  # form parameters
359
359
  form_params = opts[:form_params] || {}
@@ -429,7 +429,7 @@ module Coinbase::Client
429
429
  # header parameters
430
430
  header_params = opts[:header_params] || {}
431
431
  # HTTP header 'Accept' (if needed)
432
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
432
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
433
433
 
434
434
  # form parameters
435
435
  form_params = opts[:form_params] || {}
@@ -502,7 +502,7 @@ module Coinbase::Client
502
502
  # header parameters
503
503
  header_params = opts[:header_params] || {}
504
504
  # HTTP header 'Accept' (if needed)
505
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
505
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
506
506
 
507
507
  # form parameters
508
508
  form_params = opts[:form_params] || {}
@@ -581,7 +581,7 @@ module Coinbase::Client
581
581
  # header parameters
582
582
  header_params = opts[:header_params] || {}
583
583
  # HTTP header 'Accept' (if needed)
584
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
584
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
585
585
 
586
586
  # form parameters
587
587
  form_params = opts[:form_params] || {}
@@ -653,7 +653,7 @@ module Coinbase::Client
653
653
  # header parameters
654
654
  header_params = opts[:header_params] || {}
655
655
  # HTTP header 'Accept' (if needed)
656
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
656
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
657
657
 
658
658
  # form parameters
659
659
  form_params = opts[:form_params] || {}
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -57,7 +57,7 @@ module Coinbase::Client
57
57
  # header parameters
58
58
  header_params = opts[:header_params] || {}
59
59
  # HTTP header 'Accept' (if needed)
60
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
61
61
 
62
62
  # form parameters
63
63
  form_params = opts[:form_params] || {}
@@ -0,0 +1,107 @@
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
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.8.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Coinbase::Client
16
+ class BalanceHistoryApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get address balance history for asset
23
+ # List the historical balance of an asset in a specific 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 historical balance for.
26
+ # @param asset_id [String] The symbol of the asset to fetch the historical balance for.
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
29
+ # @option opts [String] :page A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
30
+ # @return [AddressHistoricalBalanceList]
31
+ def list_address_historical_balance(network_id, address_id, asset_id, opts = {})
32
+ data, _status_code, _headers = list_address_historical_balance_with_http_info(network_id, address_id, asset_id, opts)
33
+ data
34
+ end
35
+
36
+ # Get address balance history for asset
37
+ # List the historical balance of an asset in a specific address.
38
+ # @param network_id [String] The ID of the blockchain network
39
+ # @param address_id [String] The ID of the address to fetch the historical balance for.
40
+ # @param asset_id [String] The symbol of the asset to fetch the historical balance for.
41
+ # @param [Hash] opts the optional parameters
42
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
43
+ # @option opts [String] :page A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
44
+ # @return [Array<(AddressHistoricalBalanceList, Integer, Hash)>] AddressHistoricalBalanceList data, response status code and response headers
45
+ def list_address_historical_balance_with_http_info(network_id, address_id, asset_id, opts = {})
46
+ if @api_client.config.debugging
47
+ @api_client.config.logger.debug 'Calling API: BalanceHistoryApi.list_address_historical_balance ...'
48
+ end
49
+ # verify the required parameter 'network_id' is set
50
+ if @api_client.config.client_side_validation && network_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'network_id' when calling BalanceHistoryApi.list_address_historical_balance"
52
+ end
53
+ # verify the required parameter 'address_id' is set
54
+ if @api_client.config.client_side_validation && address_id.nil?
55
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling BalanceHistoryApi.list_address_historical_balance"
56
+ end
57
+ # verify the required parameter 'asset_id' is set
58
+ if @api_client.config.client_side_validation && asset_id.nil?
59
+ fail ArgumentError, "Missing the required parameter 'asset_id' when calling BalanceHistoryApi.list_address_historical_balance"
60
+ end
61
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'].to_s.length > 5000
62
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling BalanceHistoryApi.list_address_historical_balance, the character length must be smaller than or equal to 5000.'
63
+ end
64
+
65
+ # resource path
66
+ local_var_path = '/v1/networks/{network_id}/addresses/{address_id}/balance_history/{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))
67
+
68
+ # query parameters
69
+ query_params = opts[:query_params] || {}
70
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
71
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
72
+
73
+ # header parameters
74
+ header_params = opts[:header_params] || {}
75
+ # HTTP header 'Accept' (if needed)
76
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
77
+
78
+ # form parameters
79
+ form_params = opts[:form_params] || {}
80
+
81
+ # http body (model)
82
+ post_body = opts[:debug_body]
83
+
84
+ # return_type
85
+ return_type = opts[:debug_return_type] || 'AddressHistoricalBalanceList'
86
+
87
+ # auth_names
88
+ auth_names = opts[:debug_auth_names] || []
89
+
90
+ new_options = opts.merge(
91
+ :operation => :"BalanceHistoryApi.list_address_historical_balance",
92
+ :header_params => header_params,
93
+ :query_params => query_params,
94
+ :form_params => form_params,
95
+ :body => post_body,
96
+ :auth_names => auth_names,
97
+ :return_type => return_type
98
+ )
99
+
100
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug "API called: BalanceHistoryApi#list_address_historical_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
103
+ end
104
+ return data, status_code, headers
105
+ end
106
+ end
107
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -19,7 +19,7 @@ module Coinbase::Client
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Get contract events
22
+ # List contract events
23
23
  # Retrieve events for a specific contract
24
24
  # @param network_id [String] Unique identifier for the blockchain network
25
25
  # @param protocol_name [String] Case-sensitive name of the blockchain protocol
@@ -36,7 +36,7 @@ module Coinbase::Client
36
36
  data
37
37
  end
38
38
 
39
- # Get contract events
39
+ # List contract events
40
40
  # Retrieve events for a specific contract
41
41
  # @param network_id [String] Unique identifier for the blockchain network
42
42
  # @param protocol_name [String] Case-sensitive name of the blockchain protocol
@@ -95,7 +95,7 @@ module Coinbase::Client
95
95
  # header parameters
96
96
  header_params = opts[:header_params] || {}
97
97
  # HTTP header 'Accept' (if needed)
98
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
98
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
99
99
 
100
100
  # form parameters
101
101
  form_params = opts[:form_params] || {}
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -69,7 +69,7 @@ module Coinbase::Client
69
69
  # header parameters
70
70
  header_params = opts[:header_params] || {}
71
71
  # HTTP header 'Accept' (if needed)
72
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
72
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
73
73
  # HTTP header 'Content-Type'
74
74
  content_type = @api_client.select_header_content_type(['application/json'])
75
75
  if !content_type.nil?
@@ -149,7 +149,7 @@ module Coinbase::Client
149
149
  # header parameters
150
150
  header_params = opts[:header_params] || {}
151
151
  # HTTP header 'Accept' (if needed)
152
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
152
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
153
153
  # HTTP header 'Content-Type'
154
154
  content_type = @api_client.select_header_content_type(['application/json'])
155
155
  if !content_type.nil?
@@ -229,7 +229,7 @@ module Coinbase::Client
229
229
  # header parameters
230
230
  header_params = opts[:header_params] || {}
231
231
  # HTTP header 'Accept' (if needed)
232
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
232
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
233
233
 
234
234
  # form parameters
235
235
  form_params = opts[:form_params] || {}
@@ -308,7 +308,7 @@ module Coinbase::Client
308
308
  # header parameters
309
309
  header_params = opts[:header_params] || {}
310
310
  # HTTP header 'Accept' (if needed)
311
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
311
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
312
312
 
313
313
  # form parameters
314
314
  form_params = opts[:form_params] || {}
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -63,7 +63,7 @@ module Coinbase::Client
63
63
  # header parameters
64
64
  header_params = opts[:header_params] || {}
65
65
  # HTTP header 'Accept' (if needed)
66
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
67
67
 
68
68
  # form parameters
69
69
  form_params = opts[:form_params] || {}
@@ -94,91 +94,6 @@ module Coinbase::Client
94
94
  return data, status_code, headers
95
95
  end
96
96
 
97
- # Get address balance history for asset
98
- # List the historical balance of an asset in a specific address.
99
- # @param network_id [String] The ID of the blockchain network
100
- # @param address_id [String] The ID of the address to fetch the historical balance for.
101
- # @param asset_id [String] The symbol of the asset to fetch the historical balance for.
102
- # @param [Hash] opts the optional parameters
103
- # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
104
- # @option opts [String] :page A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
105
- # @return [AddressHistoricalBalanceList]
106
- def list_address_historical_balance(network_id, address_id, asset_id, opts = {})
107
- data, _status_code, _headers = list_address_historical_balance_with_http_info(network_id, address_id, asset_id, opts)
108
- data
109
- end
110
-
111
- # Get address balance history for asset
112
- # List the historical balance of an asset in a specific address.
113
- # @param network_id [String] The ID of the blockchain network
114
- # @param address_id [String] The ID of the address to fetch the historical balance for.
115
- # @param asset_id [String] The symbol of the asset to fetch the historical balance for.
116
- # @param [Hash] opts the optional parameters
117
- # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
118
- # @option opts [String] :page A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
119
- # @return [Array<(AddressHistoricalBalanceList, Integer, Hash)>] AddressHistoricalBalanceList data, response status code and response headers
120
- def list_address_historical_balance_with_http_info(network_id, address_id, asset_id, opts = {})
121
- if @api_client.config.debugging
122
- @api_client.config.logger.debug 'Calling API: ExternalAddressesApi.list_address_historical_balance ...'
123
- end
124
- # verify the required parameter 'network_id' is set
125
- if @api_client.config.client_side_validation && network_id.nil?
126
- fail ArgumentError, "Missing the required parameter 'network_id' when calling ExternalAddressesApi.list_address_historical_balance"
127
- end
128
- # verify the required parameter 'address_id' is set
129
- if @api_client.config.client_side_validation && address_id.nil?
130
- fail ArgumentError, "Missing the required parameter 'address_id' when calling ExternalAddressesApi.list_address_historical_balance"
131
- end
132
- # verify the required parameter 'asset_id' is set
133
- if @api_client.config.client_side_validation && asset_id.nil?
134
- fail ArgumentError, "Missing the required parameter 'asset_id' when calling ExternalAddressesApi.list_address_historical_balance"
135
- end
136
- if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'].to_s.length > 5000
137
- fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ExternalAddressesApi.list_address_historical_balance, the character length must be smaller than or equal to 5000.'
138
- end
139
-
140
- # resource path
141
- local_var_path = '/v1/networks/{network_id}/addresses/{address_id}/balance_history/{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))
142
-
143
- # query parameters
144
- query_params = opts[:query_params] || {}
145
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
146
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
147
-
148
- # header parameters
149
- header_params = opts[:header_params] || {}
150
- # HTTP header 'Accept' (if needed)
151
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
152
-
153
- # form parameters
154
- form_params = opts[:form_params] || {}
155
-
156
- # http body (model)
157
- post_body = opts[:debug_body]
158
-
159
- # return_type
160
- return_type = opts[:debug_return_type] || 'AddressHistoricalBalanceList'
161
-
162
- # auth_names
163
- auth_names = opts[:debug_auth_names] || []
164
-
165
- new_options = opts.merge(
166
- :operation => :"ExternalAddressesApi.list_address_historical_balance",
167
- :header_params => header_params,
168
- :query_params => query_params,
169
- :form_params => form_params,
170
- :body => post_body,
171
- :auth_names => auth_names,
172
- :return_type => return_type
173
- )
174
-
175
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
176
- if @api_client.config.debugging
177
- @api_client.config.logger.debug "API called: ExternalAddressesApi#list_address_historical_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
178
- end
179
- return data, status_code, headers
180
- end
181
-
182
97
  # List transactions for an address.
183
98
  # List all transactions that interact with the address.
184
99
  # @param network_id [String] The ID of the blockchain network
@@ -227,7 +142,7 @@ module Coinbase::Client
227
142
  # header parameters
228
143
  header_params = opts[:header_params] || {}
229
144
  # HTTP header 'Accept' (if needed)
230
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
145
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
231
146
 
232
147
  # form parameters
233
148
  form_params = opts[:form_params] || {}
@@ -303,7 +218,7 @@ module Coinbase::Client
303
218
  # header parameters
304
219
  header_params = opts[:header_params] || {}
305
220
  # HTTP header 'Accept' (if needed)
306
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
221
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
307
222
 
308
223
  # form parameters
309
224
  form_params = opts[:form_params] || {}
@@ -375,7 +290,7 @@ module Coinbase::Client
375
290
  # header parameters
376
291
  header_params = opts[:header_params] || {}
377
292
  # HTTP header 'Accept' (if needed)
378
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
293
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
379
294
 
380
295
  # form parameters
381
296
  form_params = opts[:form_params] || {}
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -51,7 +51,7 @@ module Coinbase::Client
51
51
  # header parameters
52
52
  header_params = opts[:header_params] || {}
53
53
  # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
55
 
56
56
  # form parameters
57
57
  form_params = opts[:form_params] || {}
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -47,7 +47,7 @@ module Coinbase::Client
47
47
  # header parameters
48
48
  header_params = opts[:header_params] || {}
49
49
  # HTTP header 'Accept' (if needed)
50
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
50
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
51
51
  # HTTP header 'Content-Type'
52
52
  content_type = @api_client.select_header_content_type(['application/json'])
53
53
  if !content_type.nil?
@@ -115,7 +115,7 @@ module Coinbase::Client
115
115
  # header parameters
116
116
  header_params = opts[:header_params] || {}
117
117
  # HTTP header 'Accept' (if needed)
118
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
119
119
 
120
120
  # form parameters
121
121
  form_params = opts[:form_params] || {}
@@ -188,7 +188,7 @@ module Coinbase::Client
188
188
  # header parameters
189
189
  header_params = opts[:header_params] || {}
190
190
  # HTTP header 'Accept' (if needed)
191
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
191
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
192
192
 
193
193
  # form parameters
194
194
  form_params = opts[:form_params] || {}
@@ -255,7 +255,7 @@ module Coinbase::Client
255
255
  # header parameters
256
256
  header_params = opts[:header_params] || {}
257
257
  # HTTP header 'Accept' (if needed)
258
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
258
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
259
259
 
260
260
  # form parameters
261
261
  form_params = opts[:form_params] || {}
@@ -320,7 +320,7 @@ module Coinbase::Client
320
320
  # header parameters
321
321
  header_params = opts[:header_params] || {}
322
322
  # HTTP header 'Accept' (if needed)
323
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
323
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
324
324
  # HTTP header 'Content-Type'
325
325
  content_type = @api_client.select_header_content_type(['application/json'])
326
326
  if !content_type.nil?
@@ -390,7 +390,7 @@ module Coinbase::Client
390
390
  # header parameters
391
391
  header_params = opts[:header_params] || {}
392
392
  # HTTP header 'Accept' (if needed)
393
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
393
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
394
394
  # HTTP header 'Content-Type'
395
395
  content_type = @api_client.select_header_content_type(['application/json'])
396
396
  if !content_type.nil?
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -51,7 +51,7 @@ module Coinbase::Client
51
51
  # header parameters
52
52
  header_params = opts[:header_params] || {}
53
53
  # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
55
  # HTTP header 'Content-Type'
56
56
  content_type = @api_client.select_header_content_type(['application/json'])
57
57
  if !content_type.nil?
@@ -176,7 +176,7 @@ module Coinbase::Client
176
176
  # header parameters
177
177
  header_params = opts[:header_params] || {}
178
178
  # HTTP header 'Accept' (if needed)
179
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
179
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
180
180
 
181
181
  # form parameters
182
182
  form_params = opts[:form_params] || {}
@@ -249,7 +249,7 @@ module Coinbase::Client
249
249
  # header parameters
250
250
  header_params = opts[:header_params] || {}
251
251
  # HTTP header 'Accept' (if needed)
252
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
252
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
253
253
  # HTTP header 'Content-Type'
254
254
  content_type = @api_client.select_header_content_type(['application/json'])
255
255
  if !content_type.nil?
@@ -329,7 +329,7 @@ module Coinbase::Client
329
329
  # header parameters
330
330
  header_params = opts[:header_params] || {}
331
331
  # HTTP header 'Accept' (if needed)
332
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
332
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
333
333
 
334
334
  # form parameters
335
335
  form_params = opts[:form_params] || {}
@@ -392,7 +392,7 @@ module Coinbase::Client
392
392
  # header parameters
393
393
  header_params = opts[:header_params] || {}
394
394
  # HTTP header 'Accept' (if needed)
395
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
395
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
396
396
  # HTTP header 'Content-Type'
397
397
  content_type = @api_client.select_header_content_type(['application/json'])
398
398
  if !content_type.nil?