coinbase-sdk 0.0.10 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/lib/coinbase/address/external_address.rb +3 -166
  3. data/lib/coinbase/address/wallet_address.rb +80 -107
  4. data/lib/coinbase/address.rb +128 -0
  5. data/lib/coinbase/client/api/addresses_api.rb +1 -1
  6. data/lib/coinbase/client/api/assets_api.rb +3 -3
  7. data/lib/coinbase/client/api/contract_events_api.rb +121 -0
  8. data/lib/coinbase/client/api/external_addresses_api.rb +1 -1
  9. data/lib/coinbase/client/api/server_signers_api.rb +1 -1
  10. data/lib/coinbase/client/api/stake_api.rb +242 -1
  11. data/lib/coinbase/client/api/trades_api.rb +1 -1
  12. data/lib/coinbase/client/api/transfers_api.rb +1 -1
  13. data/lib/coinbase/client/api/users_api.rb +1 -1
  14. data/lib/coinbase/client/api/validators_api.rb +1 -1
  15. data/lib/coinbase/client/api/wallets_api.rb +1 -1
  16. data/lib/coinbase/client/api/webhooks_api.rb +286 -0
  17. data/lib/coinbase/client/api_client.rb +1 -1
  18. data/lib/coinbase/client/api_error.rb +1 -1
  19. data/lib/coinbase/client/configuration.rb +11 -1
  20. data/lib/coinbase/client/models/address.rb +1 -1
  21. data/lib/coinbase/client/models/address_balance_list.rb +1 -1
  22. data/lib/coinbase/client/models/address_list.rb +1 -1
  23. data/lib/coinbase/client/models/asset.rb +1 -1
  24. data/lib/coinbase/client/models/balance.rb +1 -1
  25. data/lib/coinbase/client/models/broadcast_staking_operation_request.rb +239 -0
  26. data/lib/coinbase/client/models/broadcast_trade_request.rb +1 -1
  27. data/lib/coinbase/client/models/broadcast_transfer_request.rb +1 -1
  28. data/lib/coinbase/client/models/build_staking_operation_request.rb +1 -1
  29. data/lib/coinbase/client/models/contract_event.rb +336 -0
  30. data/lib/coinbase/client/models/contract_event_list.rb +259 -0
  31. data/lib/coinbase/client/models/create_address_request.rb +1 -1
  32. data/lib/coinbase/client/models/create_server_signer_request.rb +1 -1
  33. data/lib/coinbase/client/models/create_staking_operation_request.rb +274 -0
  34. data/lib/coinbase/client/models/create_trade_request.rb +1 -1
  35. data/lib/coinbase/client/models/create_transfer_request.rb +1 -1
  36. data/lib/coinbase/client/models/create_wallet_request.rb +1 -1
  37. data/lib/coinbase/client/models/create_wallet_request_wallet.rb +1 -1
  38. data/lib/coinbase/client/models/create_webhook_request.rb +282 -0
  39. data/lib/coinbase/client/models/error.rb +1 -1
  40. data/lib/coinbase/client/models/ethereum_validator_metadata.rb +1 -1
  41. data/lib/coinbase/client/models/faucet_transaction.rb +1 -1
  42. data/lib/coinbase/client/models/feature.rb +1 -1
  43. data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +1 -1
  44. data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +1 -1
  45. data/lib/coinbase/client/models/get_staking_context_request.rb +1 -1
  46. data/lib/coinbase/client/models/native_eth_staking_context.rb +1 -1
  47. data/lib/coinbase/client/models/partial_eth_staking_context.rb +1 -1
  48. data/lib/coinbase/client/models/seed_creation_event.rb +1 -1
  49. data/lib/coinbase/client/models/seed_creation_event_result.rb +1 -1
  50. data/lib/coinbase/client/models/server_signer.rb +1 -1
  51. data/lib/coinbase/client/models/server_signer_event.rb +1 -1
  52. data/lib/coinbase/client/models/server_signer_event_event.rb +1 -1
  53. data/lib/coinbase/client/models/server_signer_event_list.rb +1 -1
  54. data/lib/coinbase/client/models/server_signer_list.rb +1 -1
  55. data/lib/coinbase/client/models/signature_creation_event.rb +1 -1
  56. data/lib/coinbase/client/models/signature_creation_event_result.rb +1 -1
  57. data/lib/coinbase/client/models/signed_voluntary_exit_message_metadata.rb +1 -1
  58. data/lib/coinbase/client/models/staking_context.rb +1 -1
  59. data/lib/coinbase/client/models/staking_context_context.rb +1 -1
  60. data/lib/coinbase/client/models/staking_operation.rb +16 -6
  61. data/lib/coinbase/client/models/staking_operation_metadata.rb +1 -1
  62. data/lib/coinbase/client/models/staking_reward.rb +1 -1
  63. data/lib/coinbase/client/models/staking_reward_format.rb +1 -1
  64. data/lib/coinbase/client/models/trade.rb +1 -1
  65. data/lib/coinbase/client/models/trade_list.rb +1 -1
  66. data/lib/coinbase/client/models/transaction.rb +1 -1
  67. data/lib/coinbase/client/models/transaction_type.rb +1 -1
  68. data/lib/coinbase/client/models/transfer.rb +5 -93
  69. data/lib/coinbase/client/models/transfer_list.rb +1 -1
  70. data/lib/coinbase/client/models/update_webhook_request.rb +289 -0
  71. data/lib/coinbase/client/models/user.rb +1 -1
  72. data/lib/coinbase/client/models/validator.rb +1 -1
  73. data/lib/coinbase/client/models/validator_details.rb +1 -1
  74. data/lib/coinbase/client/models/validator_list.rb +1 -1
  75. data/lib/coinbase/client/models/wallet.rb +1 -1
  76. data/lib/coinbase/client/models/wallet_list.rb +1 -1
  77. data/lib/coinbase/client/models/webhook.rb +299 -0
  78. data/lib/coinbase/client/models/webhook_event_filter.rb +236 -0
  79. data/lib/coinbase/client/models/webhook_event_type.rb +41 -0
  80. data/lib/coinbase/client/models/webhook_list.rb +244 -0
  81. data/lib/coinbase/client/version.rb +1 -1
  82. data/lib/coinbase/client.rb +13 -1
  83. data/lib/coinbase/constants.rb +3 -0
  84. data/lib/coinbase/destination.rb +51 -0
  85. data/lib/coinbase/errors.rb +14 -0
  86. data/lib/coinbase/middleware.rb +12 -0
  87. data/lib/coinbase/staking_operation.rb +106 -5
  88. data/lib/coinbase/trade.rb +87 -5
  89. data/lib/coinbase/transaction.rb +13 -2
  90. data/lib/coinbase/transfer.rb +86 -7
  91. data/lib/coinbase/wallet.rb +77 -4
  92. data/lib/coinbase.rb +3 -1
  93. metadata +29 -2
@@ -0,0 +1,121 @@
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.7.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Coinbase::Client
16
+ class ContractEventsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get contract events
23
+ # Retrieve events for a specific contract
24
+ # @param network_id [String] Unique identifier for the blockchain network
25
+ # @param protocol_name [String] Case-sensitive name of the blockchain protocol
26
+ # @param contract_address [String] EVM address of the smart contract (42 characters, including '0x', in lowercase)
27
+ # @param from_block_height [Integer] Lower bound of the block range to query (inclusive)
28
+ # @param to_block_height [Integer] Upper bound of the block range to query (inclusive)
29
+ # @param [Hash] opts the optional parameters
30
+ # @option opts [String] :contract_name Case-sensitive name of the specific contract within the project
31
+ # @option opts [String] :event_name Case-sensitive name of the event to filter for in the contract's logs
32
+ # @option opts [String] :next_page Pagination token for retrieving the next set of results
33
+ # @return [ContractEventList]
34
+ def list_contract_events(network_id, protocol_name, contract_address, from_block_height, to_block_height, opts = {})
35
+ data, _status_code, _headers = list_contract_events_with_http_info(network_id, protocol_name, contract_address, from_block_height, to_block_height, opts)
36
+ data
37
+ end
38
+
39
+ # Get contract events
40
+ # Retrieve events for a specific contract
41
+ # @param network_id [String] Unique identifier for the blockchain network
42
+ # @param protocol_name [String] Case-sensitive name of the blockchain protocol
43
+ # @param contract_address [String] EVM address of the smart contract (42 characters, including '0x', in lowercase)
44
+ # @param from_block_height [Integer] Lower bound of the block range to query (inclusive)
45
+ # @param to_block_height [Integer] Upper bound of the block range to query (inclusive)
46
+ # @param [Hash] opts the optional parameters
47
+ # @option opts [String] :contract_name Case-sensitive name of the specific contract within the project
48
+ # @option opts [String] :event_name Case-sensitive name of the event to filter for in the contract's logs
49
+ # @option opts [String] :next_page Pagination token for retrieving the next set of results
50
+ # @return [Array<(ContractEventList, Integer, Hash)>] ContractEventList data, response status code and response headers
51
+ def list_contract_events_with_http_info(network_id, protocol_name, contract_address, from_block_height, to_block_height, opts = {})
52
+ if @api_client.config.debugging
53
+ @api_client.config.logger.debug 'Calling API: ContractEventsApi.list_contract_events ...'
54
+ end
55
+ # verify the required parameter 'network_id' is set
56
+ if @api_client.config.client_side_validation && network_id.nil?
57
+ fail ArgumentError, "Missing the required parameter 'network_id' when calling ContractEventsApi.list_contract_events"
58
+ end
59
+ # verify the required parameter 'protocol_name' is set
60
+ if @api_client.config.client_side_validation && protocol_name.nil?
61
+ fail ArgumentError, "Missing the required parameter 'protocol_name' when calling ContractEventsApi.list_contract_events"
62
+ end
63
+ # verify the required parameter 'contract_address' is set
64
+ if @api_client.config.client_side_validation && contract_address.nil?
65
+ fail ArgumentError, "Missing the required parameter 'contract_address' when calling ContractEventsApi.list_contract_events"
66
+ end
67
+ # verify the required parameter 'from_block_height' is set
68
+ if @api_client.config.client_side_validation && from_block_height.nil?
69
+ fail ArgumentError, "Missing the required parameter 'from_block_height' when calling ContractEventsApi.list_contract_events"
70
+ end
71
+ # verify the required parameter 'to_block_height' is set
72
+ if @api_client.config.client_side_validation && to_block_height.nil?
73
+ fail ArgumentError, "Missing the required parameter 'to_block_height' when calling ContractEventsApi.list_contract_events"
74
+ end
75
+ # resource path
76
+ local_var_path = '/v1/networks/{network_id}/smart_contracts/{contract_address}/events'.sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s)).sub('{' + 'contract_address' + '}', CGI.escape(contract_address.to_s))
77
+
78
+ # query parameters
79
+ query_params = opts[:query_params] || {}
80
+ query_params[:'protocol_name'] = protocol_name
81
+ query_params[:'from_block_height'] = from_block_height
82
+ query_params[:'to_block_height'] = to_block_height
83
+ query_params[:'contract_name'] = opts[:'contract_name'] if !opts[:'contract_name'].nil?
84
+ query_params[:'event_name'] = opts[:'event_name'] if !opts[:'event_name'].nil?
85
+ query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
86
+
87
+ # header parameters
88
+ header_params = opts[:header_params] || {}
89
+ # HTTP header 'Accept' (if needed)
90
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
91
+
92
+ # form parameters
93
+ form_params = opts[:form_params] || {}
94
+
95
+ # http body (model)
96
+ post_body = opts[:debug_body]
97
+
98
+ # return_type
99
+ return_type = opts[:debug_return_type] || 'ContractEventList'
100
+
101
+ # auth_names
102
+ auth_names = opts[:debug_auth_names] || []
103
+
104
+ new_options = opts.merge(
105
+ :operation => :"ContractEventsApi.list_contract_events",
106
+ :header_params => header_params,
107
+ :query_params => query_params,
108
+ :form_params => form_params,
109
+ :body => post_body,
110
+ :auth_names => auth_names,
111
+ :return_type => return_type
112
+ )
113
+
114
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
115
+ if @api_client.config.debugging
116
+ @api_client.config.logger.debug "API called: ContractEventsApi#list_contract_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
117
+ end
118
+ return data, status_code, headers
119
+ end
120
+ end
121
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
  Contact: yuga.cohler@coinbase.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
  Contact: yuga.cohler@coinbase.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
  Contact: yuga.cohler@coinbase.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -19,6 +19,92 @@ module Coinbase::Client
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Broadcast a staking operation
23
+ # Broadcast a staking operation.
24
+ # @param wallet_id [String] The ID of the wallet the address belongs to.
25
+ # @param address_id [String] The ID of the address the staking operation belongs to.
26
+ # @param staking_operation_id [String] The ID of the staking operation to broadcast.
27
+ # @param broadcast_staking_operation_request [BroadcastStakingOperationRequest]
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [StakingOperation]
30
+ def broadcast_staking_operation(wallet_id, address_id, staking_operation_id, broadcast_staking_operation_request, opts = {})
31
+ data, _status_code, _headers = broadcast_staking_operation_with_http_info(wallet_id, address_id, staking_operation_id, broadcast_staking_operation_request, opts)
32
+ data
33
+ end
34
+
35
+ # Broadcast a staking operation
36
+ # Broadcast a staking operation.
37
+ # @param wallet_id [String] The ID of the wallet the address belongs to.
38
+ # @param address_id [String] The ID of the address the staking operation belongs to.
39
+ # @param staking_operation_id [String] The ID of the staking operation to broadcast.
40
+ # @param broadcast_staking_operation_request [BroadcastStakingOperationRequest]
41
+ # @param [Hash] opts the optional parameters
42
+ # @return [Array<(StakingOperation, Integer, Hash)>] StakingOperation data, response status code and response headers
43
+ def broadcast_staking_operation_with_http_info(wallet_id, address_id, staking_operation_id, broadcast_staking_operation_request, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: StakeApi.broadcast_staking_operation ...'
46
+ end
47
+ # verify the required parameter 'wallet_id' is set
48
+ if @api_client.config.client_side_validation && wallet_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'wallet_id' when calling StakeApi.broadcast_staking_operation"
50
+ end
51
+ # verify the required parameter 'address_id' is set
52
+ if @api_client.config.client_side_validation && address_id.nil?
53
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling StakeApi.broadcast_staking_operation"
54
+ end
55
+ # verify the required parameter 'staking_operation_id' is set
56
+ if @api_client.config.client_side_validation && staking_operation_id.nil?
57
+ fail ArgumentError, "Missing the required parameter 'staking_operation_id' when calling StakeApi.broadcast_staking_operation"
58
+ end
59
+ # verify the required parameter 'broadcast_staking_operation_request' is set
60
+ if @api_client.config.client_side_validation && broadcast_staking_operation_request.nil?
61
+ fail ArgumentError, "Missing the required parameter 'broadcast_staking_operation_request' when calling StakeApi.broadcast_staking_operation"
62
+ end
63
+ # resource path
64
+ local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations/{staking_operation_id}/broadcast'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s)).sub('{' + 'staking_operation_id' + '}', CGI.escape(staking_operation_id.to_s))
65
+
66
+ # query parameters
67
+ query_params = opts[:query_params] || {}
68
+
69
+ # header parameters
70
+ header_params = opts[:header_params] || {}
71
+ # HTTP header 'Accept' (if needed)
72
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
73
+ # HTTP header 'Content-Type'
74
+ content_type = @api_client.select_header_content_type(['application/json'])
75
+ if !content_type.nil?
76
+ header_params['Content-Type'] = content_type
77
+ end
78
+
79
+ # form parameters
80
+ form_params = opts[:form_params] || {}
81
+
82
+ # http body (model)
83
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(broadcast_staking_operation_request)
84
+
85
+ # return_type
86
+ return_type = opts[:debug_return_type] || 'StakingOperation'
87
+
88
+ # auth_names
89
+ auth_names = opts[:debug_auth_names] || []
90
+
91
+ new_options = opts.merge(
92
+ :operation => :"StakeApi.broadcast_staking_operation",
93
+ :header_params => header_params,
94
+ :query_params => query_params,
95
+ :form_params => form_params,
96
+ :body => post_body,
97
+ :auth_names => auth_names,
98
+ :return_type => return_type
99
+ )
100
+
101
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug "API called: StakeApi#broadcast_staking_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
104
+ end
105
+ return data, status_code, headers
106
+ end
107
+
22
108
  # Build a new staking operation
23
109
  # Build a new staking operation
24
110
  # @param build_staking_operation_request [BuildStakingOperationRequest]
@@ -87,6 +173,86 @@ module Coinbase::Client
87
173
  return data, status_code, headers
88
174
  end
89
175
 
176
+ # Create a new staking operation for an address
177
+ # Create a new staking operation.
178
+ # @param wallet_id [String] The ID of the wallet the address belongs to.
179
+ # @param address_id [String] The ID of the address to create the staking operation for.
180
+ # @param create_staking_operation_request [CreateStakingOperationRequest]
181
+ # @param [Hash] opts the optional parameters
182
+ # @return [StakingOperation]
183
+ def create_staking_operation(wallet_id, address_id, create_staking_operation_request, opts = {})
184
+ data, _status_code, _headers = create_staking_operation_with_http_info(wallet_id, address_id, create_staking_operation_request, opts)
185
+ data
186
+ end
187
+
188
+ # Create a new staking operation for an address
189
+ # Create a new staking operation.
190
+ # @param wallet_id [String] The ID of the wallet the address belongs to.
191
+ # @param address_id [String] The ID of the address to create the staking operation for.
192
+ # @param create_staking_operation_request [CreateStakingOperationRequest]
193
+ # @param [Hash] opts the optional parameters
194
+ # @return [Array<(StakingOperation, Integer, Hash)>] StakingOperation data, response status code and response headers
195
+ def create_staking_operation_with_http_info(wallet_id, address_id, create_staking_operation_request, opts = {})
196
+ if @api_client.config.debugging
197
+ @api_client.config.logger.debug 'Calling API: StakeApi.create_staking_operation ...'
198
+ end
199
+ # verify the required parameter 'wallet_id' is set
200
+ if @api_client.config.client_side_validation && wallet_id.nil?
201
+ fail ArgumentError, "Missing the required parameter 'wallet_id' when calling StakeApi.create_staking_operation"
202
+ end
203
+ # verify the required parameter 'address_id' is set
204
+ if @api_client.config.client_side_validation && address_id.nil?
205
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling StakeApi.create_staking_operation"
206
+ end
207
+ # verify the required parameter 'create_staking_operation_request' is set
208
+ if @api_client.config.client_side_validation && create_staking_operation_request.nil?
209
+ fail ArgumentError, "Missing the required parameter 'create_staking_operation_request' when calling StakeApi.create_staking_operation"
210
+ end
211
+ # resource path
212
+ local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s))
213
+
214
+ # query parameters
215
+ query_params = opts[:query_params] || {}
216
+
217
+ # header parameters
218
+ header_params = opts[:header_params] || {}
219
+ # HTTP header 'Accept' (if needed)
220
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
221
+ # HTTP header 'Content-Type'
222
+ content_type = @api_client.select_header_content_type(['application/json'])
223
+ if !content_type.nil?
224
+ header_params['Content-Type'] = content_type
225
+ end
226
+
227
+ # form parameters
228
+ form_params = opts[:form_params] || {}
229
+
230
+ # http body (model)
231
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_staking_operation_request)
232
+
233
+ # return_type
234
+ return_type = opts[:debug_return_type] || 'StakingOperation'
235
+
236
+ # auth_names
237
+ auth_names = opts[:debug_auth_names] || []
238
+
239
+ new_options = opts.merge(
240
+ :operation => :"StakeApi.create_staking_operation",
241
+ :header_params => header_params,
242
+ :query_params => query_params,
243
+ :form_params => form_params,
244
+ :body => post_body,
245
+ :auth_names => auth_names,
246
+ :return_type => return_type
247
+ )
248
+
249
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
250
+ if @api_client.config.debugging
251
+ @api_client.config.logger.debug "API called: StakeApi#create_staking_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
252
+ end
253
+ return data, status_code, headers
254
+ end
255
+
90
256
  # Fetch staking rewards
91
257
  # Fetch staking rewards for a list of addresses
92
258
  # @param fetch_staking_rewards_request [FetchStakingRewardsRequest]
@@ -307,5 +473,80 @@ module Coinbase::Client
307
473
  end
308
474
  return data, status_code, headers
309
475
  end
476
+
477
+ # Get the latest state of a staking operation
478
+ # Get the latest state of a staking operation.
479
+ # @param wallet_id [String] The ID of the wallet the address belongs to
480
+ # @param address_id [String] The ID of the address to fetch the staking operation for.
481
+ # @param staking_operation_id [String] The ID of the staking operation.
482
+ # @param [Hash] opts the optional parameters
483
+ # @return [StakingOperation]
484
+ def get_staking_operation(wallet_id, address_id, staking_operation_id, opts = {})
485
+ data, _status_code, _headers = get_staking_operation_with_http_info(wallet_id, address_id, staking_operation_id, opts)
486
+ data
487
+ end
488
+
489
+ # Get the latest state of a staking operation
490
+ # Get the latest state of a staking operation.
491
+ # @param wallet_id [String] The ID of the wallet the address belongs to
492
+ # @param address_id [String] The ID of the address to fetch the staking operation for.
493
+ # @param staking_operation_id [String] The ID of the staking operation.
494
+ # @param [Hash] opts the optional parameters
495
+ # @return [Array<(StakingOperation, Integer, Hash)>] StakingOperation data, response status code and response headers
496
+ def get_staking_operation_with_http_info(wallet_id, address_id, staking_operation_id, opts = {})
497
+ if @api_client.config.debugging
498
+ @api_client.config.logger.debug 'Calling API: StakeApi.get_staking_operation ...'
499
+ end
500
+ # verify the required parameter 'wallet_id' is set
501
+ if @api_client.config.client_side_validation && wallet_id.nil?
502
+ fail ArgumentError, "Missing the required parameter 'wallet_id' when calling StakeApi.get_staking_operation"
503
+ end
504
+ # verify the required parameter 'address_id' is set
505
+ if @api_client.config.client_side_validation && address_id.nil?
506
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling StakeApi.get_staking_operation"
507
+ end
508
+ # verify the required parameter 'staking_operation_id' is set
509
+ if @api_client.config.client_side_validation && staking_operation_id.nil?
510
+ fail ArgumentError, "Missing the required parameter 'staking_operation_id' when calling StakeApi.get_staking_operation"
511
+ end
512
+ # resource path
513
+ local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations/{staking_operation_id}'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s)).sub('{' + 'staking_operation_id' + '}', CGI.escape(staking_operation_id.to_s))
514
+
515
+ # query parameters
516
+ query_params = opts[:query_params] || {}
517
+
518
+ # header parameters
519
+ header_params = opts[:header_params] || {}
520
+ # HTTP header 'Accept' (if needed)
521
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
522
+
523
+ # form parameters
524
+ form_params = opts[:form_params] || {}
525
+
526
+ # http body (model)
527
+ post_body = opts[:debug_body]
528
+
529
+ # return_type
530
+ return_type = opts[:debug_return_type] || 'StakingOperation'
531
+
532
+ # auth_names
533
+ auth_names = opts[:debug_auth_names] || []
534
+
535
+ new_options = opts.merge(
536
+ :operation => :"StakeApi.get_staking_operation",
537
+ :header_params => header_params,
538
+ :query_params => query_params,
539
+ :form_params => form_params,
540
+ :body => post_body,
541
+ :auth_names => auth_names,
542
+ :return_type => return_type
543
+ )
544
+
545
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
546
+ if @api_client.config.debugging
547
+ @api_client.config.logger.debug "API called: StakeApi#get_staking_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
548
+ end
549
+ return data, status_code, headers
550
+ end
310
551
  end
311
552
  end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
  Contact: yuga.cohler@coinbase.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
  Contact: yuga.cohler@coinbase.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
  Contact: yuga.cohler@coinbase.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
  Contact: yuga.cohler@coinbase.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
  Contact: yuga.cohler@coinbase.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12