coinbase-sdk 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/coinbase/address.rb +22 -3
- data/lib/coinbase/address_reputation.rb +67 -0
- 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 +2 -2
- data/lib/coinbase/client/api/contract_events_api.rb +2 -2
- data/lib/coinbase/client/api/contract_invocations_api.rb +5 -5
- data/lib/coinbase/client/api/external_addresses_api.rb +246 -5
- data/lib/coinbase/client/api/fund_api.rb +5 -5
- data/lib/coinbase/client/api/mpc_wallet_stake_api.rb +4 -4
- data/lib/coinbase/client/api/networks_api.rb +2 -2
- data/lib/coinbase/client/api/onchain_identity_api.rb +2 -2
- data/lib/coinbase/client/api/reputation_api.rb +2 -71
- data/lib/coinbase/client/api/server_signers_api.rb +7 -7
- data/lib/coinbase/client/api/smart_contracts_api.rb +169 -26
- data/lib/coinbase/client/api/stake_api.rb +8 -8
- data/lib/coinbase/client/api/trades_api.rb +5 -5
- data/lib/coinbase/client/api/transaction_history_api.rb +2 -2
- data/lib/coinbase/client/api/transfers_api.rb +14 -14
- data/lib/coinbase/client/api/users_api.rb +1 -1
- data/lib/coinbase/client/api/wallets_api.rb +6 -6
- data/lib/coinbase/client/api/webhooks_api.rb +6 -6
- data/lib/coinbase/client/api_client.rb +1 -1
- data/lib/coinbase/client/api_error.rb +1 -1
- data/lib/coinbase/client/configuration.rb +15 -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_reputation.rb +16 -9
- data/lib/coinbase/client/models/address_reputation_metadata.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_transfer_request.rb → broadcast_external_transfer_request.rb} +4 -4
- 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/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 +1 -1
- 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 +1 -1
- data/lib/coinbase/client/models/create_external_transfer_request.rb +273 -0
- data/lib/coinbase/client/models/create_fund_operation_request.rb +2 -2
- data/lib/coinbase/client/models/create_fund_quote_request.rb +2 -2
- 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_smart_contract_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_wallet_webhook_request.rb +1 -1
- data/lib/coinbase/client/models/create_webhook_request.rb +1 -1
- data/lib/coinbase/client/models/crypto_amount.rb +1 -1
- data/lib/coinbase/client/models/deploy_smart_contract_request.rb +1 -1
- data/lib/coinbase/client/models/erc20_transfer_event.rb +1 -1
- data/lib/coinbase/client/models/erc721_transfer_event.rb +1 -1
- data/lib/coinbase/client/models/error.rb +1 -1
- data/lib/coinbase/client/models/ethereum_token_transfer.rb +1 -1
- data/lib/coinbase/client/models/ethereum_transaction.rb +15 -5
- 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/fiat_amount.rb +1 -1
- data/lib/coinbase/client/models/fund_operation.rb +1 -1
- data/lib/coinbase/client/models/fund_operation_fees.rb +1 -1
- data/lib/coinbase/client/models/fund_operation_list.rb +1 -1
- data/lib/coinbase/client/models/fund_quote.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/multi_token_contract_options.rb +1 -1
- data/lib/coinbase/client/models/network.rb +1 -1
- data/lib/coinbase/client/models/network_identifier.rb +1 -1
- data/lib/coinbase/client/models/nft_contract_options.rb +1 -1
- data/lib/coinbase/client/models/onchain_name.rb +1 -1
- data/lib/coinbase/client/models/onchain_name_list.rb +1 -1
- 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/read_contract_request.rb +1 -1
- data/lib/coinbase/client/models/register_smart_contract_request.rb +252 -0
- 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/smart_contract.rb +37 -31
- data/lib/coinbase/client/models/smart_contract_activity_event.rb +386 -0
- data/lib/coinbase/client/models/smart_contract_list.rb +1 -1
- data/lib/coinbase/client/models/smart_contract_options.rb +1 -1
- data/lib/coinbase/client/models/smart_contract_type.rb +3 -2
- data/lib/coinbase/client/models/solidity_value.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/token_contract_options.rb +1 -1
- data/lib/coinbase/client/models/token_transfer_type.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 +2 -37
- data/lib/coinbase/client/models/transfer_list.rb +1 -1
- data/lib/coinbase/client/models/update_smart_contract_request.rb +245 -0
- data/lib/coinbase/client/models/update_webhook_request.rb +1 -1
- data/lib/coinbase/client/models/user.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 +1 -1
- data/lib/coinbase/client/models/webhook_event_type.rb +3 -2
- data/lib/coinbase/client/models/webhook_event_type_filter.rb +2 -1
- data/lib/coinbase/client/models/webhook_list.rb +1 -1
- data/lib/coinbase/client/models/{address_risk.rb → webhook_smart_contract_event_filter.rb} +19 -17
- data/lib/coinbase/client/models/webhook_wallet_activity_filter.rb +8 -1
- data/lib/coinbase/client/version.rb +1 -1
- data/lib/coinbase/client.rb +7 -3
- data/lib/coinbase/errors.rb +8 -0
- data/lib/coinbase/smart_contract.rb +338 -245
- data/lib/coinbase/version.rb +1 -1
- data/lib/coinbase/wallet/data.rb +6 -4
- data/lib/coinbase/wallet.rb +3 -2
- data/lib/coinbase.rb +2 -1
- metadata +12 -7
@@ -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.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -24,11 +24,11 @@ module Coinbase::Client
|
|
24
24
|
# @param wallet_id [String] The ID of the wallet the address belongs to
|
25
25
|
# @param address_id [String] The ID of the address the transfer belongs to
|
26
26
|
# @param transfer_id [String] The ID of the transfer to broadcast
|
27
|
-
# @param
|
27
|
+
# @param broadcast_external_transfer_request [BroadcastExternalTransferRequest]
|
28
28
|
# @param [Hash] opts the optional parameters
|
29
29
|
# @return [Transfer]
|
30
|
-
def broadcast_transfer(wallet_id, address_id, transfer_id,
|
31
|
-
data, _status_code, _headers = broadcast_transfer_with_http_info(wallet_id, address_id, transfer_id,
|
30
|
+
def broadcast_transfer(wallet_id, address_id, transfer_id, broadcast_external_transfer_request, opts = {})
|
31
|
+
data, _status_code, _headers = broadcast_transfer_with_http_info(wallet_id, address_id, transfer_id, broadcast_external_transfer_request, opts)
|
32
32
|
data
|
33
33
|
end
|
34
34
|
|
@@ -37,10 +37,10 @@ module Coinbase::Client
|
|
37
37
|
# @param wallet_id [String] The ID of the wallet the address belongs to
|
38
38
|
# @param address_id [String] The ID of the address the transfer belongs to
|
39
39
|
# @param transfer_id [String] The ID of the transfer to broadcast
|
40
|
-
# @param
|
40
|
+
# @param broadcast_external_transfer_request [BroadcastExternalTransferRequest]
|
41
41
|
# @param [Hash] opts the optional parameters
|
42
42
|
# @return [Array<(Transfer, Integer, Hash)>] Transfer data, response status code and response headers
|
43
|
-
def broadcast_transfer_with_http_info(wallet_id, address_id, transfer_id,
|
43
|
+
def broadcast_transfer_with_http_info(wallet_id, address_id, transfer_id, broadcast_external_transfer_request, opts = {})
|
44
44
|
if @api_client.config.debugging
|
45
45
|
@api_client.config.logger.debug 'Calling API: TransfersApi.broadcast_transfer ...'
|
46
46
|
end
|
@@ -56,9 +56,9 @@ module Coinbase::Client
|
|
56
56
|
if @api_client.config.client_side_validation && transfer_id.nil?
|
57
57
|
fail ArgumentError, "Missing the required parameter 'transfer_id' when calling TransfersApi.broadcast_transfer"
|
58
58
|
end
|
59
|
-
# verify the required parameter '
|
60
|
-
if @api_client.config.client_side_validation &&
|
61
|
-
fail ArgumentError, "Missing the required parameter '
|
59
|
+
# verify the required parameter 'broadcast_external_transfer_request' is set
|
60
|
+
if @api_client.config.client_side_validation && broadcast_external_transfer_request.nil?
|
61
|
+
fail ArgumentError, "Missing the required parameter 'broadcast_external_transfer_request' when calling TransfersApi.broadcast_transfer"
|
62
62
|
end
|
63
63
|
# resource path
|
64
64
|
local_var_path = '/v1/wallets/{wallet_id}/addresses/{address_id}/transfers/{transfer_id}/broadcast'.sub('{' + 'wallet_id' + '}', CGI.escape(wallet_id.to_s)).sub('{' + 'address_id' + '}', CGI.escape(address_id.to_s)).sub('{' + 'transfer_id' + '}', CGI.escape(transfer_id.to_s))
|
@@ -80,13 +80,13 @@ module Coinbase::Client
|
|
80
80
|
form_params = opts[:form_params] || {}
|
81
81
|
|
82
82
|
# http body (model)
|
83
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
83
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(broadcast_external_transfer_request)
|
84
84
|
|
85
85
|
# return_type
|
86
86
|
return_type = opts[:debug_return_type] || 'Transfer'
|
87
87
|
|
88
88
|
# auth_names
|
89
|
-
auth_names = opts[:debug_auth_names] || []
|
89
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
90
90
|
|
91
91
|
new_options = opts.merge(
|
92
92
|
:operation => :"TransfersApi.broadcast_transfer",
|
@@ -166,7 +166,7 @@ module Coinbase::Client
|
|
166
166
|
return_type = opts[:debug_return_type] || 'Transfer'
|
167
167
|
|
168
168
|
# auth_names
|
169
|
-
auth_names = opts[:debug_auth_names] || []
|
169
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
170
170
|
|
171
171
|
new_options = opts.merge(
|
172
172
|
:operation => :"TransfersApi.create_transfer",
|
@@ -241,7 +241,7 @@ module Coinbase::Client
|
|
241
241
|
return_type = opts[:debug_return_type] || 'Transfer'
|
242
242
|
|
243
243
|
# auth_names
|
244
|
-
auth_names = opts[:debug_auth_names] || []
|
244
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
245
245
|
|
246
246
|
new_options = opts.merge(
|
247
247
|
:operation => :"TransfersApi.get_transfer",
|
@@ -320,7 +320,7 @@ module Coinbase::Client
|
|
320
320
|
return_type = opts[:debug_return_type] || 'TransferList'
|
321
321
|
|
322
322
|
# auth_names
|
323
|
-
auth_names = opts[:debug_auth_names] || []
|
323
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
324
324
|
|
325
325
|
new_options = opts.merge(
|
326
326
|
:operation => :"TransfersApi.list_transfers",
|
@@ -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.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -64,7 +64,7 @@ module Coinbase::Client
|
|
64
64
|
return_type = opts[:debug_return_type] || 'Wallet'
|
65
65
|
|
66
66
|
# auth_names
|
67
|
-
auth_names = opts[:debug_auth_names] || []
|
67
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
68
68
|
|
69
69
|
new_options = opts.merge(
|
70
70
|
:operation => :"WalletsApi.create_wallet",
|
@@ -127,7 +127,7 @@ module Coinbase::Client
|
|
127
127
|
return_type = opts[:debug_return_type] || 'Wallet'
|
128
128
|
|
129
129
|
# auth_names
|
130
|
-
auth_names = opts[:debug_auth_names] || []
|
130
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
131
131
|
|
132
132
|
new_options = opts.merge(
|
133
133
|
:operation => :"WalletsApi.get_wallet",
|
@@ -196,7 +196,7 @@ module Coinbase::Client
|
|
196
196
|
return_type = opts[:debug_return_type] || 'Balance'
|
197
197
|
|
198
198
|
# auth_names
|
199
|
-
auth_names = opts[:debug_auth_names] || []
|
199
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
200
200
|
|
201
201
|
new_options = opts.merge(
|
202
202
|
:operation => :"WalletsApi.get_wallet_balance",
|
@@ -259,7 +259,7 @@ module Coinbase::Client
|
|
259
259
|
return_type = opts[:debug_return_type] || 'AddressBalanceList'
|
260
260
|
|
261
261
|
# auth_names
|
262
|
-
auth_names = opts[:debug_auth_names] || []
|
262
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
263
263
|
|
264
264
|
new_options = opts.merge(
|
265
265
|
:operation => :"WalletsApi.list_wallet_balances",
|
@@ -326,7 +326,7 @@ module Coinbase::Client
|
|
326
326
|
return_type = opts[:debug_return_type] || 'WalletList'
|
327
327
|
|
328
328
|
# auth_names
|
329
|
-
auth_names = opts[:debug_auth_names] || []
|
329
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
330
330
|
|
331
331
|
new_options = opts.merge(
|
332
332
|
:operation => :"WalletsApi.list_wallets",
|
@@ -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.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -70,7 +70,7 @@ module Coinbase::Client
|
|
70
70
|
return_type = opts[:debug_return_type] || 'Webhook'
|
71
71
|
|
72
72
|
# auth_names
|
73
|
-
auth_names = opts[:debug_auth_names] || []
|
73
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
74
74
|
|
75
75
|
new_options = opts.merge(
|
76
76
|
:operation => :"WebhooksApi.create_wallet_webhook",
|
@@ -134,7 +134,7 @@ module Coinbase::Client
|
|
134
134
|
return_type = opts[:debug_return_type] || 'Webhook'
|
135
135
|
|
136
136
|
# auth_names
|
137
|
-
auth_names = opts[:debug_auth_names] || []
|
137
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
138
138
|
|
139
139
|
new_options = opts.merge(
|
140
140
|
:operation => :"WebhooksApi.create_webhook",
|
@@ -197,7 +197,7 @@ module Coinbase::Client
|
|
197
197
|
return_type = opts[:debug_return_type]
|
198
198
|
|
199
199
|
# auth_names
|
200
|
-
auth_names = opts[:debug_auth_names] || []
|
200
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
201
201
|
|
202
202
|
new_options = opts.merge(
|
203
203
|
:operation => :"WebhooksApi.delete_webhook",
|
@@ -264,7 +264,7 @@ module Coinbase::Client
|
|
264
264
|
return_type = opts[:debug_return_type] || 'WebhookList'
|
265
265
|
|
266
266
|
# auth_names
|
267
|
-
auth_names = opts[:debug_auth_names] || []
|
267
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
268
268
|
|
269
269
|
new_options = opts.merge(
|
270
270
|
:operation => :"WebhooksApi.list_webhooks",
|
@@ -334,7 +334,7 @@ module Coinbase::Client
|
|
334
334
|
return_type = opts[:debug_return_type] || 'Webhook'
|
335
335
|
|
336
336
|
# auth_names
|
337
|
-
auth_names = opts[:debug_auth_names] || []
|
337
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'session']
|
338
338
|
|
339
339
|
new_options = opts.merge(
|
340
340
|
:operation => :"WebhooksApi.update_webhook",
|
@@ -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.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -248,6 +248,20 @@ module Coinbase::Client
|
|
248
248
|
# Returns Auth Settings hash for api client.
|
249
249
|
def auth_settings
|
250
250
|
{
|
251
|
+
'apiKey' =>
|
252
|
+
{
|
253
|
+
type: 'api_key',
|
254
|
+
in: 'header',
|
255
|
+
key: 'Jwt',
|
256
|
+
value: api_key_with_prefix('Jwt')
|
257
|
+
},
|
258
|
+
'session' =>
|
259
|
+
{
|
260
|
+
type: 'api_key',
|
261
|
+
in: 'header',
|
262
|
+
key: 'Jwt',
|
263
|
+
value: api_key_with_prefix('Jwt')
|
264
|
+
},
|
251
265
|
}
|
252
266
|
end
|
253
267
|
|
@@ -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.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -16,15 +16,15 @@ require 'time'
|
|
16
16
|
module Coinbase::Client
|
17
17
|
# The reputation score with metadata of a blockchain address.
|
18
18
|
class AddressReputation
|
19
|
-
# The
|
20
|
-
attr_accessor :
|
19
|
+
# The score of a wallet address, ranging from -100 to 100. A negative score indicates a bad reputation, while a positive score indicates a good reputation.
|
20
|
+
attr_accessor :score
|
21
21
|
|
22
22
|
attr_accessor :metadata
|
23
23
|
|
24
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
25
|
def self.attribute_map
|
26
26
|
{
|
27
|
-
:'
|
27
|
+
:'score' => :'score',
|
28
28
|
:'metadata' => :'metadata'
|
29
29
|
}
|
30
30
|
end
|
@@ -37,7 +37,7 @@ module Coinbase::Client
|
|
37
37
|
# Attribute type mapping.
|
38
38
|
def self.openapi_types
|
39
39
|
{
|
40
|
-
:'
|
40
|
+
:'score' => :'Integer',
|
41
41
|
:'metadata' => :'AddressReputationMetadata'
|
42
42
|
}
|
43
43
|
end
|
@@ -63,8 +63,10 @@ module Coinbase::Client
|
|
63
63
|
h[k.to_sym] = v
|
64
64
|
}
|
65
65
|
|
66
|
-
if attributes.key?(:'
|
67
|
-
self.
|
66
|
+
if attributes.key?(:'score')
|
67
|
+
self.score = attributes[:'score']
|
68
|
+
else
|
69
|
+
self.score = nil
|
68
70
|
end
|
69
71
|
|
70
72
|
if attributes.key?(:'metadata')
|
@@ -79,6 +81,10 @@ module Coinbase::Client
|
|
79
81
|
def list_invalid_properties
|
80
82
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
81
83
|
invalid_properties = Array.new
|
84
|
+
if @score.nil?
|
85
|
+
invalid_properties.push('invalid value for "score", score cannot be nil.')
|
86
|
+
end
|
87
|
+
|
82
88
|
if @metadata.nil?
|
83
89
|
invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
|
84
90
|
end
|
@@ -90,6 +96,7 @@ module Coinbase::Client
|
|
90
96
|
# @return true if the model is valid
|
91
97
|
def valid?
|
92
98
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
99
|
+
return false if @score.nil?
|
93
100
|
return false if @metadata.nil?
|
94
101
|
true
|
95
102
|
end
|
@@ -99,7 +106,7 @@ module Coinbase::Client
|
|
99
106
|
def ==(o)
|
100
107
|
return true if self.equal?(o)
|
101
108
|
self.class == o.class &&
|
102
|
-
|
109
|
+
score == o.score &&
|
103
110
|
metadata == o.metadata
|
104
111
|
end
|
105
112
|
|
@@ -112,7 +119,7 @@ module Coinbase::Client
|
|
112
119
|
# Calculates hash code according to all attributes.
|
113
120
|
# @return [Integer] Hash code
|
114
121
|
def hash
|
115
|
-
[
|
122
|
+
[score, metadata].hash
|
116
123
|
end
|
117
124
|
|
118
125
|
# Builds the object from hash
|
@@ -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.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Coinbase::Client
|
17
|
-
class
|
17
|
+
class BroadcastExternalTransferRequest
|
18
18
|
# The hex-encoded signed payload of the transfer
|
19
19
|
attr_accessor :signed_payload
|
20
20
|
|
@@ -47,13 +47,13 @@ module Coinbase::Client
|
|
47
47
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
48
|
def initialize(attributes = {})
|
49
49
|
if (!attributes.is_a?(Hash))
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Coinbase::Client::
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Coinbase::Client::BroadcastExternalTransferRequest` initialize method"
|
51
51
|
end
|
52
52
|
|
53
53
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
54
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
55
|
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Coinbase::Client::
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Coinbase::Client::BroadcastExternalTransferRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
57
|
end
|
58
58
|
h[k.to_sym] = v
|
59
59
|
}
|