coinbase-sdk 0.0.14 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/coinbase/address/wallet_address.rb +7 -4
- data/lib/coinbase/address.rb +36 -0
- data/lib/coinbase/client/api/addresses_api.rb +1 -1
- data/lib/coinbase/client/api/assets_api.rb +1 -1
- data/lib/coinbase/client/api/contract_events_api.rb +1 -1
- data/lib/coinbase/client/api/external_addresses_api.rb +86 -1
- data/lib/coinbase/client/api/networks_api.rb +85 -0
- data/lib/coinbase/client/api/server_signers_api.rb +1 -1
- data/lib/coinbase/client/api/stake_api.rb +121 -1
- data/lib/coinbase/client/api/trades_api.rb +1 -1
- data/lib/coinbase/client/api/transfers_api.rb +1 -1
- data/lib/coinbase/client/api/users_api.rb +1 -1
- data/lib/coinbase/client/api/validators_api.rb +1 -1
- data/lib/coinbase/client/api/wallets_api.rb +1 -1
- data/lib/coinbase/client/api/webhooks_api.rb +1 -1
- data/lib/coinbase/client/api_client.rb +1 -1
- data/lib/coinbase/client/api_error.rb +1 -1
- data/lib/coinbase/client/configuration.rb +1 -11
- data/lib/coinbase/client/models/address.rb +1 -1
- data/lib/coinbase/client/models/address_balance_list.rb +1 -1
- data/lib/coinbase/client/models/address_historical_balance_list.rb +258 -0
- data/lib/coinbase/client/models/address_list.rb +1 -1
- data/lib/coinbase/client/models/asset.rb +1 -1
- data/lib/coinbase/client/models/balance.rb +1 -1
- data/lib/coinbase/client/models/broadcast_staking_operation_request.rb +1 -1
- data/lib/coinbase/client/models/broadcast_trade_request.rb +1 -1
- data/lib/coinbase/client/models/broadcast_transfer_request.rb +1 -1
- data/lib/coinbase/client/models/build_staking_operation_request.rb +1 -1
- data/lib/coinbase/client/models/contract_event.rb +1 -1
- data/lib/coinbase/client/models/contract_event_list.rb +1 -1
- data/lib/coinbase/client/models/create_address_request.rb +1 -1
- data/lib/coinbase/client/models/create_server_signer_request.rb +1 -1
- data/lib/coinbase/client/models/create_staking_operation_request.rb +1 -1
- data/lib/coinbase/client/models/create_trade_request.rb +1 -1
- data/lib/coinbase/client/models/create_transfer_request.rb +15 -5
- data/lib/coinbase/client/models/create_wallet_request.rb +1 -1
- data/lib/coinbase/client/models/create_wallet_request_wallet.rb +1 -1
- data/lib/coinbase/client/models/create_webhook_request.rb +1 -1
- data/lib/coinbase/client/models/error.rb +1 -1
- data/lib/coinbase/client/models/ethereum_validator.rb +374 -0
- data/lib/coinbase/client/models/ethereum_validator_metadata.rb +1 -1
- data/lib/coinbase/client/models/faucet_transaction.rb +1 -1
- data/lib/coinbase/client/models/feature.rb +1 -1
- data/lib/coinbase/client/models/feature_set.rb +307 -0
- data/lib/coinbase/client/models/fetch_historical_staking_balances200_response.rb +258 -0
- data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +1 -1
- data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +1 -1
- data/lib/coinbase/client/models/get_staking_context_request.rb +1 -1
- data/lib/coinbase/client/models/get_validator200_response.rb +221 -0
- data/lib/coinbase/client/models/get_validator200_response_validator.rb +214 -0
- data/lib/coinbase/client/models/historical_balance.rb +273 -0
- data/lib/coinbase/client/models/native_eth_staking_context.rb +1 -1
- data/lib/coinbase/client/models/network.rb +355 -0
- data/lib/coinbase/client/models/network_identifier.rb +44 -0
- data/lib/coinbase/client/models/partial_eth_staking_context.rb +1 -1
- data/lib/coinbase/client/models/seed_creation_event.rb +1 -1
- data/lib/coinbase/client/models/seed_creation_event_result.rb +1 -1
- data/lib/coinbase/client/models/server_signer.rb +1 -1
- data/lib/coinbase/client/models/server_signer_event.rb +1 -1
- data/lib/coinbase/client/models/server_signer_event_event.rb +1 -1
- data/lib/coinbase/client/models/server_signer_event_list.rb +1 -1
- data/lib/coinbase/client/models/server_signer_list.rb +1 -1
- data/lib/coinbase/client/models/signature_creation_event.rb +1 -1
- data/lib/coinbase/client/models/signature_creation_event_result.rb +1 -1
- data/lib/coinbase/client/models/signed_voluntary_exit_message_metadata.rb +1 -1
- data/lib/coinbase/client/models/sponsored_send.rb +338 -0
- data/lib/coinbase/client/models/staking_balance.rb +289 -0
- data/lib/coinbase/client/models/staking_context.rb +1 -1
- data/lib/coinbase/client/models/staking_context_context.rb +223 -75
- data/lib/coinbase/client/models/staking_operation.rb +3 -3
- data/lib/coinbase/client/models/staking_operation_metadata.rb +1 -1
- data/lib/coinbase/client/models/staking_reward.rb +23 -7
- data/lib/coinbase/client/models/staking_reward_format.rb +3 -2
- data/lib/coinbase/client/models/staking_reward_usd_value.rb +257 -0
- data/lib/coinbase/client/models/trade.rb +1 -1
- data/lib/coinbase/client/models/trade_list.rb +1 -1
- data/lib/coinbase/client/models/transaction.rb +3 -3
- data/lib/coinbase/client/models/transaction_type.rb +3 -2
- data/lib/coinbase/client/models/transfer.rb +102 -9
- data/lib/coinbase/client/models/transfer_list.rb +1 -1
- data/lib/coinbase/client/models/update_webhook_request.rb +1 -1
- data/lib/coinbase/client/models/user.rb +1 -1
- data/lib/coinbase/client/models/validator.rb +1 -1
- data/lib/coinbase/client/models/validator_details.rb +1 -1
- data/lib/coinbase/client/models/validator_list.rb +1 -1
- data/lib/coinbase/client/models/validator_list_data.rb +216 -0
- data/lib/coinbase/client/models/wallet.rb +14 -17
- data/lib/coinbase/client/models/wallet_list.rb +1 -1
- data/lib/coinbase/client/models/webhook.rb +1 -1
- data/lib/coinbase/client/models/webhook_event_filter.rb +1 -1
- data/lib/coinbase/client/models/webhook_event_type.rb +3 -2
- data/lib/coinbase/client/models/webhook_list.rb +1 -1
- data/lib/coinbase/client/version.rb +1 -1
- data/lib/coinbase/client.rb +11 -4
- data/lib/coinbase/errors.rb +7 -0
- data/lib/coinbase/historical_balance.rb +53 -0
- data/lib/coinbase/server_signer.rb +14 -3
- data/lib/coinbase/sponsored_send.rb +110 -0
- data/lib/coinbase/staking_balance.rb +86 -0
- data/lib/coinbase/staking_reward.rb +18 -0
- data/lib/coinbase/transaction.rb +7 -3
- data/lib/coinbase/transfer.rb +56 -28
- data/lib/coinbase/wallet/data.rb +31 -0
- data/lib/coinbase/wallet.rb +15 -46
- data/lib/coinbase.rb +15 -3
- metadata +48 -2
@@ -0,0 +1,257 @@
|
|
1
|
+
=begin
|
2
|
+
#Coinbase Platform API
|
3
|
+
|
4
|
+
#This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.1-alpha
|
7
|
+
Contact: yuga.cohler@coinbase.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.6.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Coinbase::Client
|
17
|
+
# The USD value of the reward
|
18
|
+
class StakingRewardUSDValue
|
19
|
+
# The value of the reward in USD
|
20
|
+
attr_accessor :amount
|
21
|
+
|
22
|
+
# The conversion price from native currency to USD
|
23
|
+
attr_accessor :conversion_price
|
24
|
+
|
25
|
+
# The time of the conversion in UTC.
|
26
|
+
attr_accessor :conversion_time
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'amount' => :'amount',
|
32
|
+
:'conversion_price' => :'conversion_price',
|
33
|
+
:'conversion_time' => :'conversion_time'
|
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
|
+
:'amount' => :'String',
|
46
|
+
:'conversion_price' => :'String',
|
47
|
+
:'conversion_time' => :'Time'
|
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 `Coinbase::Client::StakingRewardUSDValue` 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 `Coinbase::Client::StakingRewardUSDValue`. 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?(:'amount')
|
73
|
+
self.amount = attributes[:'amount']
|
74
|
+
else
|
75
|
+
self.amount = nil
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'conversion_price')
|
79
|
+
self.conversion_price = attributes[:'conversion_price']
|
80
|
+
else
|
81
|
+
self.conversion_price = nil
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'conversion_time')
|
85
|
+
self.conversion_time = attributes[:'conversion_time']
|
86
|
+
else
|
87
|
+
self.conversion_time = nil
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
92
|
+
# @return Array for valid properties with the reasons
|
93
|
+
def list_invalid_properties
|
94
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
95
|
+
invalid_properties = Array.new
|
96
|
+
if @amount.nil?
|
97
|
+
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
98
|
+
end
|
99
|
+
|
100
|
+
if @conversion_price.nil?
|
101
|
+
invalid_properties.push('invalid value for "conversion_price", conversion_price cannot be nil.')
|
102
|
+
end
|
103
|
+
|
104
|
+
if @conversion_time.nil?
|
105
|
+
invalid_properties.push('invalid value for "conversion_time", conversion_time 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
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
115
|
+
return false if @amount.nil?
|
116
|
+
return false if @conversion_price.nil?
|
117
|
+
return false if @conversion_time.nil?
|
118
|
+
true
|
119
|
+
end
|
120
|
+
|
121
|
+
# Checks equality by comparing each attribute.
|
122
|
+
# @param [Object] Object to be compared
|
123
|
+
def ==(o)
|
124
|
+
return true if self.equal?(o)
|
125
|
+
self.class == o.class &&
|
126
|
+
amount == o.amount &&
|
127
|
+
conversion_price == o.conversion_price &&
|
128
|
+
conversion_time == o.conversion_time
|
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
|
+
[amount, conversion_price, conversion_time].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
|
+
return nil unless attributes.is_a?(Hash)
|
148
|
+
attributes = attributes.transform_keys(&:to_sym)
|
149
|
+
transformed_hash = {}
|
150
|
+
openapi_types.each_pair do |key, type|
|
151
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
152
|
+
transformed_hash["#{key}"] = nil
|
153
|
+
elsif type =~ /\AArray<(.*)>/i
|
154
|
+
# check to ensure the input is an array given that the attribute
|
155
|
+
# is documented as an array but the input is not
|
156
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
157
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
158
|
+
end
|
159
|
+
elsif !attributes[attribute_map[key]].nil?
|
160
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
161
|
+
end
|
162
|
+
end
|
163
|
+
new(transformed_hash)
|
164
|
+
end
|
165
|
+
|
166
|
+
# Deserializes the data based on type
|
167
|
+
# @param string type Data type
|
168
|
+
# @param string value Value to be deserialized
|
169
|
+
# @return [Object] Deserialized data
|
170
|
+
def self._deserialize(type, value)
|
171
|
+
case type.to_sym
|
172
|
+
when :Time
|
173
|
+
Time.parse(value)
|
174
|
+
when :Date
|
175
|
+
Date.parse(value)
|
176
|
+
when :String
|
177
|
+
value.to_s
|
178
|
+
when :Integer
|
179
|
+
value.to_i
|
180
|
+
when :Float
|
181
|
+
value.to_f
|
182
|
+
when :Boolean
|
183
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
184
|
+
true
|
185
|
+
else
|
186
|
+
false
|
187
|
+
end
|
188
|
+
when :Object
|
189
|
+
# generic object (usually a Hash), return directly
|
190
|
+
value
|
191
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
192
|
+
inner_type = Regexp.last_match[:inner_type]
|
193
|
+
value.map { |v| _deserialize(inner_type, v) }
|
194
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
195
|
+
k_type = Regexp.last_match[:k_type]
|
196
|
+
v_type = Regexp.last_match[:v_type]
|
197
|
+
{}.tap do |hash|
|
198
|
+
value.each do |k, v|
|
199
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
else # model
|
203
|
+
# models (e.g. Pet) or oneOf
|
204
|
+
klass = Coinbase::Client.const_get(type)
|
205
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
# Returns the string representation of the object
|
210
|
+
# @return [String] String presentation of the object
|
211
|
+
def to_s
|
212
|
+
to_hash.to_s
|
213
|
+
end
|
214
|
+
|
215
|
+
# to_body is an alias to to_hash (backward compatibility)
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
217
|
+
def to_body
|
218
|
+
to_hash
|
219
|
+
end
|
220
|
+
|
221
|
+
# Returns the object in the form of hash
|
222
|
+
# @return [Hash] Returns the object in the form of hash
|
223
|
+
def to_hash
|
224
|
+
hash = {}
|
225
|
+
self.class.attribute_map.each_pair do |attr, param|
|
226
|
+
value = self.send(attr)
|
227
|
+
if value.nil?
|
228
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
229
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
230
|
+
end
|
231
|
+
|
232
|
+
hash[param] = _to_hash(value)
|
233
|
+
end
|
234
|
+
hash
|
235
|
+
end
|
236
|
+
|
237
|
+
# Outputs non-array value in the form of hash
|
238
|
+
# For object, use to_hash. Otherwise, just return the value
|
239
|
+
# @param [Object] value Any valid value
|
240
|
+
# @return [Hash] Returns the value in the form of hash
|
241
|
+
def _to_hash(value)
|
242
|
+
if value.is_a?(Array)
|
243
|
+
value.compact.map { |v| _to_hash(v) }
|
244
|
+
elsif value.is_a?(Hash)
|
245
|
+
{}.tap do |hash|
|
246
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
247
|
+
end
|
248
|
+
elsif value.respond_to? :to_hash
|
249
|
+
value.to_hash
|
250
|
+
else
|
251
|
+
value
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
end
|
256
|
+
|
257
|
+
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.0.1-alpha
|
7
7
|
Contact: yuga.cohler@coinbase.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -180,7 +180,7 @@ module Coinbase::Client
|
|
180
180
|
return false if @from_address_id.nil?
|
181
181
|
return false if @unsigned_payload.nil?
|
182
182
|
return false if @status.nil?
|
183
|
-
status_validator = EnumAttributeValidator.new('String', ["pending", "signed", "broadcast", "complete", "failed"])
|
183
|
+
status_validator = EnumAttributeValidator.new('String', ["pending", "signed", "broadcast", "complete", "failed", "unknown_default_open_api"])
|
184
184
|
return false unless status_validator.valid?(@status)
|
185
185
|
true
|
186
186
|
end
|
@@ -188,7 +188,7 @@ module Coinbase::Client
|
|
188
188
|
# Custom attribute writer method checking allowed values (enum).
|
189
189
|
# @param [Object] status Object to be assigned
|
190
190
|
def status=(status)
|
191
|
-
validator = EnumAttributeValidator.new('String', ["pending", "signed", "broadcast", "complete", "failed"])
|
191
|
+
validator = EnumAttributeValidator.new('String', ["pending", "signed", "broadcast", "complete", "failed", "unknown_default_open_api"])
|
192
192
|
unless validator.valid?(status)
|
193
193
|
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
194
194
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.0.1-alpha
|
7
7
|
Contact: yuga.cohler@coinbase.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -16,9 +16,10 @@ require 'time'
|
|
16
16
|
module Coinbase::Client
|
17
17
|
class TransactionType
|
18
18
|
TRANSFER = "transfer".freeze
|
19
|
+
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
19
20
|
|
20
21
|
def self.all_vars
|
21
|
-
@all_vars ||= [TRANSFER].freeze
|
22
|
+
@all_vars ||= [TRANSFER, UNKNOWN_DEFAULT_OPEN_API].freeze
|
22
23
|
end
|
23
24
|
|
24
25
|
# Builds the enum from string
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.0.1-alpha
|
7
7
|
Contact: yuga.cohler@coinbase.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -41,6 +41,45 @@ module Coinbase::Client
|
|
41
41
|
|
42
42
|
attr_accessor :transaction
|
43
43
|
|
44
|
+
attr_accessor :sponsored_send
|
45
|
+
|
46
|
+
# The unsigned payload of the transfer. This is the payload that needs to be signed by the sender.
|
47
|
+
attr_accessor :unsigned_payload
|
48
|
+
|
49
|
+
# The signed payload of the transfer. This is the payload that has been signed by the sender.
|
50
|
+
attr_accessor :signed_payload
|
51
|
+
|
52
|
+
# The hash of the transfer transaction
|
53
|
+
attr_accessor :transaction_hash
|
54
|
+
|
55
|
+
# The status of the transfer
|
56
|
+
attr_accessor :status
|
57
|
+
|
58
|
+
# Whether the transfer uses sponsored gas
|
59
|
+
attr_accessor :gasless
|
60
|
+
|
61
|
+
class EnumAttributeValidator
|
62
|
+
attr_reader :datatype
|
63
|
+
attr_reader :allowable_values
|
64
|
+
|
65
|
+
def initialize(datatype, allowable_values)
|
66
|
+
@allowable_values = allowable_values.map do |value|
|
67
|
+
case datatype.to_s
|
68
|
+
when /Integer/i
|
69
|
+
value.to_i
|
70
|
+
when /Float/i
|
71
|
+
value.to_f
|
72
|
+
else
|
73
|
+
value
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def valid?(value)
|
79
|
+
!value || allowable_values.include?(value)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
44
83
|
# Attribute mapping from ruby-style variable name to JSON key.
|
45
84
|
def self.attribute_map
|
46
85
|
{
|
@@ -52,7 +91,13 @@ module Coinbase::Client
|
|
52
91
|
:'asset_id' => :'asset_id',
|
53
92
|
:'asset' => :'asset',
|
54
93
|
:'transfer_id' => :'transfer_id',
|
55
|
-
:'transaction' => :'transaction'
|
94
|
+
:'transaction' => :'transaction',
|
95
|
+
:'sponsored_send' => :'sponsored_send',
|
96
|
+
:'unsigned_payload' => :'unsigned_payload',
|
97
|
+
:'signed_payload' => :'signed_payload',
|
98
|
+
:'transaction_hash' => :'transaction_hash',
|
99
|
+
:'status' => :'status',
|
100
|
+
:'gasless' => :'gasless'
|
56
101
|
}
|
57
102
|
end
|
58
103
|
|
@@ -72,7 +117,13 @@ module Coinbase::Client
|
|
72
117
|
:'asset_id' => :'String',
|
73
118
|
:'asset' => :'Asset',
|
74
119
|
:'transfer_id' => :'String',
|
75
|
-
:'transaction' => :'Transaction'
|
120
|
+
:'transaction' => :'Transaction',
|
121
|
+
:'sponsored_send' => :'SponsoredSend',
|
122
|
+
:'unsigned_payload' => :'String',
|
123
|
+
:'signed_payload' => :'String',
|
124
|
+
:'transaction_hash' => :'String',
|
125
|
+
:'status' => :'String',
|
126
|
+
:'gasless' => :'Boolean'
|
76
127
|
}
|
77
128
|
end
|
78
129
|
|
@@ -147,8 +198,32 @@ module Coinbase::Client
|
|
147
198
|
|
148
199
|
if attributes.key?(:'transaction')
|
149
200
|
self.transaction = attributes[:'transaction']
|
201
|
+
end
|
202
|
+
|
203
|
+
if attributes.key?(:'sponsored_send')
|
204
|
+
self.sponsored_send = attributes[:'sponsored_send']
|
205
|
+
end
|
206
|
+
|
207
|
+
if attributes.key?(:'unsigned_payload')
|
208
|
+
self.unsigned_payload = attributes[:'unsigned_payload']
|
209
|
+
end
|
210
|
+
|
211
|
+
if attributes.key?(:'signed_payload')
|
212
|
+
self.signed_payload = attributes[:'signed_payload']
|
213
|
+
end
|
214
|
+
|
215
|
+
if attributes.key?(:'transaction_hash')
|
216
|
+
self.transaction_hash = attributes[:'transaction_hash']
|
217
|
+
end
|
218
|
+
|
219
|
+
if attributes.key?(:'status')
|
220
|
+
self.status = attributes[:'status']
|
221
|
+
end
|
222
|
+
|
223
|
+
if attributes.key?(:'gasless')
|
224
|
+
self.gasless = attributes[:'gasless']
|
150
225
|
else
|
151
|
-
self.
|
226
|
+
self.gasless = nil
|
152
227
|
end
|
153
228
|
end
|
154
229
|
|
@@ -189,8 +264,8 @@ module Coinbase::Client
|
|
189
264
|
invalid_properties.push('invalid value for "transfer_id", transfer_id cannot be nil.')
|
190
265
|
end
|
191
266
|
|
192
|
-
if @
|
193
|
-
invalid_properties.push('invalid value for "
|
267
|
+
if @gasless.nil?
|
268
|
+
invalid_properties.push('invalid value for "gasless", gasless cannot be nil.')
|
194
269
|
end
|
195
270
|
|
196
271
|
invalid_properties
|
@@ -208,10 +283,22 @@ module Coinbase::Client
|
|
208
283
|
return false if @asset_id.nil?
|
209
284
|
return false if @asset.nil?
|
210
285
|
return false if @transfer_id.nil?
|
211
|
-
|
286
|
+
status_validator = EnumAttributeValidator.new('String', ["pending", "broadcast", "complete", "failed", "unknown_default_open_api"])
|
287
|
+
return false unless status_validator.valid?(@status)
|
288
|
+
return false if @gasless.nil?
|
212
289
|
true
|
213
290
|
end
|
214
291
|
|
292
|
+
# Custom attribute writer method checking allowed values (enum).
|
293
|
+
# @param [Object] status Object to be assigned
|
294
|
+
def status=(status)
|
295
|
+
validator = EnumAttributeValidator.new('String', ["pending", "broadcast", "complete", "failed", "unknown_default_open_api"])
|
296
|
+
unless validator.valid?(status)
|
297
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
298
|
+
end
|
299
|
+
@status = status
|
300
|
+
end
|
301
|
+
|
215
302
|
# Checks equality by comparing each attribute.
|
216
303
|
# @param [Object] Object to be compared
|
217
304
|
def ==(o)
|
@@ -225,7 +312,13 @@ module Coinbase::Client
|
|
225
312
|
asset_id == o.asset_id &&
|
226
313
|
asset == o.asset &&
|
227
314
|
transfer_id == o.transfer_id &&
|
228
|
-
transaction == o.transaction
|
315
|
+
transaction == o.transaction &&
|
316
|
+
sponsored_send == o.sponsored_send &&
|
317
|
+
unsigned_payload == o.unsigned_payload &&
|
318
|
+
signed_payload == o.signed_payload &&
|
319
|
+
transaction_hash == o.transaction_hash &&
|
320
|
+
status == o.status &&
|
321
|
+
gasless == o.gasless
|
229
322
|
end
|
230
323
|
|
231
324
|
# @see the `==` method
|
@@ -237,7 +330,7 @@ module Coinbase::Client
|
|
237
330
|
# Calculates hash code according to all attributes.
|
238
331
|
# @return [Integer] Hash code
|
239
332
|
def hash
|
240
|
-
[network_id, wallet_id, address_id, destination, amount, asset_id, asset, transfer_id, transaction].hash
|
333
|
+
[network_id, wallet_id, address_id, destination, amount, asset_id, asset, transfer_id, transaction, sponsored_send, unsigned_payload, signed_payload, transaction_hash, status, gasless].hash
|
241
334
|
end
|
242
335
|
|
243
336
|
# Builds the object from hash
|