coinbase-sdk 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/lib/coinbase/address/external_address.rb +3 -166
  3. data/lib/coinbase/address/wallet_address.rb +44 -0
  4. data/lib/coinbase/address.rb +128 -0
  5. data/lib/coinbase/client/api/addresses_api.rb +1 -1
  6. data/lib/coinbase/client/api/assets_api.rb +3 -3
  7. data/lib/coinbase/client/api/contract_events_api.rb +121 -0
  8. data/lib/coinbase/client/api/external_addresses_api.rb +1 -1
  9. data/lib/coinbase/client/api/server_signers_api.rb +1 -1
  10. data/lib/coinbase/client/api/stake_api.rb +242 -1
  11. data/lib/coinbase/client/api/trades_api.rb +1 -1
  12. data/lib/coinbase/client/api/transfers_api.rb +1 -1
  13. data/lib/coinbase/client/api/users_api.rb +1 -1
  14. data/lib/coinbase/client/api/validators_api.rb +1 -1
  15. data/lib/coinbase/client/api/wallets_api.rb +1 -1
  16. data/lib/coinbase/client/api/webhooks_api.rb +286 -0
  17. data/lib/coinbase/client/api_client.rb +1 -1
  18. data/lib/coinbase/client/api_error.rb +1 -1
  19. data/lib/coinbase/client/configuration.rb +11 -1
  20. data/lib/coinbase/client/models/address.rb +1 -1
  21. data/lib/coinbase/client/models/address_balance_list.rb +1 -1
  22. data/lib/coinbase/client/models/address_list.rb +1 -1
  23. data/lib/coinbase/client/models/asset.rb +1 -1
  24. data/lib/coinbase/client/models/balance.rb +1 -1
  25. data/lib/coinbase/client/models/broadcast_staking_operation_request.rb +239 -0
  26. data/lib/coinbase/client/models/broadcast_trade_request.rb +1 -1
  27. data/lib/coinbase/client/models/broadcast_transfer_request.rb +1 -1
  28. data/lib/coinbase/client/models/build_staking_operation_request.rb +1 -1
  29. data/lib/coinbase/client/models/contract_event.rb +336 -0
  30. data/lib/coinbase/client/models/contract_event_list.rb +259 -0
  31. data/lib/coinbase/client/models/create_address_request.rb +1 -1
  32. data/lib/coinbase/client/models/create_server_signer_request.rb +1 -1
  33. data/lib/coinbase/client/models/create_staking_operation_request.rb +274 -0
  34. data/lib/coinbase/client/models/create_trade_request.rb +1 -1
  35. data/lib/coinbase/client/models/create_transfer_request.rb +1 -1
  36. data/lib/coinbase/client/models/create_wallet_request.rb +1 -1
  37. data/lib/coinbase/client/models/create_wallet_request_wallet.rb +1 -1
  38. data/lib/coinbase/client/models/create_webhook_request.rb +282 -0
  39. data/lib/coinbase/client/models/error.rb +1 -1
  40. data/lib/coinbase/client/models/ethereum_validator_metadata.rb +1 -1
  41. data/lib/coinbase/client/models/faucet_transaction.rb +1 -1
  42. data/lib/coinbase/client/models/feature.rb +1 -1
  43. data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +1 -1
  44. data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +1 -1
  45. data/lib/coinbase/client/models/get_staking_context_request.rb +1 -1
  46. data/lib/coinbase/client/models/native_eth_staking_context.rb +1 -1
  47. data/lib/coinbase/client/models/partial_eth_staking_context.rb +1 -1
  48. data/lib/coinbase/client/models/seed_creation_event.rb +1 -1
  49. data/lib/coinbase/client/models/seed_creation_event_result.rb +1 -1
  50. data/lib/coinbase/client/models/server_signer.rb +1 -1
  51. data/lib/coinbase/client/models/server_signer_event.rb +1 -1
  52. data/lib/coinbase/client/models/server_signer_event_event.rb +1 -1
  53. data/lib/coinbase/client/models/server_signer_event_list.rb +1 -1
  54. data/lib/coinbase/client/models/server_signer_list.rb +1 -1
  55. data/lib/coinbase/client/models/signature_creation_event.rb +1 -1
  56. data/lib/coinbase/client/models/signature_creation_event_result.rb +1 -1
  57. data/lib/coinbase/client/models/signed_voluntary_exit_message_metadata.rb +1 -1
  58. data/lib/coinbase/client/models/staking_context.rb +1 -1
  59. data/lib/coinbase/client/models/staking_context_context.rb +1 -1
  60. data/lib/coinbase/client/models/staking_operation.rb +16 -6
  61. data/lib/coinbase/client/models/staking_operation_metadata.rb +1 -1
  62. data/lib/coinbase/client/models/staking_reward.rb +1 -1
  63. data/lib/coinbase/client/models/staking_reward_format.rb +1 -1
  64. data/lib/coinbase/client/models/trade.rb +1 -1
  65. data/lib/coinbase/client/models/trade_list.rb +1 -1
  66. data/lib/coinbase/client/models/transaction.rb +1 -1
  67. data/lib/coinbase/client/models/transaction_type.rb +1 -1
  68. data/lib/coinbase/client/models/transfer.rb +5 -93
  69. data/lib/coinbase/client/models/transfer_list.rb +1 -1
  70. data/lib/coinbase/client/models/update_webhook_request.rb +289 -0
  71. data/lib/coinbase/client/models/user.rb +1 -1
  72. data/lib/coinbase/client/models/validator.rb +1 -1
  73. data/lib/coinbase/client/models/validator_details.rb +1 -1
  74. data/lib/coinbase/client/models/validator_list.rb +1 -1
  75. data/lib/coinbase/client/models/wallet.rb +1 -1
  76. data/lib/coinbase/client/models/wallet_list.rb +1 -1
  77. data/lib/coinbase/client/models/webhook.rb +299 -0
  78. data/lib/coinbase/client/models/webhook_event_filter.rb +236 -0
  79. data/lib/coinbase/client/models/webhook_event_type.rb +41 -0
  80. data/lib/coinbase/client/models/webhook_list.rb +244 -0
  81. data/lib/coinbase/client/version.rb +1 -1
  82. data/lib/coinbase/client.rb +13 -1
  83. data/lib/coinbase/middleware.rb +12 -0
  84. data/lib/coinbase/staking_operation.rb +106 -5
  85. data/lib/coinbase/trade.rb +1 -1
  86. data/lib/coinbase/transfer.rb +4 -5
  87. data/lib/coinbase/wallet.rb +76 -0
  88. data/lib/coinbase.rb +2 -1
  89. metadata +28 -2
@@ -0,0 +1,282 @@
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.7.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Coinbase::Client
17
+ class CreateWebhookRequest
18
+ # The ID of the blockchain network
19
+ attr_accessor :network_id
20
+
21
+ attr_accessor :event_type
22
+
23
+ # Webhook will monitor all events that matches any one of the event filters.
24
+ attr_accessor :event_filters
25
+
26
+ # The URL to which the notifications will be sent
27
+ attr_accessor :notification_uri
28
+
29
+ class EnumAttributeValidator
30
+ attr_reader :datatype
31
+ attr_reader :allowable_values
32
+
33
+ def initialize(datatype, allowable_values)
34
+ @allowable_values = allowable_values.map do |value|
35
+ case datatype.to_s
36
+ when /Integer/i
37
+ value.to_i
38
+ when /Float/i
39
+ value.to_f
40
+ else
41
+ value
42
+ end
43
+ end
44
+ end
45
+
46
+ def valid?(value)
47
+ !value || allowable_values.include?(value)
48
+ end
49
+ end
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'network_id' => :'network_id',
55
+ :'event_type' => :'event_type',
56
+ :'event_filters' => :'event_filters',
57
+ :'notification_uri' => :'notification_uri'
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
+ :'network_id' => :'String',
70
+ :'event_type' => :'WebhookEventType',
71
+ :'event_filters' => :'Array<WebhookEventFilter>',
72
+ :'notification_uri' => :'String'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ ])
80
+ end
81
+
82
+ # Initializes the object
83
+ # @param [Hash] attributes Model attributes in the form of hash
84
+ def initialize(attributes = {})
85
+ if (!attributes.is_a?(Hash))
86
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Coinbase::Client::CreateWebhookRequest` initialize method"
87
+ end
88
+
89
+ # check to see if the attribute exists and convert string to symbol for hash key
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!self.class.attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Coinbase::Client::CreateWebhookRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'network_id')
98
+ self.network_id = attributes[:'network_id']
99
+ else
100
+ self.network_id = nil
101
+ end
102
+
103
+ if attributes.key?(:'event_type')
104
+ self.event_type = attributes[:'event_type']
105
+ end
106
+
107
+ if attributes.key?(:'event_filters')
108
+ if (value = attributes[:'event_filters']).is_a?(Array)
109
+ self.event_filters = value
110
+ end
111
+ end
112
+
113
+ if attributes.key?(:'notification_uri')
114
+ self.notification_uri = attributes[:'notification_uri']
115
+ else
116
+ self.notification_uri = nil
117
+ end
118
+ end
119
+
120
+ # Show invalid properties with the reasons. Usually used together with valid?
121
+ # @return Array for valid properties with the reasons
122
+ def list_invalid_properties
123
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
124
+ invalid_properties = Array.new
125
+ if @network_id.nil?
126
+ invalid_properties.push('invalid value for "network_id", network_id cannot be nil.')
127
+ end
128
+
129
+ if @notification_uri.nil?
130
+ invalid_properties.push('invalid value for "notification_uri", notification_uri cannot be nil.')
131
+ end
132
+
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ warn '[DEPRECATED] the `valid?` method is obsolete'
140
+ return false if @network_id.nil?
141
+ return false if @notification_uri.nil?
142
+ true
143
+ end
144
+
145
+ # Checks equality by comparing each attribute.
146
+ # @param [Object] Object to be compared
147
+ def ==(o)
148
+ return true if self.equal?(o)
149
+ self.class == o.class &&
150
+ network_id == o.network_id &&
151
+ event_type == o.event_type &&
152
+ event_filters == o.event_filters &&
153
+ notification_uri == o.notification_uri
154
+ end
155
+
156
+ # @see the `==` method
157
+ # @param [Object] Object to be compared
158
+ def eql?(o)
159
+ self == o
160
+ end
161
+
162
+ # Calculates hash code according to all attributes.
163
+ # @return [Integer] Hash code
164
+ def hash
165
+ [network_id, event_type, event_filters, notification_uri].hash
166
+ end
167
+
168
+ # Builds the object from hash
169
+ # @param [Hash] attributes Model attributes in the form of hash
170
+ # @return [Object] Returns the model itself
171
+ def self.build_from_hash(attributes)
172
+ return nil unless attributes.is_a?(Hash)
173
+ attributes = attributes.transform_keys(&:to_sym)
174
+ transformed_hash = {}
175
+ openapi_types.each_pair do |key, type|
176
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
177
+ transformed_hash["#{key}"] = nil
178
+ elsif type =~ /\AArray<(.*)>/i
179
+ # check to ensure the input is an array given that the attribute
180
+ # is documented as an array but the input is not
181
+ if attributes[attribute_map[key]].is_a?(Array)
182
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
183
+ end
184
+ elsif !attributes[attribute_map[key]].nil?
185
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
186
+ end
187
+ end
188
+ new(transformed_hash)
189
+ end
190
+
191
+ # Deserializes the data based on type
192
+ # @param string type Data type
193
+ # @param string value Value to be deserialized
194
+ # @return [Object] Deserialized data
195
+ def self._deserialize(type, value)
196
+ case type.to_sym
197
+ when :Time
198
+ Time.parse(value)
199
+ when :Date
200
+ Date.parse(value)
201
+ when :String
202
+ value.to_s
203
+ when :Integer
204
+ value.to_i
205
+ when :Float
206
+ value.to_f
207
+ when :Boolean
208
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
209
+ true
210
+ else
211
+ false
212
+ end
213
+ when :Object
214
+ # generic object (usually a Hash), return directly
215
+ value
216
+ when /\AArray<(?<inner_type>.+)>\z/
217
+ inner_type = Regexp.last_match[:inner_type]
218
+ value.map { |v| _deserialize(inner_type, v) }
219
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
220
+ k_type = Regexp.last_match[:k_type]
221
+ v_type = Regexp.last_match[:v_type]
222
+ {}.tap do |hash|
223
+ value.each do |k, v|
224
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
225
+ end
226
+ end
227
+ else # model
228
+ # models (e.g. Pet) or oneOf
229
+ klass = Coinbase::Client.const_get(type)
230
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
231
+ end
232
+ end
233
+
234
+ # Returns the string representation of the object
235
+ # @return [String] String presentation of the object
236
+ def to_s
237
+ to_hash.to_s
238
+ end
239
+
240
+ # to_body is an alias to to_hash (backward compatibility)
241
+ # @return [Hash] Returns the object in the form of hash
242
+ def to_body
243
+ to_hash
244
+ end
245
+
246
+ # Returns the object in the form of hash
247
+ # @return [Hash] Returns the object in the form of hash
248
+ def to_hash
249
+ hash = {}
250
+ self.class.attribute_map.each_pair do |attr, param|
251
+ value = self.send(attr)
252
+ if value.nil?
253
+ is_nullable = self.class.openapi_nullable.include?(attr)
254
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
255
+ end
256
+
257
+ hash[param] = _to_hash(value)
258
+ end
259
+ hash
260
+ end
261
+
262
+ # Outputs non-array value in the form of hash
263
+ # For object, use to_hash. Otherwise, just return the value
264
+ # @param [Object] value Any valid value
265
+ # @return [Hash] Returns the value in the form of hash
266
+ def _to_hash(value)
267
+ if value.is_a?(Array)
268
+ value.compact.map { |v| _to_hash(v) }
269
+ elsif value.is_a?(Hash)
270
+ {}.tap do |hash|
271
+ value.each { |k, v| hash[k] = _to_hash(v) }
272
+ end
273
+ elsif value.respond_to? :to_hash
274
+ value.to_hash
275
+ else
276
+ value
277
+ end
278
+ end
279
+
280
+ end
281
+
282
+ 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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -19,16 +19,19 @@ module Coinbase::Client
19
19
  # The unique ID of the staking operation.
20
20
  attr_accessor :id
21
21
 
22
+ # The ID of the wallet that owns the address.
23
+ attr_accessor :wallet_id
24
+
22
25
  # The ID of the blockchain network.
23
26
  attr_accessor :network_id
24
27
 
25
28
  # The onchain address orchestrating the staking operation.
26
29
  attr_accessor :address_id
27
30
 
28
- # The status of the staking operation
31
+ # The status of the staking operation.
29
32
  attr_accessor :status
30
33
 
31
- # The transaction(s) that will execute the staking operation onchain
34
+ # The transaction(s) that will execute the staking operation onchain.
32
35
  attr_accessor :transactions
33
36
 
34
37
  attr_accessor :metadata
@@ -59,6 +62,7 @@ module Coinbase::Client
59
62
  def self.attribute_map
60
63
  {
61
64
  :'id' => :'id',
65
+ :'wallet_id' => :'wallet_id',
62
66
  :'network_id' => :'network_id',
63
67
  :'address_id' => :'address_id',
64
68
  :'status' => :'status',
@@ -76,6 +80,7 @@ module Coinbase::Client
76
80
  def self.openapi_types
77
81
  {
78
82
  :'id' => :'String',
83
+ :'wallet_id' => :'String',
79
84
  :'network_id' => :'String',
80
85
  :'address_id' => :'String',
81
86
  :'status' => :'String',
@@ -111,6 +116,10 @@ module Coinbase::Client
111
116
  self.id = nil
112
117
  end
113
118
 
119
+ if attributes.key?(:'wallet_id')
120
+ self.wallet_id = attributes[:'wallet_id']
121
+ end
122
+
114
123
  if attributes.key?(:'network_id')
115
124
  self.network_id = attributes[:'network_id']
116
125
  else
@@ -178,7 +187,7 @@ module Coinbase::Client
178
187
  return false if @network_id.nil?
179
188
  return false if @address_id.nil?
180
189
  return false if @status.nil?
181
- status_validator = EnumAttributeValidator.new('String', ["initialized", "pending", "complete", "failed"])
190
+ status_validator = EnumAttributeValidator.new('String', ["initialized", "pending", "complete", "failed", "unspecified"])
182
191
  return false unless status_validator.valid?(@status)
183
192
  return false if @transactions.nil?
184
193
  true
@@ -187,7 +196,7 @@ module Coinbase::Client
187
196
  # Custom attribute writer method checking allowed values (enum).
188
197
  # @param [Object] status Object to be assigned
189
198
  def status=(status)
190
- validator = EnumAttributeValidator.new('String', ["initialized", "pending", "complete", "failed"])
199
+ validator = EnumAttributeValidator.new('String', ["initialized", "pending", "complete", "failed", "unspecified"])
191
200
  unless validator.valid?(status)
192
201
  fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
193
202
  end
@@ -200,6 +209,7 @@ module Coinbase::Client
200
209
  return true if self.equal?(o)
201
210
  self.class == o.class &&
202
211
  id == o.id &&
212
+ wallet_id == o.wallet_id &&
203
213
  network_id == o.network_id &&
204
214
  address_id == o.address_id &&
205
215
  status == o.status &&
@@ -216,7 +226,7 @@ module Coinbase::Client
216
226
  # Calculates hash code according to all attributes.
217
227
  # @return [Integer] Hash code
218
228
  def hash
219
- [id, network_id, address_id, status, transactions, metadata].hash
229
+ [id, wallet_id, network_id, address_id, status, transactions, metadata].hash
220
230
  end
221
231
 
222
232
  # Builds the object from hash
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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.6.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12