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.
Files changed (205) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +51 -15
  3. data/docs/BroadcastLocallySignedTransactionR.md +24 -0
  4. data/docs/BroadcastLocallySignedTransactionRB.md +20 -0
  5. data/docs/BroadcastLocallySignedTransactionRBData.md +18 -0
  6. data/docs/BroadcastLocallySignedTransactionRBDataItem.md +22 -0
  7. data/docs/BroadcastLocallySignedTransactionRData.md +18 -0
  8. data/docs/BroadcastLocallySignedTransactionRI.md +18 -0
  9. data/docs/BroadcastTransactionFail.md +24 -0
  10. data/docs/BroadcastTransactionFailData.md +22 -0
  11. data/docs/BroadcastTransactionFailDataItem.md +24 -0
  12. data/docs/BroadcastTransactionSuccess.md +24 -0
  13. data/docs/BroadcastTransactionSuccessData.md +22 -0
  14. data/docs/BroadcastTransactionSuccessDataItem.md +22 -0
  15. data/docs/CreateCoinsTransactionRequestFromAddressRBDataItem.md +6 -2
  16. data/docs/CreateCoinsTransactionRequestFromAddressRI.md +4 -0
  17. data/docs/CreateCoinsTransactionRequestFromWalletRBDataItem.md +7 -3
  18. data/docs/{CreateCoinsTransactionRequestFromWalletRBDataItemDestinations.md → CreateCoinsTransactionRequestFromWalletRBDataItemRecipients.md} +3 -3
  19. data/docs/CreateCoinsTransactionRequestFromWalletRI.md +4 -0
  20. data/docs/CreateTokensTransactionRequestFromAddressRBDataItem.md +6 -2
  21. data/docs/CreateTokensTransactionRequestFromAddressRI.md +4 -0
  22. data/docs/FeaturesApi.md +167 -0
  23. data/docs/{ListReceivingAddressesR.md → GenerateDepositAddressR.md} +3 -3
  24. data/docs/{GenerateReceivingAddressRB.md → GenerateDepositAddressRB.md} +3 -3
  25. data/docs/GenerateDepositAddressRBData.md +18 -0
  26. data/docs/{GenerateReceivingAddressRBDataItem.md → GenerateDepositAddressRBDataItem.md} +2 -2
  27. data/docs/GenerateDepositAddressRData.md +18 -0
  28. data/docs/{GenerateReceivingAddressRI.md → GenerateDepositAddressRI.md} +2 -2
  29. data/docs/GeneratingApi.md +16 -16
  30. data/docs/GetAddressDetailsRIConfirmedBalance.md +2 -2
  31. data/docs/GetAddressDetailsRITotalReceived.md +2 -2
  32. data/docs/GetAddressDetailsRITotalSpent.md +2 -2
  33. data/docs/GetBlockDetailsByBlockHashRIBS.md +2 -0
  34. data/docs/GetBlockDetailsByBlockHashRIBSBSC.md +36 -0
  35. data/docs/GetBlockDetailsByBlockHeightRIBS.md +2 -0
  36. data/docs/GetBlockDetailsByBlockHeightRIBSBSC.md +34 -0
  37. data/docs/GetLatestMinedBlockRIBS.md +2 -0
  38. data/docs/GetLatestMinedBlockRIBSBSC.md +34 -0
  39. data/docs/GetTransactionDetailsByTransactionIDRIBS.md +2 -0
  40. data/docs/GetTransactionDetailsByTransactionIDRIBSBSC.md +28 -0
  41. data/docs/GetTransactionDetailsByTransactionIDRIBSBSCGasPrice.md +20 -0
  42. data/docs/GetTransactionDetailsByTransactionIDRIFee.md +1 -1
  43. data/docs/InformativeApi.md +15 -15
  44. data/docs/{GenerateReceivingAddressR.md → ListDepositAddressesR.md} +3 -3
  45. data/docs/{ListReceivingAddressesRData.md → ListDepositAddressesRData.md} +3 -3
  46. data/docs/{ListReceivingAddressesRI.md → ListDepositAddressesRI.md} +2 -2
  47. data/docs/ListTransactionsByAddressRIBS.md +2 -0
  48. data/docs/ListTransactionsByAddressRIBSBSC.md +30 -0
  49. data/docs/ListTransactionsByBlockHashRIBS.md +2 -0
  50. data/docs/ListTransactionsByBlockHashRIBSBSC.md +30 -0
  51. data/docs/ListTransactionsByBlockHashRIFee.md +1 -1
  52. data/docs/ListTransactionsByBlockHeightRIBS.md +2 -0
  53. data/docs/ListTransactionsByBlockHeightRIBSBSC.md +28 -0
  54. data/docs/ListTransactionsByBlockHeightRIBSBSCGasPrice.md +20 -0
  55. data/docs/ListXRPRippleTransactionsByAddressRI.md +2 -4
  56. data/docs/TransactionRequestApproval.md +24 -0
  57. data/docs/TransactionRequestApprovalData.md +22 -0
  58. data/docs/TransactionRequestApprovalDataItem.md +28 -0
  59. data/docs/TransactionRequestBroadcasted.md +24 -0
  60. data/docs/TransactionRequestBroadcastedData.md +22 -0
  61. data/docs/TransactionRequestBroadcastedDataItem.md +30 -0
  62. data/docs/TransactionRequestFail.md +24 -0
  63. data/docs/TransactionRequestFailData.md +22 -0
  64. data/docs/TransactionRequestFailDataItem.md +30 -0
  65. data/docs/TransactionRequestMined.md +24 -0
  66. data/docs/TransactionRequestMinedData.md +22 -0
  67. data/docs/TransactionRequestRejection.md +24 -0
  68. data/docs/TransactionRequestRejectionData.md +22 -0
  69. data/docs/TransactionRequestRejectionDataItem.md +28 -0
  70. data/docs/TransactionsApi.md +10 -10
  71. data/docs/XRPRippleApi.md +3 -1
  72. data/lib/crypto_apis.rb +46 -11
  73. data/lib/crypto_apis/api/features_api.rb +194 -0
  74. data/lib/crypto_apis/api/generating_api.rb +17 -17
  75. data/lib/crypto_apis/api/informative_api.rb +18 -18
  76. data/lib/crypto_apis/api/transactions_api.rb +10 -10
  77. data/lib/crypto_apis/api/unified_endpoints_api.rb +7 -7
  78. data/lib/crypto_apis/api/xrp_ripple_api.rb +7 -0
  79. data/lib/crypto_apis/models/broadcast_locally_signed_transaction_r.rb +263 -0
  80. data/lib/crypto_apis/models/broadcast_locally_signed_transaction_r_data.rb +223 -0
  81. data/lib/crypto_apis/models/broadcast_locally_signed_transaction_rb.rb +233 -0
  82. data/lib/crypto_apis/models/broadcast_locally_signed_transaction_rb_data.rb +223 -0
  83. data/lib/crypto_apis/models/broadcast_locally_signed_transaction_rb_data_item.rb +249 -0
  84. data/lib/crypto_apis/models/broadcast_locally_signed_transaction_ri.rb +224 -0
  85. data/lib/crypto_apis/models/broadcast_transaction_fail.rb +268 -0
  86. data/lib/crypto_apis/models/broadcast_transaction_fail_data.rb +254 -0
  87. data/lib/crypto_apis/models/broadcast_transaction_fail_data_item.rb +270 -0
  88. data/lib/crypto_apis/models/broadcast_transaction_success.rb +268 -0
  89. data/lib/crypto_apis/models/broadcast_transaction_success_data.rb +254 -0
  90. data/lib/crypto_apis/models/broadcast_transaction_success_data_item.rb +255 -0
  91. data/lib/crypto_apis/models/create_coins_transaction_request_from_address_rb_data_item.rb +30 -10
  92. data/lib/crypto_apis/models/create_coins_transaction_request_from_address_ri.rb +21 -1
  93. data/lib/crypto_apis/models/create_coins_transaction_request_from_wallet_rb_data_item.rb +38 -18
  94. 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
  95. data/lib/crypto_apis/models/create_coins_transaction_request_from_wallet_ri.rb +21 -1
  96. data/lib/crypto_apis/models/create_tokens_transaction_request_from_address_rb_data_item.rb +30 -10
  97. data/lib/crypto_apis/models/create_tokens_transaction_request_from_address_ri.rb +31 -1
  98. data/lib/crypto_apis/models/{list_receiving_addresses_r.rb → generate_deposit_address_r.rb} +4 -4
  99. data/lib/crypto_apis/models/{generate_receiving_address_r_data.rb → generate_deposit_address_r_data.rb} +4 -4
  100. data/lib/crypto_apis/models/{generate_receiving_address_rb.rb → generate_deposit_address_rb.rb} +4 -4
  101. data/lib/crypto_apis/models/{generate_receiving_address_rb_data.rb → generate_deposit_address_rb_data.rb} +4 -4
  102. data/lib/crypto_apis/models/{generate_receiving_address_rb_data_item.rb → generate_deposit_address_rb_data_item.rb} +3 -3
  103. data/lib/crypto_apis/models/{list_receiving_addresses_ri.rb → generate_deposit_address_ri.rb} +3 -3
  104. data/lib/crypto_apis/models/get_address_details_ri_confirmed_balance.rb +0 -1
  105. data/lib/crypto_apis/models/get_address_details_ri_total_received.rb +0 -1
  106. data/lib/crypto_apis/models/get_address_details_ri_total_spent.rb +0 -1
  107. data/lib/crypto_apis/models/get_block_details_by_block_hash_ribs.rb +1 -0
  108. data/lib/crypto_apis/models/get_block_details_by_block_hash_ribsbsc.rb +361 -0
  109. data/lib/crypto_apis/models/get_block_details_by_block_height_ribs.rb +1 -0
  110. data/lib/crypto_apis/models/get_block_details_by_block_height_ribsbsc.rb +345 -0
  111. data/lib/crypto_apis/models/get_latest_mined_block_ribs.rb +1 -0
  112. data/lib/crypto_apis/models/get_latest_mined_block_ribsbsc.rb +345 -0
  113. data/lib/crypto_apis/models/get_transaction_details_by_transaction_idri_fee.rb +0 -1
  114. data/lib/crypto_apis/models/get_transaction_details_by_transaction_idribs.rb +1 -0
  115. data/lib/crypto_apis/models/get_transaction_details_by_transaction_idribsbsc.rb +299 -0
  116. data/lib/crypto_apis/models/get_transaction_details_by_transaction_idribsbsc_gas_price.rb +238 -0
  117. data/lib/crypto_apis/models/{generate_receiving_address_r.rb → list_deposit_addresses_r.rb} +4 -4
  118. data/lib/crypto_apis/models/{list_receiving_addresses_r_data.rb → list_deposit_addresses_r_data.rb} +4 -4
  119. data/lib/crypto_apis/models/{generate_receiving_address_ri.rb → list_deposit_addresses_ri.rb} +3 -3
  120. data/lib/crypto_apis/models/list_transactions_by_address_ribs.rb +1 -0
  121. data/lib/crypto_apis/models/list_transactions_by_address_ribsbsc.rb +314 -0
  122. data/lib/crypto_apis/models/list_transactions_by_block_hash_ri_fee.rb +0 -1
  123. data/lib/crypto_apis/models/list_transactions_by_block_hash_ribs.rb +1 -0
  124. data/lib/crypto_apis/models/list_transactions_by_block_hash_ribsbsc.rb +314 -0
  125. data/lib/crypto_apis/models/list_transactions_by_block_height_ribs.rb +1 -0
  126. data/lib/crypto_apis/models/list_transactions_by_block_height_ribsbsc.rb +299 -0
  127. data/lib/crypto_apis/models/list_transactions_by_block_height_ribsbsc_gas_price.rb +238 -0
  128. data/lib/crypto_apis/models/list_xrp_ripple_transactions_by_address_ri.rb +1 -16
  129. data/lib/crypto_apis/models/transaction_request_approval.rb +268 -0
  130. data/lib/crypto_apis/models/transaction_request_approval_data.rb +254 -0
  131. data/lib/crypto_apis/models/transaction_request_approval_data_item.rb +300 -0
  132. data/lib/crypto_apis/models/transaction_request_broadcasted.rb +268 -0
  133. data/lib/crypto_apis/models/transaction_request_broadcasted_data.rb +254 -0
  134. data/lib/crypto_apis/models/transaction_request_broadcasted_data_item.rb +315 -0
  135. data/lib/crypto_apis/models/transaction_request_fail.rb +268 -0
  136. data/lib/crypto_apis/models/transaction_request_fail_data.rb +254 -0
  137. data/lib/crypto_apis/models/transaction_request_fail_data_item.rb +315 -0
  138. data/lib/crypto_apis/models/transaction_request_mined.rb +268 -0
  139. data/lib/crypto_apis/models/transaction_request_mined_data.rb +254 -0
  140. data/lib/crypto_apis/models/transaction_request_rejection.rb +268 -0
  141. data/lib/crypto_apis/models/transaction_request_rejection_data.rb +254 -0
  142. data/lib/crypto_apis/models/transaction_request_rejection_data_item.rb +300 -0
  143. data/lib/crypto_apis/version.rb +1 -1
  144. data/spec/api/{validating_api_spec.rb → features_api_spec.rb} +21 -6
  145. data/spec/api/generating_api_spec.rb +5 -5
  146. data/spec/api/informative_api_spec.rb +5 -5
  147. data/spec/api/transactions_api_spec.rb +1 -1
  148. data/spec/api/xrp_ripple_api_spec.rb +1 -0
  149. data/spec/models/broadcast_locally_signed_transaction_r_data_spec.rb +34 -0
  150. data/spec/models/broadcast_locally_signed_transaction_r_spec.rb +52 -0
  151. data/spec/models/broadcast_locally_signed_transaction_rb_data_item_spec.rb +46 -0
  152. data/spec/models/broadcast_locally_signed_transaction_rb_data_spec.rb +34 -0
  153. data/spec/models/broadcast_locally_signed_transaction_rb_spec.rb +40 -0
  154. data/spec/models/broadcast_locally_signed_transaction_ri_spec.rb +34 -0
  155. data/spec/models/broadcast_transaction_fail_data_item_spec.rb +52 -0
  156. data/spec/models/broadcast_transaction_fail_data_spec.rb +46 -0
  157. data/spec/models/broadcast_transaction_fail_spec.rb +52 -0
  158. data/spec/models/broadcast_transaction_success_data_item_spec.rb +46 -0
  159. data/spec/models/broadcast_transaction_success_data_spec.rb +46 -0
  160. data/spec/models/broadcast_transaction_success_spec.rb +52 -0
  161. data/spec/models/create_coins_transaction_request_from_address_rb_data_item_spec.rb +13 -1
  162. data/spec/models/create_coins_transaction_request_from_address_ri_spec.rb +12 -0
  163. 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
  164. data/spec/models/create_coins_transaction_request_from_wallet_rb_data_item_spec.rb +13 -1
  165. data/spec/models/create_coins_transaction_request_from_wallet_ri_spec.rb +12 -0
  166. data/spec/models/create_tokens_transaction_request_from_address_rb_data_item_spec.rb +13 -1
  167. data/spec/models/create_tokens_transaction_request_from_address_ri_spec.rb +12 -0
  168. data/spec/models/{generate_receiving_address_r_data_spec.rb → generate_deposit_address_r_data_spec.rb} +6 -6
  169. data/spec/models/{list_receiving_addresses_r_spec.rb → generate_deposit_address_r_spec.rb} +6 -6
  170. data/spec/models/{generate_receiving_address_rb_data_item_spec.rb → generate_deposit_address_rb_data_item_spec.rb} +6 -6
  171. data/spec/models/{generate_receiving_address_rb_data_spec.rb → generate_deposit_address_rb_data_spec.rb} +6 -6
  172. data/spec/models/{generate_receiving_address_rb_spec.rb → generate_deposit_address_rb_spec.rb} +6 -6
  173. data/spec/models/{list_receiving_addresses_ri_spec.rb → generate_deposit_address_ri_spec.rb} +6 -6
  174. data/spec/models/get_block_details_by_block_hash_ribsbsc_spec.rb +88 -0
  175. data/spec/models/get_block_details_by_block_height_ribsbsc_spec.rb +82 -0
  176. data/spec/models/get_latest_mined_block_ribsbsc_spec.rb +82 -0
  177. data/spec/models/get_transaction_details_by_transaction_idribsbsc_gas_price_spec.rb +40 -0
  178. data/spec/models/get_transaction_details_by_transaction_idribsbsc_spec.rb +64 -0
  179. data/spec/models/{list_receiving_addresses_r_data_spec.rb → list_deposit_addresses_r_data_spec.rb} +6 -6
  180. data/spec/models/{generate_receiving_address_r_spec.rb → list_deposit_addresses_r_spec.rb} +6 -6
  181. data/spec/models/{generate_receiving_address_ri_spec.rb → list_deposit_addresses_ri_spec.rb} +6 -6
  182. data/spec/models/list_transactions_by_address_ribsbsc_spec.rb +70 -0
  183. data/spec/models/list_transactions_by_block_hash_ribsbsc_spec.rb +70 -0
  184. data/spec/models/list_transactions_by_block_height_ribsbsc_gas_price_spec.rb +40 -0
  185. data/spec/models/list_transactions_by_block_height_ribsbsc_spec.rb +64 -0
  186. data/spec/models/list_xrp_ripple_transactions_by_address_ri_spec.rb +0 -6
  187. data/spec/models/transaction_request_approval_data_item_spec.rb +64 -0
  188. data/spec/models/transaction_request_approval_data_spec.rb +46 -0
  189. data/spec/models/transaction_request_approval_spec.rb +52 -0
  190. data/spec/models/transaction_request_broadcasted_data_item_spec.rb +70 -0
  191. data/spec/models/transaction_request_broadcasted_data_spec.rb +46 -0
  192. data/spec/models/transaction_request_broadcasted_spec.rb +52 -0
  193. data/spec/models/transaction_request_fail_data_item_spec.rb +70 -0
  194. data/spec/models/transaction_request_fail_data_spec.rb +46 -0
  195. data/spec/models/transaction_request_fail_spec.rb +52 -0
  196. data/spec/models/transaction_request_mined_data_spec.rb +46 -0
  197. data/spec/models/transaction_request_mined_spec.rb +52 -0
  198. data/spec/models/transaction_request_rejection_data_item_spec.rb +64 -0
  199. data/spec/models/transaction_request_rejection_data_spec.rb +46 -0
  200. data/spec/models/transaction_request_rejection_spec.rb +52 -0
  201. metadata +186 -46
  202. data/docs/GenerateReceivingAddressRBData.md +0 -18
  203. data/docs/GenerateReceivingAddressRData.md +0 -18
  204. data/docs/ValidatingApi.md +0 -87
  205. data/lib/crypto_apis/api/validating_api.rb +0 -108
@@ -0,0 +1,255 @@
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
+ # Defines an `item` as one result.
18
+ class BroadcastTransactionSuccessDataItem
19
+ # Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
20
+ attr_accessor :blockchain
21
+
22
+ # 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.
23
+ attr_accessor :network
24
+
25
+ # Defines the unique ID of the specific transaction, i.e. its identification number.
26
+ attr_accessor :transaction_id
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'blockchain' => :'blockchain',
32
+ :'network' => :'network',
33
+ :'transaction_id' => :'transactionId'
34
+ }
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'blockchain' => :'String',
46
+ :'network' => :'String',
47
+ :'transaction_id' => :'String'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `CryptoApis::BroadcastTransactionSuccessDataItem` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `CryptoApis::BroadcastTransactionSuccessDataItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'blockchain')
73
+ self.blockchain = attributes[:'blockchain']
74
+ end
75
+
76
+ if attributes.key?(:'network')
77
+ self.network = attributes[:'network']
78
+ end
79
+
80
+ if attributes.key?(:'transaction_id')
81
+ self.transaction_id = attributes[:'transaction_id']
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ invalid_properties = Array.new
89
+ if @blockchain.nil?
90
+ invalid_properties.push('invalid value for "blockchain", blockchain cannot be nil.')
91
+ end
92
+
93
+ if @network.nil?
94
+ invalid_properties.push('invalid value for "network", network cannot be nil.')
95
+ end
96
+
97
+ if @transaction_id.nil?
98
+ invalid_properties.push('invalid value for "transaction_id", transaction_id cannot be nil.')
99
+ end
100
+
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ return false if @blockchain.nil?
108
+ return false if @network.nil?
109
+ return false if @transaction_id.nil?
110
+ true
111
+ end
112
+
113
+ # Checks equality by comparing each attribute.
114
+ # @param [Object] Object to be compared
115
+ def ==(o)
116
+ return true if self.equal?(o)
117
+ self.class == o.class &&
118
+ blockchain == o.blockchain &&
119
+ network == o.network &&
120
+ transaction_id == o.transaction_id
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [blockchain, network, transaction_id].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ new.build_from_hash(attributes)
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ self.class.openapi_types.each_pair do |key, type|
148
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
149
+ self.send("#{key}=", nil)
150
+ elsif type =~ /\AArray<(.*)>/i
151
+ # check to ensure the input is an array given that the attribute
152
+ # is documented as an array but the input is not
153
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
154
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
155
+ end
156
+ elsif !attributes[self.class.attribute_map[key]].nil?
157
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
158
+ end
159
+ end
160
+
161
+ self
162
+ end
163
+
164
+ # Deserializes the data based on type
165
+ # @param string type Data type
166
+ # @param string value Value to be deserialized
167
+ # @return [Object] Deserialized data
168
+ def _deserialize(type, value)
169
+ case type.to_sym
170
+ when :Time
171
+ Time.parse(value)
172
+ when :Date
173
+ Date.parse(value)
174
+ when :String
175
+ value.to_s
176
+ when :Integer
177
+ value.to_i
178
+ when :Float
179
+ value.to_f
180
+ when :Boolean
181
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
182
+ true
183
+ else
184
+ false
185
+ end
186
+ when :Object
187
+ # generic object (usually a Hash), return directly
188
+ value
189
+ when /\AArray<(?<inner_type>.+)>\z/
190
+ inner_type = Regexp.last_match[:inner_type]
191
+ value.map { |v| _deserialize(inner_type, v) }
192
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
193
+ k_type = Regexp.last_match[:k_type]
194
+ v_type = Regexp.last_match[:v_type]
195
+ {}.tap do |hash|
196
+ value.each do |k, v|
197
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
198
+ end
199
+ end
200
+ else # model
201
+ # models (e.g. Pet) or oneOf
202
+ klass = CryptoApis.const_get(type)
203
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
204
+ end
205
+ end
206
+
207
+ # Returns the string representation of the object
208
+ # @return [String] String presentation of the object
209
+ def to_s
210
+ to_hash.to_s
211
+ end
212
+
213
+ # to_body is an alias to to_hash (backward compatibility)
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_body
216
+ to_hash
217
+ end
218
+
219
+ # Returns the object in the form of hash
220
+ # @return [Hash] Returns the object in the form of hash
221
+ def to_hash
222
+ hash = {}
223
+ self.class.attribute_map.each_pair do |attr, param|
224
+ value = self.send(attr)
225
+ if value.nil?
226
+ is_nullable = self.class.openapi_nullable.include?(attr)
227
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
228
+ end
229
+
230
+ hash[param] = _to_hash(value)
231
+ end
232
+ hash
233
+ end
234
+
235
+ # Outputs non-array value in the form of hash
236
+ # For object, use to_hash. Otherwise, just return the value
237
+ # @param [Object] value Any valid value
238
+ # @return [Hash] Returns the value in the form of hash
239
+ def _to_hash(value)
240
+ if value.is_a?(Array)
241
+ value.compact.map { |v| _to_hash(v) }
242
+ elsif value.is_a?(Hash)
243
+ {}.tap do |hash|
244
+ value.each { |k, v| hash[k] = _to_hash(v) }
245
+ end
246
+ elsif value.respond_to? :to_hash
247
+ value.to_hash
248
+ else
249
+ value
250
+ end
251
+ end
252
+
253
+ end
254
+
255
+ end
@@ -18,11 +18,17 @@ module CryptoApis
18
18
  # Represents the specific amount of the transaction.
19
19
  attr_accessor :amount
20
20
 
21
+ # Represents the Secret Key value provided by the customer. This field is used for security purposes during the callback notification, in order to prove the sender of the callback as Crypto APIs.
22
+ attr_accessor :callback_secret_key
23
+
24
+ # Verified URL for sending callbacks
25
+ attr_accessor :callback_url
26
+
21
27
  # Represents the fee priority of the automation, whether it is \"slow\", \"standard\" or \"fast\".
22
28
  attr_accessor :fee_priority
23
29
 
24
30
  # Defines the specific recipient address for the transaction.
25
- attr_accessor :to_address
31
+ attr_accessor :recipient_address
26
32
 
27
33
  class EnumAttributeValidator
28
34
  attr_reader :datatype
@@ -50,8 +56,10 @@ module CryptoApis
50
56
  def self.attribute_map
51
57
  {
52
58
  :'amount' => :'amount',
59
+ :'callback_secret_key' => :'callbackSecretKey',
60
+ :'callback_url' => :'callbackUrl',
53
61
  :'fee_priority' => :'feePriority',
54
- :'to_address' => :'toAddress'
62
+ :'recipient_address' => :'recipientAddress'
55
63
  }
56
64
  end
57
65
 
@@ -64,8 +72,10 @@ module CryptoApis
64
72
  def self.openapi_types
65
73
  {
66
74
  :'amount' => :'String',
75
+ :'callback_secret_key' => :'String',
76
+ :'callback_url' => :'String',
67
77
  :'fee_priority' => :'String',
68
- :'to_address' => :'String'
78
+ :'recipient_address' => :'String'
69
79
  }
70
80
  end
71
81
 
@@ -94,12 +104,20 @@ module CryptoApis
94
104
  self.amount = attributes[:'amount']
95
105
  end
96
106
 
107
+ if attributes.key?(:'callback_secret_key')
108
+ self.callback_secret_key = attributes[:'callback_secret_key']
109
+ end
110
+
111
+ if attributes.key?(:'callback_url')
112
+ self.callback_url = attributes[:'callback_url']
113
+ end
114
+
97
115
  if attributes.key?(:'fee_priority')
98
116
  self.fee_priority = attributes[:'fee_priority']
99
117
  end
100
118
 
101
- if attributes.key?(:'to_address')
102
- self.to_address = attributes[:'to_address']
119
+ if attributes.key?(:'recipient_address')
120
+ self.recipient_address = attributes[:'recipient_address']
103
121
  end
104
122
  end
105
123
 
@@ -115,8 +133,8 @@ module CryptoApis
115
133
  invalid_properties.push('invalid value for "fee_priority", fee_priority cannot be nil.')
116
134
  end
117
135
 
118
- if @to_address.nil?
119
- invalid_properties.push('invalid value for "to_address", to_address cannot be nil.')
136
+ if @recipient_address.nil?
137
+ invalid_properties.push('invalid value for "recipient_address", recipient_address cannot be nil.')
120
138
  end
121
139
 
122
140
  invalid_properties
@@ -129,7 +147,7 @@ module CryptoApis
129
147
  return false if @fee_priority.nil?
130
148
  fee_priority_validator = EnumAttributeValidator.new('String', ["slow", "standard", "fast"])
131
149
  return false unless fee_priority_validator.valid?(@fee_priority)
132
- return false if @to_address.nil?
150
+ return false if @recipient_address.nil?
133
151
  true
134
152
  end
135
153
 
@@ -149,8 +167,10 @@ module CryptoApis
149
167
  return true if self.equal?(o)
150
168
  self.class == o.class &&
151
169
  amount == o.amount &&
170
+ callback_secret_key == o.callback_secret_key &&
171
+ callback_url == o.callback_url &&
152
172
  fee_priority == o.fee_priority &&
153
- to_address == o.to_address
173
+ recipient_address == o.recipient_address
154
174
  end
155
175
 
156
176
  # @see the `==` method
@@ -162,7 +182,7 @@ module CryptoApis
162
182
  # Calculates hash code according to all attributes.
163
183
  # @return [Integer] Hash code
164
184
  def hash
165
- [amount, fee_priority, to_address].hash
185
+ [amount, callback_secret_key, callback_url, fee_priority, recipient_address].hash
166
186
  end
167
187
 
168
188
  # Builds the object from hash
@@ -15,6 +15,12 @@ require 'time'
15
15
 
16
16
  module CryptoApis
17
17
  class CreateCoinsTransactionRequestFromAddressRI
18
+ # Represents the Secret Key value provided by the customer. This field is used for security purposes during the callback notification, in order to prove the sender of the callback as Crypto APIs.
19
+ attr_accessor :callback_secret_key
20
+
21
+ # Verified URL for sending callbacks
22
+ attr_accessor :callback_url
23
+
18
24
  # Represents the fee priority of the automation, whether it is \"slow\", \"standard\" or \"fast\".
19
25
  attr_accessor :fee_priority
20
26
 
@@ -51,6 +57,8 @@ module CryptoApis
51
57
  # Attribute mapping from ruby-style variable name to JSON key.
52
58
  def self.attribute_map
53
59
  {
60
+ :'callback_secret_key' => :'callbackSecretKey',
61
+ :'callback_url' => :'callbackUrl',
54
62
  :'fee_priority' => :'feePriority',
55
63
  :'recipients' => :'recipients',
56
64
  :'senders' => :'senders',
@@ -66,6 +74,8 @@ module CryptoApis
66
74
  # Attribute type mapping.
67
75
  def self.openapi_types
68
76
  {
77
+ :'callback_secret_key' => :'String',
78
+ :'callback_url' => :'String',
69
79
  :'fee_priority' => :'String',
70
80
  :'recipients' => :'Array<CreateCoinsTransactionRequestFromAddressRIRecipients>',
71
81
  :'senders' => :'CreateCoinsTransactionRequestFromAddressRISenders',
@@ -94,6 +104,14 @@ module CryptoApis
94
104
  h[k.to_sym] = v
95
105
  }
96
106
 
107
+ if attributes.key?(:'callback_secret_key')
108
+ self.callback_secret_key = attributes[:'callback_secret_key']
109
+ end
110
+
111
+ if attributes.key?(:'callback_url')
112
+ self.callback_url = attributes[:'callback_url']
113
+ end
114
+
97
115
  if attributes.key?(:'fee_priority')
98
116
  self.fee_priority = attributes[:'fee_priority']
99
117
  end
@@ -175,6 +193,8 @@ module CryptoApis
175
193
  def ==(o)
176
194
  return true if self.equal?(o)
177
195
  self.class == o.class &&
196
+ callback_secret_key == o.callback_secret_key &&
197
+ callback_url == o.callback_url &&
178
198
  fee_priority == o.fee_priority &&
179
199
  recipients == o.recipients &&
180
200
  senders == o.senders &&
@@ -190,7 +210,7 @@ module CryptoApis
190
210
  # Calculates hash code according to all attributes.
191
211
  # @return [Integer] Hash code
192
212
  def hash
193
- [fee_priority, recipients, senders, transaction_request_status].hash
213
+ [callback_secret_key, callback_url, fee_priority, recipients, senders, transaction_request_status].hash
194
214
  end
195
215
 
196
216
  # Builds the object from hash
@@ -15,12 +15,18 @@ require 'time'
15
15
 
16
16
  module CryptoApis
17
17
  class CreateCoinsTransactionRequestFromWalletRBDataItem
18
- # Defines the destination of the transaction, whether it is incoming or outgoing.
19
- attr_accessor :destinations
18
+ # Represents the Secret Key value provided by the customer. This field is used for security purposes during the callback notification, in order to prove the sender of the callback as Crypto APIs.
19
+ attr_accessor :callback_secret_key
20
+
21
+ # Verified URL for sending callbacks
22
+ attr_accessor :callback_url
20
23
 
21
24
  # Represents the fee priority of the automation, whether it is \"slow\", \"standard\" or \"fast\".
22
25
  attr_accessor :fee_priority
23
26
 
27
+ # Defines the destination of the transaction, whether it is incoming or outgoing.
28
+ attr_accessor :recipients
29
+
24
30
  class EnumAttributeValidator
25
31
  attr_reader :datatype
26
32
  attr_reader :allowable_values
@@ -46,8 +52,10 @@ module CryptoApis
46
52
  # Attribute mapping from ruby-style variable name to JSON key.
47
53
  def self.attribute_map
48
54
  {
49
- :'destinations' => :'destinations',
50
- :'fee_priority' => :'feePriority'
55
+ :'callback_secret_key' => :'callbackSecretKey',
56
+ :'callback_url' => :'callbackUrl',
57
+ :'fee_priority' => :'feePriority',
58
+ :'recipients' => :'recipients'
51
59
  }
52
60
  end
53
61
 
@@ -59,8 +67,10 @@ module CryptoApis
59
67
  # Attribute type mapping.
60
68
  def self.openapi_types
61
69
  {
62
- :'destinations' => :'Array<CreateCoinsTransactionRequestFromWalletRBDataItemDestinations>',
63
- :'fee_priority' => :'String'
70
+ :'callback_secret_key' => :'String',
71
+ :'callback_url' => :'String',
72
+ :'fee_priority' => :'String',
73
+ :'recipients' => :'Array<CreateCoinsTransactionRequestFromWalletRBDataItemRecipients>'
64
74
  }
65
75
  end
66
76
 
@@ -85,39 +95,47 @@ module CryptoApis
85
95
  h[k.to_sym] = v
86
96
  }
87
97
 
88
- if attributes.key?(:'destinations')
89
- if (value = attributes[:'destinations']).is_a?(Array)
90
- self.destinations = value
91
- end
98
+ if attributes.key?(:'callback_secret_key')
99
+ self.callback_secret_key = attributes[:'callback_secret_key']
100
+ end
101
+
102
+ if attributes.key?(:'callback_url')
103
+ self.callback_url = attributes[:'callback_url']
92
104
  end
93
105
 
94
106
  if attributes.key?(:'fee_priority')
95
107
  self.fee_priority = attributes[:'fee_priority']
96
108
  end
109
+
110
+ if attributes.key?(:'recipients')
111
+ if (value = attributes[:'recipients']).is_a?(Array)
112
+ self.recipients = value
113
+ end
114
+ end
97
115
  end
98
116
 
99
117
  # Show invalid properties with the reasons. Usually used together with valid?
100
118
  # @return Array for valid properties with the reasons
101
119
  def list_invalid_properties
102
120
  invalid_properties = Array.new
103
- if @destinations.nil?
104
- invalid_properties.push('invalid value for "destinations", destinations cannot be nil.')
105
- end
106
-
107
121
  if @fee_priority.nil?
108
122
  invalid_properties.push('invalid value for "fee_priority", fee_priority cannot be nil.')
109
123
  end
110
124
 
125
+ if @recipients.nil?
126
+ invalid_properties.push('invalid value for "recipients", recipients cannot be nil.')
127
+ end
128
+
111
129
  invalid_properties
112
130
  end
113
131
 
114
132
  # Check to see if the all the properties in the model are valid
115
133
  # @return true if the model is valid
116
134
  def valid?
117
- return false if @destinations.nil?
118
135
  return false if @fee_priority.nil?
119
136
  fee_priority_validator = EnumAttributeValidator.new('String', ["slow", "standard", "fast"])
120
137
  return false unless fee_priority_validator.valid?(@fee_priority)
138
+ return false if @recipients.nil?
121
139
  true
122
140
  end
123
141
 
@@ -136,8 +154,10 @@ module CryptoApis
136
154
  def ==(o)
137
155
  return true if self.equal?(o)
138
156
  self.class == o.class &&
139
- destinations == o.destinations &&
140
- fee_priority == o.fee_priority
157
+ callback_secret_key == o.callback_secret_key &&
158
+ callback_url == o.callback_url &&
159
+ fee_priority == o.fee_priority &&
160
+ recipients == o.recipients
141
161
  end
142
162
 
143
163
  # @see the `==` method
@@ -149,7 +169,7 @@ module CryptoApis
149
169
  # Calculates hash code according to all attributes.
150
170
  # @return [Integer] Hash code
151
171
  def hash
152
- [destinations, fee_priority].hash
172
+ [callback_secret_key, callback_url, fee_priority, recipients].hash
153
173
  end
154
174
 
155
175
  # Builds the object from hash