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.
- checksums.yaml +4 -4
- data/lib/coinbase/address/wallet_address.rb +10 -2
- data/lib/coinbase/address.rb +5 -1
- data/lib/coinbase/client/api/addresses_api.rb +10 -10
- data/lib/coinbase/client/api/assets_api.rb +2 -2
- data/lib/coinbase/client/api/balance_history_api.rb +107 -0
- data/lib/coinbase/client/api/contract_events_api.rb +4 -4
- data/lib/coinbase/client/api/contract_invocations_api.rb +5 -5
- data/lib/coinbase/client/api/external_addresses_api.rb +5 -90
- data/lib/coinbase/client/api/networks_api.rb +2 -2
- data/lib/coinbase/client/api/server_signers_api.rb +7 -7
- data/lib/coinbase/client/api/stake_api.rb +6 -6
- data/lib/coinbase/client/api/trades_api.rb +5 -5
- data/lib/coinbase/client/api/transfers_api.rb +5 -5
- data/lib/coinbase/client/api/validators_api.rb +7 -7
- data/lib/coinbase/client/api/wallet_stake_api.rb +4 -4
- data/lib/coinbase/client/api/wallets_api.rb +10 -10
- data/lib/coinbase/client/api/webhooks_api.rb +5 -5
- data/lib/coinbase/client/api_client.rb +30 -24
- data/lib/coinbase/client/api_error.rb +1 -1
- data/lib/coinbase/client/configuration.rb +1 -1
- data/lib/coinbase/client/models/address.rb +1 -1
- data/lib/coinbase/client/models/address_balance_list.rb +1 -1
- data/lib/coinbase/client/models/address_historical_balance_list.rb +1 -1
- data/lib/coinbase/client/models/address_list.rb +1 -1
- data/lib/coinbase/client/models/address_transaction_list.rb +1 -1
- data/lib/coinbase/client/models/asset.rb +1 -1
- data/lib/coinbase/client/models/balance.rb +1 -1
- data/lib/coinbase/client/models/broadcast_contract_invocation_request.rb +1 -1
- data/lib/coinbase/client/models/broadcast_staking_operation_request.rb +1 -1
- data/lib/coinbase/client/models/broadcast_trade_request.rb +1 -1
- data/lib/coinbase/client/models/broadcast_transfer_request.rb +1 -1
- data/lib/coinbase/client/models/build_staking_operation_request.rb +1 -1
- data/lib/coinbase/client/models/contract_event.rb +1 -1
- data/lib/coinbase/client/models/contract_event_list.rb +1 -1
- data/lib/coinbase/client/models/contract_invocation.rb +19 -2
- data/lib/coinbase/client/models/contract_invocation_list.rb +1 -1
- data/lib/coinbase/client/models/create_address_request.rb +1 -1
- data/lib/coinbase/client/models/create_contract_invocation_request.rb +15 -5
- data/lib/coinbase/client/models/create_payload_signature_request.rb +1 -1
- data/lib/coinbase/client/models/create_server_signer_request.rb +1 -1
- data/lib/coinbase/client/models/create_staking_operation_request.rb +1 -1
- data/lib/coinbase/client/models/create_trade_request.rb +1 -1
- data/lib/coinbase/client/models/create_transfer_request.rb +2 -2
- data/lib/coinbase/client/models/create_wallet_request.rb +1 -1
- data/lib/coinbase/client/models/create_wallet_request_wallet.rb +1 -1
- data/lib/coinbase/client/models/create_webhook_request.rb +1 -1
- data/lib/coinbase/client/models/erc20_transfer_event.rb +336 -0
- data/lib/coinbase/client/models/{user.rb → erc721_transfer_event.rb} +130 -25
- data/lib/coinbase/client/models/error.rb +15 -5
- data/lib/coinbase/client/models/ethereum_transaction.rb +1 -1
- data/lib/coinbase/client/models/ethereum_transaction_access.rb +1 -1
- data/lib/coinbase/client/models/ethereum_transaction_access_list.rb +1 -1
- data/lib/coinbase/client/models/ethereum_transaction_flattened_trace.rb +1 -1
- data/lib/coinbase/client/models/ethereum_validator_metadata.rb +1 -1
- data/lib/coinbase/client/models/faucet_transaction.rb +1 -1
- data/lib/coinbase/client/models/feature_set.rb +1 -1
- data/lib/coinbase/client/models/fetch_historical_staking_balances200_response.rb +1 -1
- data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +1 -1
- data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +1 -1
- data/lib/coinbase/client/models/get_staking_context_request.rb +1 -1
- data/lib/coinbase/client/models/historical_balance.rb +1 -1
- data/lib/coinbase/client/models/network.rb +1 -1
- data/lib/coinbase/client/models/network_identifier.rb +3 -2
- data/lib/coinbase/client/models/payload_signature.rb +1 -1
- data/lib/coinbase/client/models/payload_signature_list.rb +1 -1
- data/lib/coinbase/client/models/seed_creation_event.rb +1 -1
- data/lib/coinbase/client/models/seed_creation_event_result.rb +1 -1
- data/lib/coinbase/client/models/server_signer.rb +1 -1
- data/lib/coinbase/client/models/server_signer_event.rb +1 -1
- data/lib/coinbase/client/models/server_signer_event_event.rb +1 -1
- data/lib/coinbase/client/models/server_signer_event_list.rb +1 -1
- data/lib/coinbase/client/models/server_signer_list.rb +1 -1
- data/lib/coinbase/client/models/signature_creation_event.rb +1 -1
- data/lib/coinbase/client/models/signature_creation_event_result.rb +1 -1
- data/lib/coinbase/client/models/signed_voluntary_exit_message_metadata.rb +1 -1
- data/lib/coinbase/client/models/sponsored_send.rb +1 -1
- data/lib/coinbase/client/models/staking_balance.rb +1 -1
- data/lib/coinbase/client/models/staking_context.rb +1 -1
- data/lib/coinbase/client/models/staking_context_context.rb +1 -1
- data/lib/coinbase/client/models/staking_operation.rb +1 -1
- data/lib/coinbase/client/models/staking_operation_metadata.rb +1 -1
- data/lib/coinbase/client/models/staking_reward.rb +1 -1
- data/lib/coinbase/client/models/staking_reward_format.rb +1 -1
- data/lib/coinbase/client/models/staking_reward_usd_value.rb +1 -1
- data/lib/coinbase/client/models/trade.rb +1 -1
- data/lib/coinbase/client/models/trade_list.rb +1 -1
- data/lib/coinbase/client/models/transaction.rb +1 -1
- data/lib/coinbase/client/models/transaction_content.rb +1 -1
- data/lib/coinbase/client/models/transaction_type.rb +1 -1
- data/lib/coinbase/client/models/transfer.rb +1 -1
- data/lib/coinbase/client/models/transfer_list.rb +1 -1
- data/lib/coinbase/client/models/update_webhook_request.rb +1 -1
- data/lib/coinbase/client/models/validator.rb +1 -1
- data/lib/coinbase/client/models/validator_details.rb +1 -1
- data/lib/coinbase/client/models/validator_list.rb +1 -1
- data/lib/coinbase/client/models/validator_status.rb +1 -1
- data/lib/coinbase/client/models/wallet.rb +1 -1
- data/lib/coinbase/client/models/wallet_list.rb +1 -1
- data/lib/coinbase/client/models/webhook.rb +1 -1
- data/lib/coinbase/client/models/webhook_event_filter.rb +4 -4
- data/lib/coinbase/client/models/webhook_event_type.rb +1 -1
- data/lib/coinbase/client/models/webhook_list.rb +1 -1
- data/lib/coinbase/client/version.rb +1 -1
- data/lib/coinbase/client.rb +4 -3
- data/lib/coinbase/contract_invocation.rb +26 -1
- data/lib/coinbase/version.rb +1 -1
- metadata +5 -5
- data/lib/coinbase/client/api/users_api.rb +0 -79
- data/lib/coinbase/client/models/feature.rb +0 -43
@@ -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.
|
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.
|
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.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -20,7 +20,7 @@ module Coinbase::Client
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Get a validator belonging to the CDP project
|
23
|
-
# Get a validator belonging to the
|
23
|
+
# Get a validator belonging to the CDP project for a given network, asset and id.
|
24
24
|
# @param network_id [String] The ID of the blockchain network.
|
25
25
|
# @param asset_id [String] The symbol of the asset to get the validator for.
|
26
26
|
# @param validator_id [String] The unique id of the validator to fetch details for.
|
@@ -32,7 +32,7 @@ module Coinbase::Client
|
|
32
32
|
end
|
33
33
|
|
34
34
|
# Get a validator belonging to the CDP project
|
35
|
-
# Get a validator belonging to the
|
35
|
+
# Get a validator belonging to the CDP project for a given network, asset and id.
|
36
36
|
# @param network_id [String] The ID of the blockchain network.
|
37
37
|
# @param asset_id [String] The symbol of the asset to get the validator for.
|
38
38
|
# @param validator_id [String] The unique id of the validator to fetch details for.
|
@@ -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] || {}
|
@@ -95,7 +95,7 @@ module Coinbase::Client
|
|
95
95
|
end
|
96
96
|
|
97
97
|
# List validators belonging to the CDP project
|
98
|
-
# List validators belonging to the
|
98
|
+
# List validators belonging to the CDP project for a given network and asset.
|
99
99
|
# @param network_id [String] The ID of the blockchain network.
|
100
100
|
# @param asset_id [String] The symbol of the asset to get the validators for.
|
101
101
|
# @param [Hash] opts the optional parameters
|
@@ -109,7 +109,7 @@ module Coinbase::Client
|
|
109
109
|
end
|
110
110
|
|
111
111
|
# List validators belonging to the CDP project
|
112
|
-
# List validators belonging to the
|
112
|
+
# List validators belonging to the CDP project for a given network and asset.
|
113
113
|
# @param network_id [String] The ID of the blockchain network.
|
114
114
|
# @param asset_id [String] The symbol of the asset to get the validators for.
|
115
115
|
# @param [Hash] opts the optional parameters
|
@@ -145,7 +145,7 @@ module Coinbase::Client
|
|
145
145
|
# header parameters
|
146
146
|
header_params = opts[:header_params] || {}
|
147
147
|
# HTTP header 'Accept' (if needed)
|
148
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
148
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
149
149
|
|
150
150
|
# form parameters
|
151
151
|
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.
|
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] || {}
|
@@ -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.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -20,7 +20,7 @@ module Coinbase::Client
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Create a new wallet
|
23
|
-
# Create a new wallet scoped to the
|
23
|
+
# Create a new wallet scoped to the CDP project.
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
25
|
# @option opts [CreateWalletRequest] :create_wallet_request
|
26
26
|
# @return [Wallet]
|
@@ -30,7 +30,7 @@ module Coinbase::Client
|
|
30
30
|
end
|
31
31
|
|
32
32
|
# Create a new wallet
|
33
|
-
# Create a new wallet scoped to the
|
33
|
+
# Create a new wallet scoped to the CDP project.
|
34
34
|
# @param [Hash] opts the optional parameters
|
35
35
|
# @option opts [CreateWalletRequest] :create_wallet_request
|
36
36
|
# @return [Array<(Wallet, Integer, Hash)>] Wallet data, response status code and response headers
|
@@ -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] || {}
|
@@ -184,7 +184,7 @@ module Coinbase::Client
|
|
184
184
|
# header parameters
|
185
185
|
header_params = opts[:header_params] || {}
|
186
186
|
# HTTP header 'Accept' (if needed)
|
187
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
187
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
188
188
|
|
189
189
|
# form parameters
|
190
190
|
form_params = opts[:form_params] || {}
|
@@ -247,7 +247,7 @@ module Coinbase::Client
|
|
247
247
|
# header parameters
|
248
248
|
header_params = opts[:header_params] || {}
|
249
249
|
# HTTP header 'Accept' (if needed)
|
250
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
251
251
|
|
252
252
|
# form parameters
|
253
253
|
form_params = opts[:form_params] || {}
|
@@ -279,7 +279,7 @@ module Coinbase::Client
|
|
279
279
|
end
|
280
280
|
|
281
281
|
# List wallets
|
282
|
-
# List wallets belonging to the
|
282
|
+
# List wallets belonging to the CDP project.
|
283
283
|
# @param [Hash] opts the optional parameters
|
284
284
|
# @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.
|
285
285
|
# @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.
|
@@ -290,7 +290,7 @@ module Coinbase::Client
|
|
290
290
|
end
|
291
291
|
|
292
292
|
# List wallets
|
293
|
-
# List wallets belonging to the
|
293
|
+
# List wallets belonging to the CDP project.
|
294
294
|
# @param [Hash] opts the optional parameters
|
295
295
|
# @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.
|
296
296
|
# @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.
|
@@ -314,7 +314,7 @@ module Coinbase::Client
|
|
314
314
|
# header parameters
|
315
315
|
header_params = opts[:header_params] || {}
|
316
316
|
# HTTP header 'Accept' (if needed)
|
317
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
318
318
|
|
319
319
|
# form parameters
|
320
320
|
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.
|
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] || {}
|
@@ -182,7 +182,7 @@ module Coinbase::Client
|
|
182
182
|
# header parameters
|
183
183
|
header_params = opts[:header_params] || {}
|
184
184
|
# HTTP header 'Accept' (if needed)
|
185
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
185
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
186
186
|
|
187
187
|
# form parameters
|
188
188
|
form_params = opts[:form_params] || {}
|
@@ -247,7 +247,7 @@ module Coinbase::Client
|
|
247
247
|
# header parameters
|
248
248
|
header_params = opts[:header_params] || {}
|
249
249
|
# HTTP header 'Accept' (if needed)
|
250
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
251
251
|
# HTTP header 'Content-Type'
|
252
252
|
content_type = @api_client.select_header_content_type(['application/json'])
|
253
253
|
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.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -164,35 +164,41 @@ module Coinbase::Client
|
|
164
164
|
request.options.on_data = Proc.new do |chunk, overall_received_bytes|
|
165
165
|
stream << chunk
|
166
166
|
end
|
167
|
+
|
167
168
|
stream
|
168
169
|
end
|
169
170
|
|
170
171
|
def deserialize_file(response, stream)
|
171
|
-
body
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
172
|
+
body = response.body
|
173
|
+
encoding = body.encoding
|
174
|
+
|
175
|
+
# reconstruct content
|
176
|
+
content = stream.join
|
177
|
+
content = content.unpack('m').join if response.headers['Content-Transfer-Encoding'] == 'binary'
|
178
|
+
content = content.force_encoding(encoding)
|
179
|
+
|
180
|
+
# return byte stream
|
181
|
+
return content if @config.return_binary_data == true
|
182
|
+
|
183
|
+
# return file instead of binary data
|
184
|
+
content_disposition = response.headers['Content-Disposition']
|
185
|
+
if content_disposition && content_disposition =~ /filename=/i
|
186
|
+
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
187
|
+
prefix = sanitize_filename(filename)
|
176
188
|
else
|
177
|
-
|
178
|
-
content_disposition = response.headers['Content-Disposition']
|
179
|
-
if content_disposition && content_disposition =~ /filename=/i
|
180
|
-
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
181
|
-
prefix = sanitize_filename(filename)
|
182
|
-
else
|
183
|
-
prefix = 'download-'
|
184
|
-
end
|
185
|
-
prefix = prefix + '-' unless prefix.end_with?('-')
|
186
|
-
encoding = body.encoding
|
187
|
-
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
188
|
-
tempfile.write(stream.join.force_encoding(encoding))
|
189
|
-
tempfile.close
|
190
|
-
config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
191
|
-
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
192
|
-
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
193
|
-
"explicitly with `tempfile.delete`"
|
194
|
-
tempfile
|
189
|
+
prefix = 'download-'
|
195
190
|
end
|
191
|
+
prefix = prefix + '-' unless prefix.end_with?('-')
|
192
|
+
|
193
|
+
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
194
|
+
tempfile.write(content)
|
195
|
+
tempfile.close
|
196
|
+
|
197
|
+
config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
198
|
+
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
199
|
+
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
200
|
+
"explicitly with `tempfile.delete`"
|
201
|
+
tempfile
|
196
202
|
end
|
197
203
|
|
198
204
|
def connection(opts)
|
@@ -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.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -40,6 +40,9 @@ module Coinbase::Client
|
|
40
40
|
# The JSON-encoded ABI of the contract.
|
41
41
|
attr_accessor :abi
|
42
42
|
|
43
|
+
# The amount to send to the contract for a payable method
|
44
|
+
attr_accessor :amount
|
45
|
+
|
43
46
|
attr_accessor :transaction
|
44
47
|
|
45
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -53,6 +56,7 @@ module Coinbase::Client
|
|
53
56
|
:'method' => :'method',
|
54
57
|
:'args' => :'args',
|
55
58
|
:'abi' => :'abi',
|
59
|
+
:'amount' => :'amount',
|
56
60
|
:'transaction' => :'transaction'
|
57
61
|
}
|
58
62
|
end
|
@@ -73,6 +77,7 @@ module Coinbase::Client
|
|
73
77
|
:'method' => :'String',
|
74
78
|
:'args' => :'String',
|
75
79
|
:'abi' => :'String',
|
80
|
+
:'amount' => :'String',
|
76
81
|
:'transaction' => :'Transaction'
|
77
82
|
}
|
78
83
|
end
|
@@ -144,6 +149,12 @@ module Coinbase::Client
|
|
144
149
|
self.abi = attributes[:'abi']
|
145
150
|
end
|
146
151
|
|
152
|
+
if attributes.key?(:'amount')
|
153
|
+
self.amount = attributes[:'amount']
|
154
|
+
else
|
155
|
+
self.amount = nil
|
156
|
+
end
|
157
|
+
|
147
158
|
if attributes.key?(:'transaction')
|
148
159
|
self.transaction = attributes[:'transaction']
|
149
160
|
else
|
@@ -184,6 +195,10 @@ module Coinbase::Client
|
|
184
195
|
invalid_properties.push('invalid value for "args", args cannot be nil.')
|
185
196
|
end
|
186
197
|
|
198
|
+
if @amount.nil?
|
199
|
+
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
200
|
+
end
|
201
|
+
|
187
202
|
if @transaction.nil?
|
188
203
|
invalid_properties.push('invalid value for "transaction", transaction cannot be nil.')
|
189
204
|
end
|
@@ -202,6 +217,7 @@ module Coinbase::Client
|
|
202
217
|
return false if @contract_address.nil?
|
203
218
|
return false if @method.nil?
|
204
219
|
return false if @args.nil?
|
220
|
+
return false if @amount.nil?
|
205
221
|
return false if @transaction.nil?
|
206
222
|
true
|
207
223
|
end
|
@@ -219,6 +235,7 @@ module Coinbase::Client
|
|
219
235
|
method == o.method &&
|
220
236
|
args == o.args &&
|
221
237
|
abi == o.abi &&
|
238
|
+
amount == o.amount &&
|
222
239
|
transaction == o.transaction
|
223
240
|
end
|
224
241
|
|
@@ -231,7 +248,7 @@ module Coinbase::Client
|
|
231
248
|
# Calculates hash code according to all attributes.
|
232
249
|
# @return [Integer] Hash code
|
233
250
|
def hash
|
234
|
-
[network_id, wallet_id, address_id, contract_invocation_id, contract_address, method, args, abi, transaction].hash
|
251
|
+
[network_id, wallet_id, address_id, contract_invocation_id, contract_address, method, args, abi, amount, transaction].hash
|
235
252
|
end
|
236
253
|
|
237
254
|
# Builds the object from hash
|