crypto_apis 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +51 -15
- data/docs/BroadcastLocallySignedTransactionR.md +24 -0
- data/docs/BroadcastLocallySignedTransactionRB.md +20 -0
- data/docs/BroadcastLocallySignedTransactionRBData.md +18 -0
- data/docs/BroadcastLocallySignedTransactionRBDataItem.md +22 -0
- data/docs/BroadcastLocallySignedTransactionRData.md +18 -0
- data/docs/BroadcastLocallySignedTransactionRI.md +18 -0
- data/docs/BroadcastTransactionFail.md +24 -0
- data/docs/BroadcastTransactionFailData.md +22 -0
- data/docs/BroadcastTransactionFailDataItem.md +24 -0
- data/docs/BroadcastTransactionSuccess.md +24 -0
- data/docs/BroadcastTransactionSuccessData.md +22 -0
- data/docs/BroadcastTransactionSuccessDataItem.md +22 -0
- data/docs/CreateCoinsTransactionRequestFromAddressRBDataItem.md +6 -2
- data/docs/CreateCoinsTransactionRequestFromAddressRI.md +4 -0
- data/docs/CreateCoinsTransactionRequestFromWalletRBDataItem.md +7 -3
- data/docs/{CreateCoinsTransactionRequestFromWalletRBDataItemDestinations.md → CreateCoinsTransactionRequestFromWalletRBDataItemRecipients.md} +3 -3
- data/docs/CreateCoinsTransactionRequestFromWalletRI.md +4 -0
- data/docs/CreateTokensTransactionRequestFromAddressRBDataItem.md +6 -2
- data/docs/CreateTokensTransactionRequestFromAddressRI.md +4 -0
- data/docs/FeaturesApi.md +167 -0
- data/docs/{ListReceivingAddressesR.md → GenerateDepositAddressR.md} +3 -3
- data/docs/{GenerateReceivingAddressRB.md → GenerateDepositAddressRB.md} +3 -3
- data/docs/GenerateDepositAddressRBData.md +18 -0
- data/docs/{GenerateReceivingAddressRBDataItem.md → GenerateDepositAddressRBDataItem.md} +2 -2
- data/docs/GenerateDepositAddressRData.md +18 -0
- data/docs/{GenerateReceivingAddressRI.md → GenerateDepositAddressRI.md} +2 -2
- data/docs/GeneratingApi.md +16 -16
- data/docs/GetAddressDetailsRIConfirmedBalance.md +2 -2
- data/docs/GetAddressDetailsRITotalReceived.md +2 -2
- data/docs/GetAddressDetailsRITotalSpent.md +2 -2
- data/docs/GetBlockDetailsByBlockHashRIBS.md +2 -0
- data/docs/GetBlockDetailsByBlockHashRIBSBSC.md +36 -0
- data/docs/GetBlockDetailsByBlockHeightRIBS.md +2 -0
- data/docs/GetBlockDetailsByBlockHeightRIBSBSC.md +34 -0
- data/docs/GetLatestMinedBlockRIBS.md +2 -0
- data/docs/GetLatestMinedBlockRIBSBSC.md +34 -0
- data/docs/GetTransactionDetailsByTransactionIDRIBS.md +2 -0
- data/docs/GetTransactionDetailsByTransactionIDRIBSBSC.md +28 -0
- data/docs/GetTransactionDetailsByTransactionIDRIBSBSCGasPrice.md +20 -0
- data/docs/GetTransactionDetailsByTransactionIDRIFee.md +1 -1
- data/docs/InformativeApi.md +15 -15
- data/docs/{GenerateReceivingAddressR.md → ListDepositAddressesR.md} +3 -3
- data/docs/{ListReceivingAddressesRData.md → ListDepositAddressesRData.md} +3 -3
- data/docs/{ListReceivingAddressesRI.md → ListDepositAddressesRI.md} +2 -2
- data/docs/ListTransactionsByAddressRIBS.md +2 -0
- data/docs/ListTransactionsByAddressRIBSBSC.md +30 -0
- data/docs/ListTransactionsByBlockHashRIBS.md +2 -0
- data/docs/ListTransactionsByBlockHashRIBSBSC.md +30 -0
- data/docs/ListTransactionsByBlockHashRIFee.md +1 -1
- data/docs/ListTransactionsByBlockHeightRIBS.md +2 -0
- data/docs/ListTransactionsByBlockHeightRIBSBSC.md +28 -0
- data/docs/ListTransactionsByBlockHeightRIBSBSCGasPrice.md +20 -0
- data/docs/ListXRPRippleTransactionsByAddressRI.md +2 -4
- data/docs/TransactionRequestApproval.md +24 -0
- data/docs/TransactionRequestApprovalData.md +22 -0
- data/docs/TransactionRequestApprovalDataItem.md +28 -0
- data/docs/TransactionRequestBroadcasted.md +24 -0
- data/docs/TransactionRequestBroadcastedData.md +22 -0
- data/docs/TransactionRequestBroadcastedDataItem.md +30 -0
- data/docs/TransactionRequestFail.md +24 -0
- data/docs/TransactionRequestFailData.md +22 -0
- data/docs/TransactionRequestFailDataItem.md +30 -0
- data/docs/TransactionRequestMined.md +24 -0
- data/docs/TransactionRequestMinedData.md +22 -0
- data/docs/TransactionRequestRejection.md +24 -0
- data/docs/TransactionRequestRejectionData.md +22 -0
- data/docs/TransactionRequestRejectionDataItem.md +28 -0
- data/docs/TransactionsApi.md +10 -10
- data/docs/XRPRippleApi.md +3 -1
- data/lib/crypto_apis.rb +46 -11
- data/lib/crypto_apis/api/features_api.rb +194 -0
- data/lib/crypto_apis/api/generating_api.rb +17 -17
- data/lib/crypto_apis/api/informative_api.rb +18 -18
- data/lib/crypto_apis/api/transactions_api.rb +10 -10
- data/lib/crypto_apis/api/unified_endpoints_api.rb +7 -7
- data/lib/crypto_apis/api/xrp_ripple_api.rb +7 -0
- data/lib/crypto_apis/models/broadcast_locally_signed_transaction_r.rb +263 -0
- data/lib/crypto_apis/models/broadcast_locally_signed_transaction_r_data.rb +223 -0
- data/lib/crypto_apis/models/broadcast_locally_signed_transaction_rb.rb +233 -0
- data/lib/crypto_apis/models/broadcast_locally_signed_transaction_rb_data.rb +223 -0
- data/lib/crypto_apis/models/broadcast_locally_signed_transaction_rb_data_item.rb +249 -0
- data/lib/crypto_apis/models/broadcast_locally_signed_transaction_ri.rb +224 -0
- data/lib/crypto_apis/models/broadcast_transaction_fail.rb +268 -0
- data/lib/crypto_apis/models/broadcast_transaction_fail_data.rb +254 -0
- data/lib/crypto_apis/models/broadcast_transaction_fail_data_item.rb +270 -0
- data/lib/crypto_apis/models/broadcast_transaction_success.rb +268 -0
- data/lib/crypto_apis/models/broadcast_transaction_success_data.rb +254 -0
- data/lib/crypto_apis/models/broadcast_transaction_success_data_item.rb +255 -0
- data/lib/crypto_apis/models/create_coins_transaction_request_from_address_rb_data_item.rb +30 -10
- data/lib/crypto_apis/models/create_coins_transaction_request_from_address_ri.rb +21 -1
- data/lib/crypto_apis/models/create_coins_transaction_request_from_wallet_rb_data_item.rb +38 -18
- data/lib/crypto_apis/models/{create_coins_transaction_request_from_wallet_rb_data_item_destinations.rb → create_coins_transaction_request_from_wallet_rb_data_item_recipients.rb} +4 -4
- data/lib/crypto_apis/models/create_coins_transaction_request_from_wallet_ri.rb +21 -1
- data/lib/crypto_apis/models/create_tokens_transaction_request_from_address_rb_data_item.rb +30 -10
- data/lib/crypto_apis/models/create_tokens_transaction_request_from_address_ri.rb +31 -1
- data/lib/crypto_apis/models/{list_receiving_addresses_r.rb → generate_deposit_address_r.rb} +4 -4
- data/lib/crypto_apis/models/{generate_receiving_address_r_data.rb → generate_deposit_address_r_data.rb} +4 -4
- data/lib/crypto_apis/models/{generate_receiving_address_rb.rb → generate_deposit_address_rb.rb} +4 -4
- data/lib/crypto_apis/models/{generate_receiving_address_rb_data.rb → generate_deposit_address_rb_data.rb} +4 -4
- data/lib/crypto_apis/models/{generate_receiving_address_rb_data_item.rb → generate_deposit_address_rb_data_item.rb} +3 -3
- data/lib/crypto_apis/models/{list_receiving_addresses_ri.rb → generate_deposit_address_ri.rb} +3 -3
- data/lib/crypto_apis/models/get_address_details_ri_confirmed_balance.rb +0 -1
- data/lib/crypto_apis/models/get_address_details_ri_total_received.rb +0 -1
- data/lib/crypto_apis/models/get_address_details_ri_total_spent.rb +0 -1
- data/lib/crypto_apis/models/get_block_details_by_block_hash_ribs.rb +1 -0
- data/lib/crypto_apis/models/get_block_details_by_block_hash_ribsbsc.rb +361 -0
- data/lib/crypto_apis/models/get_block_details_by_block_height_ribs.rb +1 -0
- data/lib/crypto_apis/models/get_block_details_by_block_height_ribsbsc.rb +345 -0
- data/lib/crypto_apis/models/get_latest_mined_block_ribs.rb +1 -0
- data/lib/crypto_apis/models/get_latest_mined_block_ribsbsc.rb +345 -0
- data/lib/crypto_apis/models/get_transaction_details_by_transaction_idri_fee.rb +0 -1
- data/lib/crypto_apis/models/get_transaction_details_by_transaction_idribs.rb +1 -0
- data/lib/crypto_apis/models/get_transaction_details_by_transaction_idribsbsc.rb +299 -0
- data/lib/crypto_apis/models/get_transaction_details_by_transaction_idribsbsc_gas_price.rb +238 -0
- data/lib/crypto_apis/models/{generate_receiving_address_r.rb → list_deposit_addresses_r.rb} +4 -4
- data/lib/crypto_apis/models/{list_receiving_addresses_r_data.rb → list_deposit_addresses_r_data.rb} +4 -4
- data/lib/crypto_apis/models/{generate_receiving_address_ri.rb → list_deposit_addresses_ri.rb} +3 -3
- data/lib/crypto_apis/models/list_transactions_by_address_ribs.rb +1 -0
- data/lib/crypto_apis/models/list_transactions_by_address_ribsbsc.rb +314 -0
- data/lib/crypto_apis/models/list_transactions_by_block_hash_ri_fee.rb +0 -1
- data/lib/crypto_apis/models/list_transactions_by_block_hash_ribs.rb +1 -0
- data/lib/crypto_apis/models/list_transactions_by_block_hash_ribsbsc.rb +314 -0
- data/lib/crypto_apis/models/list_transactions_by_block_height_ribs.rb +1 -0
- data/lib/crypto_apis/models/list_transactions_by_block_height_ribsbsc.rb +299 -0
- data/lib/crypto_apis/models/list_transactions_by_block_height_ribsbsc_gas_price.rb +238 -0
- data/lib/crypto_apis/models/list_xrp_ripple_transactions_by_address_ri.rb +1 -16
- data/lib/crypto_apis/models/transaction_request_approval.rb +268 -0
- data/lib/crypto_apis/models/transaction_request_approval_data.rb +254 -0
- data/lib/crypto_apis/models/transaction_request_approval_data_item.rb +300 -0
- data/lib/crypto_apis/models/transaction_request_broadcasted.rb +268 -0
- data/lib/crypto_apis/models/transaction_request_broadcasted_data.rb +254 -0
- data/lib/crypto_apis/models/transaction_request_broadcasted_data_item.rb +315 -0
- data/lib/crypto_apis/models/transaction_request_fail.rb +268 -0
- data/lib/crypto_apis/models/transaction_request_fail_data.rb +254 -0
- data/lib/crypto_apis/models/transaction_request_fail_data_item.rb +315 -0
- data/lib/crypto_apis/models/transaction_request_mined.rb +268 -0
- data/lib/crypto_apis/models/transaction_request_mined_data.rb +254 -0
- data/lib/crypto_apis/models/transaction_request_rejection.rb +268 -0
- data/lib/crypto_apis/models/transaction_request_rejection_data.rb +254 -0
- data/lib/crypto_apis/models/transaction_request_rejection_data_item.rb +300 -0
- data/lib/crypto_apis/version.rb +1 -1
- data/spec/api/{validating_api_spec.rb → features_api_spec.rb} +21 -6
- data/spec/api/generating_api_spec.rb +5 -5
- data/spec/api/informative_api_spec.rb +5 -5
- data/spec/api/transactions_api_spec.rb +1 -1
- data/spec/api/xrp_ripple_api_spec.rb +1 -0
- data/spec/models/broadcast_locally_signed_transaction_r_data_spec.rb +34 -0
- data/spec/models/broadcast_locally_signed_transaction_r_spec.rb +52 -0
- data/spec/models/broadcast_locally_signed_transaction_rb_data_item_spec.rb +46 -0
- data/spec/models/broadcast_locally_signed_transaction_rb_data_spec.rb +34 -0
- data/spec/models/broadcast_locally_signed_transaction_rb_spec.rb +40 -0
- data/spec/models/broadcast_locally_signed_transaction_ri_spec.rb +34 -0
- data/spec/models/broadcast_transaction_fail_data_item_spec.rb +52 -0
- data/spec/models/broadcast_transaction_fail_data_spec.rb +46 -0
- data/spec/models/broadcast_transaction_fail_spec.rb +52 -0
- data/spec/models/broadcast_transaction_success_data_item_spec.rb +46 -0
- data/spec/models/broadcast_transaction_success_data_spec.rb +46 -0
- data/spec/models/broadcast_transaction_success_spec.rb +52 -0
- data/spec/models/create_coins_transaction_request_from_address_rb_data_item_spec.rb +13 -1
- data/spec/models/create_coins_transaction_request_from_address_ri_spec.rb +12 -0
- data/spec/models/{create_coins_transaction_request_from_wallet_rb_data_item_destinations_spec.rb → create_coins_transaction_request_from_wallet_rb_data_item_recipients_spec.rb} +6 -6
- data/spec/models/create_coins_transaction_request_from_wallet_rb_data_item_spec.rb +13 -1
- data/spec/models/create_coins_transaction_request_from_wallet_ri_spec.rb +12 -0
- data/spec/models/create_tokens_transaction_request_from_address_rb_data_item_spec.rb +13 -1
- data/spec/models/create_tokens_transaction_request_from_address_ri_spec.rb +12 -0
- data/spec/models/{generate_receiving_address_r_data_spec.rb → generate_deposit_address_r_data_spec.rb} +6 -6
- data/spec/models/{list_receiving_addresses_r_spec.rb → generate_deposit_address_r_spec.rb} +6 -6
- data/spec/models/{generate_receiving_address_rb_data_item_spec.rb → generate_deposit_address_rb_data_item_spec.rb} +6 -6
- data/spec/models/{generate_receiving_address_rb_data_spec.rb → generate_deposit_address_rb_data_spec.rb} +6 -6
- data/spec/models/{generate_receiving_address_rb_spec.rb → generate_deposit_address_rb_spec.rb} +6 -6
- data/spec/models/{list_receiving_addresses_ri_spec.rb → generate_deposit_address_ri_spec.rb} +6 -6
- data/spec/models/get_block_details_by_block_hash_ribsbsc_spec.rb +88 -0
- data/spec/models/get_block_details_by_block_height_ribsbsc_spec.rb +82 -0
- data/spec/models/get_latest_mined_block_ribsbsc_spec.rb +82 -0
- data/spec/models/get_transaction_details_by_transaction_idribsbsc_gas_price_spec.rb +40 -0
- data/spec/models/get_transaction_details_by_transaction_idribsbsc_spec.rb +64 -0
- data/spec/models/{list_receiving_addresses_r_data_spec.rb → list_deposit_addresses_r_data_spec.rb} +6 -6
- data/spec/models/{generate_receiving_address_r_spec.rb → list_deposit_addresses_r_spec.rb} +6 -6
- data/spec/models/{generate_receiving_address_ri_spec.rb → list_deposit_addresses_ri_spec.rb} +6 -6
- data/spec/models/list_transactions_by_address_ribsbsc_spec.rb +70 -0
- data/spec/models/list_transactions_by_block_hash_ribsbsc_spec.rb +70 -0
- data/spec/models/list_transactions_by_block_height_ribsbsc_gas_price_spec.rb +40 -0
- data/spec/models/list_transactions_by_block_height_ribsbsc_spec.rb +64 -0
- data/spec/models/list_xrp_ripple_transactions_by_address_ri_spec.rb +0 -6
- data/spec/models/transaction_request_approval_data_item_spec.rb +64 -0
- data/spec/models/transaction_request_approval_data_spec.rb +46 -0
- data/spec/models/transaction_request_approval_spec.rb +52 -0
- data/spec/models/transaction_request_broadcasted_data_item_spec.rb +70 -0
- data/spec/models/transaction_request_broadcasted_data_spec.rb +46 -0
- data/spec/models/transaction_request_broadcasted_spec.rb +52 -0
- data/spec/models/transaction_request_fail_data_item_spec.rb +70 -0
- data/spec/models/transaction_request_fail_data_spec.rb +46 -0
- data/spec/models/transaction_request_fail_spec.rb +52 -0
- data/spec/models/transaction_request_mined_data_spec.rb +46 -0
- data/spec/models/transaction_request_mined_spec.rb +52 -0
- data/spec/models/transaction_request_rejection_data_item_spec.rb +64 -0
- data/spec/models/transaction_request_rejection_data_spec.rb +46 -0
- data/spec/models/transaction_request_rejection_spec.rb +52 -0
- metadata +186 -46
- data/docs/GenerateReceivingAddressRBData.md +0 -18
- data/docs/GenerateReceivingAddressRData.md +0 -18
- data/docs/ValidatingApi.md +0 -87
- data/lib/crypto_apis/api/validating_api.rb +0 -108
@@ -19,36 +19,36 @@ module CryptoApis
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
# Generate
|
22
|
+
# Generate Deposit Address
|
23
23
|
# Through this endpoint customers can generate a new Receiving/Deposit Addresses into their Wallet.
|
24
24
|
# @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
|
25
25
|
# @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\", \"rinkeby\" are test networks.
|
26
26
|
# @param wallet_id [String] Represents the unique ID of the specific Wallet.
|
27
27
|
# @param [Hash] opts the optional parameters
|
28
28
|
# @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
|
29
|
-
# @option opts [
|
30
|
-
# @return [
|
31
|
-
def
|
32
|
-
data, _status_code, _headers =
|
29
|
+
# @option opts [GenerateDepositAddressRB] :generate_deposit_address_rb
|
30
|
+
# @return [GenerateDepositAddressR]
|
31
|
+
def generate_deposit_address(blockchain, network, wallet_id, opts = {})
|
32
|
+
data, _status_code, _headers = generate_deposit_address_with_http_info(blockchain, network, wallet_id, opts)
|
33
33
|
data
|
34
34
|
end
|
35
35
|
|
36
|
-
# Generate
|
36
|
+
# Generate Deposit Address
|
37
37
|
# Through this endpoint customers can generate a new Receiving/Deposit Addresses into their Wallet.
|
38
38
|
# @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
|
39
39
|
# @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\", \"rinkeby\" are test networks.
|
40
40
|
# @param wallet_id [String] Represents the unique ID of the specific Wallet.
|
41
41
|
# @param [Hash] opts the optional parameters
|
42
42
|
# @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
|
43
|
-
# @option opts [
|
44
|
-
# @return [Array<(
|
45
|
-
def
|
43
|
+
# @option opts [GenerateDepositAddressRB] :generate_deposit_address_rb
|
44
|
+
# @return [Array<(GenerateDepositAddressR, Integer, Hash)>] GenerateDepositAddressR data, response status code and response headers
|
45
|
+
def generate_deposit_address_with_http_info(blockchain, network, wallet_id, opts = {})
|
46
46
|
if @api_client.config.debugging
|
47
|
-
@api_client.config.logger.debug 'Calling API: GeneratingApi.
|
47
|
+
@api_client.config.logger.debug 'Calling API: GeneratingApi.generate_deposit_address ...'
|
48
48
|
end
|
49
49
|
# verify the required parameter 'blockchain' is set
|
50
50
|
if @api_client.config.client_side_validation && blockchain.nil?
|
51
|
-
fail ArgumentError, "Missing the required parameter 'blockchain' when calling GeneratingApi.
|
51
|
+
fail ArgumentError, "Missing the required parameter 'blockchain' when calling GeneratingApi.generate_deposit_address"
|
52
52
|
end
|
53
53
|
# verify enum value
|
54
54
|
allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum"]
|
@@ -57,7 +57,7 @@ module CryptoApis
|
|
57
57
|
end
|
58
58
|
# verify the required parameter 'network' is set
|
59
59
|
if @api_client.config.client_side_validation && network.nil?
|
60
|
-
fail ArgumentError, "Missing the required parameter 'network' when calling GeneratingApi.
|
60
|
+
fail ArgumentError, "Missing the required parameter 'network' when calling GeneratingApi.generate_deposit_address"
|
61
61
|
end
|
62
62
|
# verify enum value
|
63
63
|
allowable_values = ["mainnet", "testnet"]
|
@@ -66,7 +66,7 @@ module CryptoApis
|
|
66
66
|
end
|
67
67
|
# verify the required parameter 'wallet_id' is set
|
68
68
|
if @api_client.config.client_side_validation && wallet_id.nil?
|
69
|
-
fail ArgumentError, "Missing the required parameter 'wallet_id' when calling GeneratingApi.
|
69
|
+
fail ArgumentError, "Missing the required parameter 'wallet_id' when calling GeneratingApi.generate_deposit_address"
|
70
70
|
end
|
71
71
|
# resource path
|
72
72
|
local_var_path = '/wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'walletId' + '}', CGI.escape(wallet_id.to_s))
|
@@ -86,16 +86,16 @@ module CryptoApis
|
|
86
86
|
form_params = opts[:form_params] || {}
|
87
87
|
|
88
88
|
# http body (model)
|
89
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'
|
89
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'generate_deposit_address_rb'])
|
90
90
|
|
91
91
|
# return_type
|
92
|
-
return_type = opts[:debug_return_type] || '
|
92
|
+
return_type = opts[:debug_return_type] || 'GenerateDepositAddressR'
|
93
93
|
|
94
94
|
# auth_names
|
95
95
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
96
96
|
|
97
97
|
new_options = opts.merge(
|
98
|
-
:operation => :"GeneratingApi.
|
98
|
+
:operation => :"GeneratingApi.generate_deposit_address",
|
99
99
|
:header_params => header_params,
|
100
100
|
:query_params => query_params,
|
101
101
|
:form_params => form_params,
|
@@ -106,7 +106,7 @@ module CryptoApis
|
|
106
106
|
|
107
107
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
108
108
|
if @api_client.config.debugging
|
109
|
-
@api_client.config.logger.debug "API called: GeneratingApi#
|
109
|
+
@api_client.config.logger.debug "API called: GeneratingApi#generate_deposit_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
110
110
|
end
|
111
111
|
return data, status_code, headers
|
112
112
|
end
|
@@ -107,34 +107,34 @@ module CryptoApis
|
|
107
107
|
return data, status_code, headers
|
108
108
|
end
|
109
109
|
|
110
|
-
# List
|
111
|
-
# Through this endpoint customers can pull a list of Deposit Addresses they have already generated.
|
110
|
+
# List Deposit Addresses
|
111
|
+
# Through this endpoint customers can pull a list of Deposit/Receiving Addresses they have already generated. {note}Please note that listing data from the same type will apply pagination on the results.{/note}
|
112
112
|
# @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
|
113
113
|
# @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\", \"rinkeby\" are test networks.
|
114
114
|
# @param wallet_id [String] Represents the unique ID of the specific Wallet.
|
115
115
|
# @param [Hash] opts the optional parameters
|
116
116
|
# @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
|
117
|
-
# @return [
|
118
|
-
def
|
119
|
-
data, _status_code, _headers =
|
117
|
+
# @return [ListDepositAddressesR]
|
118
|
+
def list_deposit_addresses(blockchain, network, wallet_id, opts = {})
|
119
|
+
data, _status_code, _headers = list_deposit_addresses_with_http_info(blockchain, network, wallet_id, opts)
|
120
120
|
data
|
121
121
|
end
|
122
122
|
|
123
|
-
# List
|
124
|
-
# Through this endpoint customers can pull a list of Deposit Addresses they have already generated.
|
123
|
+
# List Deposit Addresses
|
124
|
+
# Through this endpoint customers can pull a list of Deposit/Receiving Addresses they have already generated. {note}Please note that listing data from the same type will apply pagination on the results.{/note}
|
125
125
|
# @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
|
126
126
|
# @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\", \"rinkeby\" are test networks.
|
127
127
|
# @param wallet_id [String] Represents the unique ID of the specific Wallet.
|
128
128
|
# @param [Hash] opts the optional parameters
|
129
129
|
# @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
|
130
|
-
# @return [Array<(
|
131
|
-
def
|
130
|
+
# @return [Array<(ListDepositAddressesR, Integer, Hash)>] ListDepositAddressesR data, response status code and response headers
|
131
|
+
def list_deposit_addresses_with_http_info(blockchain, network, wallet_id, opts = {})
|
132
132
|
if @api_client.config.debugging
|
133
|
-
@api_client.config.logger.debug 'Calling API: InformativeApi.
|
133
|
+
@api_client.config.logger.debug 'Calling API: InformativeApi.list_deposit_addresses ...'
|
134
134
|
end
|
135
135
|
# verify the required parameter 'blockchain' is set
|
136
136
|
if @api_client.config.client_side_validation && blockchain.nil?
|
137
|
-
fail ArgumentError, "Missing the required parameter 'blockchain' when calling InformativeApi.
|
137
|
+
fail ArgumentError, "Missing the required parameter 'blockchain' when calling InformativeApi.list_deposit_addresses"
|
138
138
|
end
|
139
139
|
# verify enum value
|
140
140
|
allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum"]
|
@@ -143,7 +143,7 @@ module CryptoApis
|
|
143
143
|
end
|
144
144
|
# verify the required parameter 'network' is set
|
145
145
|
if @api_client.config.client_side_validation && network.nil?
|
146
|
-
fail ArgumentError, "Missing the required parameter 'network' when calling InformativeApi.
|
146
|
+
fail ArgumentError, "Missing the required parameter 'network' when calling InformativeApi.list_deposit_addresses"
|
147
147
|
end
|
148
148
|
# verify enum value
|
149
149
|
allowable_values = ["mainnet", "testnet"]
|
@@ -152,7 +152,7 @@ module CryptoApis
|
|
152
152
|
end
|
153
153
|
# verify the required parameter 'wallet_id' is set
|
154
154
|
if @api_client.config.client_side_validation && wallet_id.nil?
|
155
|
-
fail ArgumentError, "Missing the required parameter 'wallet_id' when calling InformativeApi.
|
155
|
+
fail ArgumentError, "Missing the required parameter 'wallet_id' when calling InformativeApi.list_deposit_addresses"
|
156
156
|
end
|
157
157
|
# resource path
|
158
158
|
local_var_path = '/wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'walletId' + '}', CGI.escape(wallet_id.to_s))
|
@@ -173,13 +173,13 @@ module CryptoApis
|
|
173
173
|
post_body = opts[:debug_body]
|
174
174
|
|
175
175
|
# return_type
|
176
|
-
return_type = opts[:debug_return_type] || '
|
176
|
+
return_type = opts[:debug_return_type] || 'ListDepositAddressesR'
|
177
177
|
|
178
178
|
# auth_names
|
179
179
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
180
180
|
|
181
181
|
new_options = opts.merge(
|
182
|
-
:operation => :"InformativeApi.
|
182
|
+
:operation => :"InformativeApi.list_deposit_addresses",
|
183
183
|
:header_params => header_params,
|
184
184
|
:query_params => query_params,
|
185
185
|
:form_params => form_params,
|
@@ -190,7 +190,7 @@ module CryptoApis
|
|
190
190
|
|
191
191
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
192
192
|
if @api_client.config.debugging
|
193
|
-
@api_client.config.logger.debug "API called: InformativeApi#
|
193
|
+
@api_client.config.logger.debug "API called: InformativeApi#list_deposit_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
194
194
|
end
|
195
195
|
return data, status_code, headers
|
196
196
|
end
|
@@ -227,7 +227,7 @@ module CryptoApis
|
|
227
227
|
fail ArgumentError, "Missing the required parameter 'blockchain' when calling InformativeApi.list_supported_tokens"
|
228
228
|
end
|
229
229
|
# verify enum value
|
230
|
-
allowable_values = ["bitcoin", "
|
230
|
+
allowable_values = ["bitcoin", "ethereum"]
|
231
231
|
if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
|
232
232
|
fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
|
233
233
|
end
|
@@ -236,7 +236,7 @@ module CryptoApis
|
|
236
236
|
fail ArgumentError, "Missing the required parameter 'network' when calling InformativeApi.list_supported_tokens"
|
237
237
|
end
|
238
238
|
# verify enum value
|
239
|
-
allowable_values = ["mainnet", "testnet"
|
239
|
+
allowable_values = ["mainnet", "testnet"]
|
240
240
|
if @api_client.config.client_side_validation && !allowable_values.include?(network)
|
241
241
|
fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
|
242
242
|
end
|
@@ -211,37 +211,33 @@ module CryptoApis
|
|
211
211
|
|
212
212
|
# Create Tokens Transaction Request from Address
|
213
213
|
# Through this endpoint users can make a single token transaction. {warning}This applies only to **fungible** tokens, **not** NFTs (non-fungible tokens).{/warning} {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note} {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}
|
214
|
-
# @param address [String] Defines the specific source address for the transaction.
|
215
214
|
# @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
|
216
215
|
# @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\", \"rinkeby\" are test networks.
|
216
|
+
# @param sender_address [String] Defines the specific source address for the transaction.
|
217
217
|
# @param wallet_id [String] Defines the unique ID of the Wallet.
|
218
218
|
# @param [Hash] opts the optional parameters
|
219
219
|
# @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
|
220
220
|
# @option opts [CreateTokensTransactionRequestFromAddressRB] :create_tokens_transaction_request_from_address_rb
|
221
221
|
# @return [CreateTokensTransactionRequestFromAddressR]
|
222
|
-
def create_tokens_transaction_request_from_address(
|
223
|
-
data, _status_code, _headers = create_tokens_transaction_request_from_address_with_http_info(
|
222
|
+
def create_tokens_transaction_request_from_address(blockchain, network, sender_address, wallet_id, opts = {})
|
223
|
+
data, _status_code, _headers = create_tokens_transaction_request_from_address_with_http_info(blockchain, network, sender_address, wallet_id, opts)
|
224
224
|
data
|
225
225
|
end
|
226
226
|
|
227
227
|
# Create Tokens Transaction Request from Address
|
228
228
|
# Through this endpoint users can make a single token transaction. {warning}This applies only to **fungible** tokens, **not** NFTs (non-fungible tokens).{/warning} {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note} {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}
|
229
|
-
# @param address [String] Defines the specific source address for the transaction.
|
230
229
|
# @param blockchain [String] Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
|
231
230
|
# @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\", \"rinkeby\" are test networks.
|
231
|
+
# @param sender_address [String] Defines the specific source address for the transaction.
|
232
232
|
# @param wallet_id [String] Defines the unique ID of the Wallet.
|
233
233
|
# @param [Hash] opts the optional parameters
|
234
234
|
# @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
|
235
235
|
# @option opts [CreateTokensTransactionRequestFromAddressRB] :create_tokens_transaction_request_from_address_rb
|
236
236
|
# @return [Array<(CreateTokensTransactionRequestFromAddressR, Integer, Hash)>] CreateTokensTransactionRequestFromAddressR data, response status code and response headers
|
237
|
-
def create_tokens_transaction_request_from_address_with_http_info(
|
237
|
+
def create_tokens_transaction_request_from_address_with_http_info(blockchain, network, sender_address, wallet_id, opts = {})
|
238
238
|
if @api_client.config.debugging
|
239
239
|
@api_client.config.logger.debug 'Calling API: TransactionsApi.create_tokens_transaction_request_from_address ...'
|
240
240
|
end
|
241
|
-
# verify the required parameter 'address' is set
|
242
|
-
if @api_client.config.client_side_validation && address.nil?
|
243
|
-
fail ArgumentError, "Missing the required parameter 'address' when calling TransactionsApi.create_tokens_transaction_request_from_address"
|
244
|
-
end
|
245
241
|
# verify the required parameter 'blockchain' is set
|
246
242
|
if @api_client.config.client_side_validation && blockchain.nil?
|
247
243
|
fail ArgumentError, "Missing the required parameter 'blockchain' when calling TransactionsApi.create_tokens_transaction_request_from_address"
|
@@ -260,12 +256,16 @@ module CryptoApis
|
|
260
256
|
if @api_client.config.client_side_validation && !allowable_values.include?(network)
|
261
257
|
fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
|
262
258
|
end
|
259
|
+
# verify the required parameter 'sender_address' is set
|
260
|
+
if @api_client.config.client_side_validation && sender_address.nil?
|
261
|
+
fail ArgumentError, "Missing the required parameter 'sender_address' when calling TransactionsApi.create_tokens_transaction_request_from_address"
|
262
|
+
end
|
263
263
|
# verify the required parameter 'wallet_id' is set
|
264
264
|
if @api_client.config.client_side_validation && wallet_id.nil?
|
265
265
|
fail ArgumentError, "Missing the required parameter 'wallet_id' when calling TransactionsApi.create_tokens_transaction_request_from_address"
|
266
266
|
end
|
267
267
|
# resource path
|
268
|
-
local_var_path = '/wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{
|
268
|
+
local_var_path = '/wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{senderAddress}/token-transaction-requests'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'senderAddress' + '}', CGI.escape(sender_address.to_s)).sub('{' + 'walletId' + '}', CGI.escape(wallet_id.to_s))
|
269
269
|
|
270
270
|
# query parameters
|
271
271
|
query_params = opts[:query_params] || {}
|
@@ -137,7 +137,7 @@ module CryptoApis
|
|
137
137
|
fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.get_block_details_by_block_hash"
|
138
138
|
end
|
139
139
|
# verify enum value
|
140
|
-
allowable_values = ["bitcoin", "ethereum", "ethereum-classic", "bitcoin-cash", "litecoin", "dogecoin", "dash"]
|
140
|
+
allowable_values = ["bitcoin", "ethereum", "ethereum-classic", "bitcoin-cash", "litecoin", "dogecoin", "dash", "binance-smart-chain"]
|
141
141
|
if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
|
142
142
|
fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
|
143
143
|
end
|
@@ -225,7 +225,7 @@ module CryptoApis
|
|
225
225
|
fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.get_block_details_by_block_height"
|
226
226
|
end
|
227
227
|
# verify enum value
|
228
|
-
allowable_values = ["bitcoin", "ethereum", "ethereum-classic", "bitcoin-cash", "litecoin", "dogecoin", "dash"]
|
228
|
+
allowable_values = ["bitcoin", "ethereum", "ethereum-classic", "bitcoin-cash", "litecoin", "dogecoin", "dash", "binance-smart-chain"]
|
229
229
|
if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
|
230
230
|
fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
|
231
231
|
end
|
@@ -393,7 +393,7 @@ module CryptoApis
|
|
393
393
|
fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.get_latest_mined_block"
|
394
394
|
end
|
395
395
|
# verify enum value
|
396
|
-
allowable_values = ["bitcoin", "ethereum", "ethereum-classic", "bitcoin-cash", "litecoin", "dogecoin", "dash"]
|
396
|
+
allowable_values = ["bitcoin", "ethereum", "ethereum-classic", "bitcoin-cash", "litecoin", "dogecoin", "dash", "binance-smart-chain"]
|
397
397
|
if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
|
398
398
|
fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
|
399
399
|
end
|
@@ -477,7 +477,7 @@ module CryptoApis
|
|
477
477
|
fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.get_transaction_details_by_transaction_id"
|
478
478
|
end
|
479
479
|
# verify enum value
|
480
|
-
allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic"]
|
480
|
+
allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic", "binance-smart-chain"]
|
481
481
|
if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
|
482
482
|
fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
|
483
483
|
end
|
@@ -569,7 +569,7 @@ module CryptoApis
|
|
569
569
|
fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.list_transactions_by_address"
|
570
570
|
end
|
571
571
|
# verify enum value
|
572
|
-
allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum-classic", "ethereum"]
|
572
|
+
allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum-classic", "ethereum", "binance-smart-chain"]
|
573
573
|
if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
|
574
574
|
fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
|
575
575
|
end
|
@@ -663,7 +663,7 @@ module CryptoApis
|
|
663
663
|
fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.list_transactions_by_block_hash"
|
664
664
|
end
|
665
665
|
# verify enum value
|
666
|
-
allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic"]
|
666
|
+
allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic", "binance-smart-chain"]
|
667
667
|
if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
|
668
668
|
fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
|
669
669
|
end
|
@@ -757,7 +757,7 @@ module CryptoApis
|
|
757
757
|
fail ArgumentError, "Missing the required parameter 'blockchain' when calling UnifiedEndpointsApi.list_transactions_by_block_height"
|
758
758
|
end
|
759
759
|
# verify enum value
|
760
|
-
allowable_values = ["bitcoin", "ethereum", "dash", "dogecoin", "litecoin", "bitcoin-cash", "ethereum-classic"]
|
760
|
+
allowable_values = ["bitcoin", "ethereum", "dash", "dogecoin", "litecoin", "bitcoin-cash", "ethereum-classic", "binance-smart-chain"]
|
761
761
|
if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
|
762
762
|
fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
|
763
763
|
end
|
@@ -406,6 +406,7 @@ module CryptoApis
|
|
406
406
|
# @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
|
407
407
|
# @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. (default to 50)
|
408
408
|
# @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0)
|
409
|
+
# @option opts [String] :transaction_type
|
409
410
|
# @return [ListXRPRippleTransactionsByAddressR]
|
410
411
|
def list_xrp__ripple_transactions_by_address(network, address, opts = {})
|
411
412
|
data, _status_code, _headers = list_xrp__ripple_transactions_by_address_with_http_info(network, address, opts)
|
@@ -420,6 +421,7 @@ module CryptoApis
|
|
420
421
|
# @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
|
421
422
|
# @option opts [Integer] :limit Defines how many items should be returned in the response per page basis.
|
422
423
|
# @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items.
|
424
|
+
# @option opts [String] :transaction_type
|
423
425
|
# @return [Array<(ListXRPRippleTransactionsByAddressR, Integer, Hash)>] ListXRPRippleTransactionsByAddressR data, response status code and response headers
|
424
426
|
def list_xrp__ripple_transactions_by_address_with_http_info(network, address, opts = {})
|
425
427
|
if @api_client.config.debugging
|
@@ -438,6 +440,10 @@ module CryptoApis
|
|
438
440
|
if @api_client.config.client_side_validation && address.nil?
|
439
441
|
fail ArgumentError, "Missing the required parameter 'address' when calling XRPRippleApi.list_xrp__ripple_transactions_by_address"
|
440
442
|
end
|
443
|
+
allowable_values = ["account-set", "account-delete", "check-cancel", "check-cash", "check-create", "deposit-preauth", "escrow-cancel", "escrow-create", "escrow-finish", "offer-cancel", "offer-create", "payment", "payment-channel-claim", "payment-channel-create", "payment-channel-fund", "set-regular-key", "signer-list-set", "ticket-create", "trust-set"]
|
444
|
+
if @api_client.config.client_side_validation && opts[:'transaction_type'] && !allowable_values.include?(opts[:'transaction_type'])
|
445
|
+
fail ArgumentError, "invalid value for \"transaction_type\", must be one of #{allowable_values}"
|
446
|
+
end
|
441
447
|
# resource path
|
442
448
|
local_var_path = '/blockchain-data/xrp-specific/{network}/addresses/{address}/transactions'.sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'address' + '}', CGI.escape(address.to_s))
|
443
449
|
|
@@ -446,6 +452,7 @@ module CryptoApis
|
|
446
452
|
query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?
|
447
453
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
448
454
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
455
|
+
query_params[:'transactionType'] = opts[:'transaction_type'] if !opts[:'transaction_type'].nil?
|
449
456
|
|
450
457
|
# header parameters
|
451
458
|
header_params = opts[:header_params] || {}
|
@@ -0,0 +1,263 @@
|
|
1
|
+
=begin
|
2
|
+
#CryptoAPIs
|
3
|
+
|
4
|
+
#Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of their blockchain applications. Crypto APIs 2.0 provides unified endpoints and data, raw data, automatic tokens and coins forwardings, callback functionalities, and much more.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: developers@cryptoapis.io
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.2.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module CryptoApis
|
17
|
+
class BroadcastLocallySignedTransactionR
|
18
|
+
# Specifies the version of the API that incorporates this endpoint.
|
19
|
+
attr_accessor :api_version
|
20
|
+
|
21
|
+
# Defines the ID of the request. The `requestId` is generated by Crypto APIs and it's unique for every request.
|
22
|
+
attr_accessor :request_id
|
23
|
+
|
24
|
+
# In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
|
25
|
+
attr_accessor :context
|
26
|
+
|
27
|
+
attr_accessor :data
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'api_version' => :'apiVersion',
|
33
|
+
:'request_id' => :'requestId',
|
34
|
+
:'context' => :'context',
|
35
|
+
:'data' => :'data'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Returns all the JSON keys this model knows about
|
40
|
+
def self.acceptable_attributes
|
41
|
+
attribute_map.values
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute type mapping.
|
45
|
+
def self.openapi_types
|
46
|
+
{
|
47
|
+
:'api_version' => :'String',
|
48
|
+
:'request_id' => :'String',
|
49
|
+
:'context' => :'String',
|
50
|
+
:'data' => :'BroadcastLocallySignedTransactionRData'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# List of attributes with nullable: true
|
55
|
+
def self.openapi_nullable
|
56
|
+
Set.new([
|
57
|
+
])
|
58
|
+
end
|
59
|
+
|
60
|
+
# Initializes the object
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
62
|
+
def initialize(attributes = {})
|
63
|
+
if (!attributes.is_a?(Hash))
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `CryptoApis::BroadcastLocallySignedTransactionR` initialize method"
|
65
|
+
end
|
66
|
+
|
67
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
69
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `CryptoApis::BroadcastLocallySignedTransactionR`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
71
|
+
end
|
72
|
+
h[k.to_sym] = v
|
73
|
+
}
|
74
|
+
|
75
|
+
if attributes.key?(:'api_version')
|
76
|
+
self.api_version = attributes[:'api_version']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.key?(:'request_id')
|
80
|
+
self.request_id = attributes[:'request_id']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.key?(:'context')
|
84
|
+
self.context = attributes[:'context']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.key?(:'data')
|
88
|
+
self.data = attributes[:'data']
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
93
|
+
# @return Array for valid properties with the reasons
|
94
|
+
def list_invalid_properties
|
95
|
+
invalid_properties = Array.new
|
96
|
+
if @api_version.nil?
|
97
|
+
invalid_properties.push('invalid value for "api_version", api_version cannot be nil.')
|
98
|
+
end
|
99
|
+
|
100
|
+
if @request_id.nil?
|
101
|
+
invalid_properties.push('invalid value for "request_id", request_id cannot be nil.')
|
102
|
+
end
|
103
|
+
|
104
|
+
if @data.nil?
|
105
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
106
|
+
end
|
107
|
+
|
108
|
+
invalid_properties
|
109
|
+
end
|
110
|
+
|
111
|
+
# Check to see if the all the properties in the model are valid
|
112
|
+
# @return true if the model is valid
|
113
|
+
def valid?
|
114
|
+
return false if @api_version.nil?
|
115
|
+
return false if @request_id.nil?
|
116
|
+
return false if @data.nil?
|
117
|
+
true
|
118
|
+
end
|
119
|
+
|
120
|
+
# Checks equality by comparing each attribute.
|
121
|
+
# @param [Object] Object to be compared
|
122
|
+
def ==(o)
|
123
|
+
return true if self.equal?(o)
|
124
|
+
self.class == o.class &&
|
125
|
+
api_version == o.api_version &&
|
126
|
+
request_id == o.request_id &&
|
127
|
+
context == o.context &&
|
128
|
+
data == o.data
|
129
|
+
end
|
130
|
+
|
131
|
+
# @see the `==` method
|
132
|
+
# @param [Object] Object to be compared
|
133
|
+
def eql?(o)
|
134
|
+
self == o
|
135
|
+
end
|
136
|
+
|
137
|
+
# Calculates hash code according to all attributes.
|
138
|
+
# @return [Integer] Hash code
|
139
|
+
def hash
|
140
|
+
[api_version, request_id, context, data].hash
|
141
|
+
end
|
142
|
+
|
143
|
+
# Builds the object from hash
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
+
# @return [Object] Returns the model itself
|
146
|
+
def self.build_from_hash(attributes)
|
147
|
+
new.build_from_hash(attributes)
|
148
|
+
end
|
149
|
+
|
150
|
+
# Builds the object from hash
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
152
|
+
# @return [Object] Returns the model itself
|
153
|
+
def build_from_hash(attributes)
|
154
|
+
return nil unless attributes.is_a?(Hash)
|
155
|
+
self.class.openapi_types.each_pair do |key, type|
|
156
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
157
|
+
self.send("#{key}=", nil)
|
158
|
+
elsif type =~ /\AArray<(.*)>/i
|
159
|
+
# check to ensure the input is an array given that the attribute
|
160
|
+
# is documented as an array but the input is not
|
161
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
162
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
163
|
+
end
|
164
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
165
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
self
|
170
|
+
end
|
171
|
+
|
172
|
+
# Deserializes the data based on type
|
173
|
+
# @param string type Data type
|
174
|
+
# @param string value Value to be deserialized
|
175
|
+
# @return [Object] Deserialized data
|
176
|
+
def _deserialize(type, value)
|
177
|
+
case type.to_sym
|
178
|
+
when :Time
|
179
|
+
Time.parse(value)
|
180
|
+
when :Date
|
181
|
+
Date.parse(value)
|
182
|
+
when :String
|
183
|
+
value.to_s
|
184
|
+
when :Integer
|
185
|
+
value.to_i
|
186
|
+
when :Float
|
187
|
+
value.to_f
|
188
|
+
when :Boolean
|
189
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
190
|
+
true
|
191
|
+
else
|
192
|
+
false
|
193
|
+
end
|
194
|
+
when :Object
|
195
|
+
# generic object (usually a Hash), return directly
|
196
|
+
value
|
197
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
198
|
+
inner_type = Regexp.last_match[:inner_type]
|
199
|
+
value.map { |v| _deserialize(inner_type, v) }
|
200
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
201
|
+
k_type = Regexp.last_match[:k_type]
|
202
|
+
v_type = Regexp.last_match[:v_type]
|
203
|
+
{}.tap do |hash|
|
204
|
+
value.each do |k, v|
|
205
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
206
|
+
end
|
207
|
+
end
|
208
|
+
else # model
|
209
|
+
# models (e.g. Pet) or oneOf
|
210
|
+
klass = CryptoApis.const_get(type)
|
211
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
# Returns the string representation of the object
|
216
|
+
# @return [String] String presentation of the object
|
217
|
+
def to_s
|
218
|
+
to_hash.to_s
|
219
|
+
end
|
220
|
+
|
221
|
+
# to_body is an alias to to_hash (backward compatibility)
|
222
|
+
# @return [Hash] Returns the object in the form of hash
|
223
|
+
def to_body
|
224
|
+
to_hash
|
225
|
+
end
|
226
|
+
|
227
|
+
# Returns the object in the form of hash
|
228
|
+
# @return [Hash] Returns the object in the form of hash
|
229
|
+
def to_hash
|
230
|
+
hash = {}
|
231
|
+
self.class.attribute_map.each_pair do |attr, param|
|
232
|
+
value = self.send(attr)
|
233
|
+
if value.nil?
|
234
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
235
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
236
|
+
end
|
237
|
+
|
238
|
+
hash[param] = _to_hash(value)
|
239
|
+
end
|
240
|
+
hash
|
241
|
+
end
|
242
|
+
|
243
|
+
# Outputs non-array value in the form of hash
|
244
|
+
# For object, use to_hash. Otherwise, just return the value
|
245
|
+
# @param [Object] value Any valid value
|
246
|
+
# @return [Hash] Returns the value in the form of hash
|
247
|
+
def _to_hash(value)
|
248
|
+
if value.is_a?(Array)
|
249
|
+
value.compact.map { |v| _to_hash(v) }
|
250
|
+
elsif value.is_a?(Hash)
|
251
|
+
{}.tap do |hash|
|
252
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
253
|
+
end
|
254
|
+
elsif value.respond_to? :to_hash
|
255
|
+
value.to_hash
|
256
|
+
else
|
257
|
+
value
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
end
|
262
|
+
|
263
|
+
end
|