coinbase-sdk 0.0.14 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/lib/coinbase/address/wallet_address.rb +31 -21
  3. data/lib/coinbase/address.rb +51 -17
  4. data/lib/coinbase/asset.rb +11 -8
  5. data/lib/coinbase/client/api/contract_events_api.rb +17 -9
  6. data/lib/coinbase/client/api/external_addresses_api.rb +85 -0
  7. data/lib/coinbase/client/api/networks_api.rb +85 -0
  8. data/lib/coinbase/client/api/stake_api.rb +74 -195
  9. data/lib/coinbase/client/api/validators_api.rb +2 -2
  10. data/lib/coinbase/client/api/wallet_stake_api.rb +263 -0
  11. data/lib/coinbase/client/models/address.rb +21 -4
  12. data/lib/coinbase/client/models/{native_eth_staking_context.rb → address_historical_balance_list.rb} +39 -35
  13. data/lib/coinbase/client/models/contract_event.rb +99 -8
  14. data/lib/coinbase/client/models/create_address_request.rb +14 -4
  15. data/lib/coinbase/client/models/create_transfer_request.rb +14 -4
  16. data/lib/coinbase/client/models/ethereum_validator_metadata.rb +11 -11
  17. data/lib/coinbase/client/models/feature.rb +2 -1
  18. data/lib/coinbase/client/models/feature_set.rb +307 -0
  19. data/lib/coinbase/client/models/{partial_eth_staking_context.rb → fetch_historical_staking_balances200_response.rb} +39 -35
  20. data/lib/coinbase/client/models/historical_balance.rb +273 -0
  21. data/lib/coinbase/client/models/network.rb +365 -0
  22. data/lib/coinbase/client/models/network_identifier.rb +44 -0
  23. data/lib/coinbase/client/models/sponsored_send.rb +338 -0
  24. data/lib/coinbase/client/models/staking_balance.rb +289 -0
  25. data/lib/coinbase/client/models/staking_context_context.rb +222 -74
  26. data/lib/coinbase/client/models/staking_operation.rb +2 -2
  27. data/lib/coinbase/client/models/staking_reward.rb +22 -6
  28. data/lib/coinbase/client/models/staking_reward_format.rb +2 -1
  29. data/lib/coinbase/client/models/staking_reward_usd_value.rb +257 -0
  30. data/lib/coinbase/client/models/transaction.rb +17 -7
  31. data/lib/coinbase/client/models/transaction_type.rb +2 -1
  32. data/lib/coinbase/client/models/transfer.rb +101 -8
  33. data/lib/coinbase/client/models/validator.rb +23 -2
  34. data/lib/coinbase/client/models/validator_status.rb +52 -0
  35. data/lib/coinbase/client/models/wallet.rb +13 -16
  36. data/lib/coinbase/client/models/webhook_event_type.rb +2 -1
  37. data/lib/coinbase/client.rb +12 -3
  38. data/lib/coinbase/constants.rb +0 -10
  39. data/lib/coinbase/contract_event.rb +104 -0
  40. data/lib/coinbase/correlation.rb +30 -0
  41. data/lib/coinbase/destination.rb +11 -9
  42. data/lib/coinbase/errors.rb +14 -0
  43. data/lib/coinbase/historical_balance.rb +53 -0
  44. data/lib/coinbase/middleware.rb +2 -0
  45. data/lib/coinbase/network.rb +103 -20
  46. data/lib/coinbase/server_signer.rb +14 -3
  47. data/lib/coinbase/smart_contract.rb +106 -0
  48. data/lib/coinbase/sponsored_send.rb +110 -0
  49. data/lib/coinbase/staking_balance.rb +92 -0
  50. data/lib/coinbase/staking_operation.rb +134 -36
  51. data/lib/coinbase/staking_reward.rb +18 -0
  52. data/lib/coinbase/trade.rb +10 -9
  53. data/lib/coinbase/transaction.rb +13 -3
  54. data/lib/coinbase/transfer.rb +65 -36
  55. data/lib/coinbase/validator.rb +18 -10
  56. data/lib/coinbase/version.rb +5 -0
  57. data/lib/coinbase/wallet/data.rb +31 -0
  58. data/lib/coinbase/wallet.rb +143 -182
  59. data/lib/coinbase/webhook.rb +181 -0
  60. data/lib/coinbase.rb +64 -21
  61. metadata +51 -5
  62. data/lib/coinbase/user.rb +0 -65
@@ -27,13 +27,17 @@ module Coinbase::Client
27
27
  # The onchain address derived on the server-side.
28
28
  attr_accessor :address_id
29
29
 
30
+ # The index of the address in the wallet.
31
+ attr_accessor :index
32
+
30
33
  # Attribute mapping from ruby-style variable name to JSON key.
31
34
  def self.attribute_map
32
35
  {
33
36
  :'wallet_id' => :'wallet_id',
34
37
  :'network_id' => :'network_id',
35
38
  :'public_key' => :'public_key',
36
- :'address_id' => :'address_id'
39
+ :'address_id' => :'address_id',
40
+ :'index' => :'index'
37
41
  }
38
42
  end
39
43
 
@@ -48,7 +52,8 @@ module Coinbase::Client
48
52
  :'wallet_id' => :'String',
49
53
  :'network_id' => :'String',
50
54
  :'public_key' => :'String',
51
- :'address_id' => :'String'
55
+ :'address_id' => :'String',
56
+ :'index' => :'Integer'
52
57
  }
53
58
  end
54
59
 
@@ -96,6 +101,12 @@ module Coinbase::Client
96
101
  else
97
102
  self.address_id = nil
98
103
  end
104
+
105
+ if attributes.key?(:'index')
106
+ self.index = attributes[:'index']
107
+ else
108
+ self.index = nil
109
+ end
99
110
  end
100
111
 
101
112
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -119,6 +130,10 @@ module Coinbase::Client
119
130
  invalid_properties.push('invalid value for "address_id", address_id cannot be nil.')
120
131
  end
121
132
 
133
+ if @index.nil?
134
+ invalid_properties.push('invalid value for "index", index cannot be nil.')
135
+ end
136
+
122
137
  invalid_properties
123
138
  end
124
139
 
@@ -130,6 +145,7 @@ module Coinbase::Client
130
145
  return false if @network_id.nil?
131
146
  return false if @public_key.nil?
132
147
  return false if @address_id.nil?
148
+ return false if @index.nil?
133
149
  true
134
150
  end
135
151
 
@@ -141,7 +157,8 @@ module Coinbase::Client
141
157
  wallet_id == o.wallet_id &&
142
158
  network_id == o.network_id &&
143
159
  public_key == o.public_key &&
144
- address_id == o.address_id
160
+ address_id == o.address_id &&
161
+ index == o.index
145
162
  end
146
163
 
147
164
  # @see the `==` method
@@ -153,7 +170,7 @@ module Coinbase::Client
153
170
  # Calculates hash code according to all attributes.
154
171
  # @return [Integer] Hash code
155
172
  def hash
156
- [wallet_id, network_id, public_key, address_id].hash
173
+ [wallet_id, network_id, public_key, address_id, index].hash
157
174
  end
158
175
 
159
176
  # Builds the object from hash
@@ -14,20 +14,22 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Coinbase::Client
17
- # The native eth staking context.
18
- class NativeEthStakingContext
19
- attr_accessor :stakeable_balance
17
+ #
18
+ class AddressHistoricalBalanceList
19
+ attr_accessor :data
20
20
 
21
- attr_accessor :unstakeable_balance
21
+ # True if this list has another page of items after this one that can be fetched.
22
+ attr_accessor :has_more
22
23
 
23
- attr_accessor :claimable_balance
24
+ # The page token to be used to fetch the next page.
25
+ attr_accessor :next_page
24
26
 
25
27
  # Attribute mapping from ruby-style variable name to JSON key.
26
28
  def self.attribute_map
27
29
  {
28
- :'stakeable_balance' => :'stakeable_balance',
29
- :'unstakeable_balance' => :'unstakeable_balance',
30
- :'claimable_balance' => :'claimable_balance'
30
+ :'data' => :'data',
31
+ :'has_more' => :'has_more',
32
+ :'next_page' => :'next_page'
31
33
  }
32
34
  end
33
35
 
@@ -39,9 +41,9 @@ module Coinbase::Client
39
41
  # Attribute type mapping.
40
42
  def self.openapi_types
41
43
  {
42
- :'stakeable_balance' => :'Balance',
43
- :'unstakeable_balance' => :'Balance',
44
- :'claimable_balance' => :'Balance'
44
+ :'data' => :'Array<HistoricalBalance>',
45
+ :'has_more' => :'Boolean',
46
+ :'next_page' => :'String'
45
47
  }
46
48
  end
47
49
 
@@ -55,33 +57,35 @@ module Coinbase::Client
55
57
  # @param [Hash] attributes Model attributes in the form of hash
56
58
  def initialize(attributes = {})
57
59
  if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `Coinbase::Client::NativeEthStakingContext` initialize method"
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Coinbase::Client::AddressHistoricalBalanceList` initialize method"
59
61
  end
60
62
 
61
63
  # check to see if the attribute exists and convert string to symbol for hash key
62
64
  attributes = attributes.each_with_object({}) { |(k, v), h|
63
65
  if (!self.class.attribute_map.key?(k.to_sym))
64
- fail ArgumentError, "`#{k}` is not a valid attribute in `Coinbase::Client::NativeEthStakingContext`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Coinbase::Client::AddressHistoricalBalanceList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
67
  end
66
68
  h[k.to_sym] = v
67
69
  }
68
70
 
69
- if attributes.key?(:'stakeable_balance')
70
- self.stakeable_balance = attributes[:'stakeable_balance']
71
+ if attributes.key?(:'data')
72
+ if (value = attributes[:'data']).is_a?(Array)
73
+ self.data = value
74
+ end
71
75
  else
72
- self.stakeable_balance = nil
76
+ self.data = nil
73
77
  end
74
78
 
75
- if attributes.key?(:'unstakeable_balance')
76
- self.unstakeable_balance = attributes[:'unstakeable_balance']
79
+ if attributes.key?(:'has_more')
80
+ self.has_more = attributes[:'has_more']
77
81
  else
78
- self.unstakeable_balance = nil
82
+ self.has_more = nil
79
83
  end
80
84
 
81
- if attributes.key?(:'claimable_balance')
82
- self.claimable_balance = attributes[:'claimable_balance']
85
+ if attributes.key?(:'next_page')
86
+ self.next_page = attributes[:'next_page']
83
87
  else
84
- self.claimable_balance = nil
88
+ self.next_page = nil
85
89
  end
86
90
  end
87
91
 
@@ -90,16 +94,16 @@ module Coinbase::Client
90
94
  def list_invalid_properties
91
95
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
92
96
  invalid_properties = Array.new
93
- if @stakeable_balance.nil?
94
- invalid_properties.push('invalid value for "stakeable_balance", stakeable_balance cannot be nil.')
97
+ if @data.nil?
98
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
95
99
  end
96
100
 
97
- if @unstakeable_balance.nil?
98
- invalid_properties.push('invalid value for "unstakeable_balance", unstakeable_balance cannot be nil.')
101
+ if @has_more.nil?
102
+ invalid_properties.push('invalid value for "has_more", has_more cannot be nil.')
99
103
  end
100
104
 
101
- if @claimable_balance.nil?
102
- invalid_properties.push('invalid value for "claimable_balance", claimable_balance cannot be nil.')
105
+ if @next_page.nil?
106
+ invalid_properties.push('invalid value for "next_page", next_page cannot be nil.')
103
107
  end
104
108
 
105
109
  invalid_properties
@@ -109,9 +113,9 @@ module Coinbase::Client
109
113
  # @return true if the model is valid
110
114
  def valid?
111
115
  warn '[DEPRECATED] the `valid?` method is obsolete'
112
- return false if @stakeable_balance.nil?
113
- return false if @unstakeable_balance.nil?
114
- return false if @claimable_balance.nil?
116
+ return false if @data.nil?
117
+ return false if @has_more.nil?
118
+ return false if @next_page.nil?
115
119
  true
116
120
  end
117
121
 
@@ -120,9 +124,9 @@ module Coinbase::Client
120
124
  def ==(o)
121
125
  return true if self.equal?(o)
122
126
  self.class == o.class &&
123
- stakeable_balance == o.stakeable_balance &&
124
- unstakeable_balance == o.unstakeable_balance &&
125
- claimable_balance == o.claimable_balance
127
+ data == o.data &&
128
+ has_more == o.has_more &&
129
+ next_page == o.next_page
126
130
  end
127
131
 
128
132
  # @see the `==` method
@@ -134,7 +138,7 @@ module Coinbase::Client
134
138
  # Calculates hash code according to all attributes.
135
139
  # @return [Integer] Hash code
136
140
  def hash
137
- [stakeable_balance, unstakeable_balance, claimable_balance].hash
141
+ [data, has_more, next_page].hash
138
142
  end
139
143
 
140
144
  # Builds the object from hash
@@ -17,7 +17,7 @@ module Coinbase::Client
17
17
  # Represents a single decoded event emitted by a smart contract
18
18
  class ContractEvent
19
19
  # The name of the blockchain network
20
- attr_accessor :network_name
20
+ attr_accessor :network_id
21
21
 
22
22
  # The name of the blockchain project or protocol
23
23
  attr_accessor :protocol_name
@@ -58,12 +58,12 @@ module Coinbase::Client
58
58
  # Attribute mapping from ruby-style variable name to JSON key.
59
59
  def self.attribute_map
60
60
  {
61
- :'network_name' => :'network_name',
61
+ :'network_id' => :'network_id',
62
62
  :'protocol_name' => :'protocol_name',
63
63
  :'contract_name' => :'contract_name',
64
64
  :'event_name' => :'event_name',
65
65
  :'sig' => :'sig',
66
- :'four_bytes' => :'fourBytes',
66
+ :'four_bytes' => :'four_bytes',
67
67
  :'contract_address' => :'contract_address',
68
68
  :'block_time' => :'block_time',
69
69
  :'block_height' => :'block_height',
@@ -82,7 +82,7 @@ module Coinbase::Client
82
82
  # Attribute type mapping.
83
83
  def self.openapi_types
84
84
  {
85
- :'network_name' => :'String',
85
+ :'network_id' => :'String',
86
86
  :'protocol_name' => :'String',
87
87
  :'contract_name' => :'String',
88
88
  :'event_name' => :'String',
@@ -119,56 +119,82 @@ module Coinbase::Client
119
119
  h[k.to_sym] = v
120
120
  }
121
121
 
122
- if attributes.key?(:'network_name')
123
- self.network_name = attributes[:'network_name']
122
+ if attributes.key?(:'network_id')
123
+ self.network_id = attributes[:'network_id']
124
+ else
125
+ self.network_id = nil
124
126
  end
125
127
 
126
128
  if attributes.key?(:'protocol_name')
127
129
  self.protocol_name = attributes[:'protocol_name']
130
+ else
131
+ self.protocol_name = nil
128
132
  end
129
133
 
130
134
  if attributes.key?(:'contract_name')
131
135
  self.contract_name = attributes[:'contract_name']
136
+ else
137
+ self.contract_name = nil
132
138
  end
133
139
 
134
140
  if attributes.key?(:'event_name')
135
141
  self.event_name = attributes[:'event_name']
142
+ else
143
+ self.event_name = nil
136
144
  end
137
145
 
138
146
  if attributes.key?(:'sig')
139
147
  self.sig = attributes[:'sig']
148
+ else
149
+ self.sig = nil
140
150
  end
141
151
 
142
152
  if attributes.key?(:'four_bytes')
143
153
  self.four_bytes = attributes[:'four_bytes']
154
+ else
155
+ self.four_bytes = nil
144
156
  end
145
157
 
146
158
  if attributes.key?(:'contract_address')
147
159
  self.contract_address = attributes[:'contract_address']
160
+ else
161
+ self.contract_address = nil
148
162
  end
149
163
 
150
164
  if attributes.key?(:'block_time')
151
165
  self.block_time = attributes[:'block_time']
166
+ else
167
+ self.block_time = nil
152
168
  end
153
169
 
154
170
  if attributes.key?(:'block_height')
155
171
  self.block_height = attributes[:'block_height']
172
+ else
173
+ self.block_height = nil
156
174
  end
157
175
 
158
176
  if attributes.key?(:'tx_hash')
159
177
  self.tx_hash = attributes[:'tx_hash']
178
+ else
179
+ self.tx_hash = nil
160
180
  end
161
181
 
162
182
  if attributes.key?(:'tx_index')
163
183
  self.tx_index = attributes[:'tx_index']
184
+ else
185
+ self.tx_index = nil
164
186
  end
165
187
 
166
188
  if attributes.key?(:'event_index')
167
189
  self.event_index = attributes[:'event_index']
190
+ else
191
+ self.event_index = nil
168
192
  end
169
193
 
170
194
  if attributes.key?(:'data')
171
195
  self.data = attributes[:'data']
196
+ else
197
+ self.data = nil
172
198
  end
173
199
  end
174
200
 
@@ -177,6 +203,58 @@ module Coinbase::Client
177
203
  def list_invalid_properties
178
204
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
179
205
  invalid_properties = Array.new
206
+ if @network_id.nil?
207
+ invalid_properties.push('invalid value for "network_id", network_id cannot be nil.')
208
+ end
209
+
210
+ if @protocol_name.nil?
211
+ invalid_properties.push('invalid value for "protocol_name", protocol_name cannot be nil.')
212
+ end
213
+
214
+ if @contract_name.nil?
215
+ invalid_properties.push('invalid value for "contract_name", contract_name cannot be nil.')
216
+ end
217
+
218
+ if @event_name.nil?
219
+ invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
220
+ end
221
+
222
+ if @sig.nil?
223
+ invalid_properties.push('invalid value for "sig", sig cannot be nil.')
224
+ end
225
+
226
+ if @four_bytes.nil?
227
+ invalid_properties.push('invalid value for "four_bytes", four_bytes cannot be nil.')
228
+ end
229
+
230
+ if @contract_address.nil?
231
+ invalid_properties.push('invalid value for "contract_address", contract_address cannot be nil.')
232
+ end
233
+
234
+ if @block_time.nil?
235
+ invalid_properties.push('invalid value for "block_time", block_time cannot be nil.')
236
+ end
237
+
238
+ if @block_height.nil?
239
+ invalid_properties.push('invalid value for "block_height", block_height cannot be nil.')
240
+ end
241
+
242
+ if @tx_hash.nil?
243
+ invalid_properties.push('invalid value for "tx_hash", tx_hash cannot be nil.')
244
+ end
245
+
246
+ if @tx_index.nil?
247
+ invalid_properties.push('invalid value for "tx_index", tx_index cannot be nil.')
248
+ end
249
+
250
+ if @event_index.nil?
251
+ invalid_properties.push('invalid value for "event_index", event_index cannot be nil.')
252
+ end
253
+
254
+ if @data.nil?
255
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
256
+ end
257
+
180
258
  invalid_properties
181
259
  end
182
260
 
@@ -184,6 +262,19 @@ module Coinbase::Client
184
262
  # @return true if the model is valid
185
263
  def valid?
186
264
  warn '[DEPRECATED] the `valid?` method is obsolete'
265
+ return false if @network_id.nil?
266
+ return false if @protocol_name.nil?
267
+ return false if @contract_name.nil?
268
+ return false if @event_name.nil?
269
+ return false if @sig.nil?
270
+ return false if @four_bytes.nil?
271
+ return false if @contract_address.nil?
272
+ return false if @block_time.nil?
273
+ return false if @block_height.nil?
274
+ return false if @tx_hash.nil?
275
+ return false if @tx_index.nil?
276
+ return false if @event_index.nil?
277
+ return false if @data.nil?
187
278
  true
188
279
  end
189
280
 
@@ -192,7 +283,7 @@ module Coinbase::Client
192
283
  def ==(o)
193
284
  return true if self.equal?(o)
194
285
  self.class == o.class &&
195
- network_name == o.network_name &&
286
+ network_id == o.network_id &&
196
287
  protocol_name == o.protocol_name &&
197
288
  contract_name == o.contract_name &&
198
289
  event_name == o.event_name &&
@@ -216,7 +307,7 @@ module Coinbase::Client
216
307
  # Calculates hash code according to all attributes.
217
308
  # @return [Integer] Hash code
218
309
  def hash
219
- [network_name, protocol_name, contract_name, event_name, sig, four_bytes, contract_address, block_time, block_height, tx_hash, tx_index, event_index, data].hash
310
+ [network_id, protocol_name, contract_name, event_name, sig, four_bytes, contract_address, block_time, block_height, tx_hash, tx_index, event_index, data].hash
220
311
  end
221
312
 
222
313
  # Builds the object from hash
@@ -21,11 +21,15 @@ module Coinbase::Client
21
21
  # An attestation signed by the private key that is associated with the wallet. The attestation will be a hex-encoded signature of a json payload with fields `wallet_id` and `public_key`, signed by the private key associated with the public_key set in the request.
22
22
  attr_accessor :attestation
23
23
 
24
+ # The index of the address within the wallet.
25
+ attr_accessor :address_index
26
+
24
27
  # Attribute mapping from ruby-style variable name to JSON key.
25
28
  def self.attribute_map
26
29
  {
27
30
  :'public_key' => :'public_key',
28
- :'attestation' => :'attestation'
31
+ :'attestation' => :'attestation',
32
+ :'address_index' => :'address_index'
29
33
  }
30
34
  end
31
35
 
@@ -38,7 +42,8 @@ module Coinbase::Client
38
42
  def self.openapi_types
39
43
  {
40
44
  :'public_key' => :'String',
41
- :'attestation' => :'String'
45
+ :'attestation' => :'String',
46
+ :'address_index' => :'Integer'
42
47
  }
43
48
  end
44
49
 
@@ -70,6 +75,10 @@ module Coinbase::Client
70
75
  if attributes.key?(:'attestation')
71
76
  self.attestation = attributes[:'attestation']
72
77
  end
78
+
79
+ if attributes.key?(:'address_index')
80
+ self.address_index = attributes[:'address_index']
81
+ end
73
82
  end
74
83
 
75
84
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -93,7 +102,8 @@ module Coinbase::Client
93
102
  return true if self.equal?(o)
94
103
  self.class == o.class &&
95
104
  public_key == o.public_key &&
96
- attestation == o.attestation
105
+ attestation == o.attestation &&
106
+ address_index == o.address_index
97
107
  end
98
108
 
99
109
  # @see the `==` method
@@ -105,7 +115,7 @@ module Coinbase::Client
105
115
  # Calculates hash code according to all attributes.
106
116
  # @return [Integer] Hash code
107
117
  def hash
108
- [public_key, attestation].hash
118
+ [public_key, attestation, address_index].hash
109
119
  end
110
120
 
111
121
  # Builds the object from hash
@@ -27,13 +27,17 @@ module Coinbase::Client
27
27
  # The destination address
28
28
  attr_accessor :destination
29
29
 
30
+ # Whether the transfer uses sponsored gas
31
+ attr_accessor :gasless
32
+
30
33
  # Attribute mapping from ruby-style variable name to JSON key.
31
34
  def self.attribute_map
32
35
  {
33
36
  :'amount' => :'amount',
34
37
  :'network_id' => :'network_id',
35
38
  :'asset_id' => :'asset_id',
36
- :'destination' => :'destination'
39
+ :'destination' => :'destination',
40
+ :'gasless' => :'gasless'
37
41
  }
38
42
  end
39
43
 
@@ -48,7 +52,8 @@ module Coinbase::Client
48
52
  :'amount' => :'String',
49
53
  :'network_id' => :'String',
50
54
  :'asset_id' => :'String',
51
- :'destination' => :'String'
55
+ :'destination' => :'String',
56
+ :'gasless' => :'Boolean'
52
57
  }
53
58
  end
54
59
 
@@ -96,6 +101,10 @@ module Coinbase::Client
96
101
  else
97
102
  self.destination = nil
98
103
  end
104
+
105
+ if attributes.key?(:'gasless')
106
+ self.gasless = attributes[:'gasless']
107
+ end
99
108
  end
100
109
 
101
110
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -141,7 +150,8 @@ module Coinbase::Client
141
150
  amount == o.amount &&
142
151
  network_id == o.network_id &&
143
152
  asset_id == o.asset_id &&
144
- destination == o.destination
153
+ destination == o.destination &&
154
+ gasless == o.gasless
145
155
  end
146
156
 
147
157
  # @see the `==` method
@@ -153,7 +163,7 @@ module Coinbase::Client
153
163
  # Calculates hash code according to all attributes.
154
164
  # @return [Integer] Hash code
155
165
  def hash
156
- [amount, network_id, asset_id, destination].hash
166
+ [amount, network_id, asset_id, destination, gasless].hash
157
167
  end
158
168
 
159
169
  # Builds the object from hash
@@ -23,7 +23,7 @@ module Coinbase::Client
23
23
  attr_accessor :public_key
24
24
 
25
25
  # The address to which the validator's rewards are sent.
26
- attr_accessor :withdrawl_address
26
+ attr_accessor :withdrawal_address
27
27
 
28
28
  # Whether the validator has been slashed.
29
29
  attr_accessor :slashed
@@ -46,7 +46,7 @@ module Coinbase::Client
46
46
  {
47
47
  :'index' => :'index',
48
48
  :'public_key' => :'public_key',
49
- :'withdrawl_address' => :'withdrawl_address',
49
+ :'withdrawal_address' => :'withdrawal_address',
50
50
  :'slashed' => :'slashed',
51
51
  :'activation_epoch' => :'activationEpoch',
52
52
  :'exit_epoch' => :'exitEpoch',
@@ -66,7 +66,7 @@ module Coinbase::Client
66
66
  {
67
67
  :'index' => :'String',
68
68
  :'public_key' => :'String',
69
- :'withdrawl_address' => :'String',
69
+ :'withdrawal_address' => :'String',
70
70
  :'slashed' => :'Boolean',
71
71
  :'activation_epoch' => :'String',
72
72
  :'exit_epoch' => :'String',
@@ -109,10 +109,10 @@ module Coinbase::Client
109
109
  self.public_key = nil
110
110
  end
111
111
 
112
- if attributes.key?(:'withdrawl_address')
113
- self.withdrawl_address = attributes[:'withdrawl_address']
112
+ if attributes.key?(:'withdrawal_address')
113
+ self.withdrawal_address = attributes[:'withdrawal_address']
114
114
  else
115
- self.withdrawl_address = nil
115
+ self.withdrawal_address = nil
116
116
  end
117
117
 
118
118
  if attributes.key?(:'slashed')
@@ -165,8 +165,8 @@ module Coinbase::Client
165
165
  invalid_properties.push('invalid value for "public_key", public_key cannot be nil.')
166
166
  end
167
167
 
168
- if @withdrawl_address.nil?
169
- invalid_properties.push('invalid value for "withdrawl_address", withdrawl_address cannot be nil.')
168
+ if @withdrawal_address.nil?
169
+ invalid_properties.push('invalid value for "withdrawal_address", withdrawal_address cannot be nil.')
170
170
  end
171
171
 
172
172
  if @slashed.nil?
@@ -202,7 +202,7 @@ module Coinbase::Client
202
202
  warn '[DEPRECATED] the `valid?` method is obsolete'
203
203
  return false if @index.nil?
204
204
  return false if @public_key.nil?
205
- return false if @withdrawl_address.nil?
205
+ return false if @withdrawal_address.nil?
206
206
  return false if @slashed.nil?
207
207
  return false if @activation_epoch.nil?
208
208
  return false if @exit_epoch.nil?
@@ -219,7 +219,7 @@ module Coinbase::Client
219
219
  self.class == o.class &&
220
220
  index == o.index &&
221
221
  public_key == o.public_key &&
222
- withdrawl_address == o.withdrawl_address &&
222
+ withdrawal_address == o.withdrawal_address &&
223
223
  slashed == o.slashed &&
224
224
  activation_epoch == o.activation_epoch &&
225
225
  exit_epoch == o.exit_epoch &&
@@ -237,7 +237,7 @@ module Coinbase::Client
237
237
  # Calculates hash code according to all attributes.
238
238
  # @return [Integer] Hash code
239
239
  def hash
240
- [index, public_key, withdrawl_address, slashed, activation_epoch, exit_epoch, withdrawable_epoch, balance, effective_balance].hash
240
+ [index, public_key, withdrawal_address, slashed, activation_epoch, exit_epoch, withdrawable_epoch, balance, effective_balance].hash
241
241
  end
242
242
 
243
243
  # Builds the object from hash
@@ -19,9 +19,10 @@ module Coinbase::Client
19
19
  TRADE = "trade".freeze
20
20
  FAUCET = "faucet".freeze
21
21
  SERVER_SIGNER = "server_signer".freeze
22
+ UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
22
23
 
23
24
  def self.all_vars
24
- @all_vars ||= [TRANSFER, TRADE, FAUCET, SERVER_SIGNER].freeze
25
+ @all_vars ||= [TRANSFER, TRADE, FAUCET, SERVER_SIGNER, UNKNOWN_DEFAULT_OPEN_API].freeze
25
26
  end
26
27
 
27
28
  # Builds the enum from string