coinbase-sdk 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/lib/coinbase/address/external_address.rb +173 -0
  3. data/lib/coinbase/address/wallet_address.rb +219 -0
  4. data/lib/coinbase/address.rb +32 -219
  5. data/lib/coinbase/asset.rb +1 -1
  6. data/lib/coinbase/authenticator.rb +2 -0
  7. data/lib/coinbase/client/api/addresses_api.rb +1 -1
  8. data/lib/coinbase/client/api/assets_api.rb +1 -1
  9. data/lib/coinbase/client/api/external_addresses_api.rb +1 -1
  10. data/lib/coinbase/client/api/server_signers_api.rb +1 -1
  11. data/lib/coinbase/client/api/stake_api.rb +1 -1
  12. data/lib/coinbase/client/api/trades_api.rb +1 -1
  13. data/lib/coinbase/client/api/transfers_api.rb +1 -1
  14. data/lib/coinbase/client/api/users_api.rb +1 -1
  15. data/lib/coinbase/client/api/wallets_api.rb +1 -1
  16. data/lib/coinbase/client/api_client.rb +3 -3
  17. data/lib/coinbase/client/api_error.rb +1 -1
  18. data/lib/coinbase/client/configuration.rb +1 -1
  19. data/lib/coinbase/client/models/address.rb +1 -1
  20. data/lib/coinbase/client/models/address_balance_list.rb +1 -1
  21. data/lib/coinbase/client/models/address_list.rb +1 -1
  22. data/lib/coinbase/client/models/asset.rb +1 -1
  23. data/lib/coinbase/client/models/balance.rb +1 -1
  24. data/lib/coinbase/client/models/broadcast_trade_request.rb +1 -1
  25. data/lib/coinbase/client/models/broadcast_transfer_request.rb +1 -1
  26. data/lib/coinbase/client/models/build_staking_operation_request.rb +1 -1
  27. data/lib/coinbase/client/models/create_address_request.rb +1 -1
  28. data/lib/coinbase/client/models/create_server_signer_request.rb +22 -5
  29. data/lib/coinbase/client/models/create_trade_request.rb +1 -1
  30. data/lib/coinbase/client/models/create_transfer_request.rb +1 -1
  31. data/lib/coinbase/client/models/create_wallet_request.rb +1 -1
  32. data/lib/coinbase/client/models/create_wallet_request_wallet.rb +1 -1
  33. data/lib/coinbase/client/models/error.rb +1 -1
  34. data/lib/coinbase/client/models/faucet_transaction.rb +23 -5
  35. data/lib/coinbase/client/models/feature.rb +1 -1
  36. data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +1 -1
  37. data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +2 -15
  38. data/lib/coinbase/client/models/get_staking_context_request.rb +1 -1
  39. data/lib/coinbase/client/models/partial_eth_staking_context.rb +4 -7
  40. data/lib/coinbase/client/models/seed_creation_event.rb +1 -1
  41. data/lib/coinbase/client/models/seed_creation_event_result.rb +1 -1
  42. data/lib/coinbase/client/models/server_signer.rb +22 -5
  43. data/lib/coinbase/client/models/server_signer_event.rb +1 -1
  44. data/lib/coinbase/client/models/server_signer_event_event.rb +1 -1
  45. data/lib/coinbase/client/models/server_signer_event_list.rb +1 -1
  46. data/lib/coinbase/client/models/server_signer_list.rb +1 -1
  47. data/lib/coinbase/client/models/signature_creation_event.rb +1 -1
  48. data/lib/coinbase/client/models/signature_creation_event_result.rb +1 -1
  49. data/lib/coinbase/client/models/staking_context.rb +1 -1
  50. data/lib/coinbase/client/models/staking_context_context.rb +1 -1
  51. data/lib/coinbase/client/models/staking_operation.rb +15 -12
  52. data/lib/coinbase/client/models/staking_reward.rb +21 -5
  53. data/lib/coinbase/client/models/staking_reward_format.rb +40 -0
  54. data/lib/coinbase/client/models/trade.rb +1 -1
  55. data/lib/coinbase/client/models/trade_list.rb +1 -1
  56. data/lib/coinbase/client/models/transaction.rb +1 -1
  57. data/lib/coinbase/client/models/transaction_type.rb +1 -1
  58. data/lib/coinbase/client/models/transfer.rb +1 -1
  59. data/lib/coinbase/client/models/transfer_list.rb +1 -1
  60. data/lib/coinbase/client/models/user.rb +1 -1
  61. data/lib/coinbase/client/models/wallet.rb +1 -1
  62. data/lib/coinbase/client/models/wallet_list.rb +1 -1
  63. data/lib/coinbase/client/version.rb +1 -1
  64. data/lib/coinbase/client.rb +2 -1
  65. data/lib/coinbase/errors.rb +7 -0
  66. data/lib/coinbase/faucet_transaction.rb +5 -4
  67. data/lib/coinbase/pagination.rb +26 -0
  68. data/lib/coinbase/staking_operation.rb +29 -0
  69. data/lib/coinbase/staking_reward.rb +79 -0
  70. data/lib/coinbase/transaction.rb +6 -0
  71. data/lib/coinbase/user.rb +5 -51
  72. data/lib/coinbase/wallet.rb +95 -100
  73. data/lib/coinbase.rb +11 -0
  74. metadata +8 -19
  75. data/lib/coinbase/client/api/balances_api.rb +0 -97
  76. data/lib/coinbase/client/api/transfer_api.rb +0 -114
  77. data/lib/coinbase/client/models/request_faucet_funds200_response.rb +0 -222
@@ -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.5.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.5.0
9
+ Generator version: 7.6.0
10
10
 
11
11
  =end
12
12
 
@@ -14,14 +14,19 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Coinbase::Client
17
+ # The faucet transaction
17
18
  class FaucetTransaction
18
19
  # The transaction hash of the transaction the faucet created.
19
20
  attr_accessor :transaction_hash
20
21
 
22
+ # Link to the transaction on the blockchain explorer.
23
+ attr_accessor :transaction_link
24
+
21
25
  # Attribute mapping from ruby-style variable name to JSON key.
22
26
  def self.attribute_map
23
27
  {
24
- :'transaction_hash' => :'transaction_hash'
28
+ :'transaction_hash' => :'transaction_hash',
29
+ :'transaction_link' => :'transaction_link'
25
30
  }
26
31
  end
27
32
 
@@ -33,7 +38,8 @@ module Coinbase::Client
33
38
  # Attribute type mapping.
34
39
  def self.openapi_types
35
40
  {
36
- :'transaction_hash' => :'String'
41
+ :'transaction_hash' => :'String',
42
+ :'transaction_link' => :'String'
37
43
  }
38
44
  end
39
45
 
@@ -63,6 +69,12 @@ module Coinbase::Client
63
69
  else
64
70
  self.transaction_hash = nil
65
71
  end
72
+
73
+ if attributes.key?(:'transaction_link')
74
+ self.transaction_link = attributes[:'transaction_link']
75
+ else
76
+ self.transaction_link = nil
77
+ end
66
78
  end
67
79
 
68
80
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -74,6 +86,10 @@ module Coinbase::Client
74
86
  invalid_properties.push('invalid value for "transaction_hash", transaction_hash cannot be nil.')
75
87
  end
76
88
 
89
+ if @transaction_link.nil?
90
+ invalid_properties.push('invalid value for "transaction_link", transaction_link cannot be nil.')
91
+ end
92
+
77
93
  invalid_properties
78
94
  end
79
95
 
@@ -82,6 +98,7 @@ module Coinbase::Client
82
98
  def valid?
83
99
  warn '[DEPRECATED] the `valid?` method is obsolete'
84
100
  return false if @transaction_hash.nil?
101
+ return false if @transaction_link.nil?
85
102
  true
86
103
  end
87
104
 
@@ -90,7 +107,8 @@ module Coinbase::Client
90
107
  def ==(o)
91
108
  return true if self.equal?(o)
92
109
  self.class == o.class &&
93
- transaction_hash == o.transaction_hash
110
+ transaction_hash == o.transaction_hash &&
111
+ transaction_link == o.transaction_link
94
112
  end
95
113
 
96
114
  # @see the `==` method
@@ -102,7 +120,7 @@ module Coinbase::Client
102
120
  # Calculates hash code according to all attributes.
103
121
  # @return [Integer] Hash code
104
122
  def hash
105
- [transaction_hash].hash
123
+ [transaction_hash, transaction_link].hash
106
124
  end
107
125
 
108
126
  # 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.5.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.5.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.5.0
9
+ Generator version: 7.6.0
10
10
 
11
11
  =end
12
12
 
@@ -30,7 +30,6 @@ module Coinbase::Client
30
30
  # The end time of this reward period
31
31
  attr_accessor :end_time
32
32
 
33
- # The format in which the rewards are to be fetched i.e native or in equivalent USD
34
33
  attr_accessor :format
35
34
 
36
35
  class EnumAttributeValidator
@@ -80,7 +79,7 @@ module Coinbase::Client
80
79
  :'address_ids' => :'Array<String>',
81
80
  :'start_time' => :'Time',
82
81
  :'end_time' => :'Time',
83
- :'format' => :'String'
82
+ :'format' => :'StakingRewardFormat'
84
83
  }
85
84
  end
86
85
 
@@ -186,21 +185,9 @@ module Coinbase::Client
186
185
  return false if @start_time.nil?
187
186
  return false if @end_time.nil?
188
187
  return false if @format.nil?
189
- format_validator = EnumAttributeValidator.new('String', ["usd", "native"])
190
- return false unless format_validator.valid?(@format)
191
188
  true
192
189
  end
193
190
 
194
- # Custom attribute writer method checking allowed values (enum).
195
- # @param [Object] format Object to be assigned
196
- def format=(format)
197
- validator = EnumAttributeValidator.new('String', ["usd", "native"])
198
- unless validator.valid?(format)
199
- fail ArgumentError, "invalid value for \"format\", must be one of #{validator.allowable_values}."
200
- end
201
- @format = format
202
- end
203
-
204
191
  # Checks equality by comparing each attribute.
205
192
  # @param [Object] Object to be compared
206
193
  def ==(o)
@@ -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.5.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.5.0
9
+ Generator version: 7.6.0
10
10
 
11
11
  =end
12
12
 
@@ -16,13 +16,10 @@ require 'time'
16
16
  module Coinbase::Client
17
17
  # The partial eth staking context
18
18
  class PartialEthStakingContext
19
- # The balance that can be staked. This is typically the wallet balance in atomic units.
20
19
  attr_accessor :stakeable_balance
21
20
 
22
- # The total staked balance of the wallet that can be unstaked in atomic units.
23
21
  attr_accessor :unstakeable_balance
24
22
 
25
- # The total unstaked balance that can be claimed in atomic units.
26
23
  attr_accessor :claimable_balance
27
24
 
28
25
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -42,9 +39,9 @@ module Coinbase::Client
42
39
  # Attribute type mapping.
43
40
  def self.openapi_types
44
41
  {
45
- :'stakeable_balance' => :'String',
46
- :'unstakeable_balance' => :'String',
47
- :'claimable_balance' => :'String'
42
+ :'stakeable_balance' => :'Balance',
43
+ :'unstakeable_balance' => :'Balance',
44
+ :'claimable_balance' => :'Balance'
48
45
  }
49
46
  end
50
47
 
@@ -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.5.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.5.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.5.0
9
+ Generator version: 7.6.0
10
10
 
11
11
  =end
12
12
 
@@ -22,11 +22,15 @@ module Coinbase::Client
22
22
  # The IDs of the wallets that the server-signer can sign for
23
23
  attr_accessor :wallets
24
24
 
25
+ # Whether the Server-Signer uses MPC.
26
+ attr_accessor :is_mpc
27
+
25
28
  # Attribute mapping from ruby-style variable name to JSON key.
26
29
  def self.attribute_map
27
30
  {
28
31
  :'server_signer_id' => :'server_signer_id',
29
- :'wallets' => :'wallets'
32
+ :'wallets' => :'wallets',
33
+ :'is_mpc' => :'is_mpc'
30
34
  }
31
35
  end
32
36
 
@@ -39,7 +43,8 @@ module Coinbase::Client
39
43
  def self.openapi_types
40
44
  {
41
45
  :'server_signer_id' => :'String',
42
- :'wallets' => :'Array<String>'
46
+ :'wallets' => :'Array<String>',
47
+ :'is_mpc' => :'Boolean'
43
48
  }
44
49
  end
45
50
 
@@ -75,6 +80,12 @@ module Coinbase::Client
75
80
  self.wallets = value
76
81
  end
77
82
  end
83
+
84
+ if attributes.key?(:'is_mpc')
85
+ self.is_mpc = attributes[:'is_mpc']
86
+ else
87
+ self.is_mpc = nil
88
+ end
78
89
  end
79
90
 
80
91
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -86,6 +97,10 @@ module Coinbase::Client
86
97
  invalid_properties.push('invalid value for "server_signer_id", server_signer_id cannot be nil.')
87
98
  end
88
99
 
100
+ if @is_mpc.nil?
101
+ invalid_properties.push('invalid value for "is_mpc", is_mpc cannot be nil.')
102
+ end
103
+
89
104
  invalid_properties
90
105
  end
91
106
 
@@ -94,6 +109,7 @@ module Coinbase::Client
94
109
  def valid?
95
110
  warn '[DEPRECATED] the `valid?` method is obsolete'
96
111
  return false if @server_signer_id.nil?
112
+ return false if @is_mpc.nil?
97
113
  true
98
114
  end
99
115
 
@@ -103,7 +119,8 @@ module Coinbase::Client
103
119
  return true if self.equal?(o)
104
120
  self.class == o.class &&
105
121
  server_signer_id == o.server_signer_id &&
106
- wallets == o.wallets
122
+ wallets == o.wallets &&
123
+ is_mpc == o.is_mpc
107
124
  end
108
125
 
109
126
  # @see the `==` method
@@ -115,7 +132,7 @@ module Coinbase::Client
115
132
  # Calculates hash code according to all attributes.
116
133
  # @return [Integer] Hash code
117
134
  def hash
118
- [server_signer_id, wallets].hash
135
+ [server_signer_id, wallets, is_mpc].hash
119
136
  end
120
137
 
121
138
  # 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.5.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.5.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.5.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.5.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.5.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.5.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.5.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.5.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.5.0
9
+ Generator version: 7.6.0
10
10
 
11
11
  =end
12
12
 
@@ -16,12 +16,13 @@ require 'time'
16
16
  module Coinbase::Client
17
17
  # An onchain transaction to help realize a staking action.
18
18
  class StakingOperation
19
- attr_accessor :transaction
19
+ # The transaction(s) that will execute the staking operation onchain
20
+ attr_accessor :transactions
20
21
 
21
22
  # Attribute mapping from ruby-style variable name to JSON key.
22
23
  def self.attribute_map
23
24
  {
24
- :'transaction' => :'transaction'
25
+ :'transactions' => :'transactions'
25
26
  }
26
27
  end
27
28
 
@@ -33,7 +34,7 @@ module Coinbase::Client
33
34
  # Attribute type mapping.
34
35
  def self.openapi_types
35
36
  {
36
- :'transaction' => :'Transaction'
37
+ :'transactions' => :'Array<Transaction>'
37
38
  }
38
39
  end
39
40
 
@@ -58,10 +59,12 @@ module Coinbase::Client
58
59
  h[k.to_sym] = v
59
60
  }
60
61
 
61
- if attributes.key?(:'transaction')
62
- self.transaction = attributes[:'transaction']
62
+ if attributes.key?(:'transactions')
63
+ if (value = attributes[:'transactions']).is_a?(Array)
64
+ self.transactions = value
65
+ end
63
66
  else
64
- self.transaction = nil
67
+ self.transactions = nil
65
68
  end
66
69
  end
67
70
 
@@ -70,8 +73,8 @@ module Coinbase::Client
70
73
  def list_invalid_properties
71
74
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
72
75
  invalid_properties = Array.new
73
- if @transaction.nil?
74
- invalid_properties.push('invalid value for "transaction", transaction cannot be nil.')
76
+ if @transactions.nil?
77
+ invalid_properties.push('invalid value for "transactions", transactions cannot be nil.')
75
78
  end
76
79
 
77
80
  invalid_properties
@@ -81,7 +84,7 @@ module Coinbase::Client
81
84
  # @return true if the model is valid
82
85
  def valid?
83
86
  warn '[DEPRECATED] the `valid?` method is obsolete'
84
- return false if @transaction.nil?
87
+ return false if @transactions.nil?
85
88
  true
86
89
  end
87
90
 
@@ -90,7 +93,7 @@ module Coinbase::Client
90
93
  def ==(o)
91
94
  return true if self.equal?(o)
92
95
  self.class == o.class &&
93
- transaction == o.transaction
96
+ transactions == o.transactions
94
97
  end
95
98
 
96
99
  # @see the `==` method
@@ -102,7 +105,7 @@ module Coinbase::Client
102
105
  # Calculates hash code according to all attributes.
103
106
  # @return [Integer] Hash code
104
107
  def hash
105
- [transaction].hash
108
+ [transactions].hash
106
109
  end
107
110
 
108
111
  # 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.5.0
9
+ Generator version: 7.6.0
10
10
 
11
11
  =end
12
12
 
@@ -28,6 +28,8 @@ module Coinbase::Client
28
28
  # The state of the reward
29
29
  attr_accessor :state
30
30
 
31
+ attr_accessor :format
32
+
31
33
  class EnumAttributeValidator
32
34
  attr_reader :datatype
33
35
  attr_reader :allowable_values
@@ -56,7 +58,8 @@ module Coinbase::Client
56
58
  :'address_id' => :'address_id',
57
59
  :'date' => :'date',
58
60
  :'amount' => :'amount',
59
- :'state' => :'state'
61
+ :'state' => :'state',
62
+ :'format' => :'format'
60
63
  }
61
64
  end
62
65
 
@@ -71,7 +74,8 @@ module Coinbase::Client
71
74
  :'address_id' => :'String',
72
75
  :'date' => :'Date',
73
76
  :'amount' => :'String',
74
- :'state' => :'String'
77
+ :'state' => :'String',
78
+ :'format' => :'StakingRewardFormat'
75
79
  }
76
80
  end
77
81
 
@@ -119,6 +123,12 @@ module Coinbase::Client
119
123
  else
120
124
  self.state = nil
121
125
  end
126
+
127
+ if attributes.key?(:'format')
128
+ self.format = attributes[:'format']
129
+ else
130
+ self.format = 'usd'
131
+ end
122
132
  end
123
133
 
124
134
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -142,6 +152,10 @@ module Coinbase::Client
142
152
  invalid_properties.push('invalid value for "state", state cannot be nil.')
143
153
  end
144
154
 
155
+ if @format.nil?
156
+ invalid_properties.push('invalid value for "format", format cannot be nil.')
157
+ end
158
+
145
159
  invalid_properties
146
160
  end
147
161
 
@@ -155,6 +169,7 @@ module Coinbase::Client
155
169
  return false if @state.nil?
156
170
  state_validator = EnumAttributeValidator.new('String', ["pending", "distributed"])
157
171
  return false unless state_validator.valid?(@state)
172
+ return false if @format.nil?
158
173
  true
159
174
  end
160
175
 
@@ -176,7 +191,8 @@ module Coinbase::Client
176
191
  address_id == o.address_id &&
177
192
  date == o.date &&
178
193
  amount == o.amount &&
179
- state == o.state
194
+ state == o.state &&
195
+ format == o.format
180
196
  end
181
197
 
182
198
  # @see the `==` method
@@ -188,7 +204,7 @@ module Coinbase::Client
188
204
  # Calculates hash code according to all attributes.
189
205
  # @return [Integer] Hash code
190
206
  def hash
191
- [address_id, date, amount, state].hash
207
+ [address_id, date, amount, state, format].hash
192
208
  end
193
209
 
194
210
  # Builds the object from hash
@@ -0,0 +1,40 @@
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
+ class StakingRewardFormat
18
+ USD = "usd".freeze
19
+ NATIVE = "native".freeze
20
+
21
+ def self.all_vars
22
+ @all_vars ||= [USD, NATIVE].freeze
23
+ end
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def self.build_from_hash(value)
29
+ new.build_from_hash(value)
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ return value if StakingRewardFormat.all_vars.include?(value)
37
+ raise "Invalid ENUM value #{value} for class #StakingRewardFormat"
38
+ end
39
+ end
40
+ 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.5.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.5.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.5.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.5.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.5.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.5.0
9
+ Generator version: 7.6.0
10
10
 
11
11
  =end
12
12