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
@@ -0,0 +1,345 @@
|
|
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
|
+
# Binance Smart Chain
|
18
|
+
class GetLatestMinedBlockRIBSBSC
|
19
|
+
# Represents a mathematical value of how hard it is to find a valid hash for this block.
|
20
|
+
attr_accessor :difficulty
|
21
|
+
|
22
|
+
# Represents a random value that can be adjusted to satisfy the proof of work
|
23
|
+
attr_accessor :nonce
|
24
|
+
|
25
|
+
# Represents the total size of the block in Bytes.
|
26
|
+
attr_accessor :size
|
27
|
+
|
28
|
+
# Numeric representation of the block extra data
|
29
|
+
attr_accessor :extra_data
|
30
|
+
|
31
|
+
# Numeric representation of the block gas limit
|
32
|
+
attr_accessor :gas_limit
|
33
|
+
|
34
|
+
# Numeric representation of the block gas used
|
35
|
+
attr_accessor :gas_used
|
36
|
+
|
37
|
+
# Numeric representation of the block gas limit
|
38
|
+
attr_accessor :mined_in_seconds
|
39
|
+
|
40
|
+
# Numeric representation of the block sha3 uncles
|
41
|
+
attr_accessor :sha3_uncles
|
42
|
+
|
43
|
+
# Numeric representation of the block total difficulty
|
44
|
+
attr_accessor :total_difficulty
|
45
|
+
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'difficulty' => :'difficulty',
|
50
|
+
:'nonce' => :'nonce',
|
51
|
+
:'size' => :'size',
|
52
|
+
:'extra_data' => :'extraData',
|
53
|
+
:'gas_limit' => :'gasLimit',
|
54
|
+
:'gas_used' => :'gasUsed',
|
55
|
+
:'mined_in_seconds' => :'minedInSeconds',
|
56
|
+
:'sha3_uncles' => :'sha3Uncles',
|
57
|
+
:'total_difficulty' => :'totalDifficulty'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Returns all the JSON keys this model knows about
|
62
|
+
def self.acceptable_attributes
|
63
|
+
attribute_map.values
|
64
|
+
end
|
65
|
+
|
66
|
+
# Attribute type mapping.
|
67
|
+
def self.openapi_types
|
68
|
+
{
|
69
|
+
:'difficulty' => :'String',
|
70
|
+
:'nonce' => :'Integer',
|
71
|
+
:'size' => :'Integer',
|
72
|
+
:'extra_data' => :'String',
|
73
|
+
:'gas_limit' => :'String',
|
74
|
+
:'gas_used' => :'String',
|
75
|
+
:'mined_in_seconds' => :'Integer',
|
76
|
+
:'sha3_uncles' => :'String',
|
77
|
+
:'total_difficulty' => :'String'
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
81
|
+
# List of attributes with nullable: true
|
82
|
+
def self.openapi_nullable
|
83
|
+
Set.new([
|
84
|
+
])
|
85
|
+
end
|
86
|
+
|
87
|
+
# Initializes the object
|
88
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
89
|
+
def initialize(attributes = {})
|
90
|
+
if (!attributes.is_a?(Hash))
|
91
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `CryptoApis::GetLatestMinedBlockRIBSBSC` initialize method"
|
92
|
+
end
|
93
|
+
|
94
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
95
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
96
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
97
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `CryptoApis::GetLatestMinedBlockRIBSBSC`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
98
|
+
end
|
99
|
+
h[k.to_sym] = v
|
100
|
+
}
|
101
|
+
|
102
|
+
if attributes.key?(:'difficulty')
|
103
|
+
self.difficulty = attributes[:'difficulty']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'nonce')
|
107
|
+
self.nonce = attributes[:'nonce']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'size')
|
111
|
+
self.size = attributes[:'size']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'extra_data')
|
115
|
+
self.extra_data = attributes[:'extra_data']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'gas_limit')
|
119
|
+
self.gas_limit = attributes[:'gas_limit']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'gas_used')
|
123
|
+
self.gas_used = attributes[:'gas_used']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.key?(:'mined_in_seconds')
|
127
|
+
self.mined_in_seconds = attributes[:'mined_in_seconds']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.key?(:'sha3_uncles')
|
131
|
+
self.sha3_uncles = attributes[:'sha3_uncles']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.key?(:'total_difficulty')
|
135
|
+
self.total_difficulty = attributes[:'total_difficulty']
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
140
|
+
# @return Array for valid properties with the reasons
|
141
|
+
def list_invalid_properties
|
142
|
+
invalid_properties = Array.new
|
143
|
+
if @difficulty.nil?
|
144
|
+
invalid_properties.push('invalid value for "difficulty", difficulty cannot be nil.')
|
145
|
+
end
|
146
|
+
|
147
|
+
if @nonce.nil?
|
148
|
+
invalid_properties.push('invalid value for "nonce", nonce cannot be nil.')
|
149
|
+
end
|
150
|
+
|
151
|
+
if @size.nil?
|
152
|
+
invalid_properties.push('invalid value for "size", size cannot be nil.')
|
153
|
+
end
|
154
|
+
|
155
|
+
if @extra_data.nil?
|
156
|
+
invalid_properties.push('invalid value for "extra_data", extra_data cannot be nil.')
|
157
|
+
end
|
158
|
+
|
159
|
+
if @gas_limit.nil?
|
160
|
+
invalid_properties.push('invalid value for "gas_limit", gas_limit cannot be nil.')
|
161
|
+
end
|
162
|
+
|
163
|
+
if @gas_used.nil?
|
164
|
+
invalid_properties.push('invalid value for "gas_used", gas_used cannot be nil.')
|
165
|
+
end
|
166
|
+
|
167
|
+
if @mined_in_seconds.nil?
|
168
|
+
invalid_properties.push('invalid value for "mined_in_seconds", mined_in_seconds cannot be nil.')
|
169
|
+
end
|
170
|
+
|
171
|
+
if @sha3_uncles.nil?
|
172
|
+
invalid_properties.push('invalid value for "sha3_uncles", sha3_uncles cannot be nil.')
|
173
|
+
end
|
174
|
+
|
175
|
+
if @total_difficulty.nil?
|
176
|
+
invalid_properties.push('invalid value for "total_difficulty", total_difficulty cannot be nil.')
|
177
|
+
end
|
178
|
+
|
179
|
+
invalid_properties
|
180
|
+
end
|
181
|
+
|
182
|
+
# Check to see if the all the properties in the model are valid
|
183
|
+
# @return true if the model is valid
|
184
|
+
def valid?
|
185
|
+
return false if @difficulty.nil?
|
186
|
+
return false if @nonce.nil?
|
187
|
+
return false if @size.nil?
|
188
|
+
return false if @extra_data.nil?
|
189
|
+
return false if @gas_limit.nil?
|
190
|
+
return false if @gas_used.nil?
|
191
|
+
return false if @mined_in_seconds.nil?
|
192
|
+
return false if @sha3_uncles.nil?
|
193
|
+
return false if @total_difficulty.nil?
|
194
|
+
true
|
195
|
+
end
|
196
|
+
|
197
|
+
# Checks equality by comparing each attribute.
|
198
|
+
# @param [Object] Object to be compared
|
199
|
+
def ==(o)
|
200
|
+
return true if self.equal?(o)
|
201
|
+
self.class == o.class &&
|
202
|
+
difficulty == o.difficulty &&
|
203
|
+
nonce == o.nonce &&
|
204
|
+
size == o.size &&
|
205
|
+
extra_data == o.extra_data &&
|
206
|
+
gas_limit == o.gas_limit &&
|
207
|
+
gas_used == o.gas_used &&
|
208
|
+
mined_in_seconds == o.mined_in_seconds &&
|
209
|
+
sha3_uncles == o.sha3_uncles &&
|
210
|
+
total_difficulty == o.total_difficulty
|
211
|
+
end
|
212
|
+
|
213
|
+
# @see the `==` method
|
214
|
+
# @param [Object] Object to be compared
|
215
|
+
def eql?(o)
|
216
|
+
self == o
|
217
|
+
end
|
218
|
+
|
219
|
+
# Calculates hash code according to all attributes.
|
220
|
+
# @return [Integer] Hash code
|
221
|
+
def hash
|
222
|
+
[difficulty, nonce, size, extra_data, gas_limit, gas_used, mined_in_seconds, sha3_uncles, total_difficulty].hash
|
223
|
+
end
|
224
|
+
|
225
|
+
# Builds the object from hash
|
226
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
227
|
+
# @return [Object] Returns the model itself
|
228
|
+
def self.build_from_hash(attributes)
|
229
|
+
new.build_from_hash(attributes)
|
230
|
+
end
|
231
|
+
|
232
|
+
# Builds the object from hash
|
233
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
234
|
+
# @return [Object] Returns the model itself
|
235
|
+
def build_from_hash(attributes)
|
236
|
+
return nil unless attributes.is_a?(Hash)
|
237
|
+
self.class.openapi_types.each_pair do |key, type|
|
238
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
239
|
+
self.send("#{key}=", nil)
|
240
|
+
elsif type =~ /\AArray<(.*)>/i
|
241
|
+
# check to ensure the input is an array given that the attribute
|
242
|
+
# is documented as an array but the input is not
|
243
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
244
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
245
|
+
end
|
246
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
247
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
self
|
252
|
+
end
|
253
|
+
|
254
|
+
# Deserializes the data based on type
|
255
|
+
# @param string type Data type
|
256
|
+
# @param string value Value to be deserialized
|
257
|
+
# @return [Object] Deserialized data
|
258
|
+
def _deserialize(type, value)
|
259
|
+
case type.to_sym
|
260
|
+
when :Time
|
261
|
+
Time.parse(value)
|
262
|
+
when :Date
|
263
|
+
Date.parse(value)
|
264
|
+
when :String
|
265
|
+
value.to_s
|
266
|
+
when :Integer
|
267
|
+
value.to_i
|
268
|
+
when :Float
|
269
|
+
value.to_f
|
270
|
+
when :Boolean
|
271
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
272
|
+
true
|
273
|
+
else
|
274
|
+
false
|
275
|
+
end
|
276
|
+
when :Object
|
277
|
+
# generic object (usually a Hash), return directly
|
278
|
+
value
|
279
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
280
|
+
inner_type = Regexp.last_match[:inner_type]
|
281
|
+
value.map { |v| _deserialize(inner_type, v) }
|
282
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
283
|
+
k_type = Regexp.last_match[:k_type]
|
284
|
+
v_type = Regexp.last_match[:v_type]
|
285
|
+
{}.tap do |hash|
|
286
|
+
value.each do |k, v|
|
287
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
288
|
+
end
|
289
|
+
end
|
290
|
+
else # model
|
291
|
+
# models (e.g. Pet) or oneOf
|
292
|
+
klass = CryptoApis.const_get(type)
|
293
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
297
|
+
# Returns the string representation of the object
|
298
|
+
# @return [String] String presentation of the object
|
299
|
+
def to_s
|
300
|
+
to_hash.to_s
|
301
|
+
end
|
302
|
+
|
303
|
+
# to_body is an alias to to_hash (backward compatibility)
|
304
|
+
# @return [Hash] Returns the object in the form of hash
|
305
|
+
def to_body
|
306
|
+
to_hash
|
307
|
+
end
|
308
|
+
|
309
|
+
# Returns the object in the form of hash
|
310
|
+
# @return [Hash] Returns the object in the form of hash
|
311
|
+
def to_hash
|
312
|
+
hash = {}
|
313
|
+
self.class.attribute_map.each_pair do |attr, param|
|
314
|
+
value = self.send(attr)
|
315
|
+
if value.nil?
|
316
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
317
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
318
|
+
end
|
319
|
+
|
320
|
+
hash[param] = _to_hash(value)
|
321
|
+
end
|
322
|
+
hash
|
323
|
+
end
|
324
|
+
|
325
|
+
# Outputs non-array value in the form of hash
|
326
|
+
# For object, use to_hash. Otherwise, just return the value
|
327
|
+
# @param [Object] value Any valid value
|
328
|
+
# @return [Hash] Returns the value in the form of hash
|
329
|
+
def _to_hash(value)
|
330
|
+
if value.is_a?(Array)
|
331
|
+
value.compact.map { |v| _to_hash(v) }
|
332
|
+
elsif value.is_a?(Hash)
|
333
|
+
{}.tap do |hash|
|
334
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
335
|
+
end
|
336
|
+
elsif value.respond_to? :to_hash
|
337
|
+
value.to_hash
|
338
|
+
else
|
339
|
+
value
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
343
|
+
end
|
344
|
+
|
345
|
+
end
|
@@ -21,6 +21,7 @@ module CryptoApis
|
|
21
21
|
[
|
22
22
|
:'GetTransactionDetailsByTransactionIDRIBSB',
|
23
23
|
:'GetTransactionDetailsByTransactionIDRIBSBC',
|
24
|
+
:'GetTransactionDetailsByTransactionIDRIBSBSC',
|
24
25
|
:'GetTransactionDetailsByTransactionIDRIBSD',
|
25
26
|
:'GetTransactionDetailsByTransactionIDRIBSD2',
|
26
27
|
:'GetTransactionDetailsByTransactionIDRIBSE',
|
@@ -0,0 +1,299 @@
|
|
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
|
+
# Binance Smart Chain
|
18
|
+
class GetTransactionDetailsByTransactionIDRIBSBSC
|
19
|
+
# Numeric representation of the transaction contract
|
20
|
+
attr_accessor :contract
|
21
|
+
|
22
|
+
# String representation of the transaction gas
|
23
|
+
attr_accessor :gas_limit
|
24
|
+
|
25
|
+
attr_accessor :gas_price
|
26
|
+
|
27
|
+
# Numeric representation of the transaction gas used
|
28
|
+
attr_accessor :gas_used
|
29
|
+
|
30
|
+
# Numeric representation of the transaction input
|
31
|
+
attr_accessor :input_data
|
32
|
+
|
33
|
+
# Numeric representation of the transaction nonce
|
34
|
+
attr_accessor :nonce
|
35
|
+
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
def self.attribute_map
|
38
|
+
{
|
39
|
+
:'contract' => :'contract',
|
40
|
+
:'gas_limit' => :'gasLimit',
|
41
|
+
:'gas_price' => :'gasPrice',
|
42
|
+
:'gas_used' => :'gasUsed',
|
43
|
+
:'input_data' => :'inputData',
|
44
|
+
:'nonce' => :'nonce'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Returns all the JSON keys this model knows about
|
49
|
+
def self.acceptable_attributes
|
50
|
+
attribute_map.values
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute type mapping.
|
54
|
+
def self.openapi_types
|
55
|
+
{
|
56
|
+
:'contract' => :'String',
|
57
|
+
:'gas_limit' => :'String',
|
58
|
+
:'gas_price' => :'GetTransactionDetailsByTransactionIDRIBSBSCGasPrice',
|
59
|
+
:'gas_used' => :'String',
|
60
|
+
:'input_data' => :'String',
|
61
|
+
:'nonce' => :'String'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# List of attributes with nullable: true
|
66
|
+
def self.openapi_nullable
|
67
|
+
Set.new([
|
68
|
+
])
|
69
|
+
end
|
70
|
+
|
71
|
+
# Initializes the object
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
73
|
+
def initialize(attributes = {})
|
74
|
+
if (!attributes.is_a?(Hash))
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `CryptoApis::GetTransactionDetailsByTransactionIDRIBSBSC` initialize method"
|
76
|
+
end
|
77
|
+
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `CryptoApis::GetTransactionDetailsByTransactionIDRIBSBSC`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
|
+
end
|
83
|
+
h[k.to_sym] = v
|
84
|
+
}
|
85
|
+
|
86
|
+
if attributes.key?(:'contract')
|
87
|
+
self.contract = attributes[:'contract']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'gas_limit')
|
91
|
+
self.gas_limit = attributes[:'gas_limit']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'gas_price')
|
95
|
+
self.gas_price = attributes[:'gas_price']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'gas_used')
|
99
|
+
self.gas_used = attributes[:'gas_used']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'input_data')
|
103
|
+
self.input_data = attributes[:'input_data']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'nonce')
|
107
|
+
self.nonce = attributes[:'nonce']
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
112
|
+
# @return Array for valid properties with the reasons
|
113
|
+
def list_invalid_properties
|
114
|
+
invalid_properties = Array.new
|
115
|
+
if @contract.nil?
|
116
|
+
invalid_properties.push('invalid value for "contract", contract cannot be nil.')
|
117
|
+
end
|
118
|
+
|
119
|
+
if @gas_limit.nil?
|
120
|
+
invalid_properties.push('invalid value for "gas_limit", gas_limit cannot be nil.')
|
121
|
+
end
|
122
|
+
|
123
|
+
if @gas_price.nil?
|
124
|
+
invalid_properties.push('invalid value for "gas_price", gas_price cannot be nil.')
|
125
|
+
end
|
126
|
+
|
127
|
+
if @gas_used.nil?
|
128
|
+
invalid_properties.push('invalid value for "gas_used", gas_used cannot be nil.')
|
129
|
+
end
|
130
|
+
|
131
|
+
if @input_data.nil?
|
132
|
+
invalid_properties.push('invalid value for "input_data", input_data cannot be nil.')
|
133
|
+
end
|
134
|
+
|
135
|
+
if @nonce.nil?
|
136
|
+
invalid_properties.push('invalid value for "nonce", nonce cannot be nil.')
|
137
|
+
end
|
138
|
+
|
139
|
+
invalid_properties
|
140
|
+
end
|
141
|
+
|
142
|
+
# Check to see if the all the properties in the model are valid
|
143
|
+
# @return true if the model is valid
|
144
|
+
def valid?
|
145
|
+
return false if @contract.nil?
|
146
|
+
return false if @gas_limit.nil?
|
147
|
+
return false if @gas_price.nil?
|
148
|
+
return false if @gas_used.nil?
|
149
|
+
return false if @input_data.nil?
|
150
|
+
return false if @nonce.nil?
|
151
|
+
true
|
152
|
+
end
|
153
|
+
|
154
|
+
# Checks equality by comparing each attribute.
|
155
|
+
# @param [Object] Object to be compared
|
156
|
+
def ==(o)
|
157
|
+
return true if self.equal?(o)
|
158
|
+
self.class == o.class &&
|
159
|
+
contract == o.contract &&
|
160
|
+
gas_limit == o.gas_limit &&
|
161
|
+
gas_price == o.gas_price &&
|
162
|
+
gas_used == o.gas_used &&
|
163
|
+
input_data == o.input_data &&
|
164
|
+
nonce == o.nonce
|
165
|
+
end
|
166
|
+
|
167
|
+
# @see the `==` method
|
168
|
+
# @param [Object] Object to be compared
|
169
|
+
def eql?(o)
|
170
|
+
self == o
|
171
|
+
end
|
172
|
+
|
173
|
+
# Calculates hash code according to all attributes.
|
174
|
+
# @return [Integer] Hash code
|
175
|
+
def hash
|
176
|
+
[contract, gas_limit, gas_price, gas_used, input_data, nonce].hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Builds the object from hash
|
180
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
181
|
+
# @return [Object] Returns the model itself
|
182
|
+
def self.build_from_hash(attributes)
|
183
|
+
new.build_from_hash(attributes)
|
184
|
+
end
|
185
|
+
|
186
|
+
# Builds the object from hash
|
187
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
188
|
+
# @return [Object] Returns the model itself
|
189
|
+
def build_from_hash(attributes)
|
190
|
+
return nil unless attributes.is_a?(Hash)
|
191
|
+
self.class.openapi_types.each_pair do |key, type|
|
192
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
193
|
+
self.send("#{key}=", nil)
|
194
|
+
elsif type =~ /\AArray<(.*)>/i
|
195
|
+
# check to ensure the input is an array given that the attribute
|
196
|
+
# is documented as an array but the input is not
|
197
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
198
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
199
|
+
end
|
200
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
201
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
self
|
206
|
+
end
|
207
|
+
|
208
|
+
# Deserializes the data based on type
|
209
|
+
# @param string type Data type
|
210
|
+
# @param string value Value to be deserialized
|
211
|
+
# @return [Object] Deserialized data
|
212
|
+
def _deserialize(type, value)
|
213
|
+
case type.to_sym
|
214
|
+
when :Time
|
215
|
+
Time.parse(value)
|
216
|
+
when :Date
|
217
|
+
Date.parse(value)
|
218
|
+
when :String
|
219
|
+
value.to_s
|
220
|
+
when :Integer
|
221
|
+
value.to_i
|
222
|
+
when :Float
|
223
|
+
value.to_f
|
224
|
+
when :Boolean
|
225
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
226
|
+
true
|
227
|
+
else
|
228
|
+
false
|
229
|
+
end
|
230
|
+
when :Object
|
231
|
+
# generic object (usually a Hash), return directly
|
232
|
+
value
|
233
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
234
|
+
inner_type = Regexp.last_match[:inner_type]
|
235
|
+
value.map { |v| _deserialize(inner_type, v) }
|
236
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
237
|
+
k_type = Regexp.last_match[:k_type]
|
238
|
+
v_type = Regexp.last_match[:v_type]
|
239
|
+
{}.tap do |hash|
|
240
|
+
value.each do |k, v|
|
241
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
242
|
+
end
|
243
|
+
end
|
244
|
+
else # model
|
245
|
+
# models (e.g. Pet) or oneOf
|
246
|
+
klass = CryptoApis.const_get(type)
|
247
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
# Returns the string representation of the object
|
252
|
+
# @return [String] String presentation of the object
|
253
|
+
def to_s
|
254
|
+
to_hash.to_s
|
255
|
+
end
|
256
|
+
|
257
|
+
# to_body is an alias to to_hash (backward compatibility)
|
258
|
+
# @return [Hash] Returns the object in the form of hash
|
259
|
+
def to_body
|
260
|
+
to_hash
|
261
|
+
end
|
262
|
+
|
263
|
+
# Returns the object in the form of hash
|
264
|
+
# @return [Hash] Returns the object in the form of hash
|
265
|
+
def to_hash
|
266
|
+
hash = {}
|
267
|
+
self.class.attribute_map.each_pair do |attr, param|
|
268
|
+
value = self.send(attr)
|
269
|
+
if value.nil?
|
270
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
271
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
272
|
+
end
|
273
|
+
|
274
|
+
hash[param] = _to_hash(value)
|
275
|
+
end
|
276
|
+
hash
|
277
|
+
end
|
278
|
+
|
279
|
+
# Outputs non-array value in the form of hash
|
280
|
+
# For object, use to_hash. Otherwise, just return the value
|
281
|
+
# @param [Object] value Any valid value
|
282
|
+
# @return [Hash] Returns the value in the form of hash
|
283
|
+
def _to_hash(value)
|
284
|
+
if value.is_a?(Array)
|
285
|
+
value.compact.map { |v| _to_hash(v) }
|
286
|
+
elsif value.is_a?(Hash)
|
287
|
+
{}.tap do |hash|
|
288
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
289
|
+
end
|
290
|
+
elsif value.respond_to? :to_hash
|
291
|
+
value.to_hash
|
292
|
+
else
|
293
|
+
value
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
297
|
+
end
|
298
|
+
|
299
|
+
end
|