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.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/lib/coinbase/address/wallet_address.rb +7 -4
  3. data/lib/coinbase/address.rb +36 -0
  4. data/lib/coinbase/client/api/addresses_api.rb +1 -1
  5. data/lib/coinbase/client/api/assets_api.rb +1 -1
  6. data/lib/coinbase/client/api/contract_events_api.rb +1 -1
  7. data/lib/coinbase/client/api/external_addresses_api.rb +86 -1
  8. data/lib/coinbase/client/api/networks_api.rb +85 -0
  9. data/lib/coinbase/client/api/server_signers_api.rb +1 -1
  10. data/lib/coinbase/client/api/stake_api.rb +121 -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 +1 -1
  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 +1 -11
  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_historical_balance_list.rb +258 -0
  23. data/lib/coinbase/client/models/address_list.rb +1 -1
  24. data/lib/coinbase/client/models/asset.rb +1 -1
  25. data/lib/coinbase/client/models/balance.rb +1 -1
  26. data/lib/coinbase/client/models/broadcast_staking_operation_request.rb +1 -1
  27. data/lib/coinbase/client/models/broadcast_trade_request.rb +1 -1
  28. data/lib/coinbase/client/models/broadcast_transfer_request.rb +1 -1
  29. data/lib/coinbase/client/models/build_staking_operation_request.rb +1 -1
  30. data/lib/coinbase/client/models/contract_event.rb +1 -1
  31. data/lib/coinbase/client/models/contract_event_list.rb +1 -1
  32. data/lib/coinbase/client/models/create_address_request.rb +1 -1
  33. data/lib/coinbase/client/models/create_server_signer_request.rb +1 -1
  34. data/lib/coinbase/client/models/create_staking_operation_request.rb +1 -1
  35. data/lib/coinbase/client/models/create_trade_request.rb +1 -1
  36. data/lib/coinbase/client/models/create_transfer_request.rb +15 -5
  37. data/lib/coinbase/client/models/create_wallet_request.rb +1 -1
  38. data/lib/coinbase/client/models/create_wallet_request_wallet.rb +1 -1
  39. data/lib/coinbase/client/models/create_webhook_request.rb +1 -1
  40. data/lib/coinbase/client/models/error.rb +1 -1
  41. data/lib/coinbase/client/models/ethereum_validator.rb +374 -0
  42. data/lib/coinbase/client/models/ethereum_validator_metadata.rb +1 -1
  43. data/lib/coinbase/client/models/faucet_transaction.rb +1 -1
  44. data/lib/coinbase/client/models/feature.rb +1 -1
  45. data/lib/coinbase/client/models/feature_set.rb +307 -0
  46. data/lib/coinbase/client/models/fetch_historical_staking_balances200_response.rb +258 -0
  47. data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +1 -1
  48. data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +1 -1
  49. data/lib/coinbase/client/models/get_staking_context_request.rb +1 -1
  50. data/lib/coinbase/client/models/get_validator200_response.rb +221 -0
  51. data/lib/coinbase/client/models/get_validator200_response_validator.rb +214 -0
  52. data/lib/coinbase/client/models/historical_balance.rb +273 -0
  53. data/lib/coinbase/client/models/native_eth_staking_context.rb +1 -1
  54. data/lib/coinbase/client/models/network.rb +355 -0
  55. data/lib/coinbase/client/models/network_identifier.rb +44 -0
  56. data/lib/coinbase/client/models/partial_eth_staking_context.rb +1 -1
  57. data/lib/coinbase/client/models/seed_creation_event.rb +1 -1
  58. data/lib/coinbase/client/models/seed_creation_event_result.rb +1 -1
  59. data/lib/coinbase/client/models/server_signer.rb +1 -1
  60. data/lib/coinbase/client/models/server_signer_event.rb +1 -1
  61. data/lib/coinbase/client/models/server_signer_event_event.rb +1 -1
  62. data/lib/coinbase/client/models/server_signer_event_list.rb +1 -1
  63. data/lib/coinbase/client/models/server_signer_list.rb +1 -1
  64. data/lib/coinbase/client/models/signature_creation_event.rb +1 -1
  65. data/lib/coinbase/client/models/signature_creation_event_result.rb +1 -1
  66. data/lib/coinbase/client/models/signed_voluntary_exit_message_metadata.rb +1 -1
  67. data/lib/coinbase/client/models/sponsored_send.rb +338 -0
  68. data/lib/coinbase/client/models/staking_balance.rb +289 -0
  69. data/lib/coinbase/client/models/staking_context.rb +1 -1
  70. data/lib/coinbase/client/models/staking_context_context.rb +223 -75
  71. data/lib/coinbase/client/models/staking_operation.rb +3 -3
  72. data/lib/coinbase/client/models/staking_operation_metadata.rb +1 -1
  73. data/lib/coinbase/client/models/staking_reward.rb +23 -7
  74. data/lib/coinbase/client/models/staking_reward_format.rb +3 -2
  75. data/lib/coinbase/client/models/staking_reward_usd_value.rb +257 -0
  76. data/lib/coinbase/client/models/trade.rb +1 -1
  77. data/lib/coinbase/client/models/trade_list.rb +1 -1
  78. data/lib/coinbase/client/models/transaction.rb +3 -3
  79. data/lib/coinbase/client/models/transaction_type.rb +3 -2
  80. data/lib/coinbase/client/models/transfer.rb +102 -9
  81. data/lib/coinbase/client/models/transfer_list.rb +1 -1
  82. data/lib/coinbase/client/models/update_webhook_request.rb +1 -1
  83. data/lib/coinbase/client/models/user.rb +1 -1
  84. data/lib/coinbase/client/models/validator.rb +1 -1
  85. data/lib/coinbase/client/models/validator_details.rb +1 -1
  86. data/lib/coinbase/client/models/validator_list.rb +1 -1
  87. data/lib/coinbase/client/models/validator_list_data.rb +216 -0
  88. data/lib/coinbase/client/models/wallet.rb +14 -17
  89. data/lib/coinbase/client/models/wallet_list.rb +1 -1
  90. data/lib/coinbase/client/models/webhook.rb +1 -1
  91. data/lib/coinbase/client/models/webhook_event_filter.rb +1 -1
  92. data/lib/coinbase/client/models/webhook_event_type.rb +3 -2
  93. data/lib/coinbase/client/models/webhook_list.rb +1 -1
  94. data/lib/coinbase/client/version.rb +1 -1
  95. data/lib/coinbase/client.rb +11 -4
  96. data/lib/coinbase/errors.rb +7 -0
  97. data/lib/coinbase/historical_balance.rb +53 -0
  98. data/lib/coinbase/server_signer.rb +14 -3
  99. data/lib/coinbase/sponsored_send.rb +110 -0
  100. data/lib/coinbase/staking_balance.rb +86 -0
  101. data/lib/coinbase/staking_reward.rb +18 -0
  102. data/lib/coinbase/transaction.rb +7 -3
  103. data/lib/coinbase/transfer.rb +56 -28
  104. data/lib/coinbase/wallet/data.rb +31 -0
  105. data/lib/coinbase/wallet.rb +15 -46
  106. data/lib/coinbase.rb +15 -3
  107. metadata +48 -2
@@ -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.7.0
9
+ Generator version: 7.6.0
10
10
 
11
11
  =end
12
12
 
@@ -14,92 +14,240 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Coinbase::Client
17
- module StakingContextContext
18
- class << self
19
- # List of class defined in oneOf (OpenAPI v3)
20
- def openapi_one_of
21
- [
22
- :'NativeEthStakingContext',
23
- :'PartialEthStakingContext'
24
- ]
17
+ class StakingContextContext
18
+ attr_accessor :stakeable_balance
19
+
20
+ attr_accessor :unstakeable_balance
21
+
22
+ attr_accessor :claimable_balance
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'stakeable_balance' => :'stakeable_balance',
28
+ :'unstakeable_balance' => :'unstakeable_balance',
29
+ :'claimable_balance' => :'claimable_balance'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'stakeable_balance' => :'Balance',
42
+ :'unstakeable_balance' => :'Balance',
43
+ :'claimable_balance' => :'Balance'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Coinbase::Client::StakingContextContext` initialize method"
25
58
  end
26
59
 
27
- # Builds the object
28
- # @param [Mixed] Data to be matched against the list of oneOf items
29
- # @return [Object] Returns the model or the data itself
30
- def build(data)
31
- # Go through the list of oneOf items and attempt to identify the appropriate one.
32
- # Note:
33
- # - We do not attempt to check whether exactly one item matches.
34
- # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
35
- # due to the way the deserialization is made in the base_object template (it just casts without verifying).
36
- # - TODO: scalar values are de facto behaving as if they were nullable.
37
- # - TODO: logging when debugging is set.
38
- openapi_one_of.each do |klass|
39
- begin
40
- next if klass == :AnyType # "nullable: true"
41
- typed_data = find_and_cast_into_type(klass, data)
42
- return typed_data if typed_data
43
- rescue # rescue all errors so we keep iterating even if the current item lookup raises
44
- end
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Coinbase::Client::StakingContextContext`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
45
64
  end
65
+ h[k.to_sym] = v
66
+ }
46
67
 
47
- openapi_one_of.include?(:AnyType) ? data : nil
68
+ if attributes.key?(:'stakeable_balance')
69
+ self.stakeable_balance = attributes[:'stakeable_balance']
70
+ else
71
+ self.stakeable_balance = nil
48
72
  end
49
73
 
50
- private
51
-
52
- SchemaMismatchError = Class.new(StandardError)
53
-
54
- # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
55
- def find_and_cast_into_type(klass, data)
56
- return if data.nil?
57
-
58
- case klass.to_s
59
- when 'Boolean'
60
- return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
61
- when 'Float'
62
- return data if data.instance_of?(Float)
63
- when 'Integer'
64
- return data if data.instance_of?(Integer)
65
- when 'Time'
66
- return Time.parse(data)
67
- when 'Date'
68
- return Date.parse(data)
69
- when 'String'
70
- return data if data.instance_of?(String)
71
- when 'Object' # "type: object"
72
- return data if data.instance_of?(Hash)
73
- when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
74
- if data.instance_of?(Array)
75
- sub_type = Regexp.last_match[:sub_type]
76
- return data.map { |item| find_and_cast_into_type(sub_type, item) }
77
- end
78
- when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
79
- if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
80
- sub_type = Regexp.last_match[:sub_type]
81
- return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
74
+ if attributes.key?(:'unstakeable_balance')
75
+ self.unstakeable_balance = attributes[:'unstakeable_balance']
76
+ else
77
+ self.unstakeable_balance = nil
78
+ end
79
+
80
+ if attributes.key?(:'claimable_balance')
81
+ self.claimable_balance = attributes[:'claimable_balance']
82
+ else
83
+ self.claimable_balance = nil
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
+ invalid_properties = Array.new
92
+ if @stakeable_balance.nil?
93
+ invalid_properties.push('invalid value for "stakeable_balance", stakeable_balance cannot be nil.')
94
+ end
95
+
96
+ if @unstakeable_balance.nil?
97
+ invalid_properties.push('invalid value for "unstakeable_balance", unstakeable_balance cannot be nil.')
98
+ end
99
+
100
+ if @claimable_balance.nil?
101
+ invalid_properties.push('invalid value for "claimable_balance", claimable_balance cannot be nil.')
102
+ end
103
+
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ warn '[DEPRECATED] the `valid?` method is obsolete'
111
+ return false if @stakeable_balance.nil?
112
+ return false if @unstakeable_balance.nil?
113
+ return false if @claimable_balance.nil?
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ stakeable_balance == o.stakeable_balance &&
123
+ unstakeable_balance == o.unstakeable_balance &&
124
+ claimable_balance == o.claimable_balance
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [stakeable_balance, unstakeable_balance, claimable_balance].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ return nil unless attributes.is_a?(Hash)
144
+ attributes = attributes.transform_keys(&:to_sym)
145
+ transformed_hash = {}
146
+ openapi_types.each_pair do |key, type|
147
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
148
+ transformed_hash["#{key}"] = nil
149
+ elsif type =~ /\AArray<(.*)>/i
150
+ # check to ensure the input is an array given that the attribute
151
+ # is documented as an array but the input is not
152
+ if attributes[attribute_map[key]].is_a?(Array)
153
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
82
154
  end
83
- else # model
84
- const = Coinbase::Client.const_get(klass)
85
- if const
86
- if const.respond_to?(:openapi_one_of) # nested oneOf model
87
- model = const.build(data)
88
- return model if model
89
- else
90
- # raise if data contains keys that are not known to the model
91
- raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
92
- model = const.build_from_hash(data)
93
- return model if model
94
- end
155
+ elsif !attributes[attribute_map[key]].nil?
156
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
157
+ end
158
+ end
159
+ new(transformed_hash)
160
+ end
161
+
162
+ # Deserializes the data based on type
163
+ # @param string type Data type
164
+ # @param string value Value to be deserialized
165
+ # @return [Object] Deserialized data
166
+ def self._deserialize(type, value)
167
+ case type.to_sym
168
+ when :Time
169
+ Time.parse(value)
170
+ when :Date
171
+ Date.parse(value)
172
+ when :String
173
+ value.to_s
174
+ when :Integer
175
+ value.to_i
176
+ when :Float
177
+ value.to_f
178
+ when :Boolean
179
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
180
+ true
181
+ else
182
+ false
183
+ end
184
+ when :Object
185
+ # generic object (usually a Hash), return directly
186
+ value
187
+ when /\AArray<(?<inner_type>.+)>\z/
188
+ inner_type = Regexp.last_match[:inner_type]
189
+ value.map { |v| _deserialize(inner_type, v) }
190
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
191
+ k_type = Regexp.last_match[:k_type]
192
+ v_type = Regexp.last_match[:v_type]
193
+ {}.tap do |hash|
194
+ value.each do |k, v|
195
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
95
196
  end
96
197
  end
198
+ else # model
199
+ # models (e.g. Pet) or oneOf
200
+ klass = Coinbase::Client.const_get(type)
201
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
202
+ end
203
+ end
204
+
205
+ # Returns the string representation of the object
206
+ # @return [String] String presentation of the object
207
+ def to_s
208
+ to_hash.to_s
209
+ end
97
210
 
98
- raise # if no match by now, raise
99
- rescue
100
- raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
211
+ # to_body is an alias to to_hash (backward compatibility)
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_body
214
+ to_hash
215
+ end
216
+
217
+ # Returns the object in the form of hash
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_hash
220
+ hash = {}
221
+ self.class.attribute_map.each_pair do |attr, param|
222
+ value = self.send(attr)
223
+ if value.nil?
224
+ is_nullable = self.class.openapi_nullable.include?(attr)
225
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
226
+ end
227
+
228
+ hash[param] = _to_hash(value)
229
+ end
230
+ hash
231
+ end
232
+
233
+ # Outputs non-array value in the form of hash
234
+ # For object, use to_hash. Otherwise, just return the value
235
+ # @param [Object] value Any valid value
236
+ # @return [Hash] Returns the value in the form of hash
237
+ def _to_hash(value)
238
+ if value.is_a?(Array)
239
+ value.compact.map { |v| _to_hash(v) }
240
+ elsif value.is_a?(Hash)
241
+ {}.tap do |hash|
242
+ value.each { |k, v| hash[k] = _to_hash(v) }
243
+ end
244
+ elsif value.respond_to? :to_hash
245
+ value.to_hash
246
+ else
247
+ value
101
248
  end
102
249
  end
250
+
103
251
  end
104
252
 
105
253
  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.7.0
9
+ Generator version: 7.6.0
10
10
 
11
11
  =end
12
12
 
@@ -187,7 +187,7 @@ module Coinbase::Client
187
187
  return false if @network_id.nil?
188
188
  return false if @address_id.nil?
189
189
  return false if @status.nil?
190
- status_validator = EnumAttributeValidator.new('String', ["initialized", "pending", "complete", "failed", "unspecified"])
190
+ status_validator = EnumAttributeValidator.new('String', ["initialized", "pending", "complete", "failed", "unspecified", "unknown_default_open_api"])
191
191
  return false unless status_validator.valid?(@status)
192
192
  return false if @transactions.nil?
193
193
  true
@@ -196,7 +196,7 @@ module Coinbase::Client
196
196
  # Custom attribute writer method checking allowed values (enum).
197
197
  # @param [Object] status Object to be assigned
198
198
  def status=(status)
199
- validator = EnumAttributeValidator.new('String', ["initialized", "pending", "complete", "failed", "unspecified"])
199
+ validator = EnumAttributeValidator.new('String', ["initialized", "pending", "complete", "failed", "unspecified", "unknown_default_open_api"])
200
200
  unless validator.valid?(status)
201
201
  fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
202
202
  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.7.0
9
+ Generator version: 7.6.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.7.0
9
+ Generator version: 7.6.0
10
10
 
11
11
  =end
12
12
 
@@ -30,6 +30,8 @@ module Coinbase::Client
30
30
 
31
31
  attr_accessor :format
32
32
 
33
+ attr_accessor :usd_value
34
+
33
35
  class EnumAttributeValidator
34
36
  attr_reader :datatype
35
37
  attr_reader :allowable_values
@@ -59,7 +61,8 @@ module Coinbase::Client
59
61
  :'date' => :'date',
60
62
  :'amount' => :'amount',
61
63
  :'state' => :'state',
62
- :'format' => :'format'
64
+ :'format' => :'format',
65
+ :'usd_value' => :'usd_value'
63
66
  }
64
67
  end
65
68
 
@@ -75,7 +78,8 @@ module Coinbase::Client
75
78
  :'date' => :'Date',
76
79
  :'amount' => :'String',
77
80
  :'state' => :'String',
78
- :'format' => :'StakingRewardFormat'
81
+ :'format' => :'StakingRewardFormat',
82
+ :'usd_value' => :'StakingRewardUSDValue'
79
83
  }
80
84
  end
81
85
 
@@ -129,6 +133,12 @@ module Coinbase::Client
129
133
  else
130
134
  self.format = 'usd'
131
135
  end
136
+
137
+ if attributes.key?(:'usd_value')
138
+ self.usd_value = attributes[:'usd_value']
139
+ else
140
+ self.usd_value = nil
141
+ end
132
142
  end
133
143
 
134
144
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -156,6 +166,10 @@ module Coinbase::Client
156
166
  invalid_properties.push('invalid value for "format", format cannot be nil.')
157
167
  end
158
168
 
169
+ if @usd_value.nil?
170
+ invalid_properties.push('invalid value for "usd_value", usd_value cannot be nil.')
171
+ end
172
+
159
173
  invalid_properties
160
174
  end
161
175
 
@@ -167,16 +181,17 @@ module Coinbase::Client
167
181
  return false if @date.nil?
168
182
  return false if @amount.nil?
169
183
  return false if @state.nil?
170
- state_validator = EnumAttributeValidator.new('String', ["pending", "distributed"])
184
+ state_validator = EnumAttributeValidator.new('String', ["pending", "distributed", "unknown_default_open_api"])
171
185
  return false unless state_validator.valid?(@state)
172
186
  return false if @format.nil?
187
+ return false if @usd_value.nil?
173
188
  true
174
189
  end
175
190
 
176
191
  # Custom attribute writer method checking allowed values (enum).
177
192
  # @param [Object] state Object to be assigned
178
193
  def state=(state)
179
- validator = EnumAttributeValidator.new('String', ["pending", "distributed"])
194
+ validator = EnumAttributeValidator.new('String', ["pending", "distributed", "unknown_default_open_api"])
180
195
  unless validator.valid?(state)
181
196
  fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
182
197
  end
@@ -192,7 +207,8 @@ module Coinbase::Client
192
207
  date == o.date &&
193
208
  amount == o.amount &&
194
209
  state == o.state &&
195
- format == o.format
210
+ format == o.format &&
211
+ usd_value == o.usd_value
196
212
  end
197
213
 
198
214
  # @see the `==` method
@@ -204,7 +220,7 @@ module Coinbase::Client
204
220
  # Calculates hash code according to all attributes.
205
221
  # @return [Integer] Hash code
206
222
  def hash
207
- [address_id, date, amount, state, format].hash
223
+ [address_id, date, amount, state, format, usd_value].hash
208
224
  end
209
225
 
210
226
  # 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.7.0
9
+ Generator version: 7.6.0
10
10
 
11
11
  =end
12
12
 
@@ -17,9 +17,10 @@ module Coinbase::Client
17
17
  class StakingRewardFormat
18
18
  USD = "usd".freeze
19
19
  NATIVE = "native".freeze
20
+ UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
20
21
 
21
22
  def self.all_vars
22
- @all_vars ||= [USD, NATIVE].freeze
23
+ @all_vars ||= [USD, NATIVE, UNKNOWN_DEFAULT_OPEN_API].freeze
23
24
  end
24
25
 
25
26
  # Builds the enum from string