coinbase-sdk 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/lib/coinbase/address/wallet_address.rb +53 -0
  3. data/lib/coinbase/address.rb +20 -0
  4. data/lib/coinbase/client/api/addresses_api.rb +231 -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/contract_invocations_api.rb +342 -0
  8. data/lib/coinbase/client/api/external_addresses_api.rb +81 -2
  9. data/lib/coinbase/client/api/networks_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/validators_api.rb +1 -1
  16. data/lib/coinbase/client/api/wallet_stake_api.rb +1 -1
  17. data/lib/coinbase/client/api/wallets_api.rb +1 -1
  18. data/lib/coinbase/client/api/webhooks_api.rb +1 -1
  19. data/lib/coinbase/client/api_client.rb +1 -1
  20. data/lib/coinbase/client/api_error.rb +1 -1
  21. data/lib/coinbase/client/configuration.rb +1 -1
  22. data/lib/coinbase/client/models/address.rb +1 -1
  23. data/lib/coinbase/client/models/address_balance_list.rb +1 -1
  24. data/lib/coinbase/client/models/address_historical_balance_list.rb +1 -1
  25. data/lib/coinbase/client/models/address_list.rb +1 -1
  26. data/lib/coinbase/client/models/address_transaction_list.rb +258 -0
  27. data/lib/coinbase/client/models/asset.rb +1 -1
  28. data/lib/coinbase/client/models/balance.rb +1 -1
  29. data/lib/coinbase/client/models/broadcast_contract_invocation_request.rb +222 -0
  30. data/lib/coinbase/client/models/broadcast_staking_operation_request.rb +1 -1
  31. data/lib/coinbase/client/models/broadcast_trade_request.rb +1 -1
  32. data/lib/coinbase/client/models/broadcast_transfer_request.rb +1 -1
  33. data/lib/coinbase/client/models/build_staking_operation_request.rb +1 -1
  34. data/lib/coinbase/client/models/contract_event.rb +1 -1
  35. data/lib/coinbase/client/models/contract_event_list.rb +1 -1
  36. data/lib/coinbase/client/models/contract_invocation.rb +351 -0
  37. data/lib/coinbase/client/models/contract_invocation_list.rb +274 -0
  38. data/lib/coinbase/client/models/create_address_request.rb +1 -1
  39. data/lib/coinbase/client/models/create_contract_invocation_request.rb +266 -0
  40. data/lib/coinbase/client/models/create_payload_signature_request.rb +232 -0
  41. data/lib/coinbase/client/models/create_server_signer_request.rb +1 -1
  42. data/lib/coinbase/client/models/create_staking_operation_request.rb +1 -1
  43. data/lib/coinbase/client/models/create_trade_request.rb +1 -1
  44. data/lib/coinbase/client/models/create_transfer_request.rb +1 -1
  45. data/lib/coinbase/client/models/create_wallet_request.rb +1 -1
  46. data/lib/coinbase/client/models/create_wallet_request_wallet.rb +1 -1
  47. data/lib/coinbase/client/models/create_webhook_request.rb +29 -5
  48. data/lib/coinbase/client/models/error.rb +1 -1
  49. data/lib/coinbase/client/models/ethereum_transaction.rb +389 -0
  50. data/lib/coinbase/client/models/ethereum_transaction_access.rb +225 -0
  51. data/lib/coinbase/client/models/ethereum_transaction_access_list.rb +216 -0
  52. data/lib/coinbase/client/models/ethereum_transaction_flattened_trace.rb +378 -0
  53. data/lib/coinbase/client/models/ethereum_validator_metadata.rb +1 -1
  54. data/lib/coinbase/client/models/faucet_transaction.rb +1 -1
  55. data/lib/coinbase/client/models/feature_set.rb +1 -1
  56. data/lib/coinbase/client/models/fetch_historical_staking_balances200_response.rb +1 -1
  57. data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +1 -1
  58. data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +1 -1
  59. data/lib/coinbase/client/models/get_staking_context_request.rb +1 -1
  60. data/lib/coinbase/client/models/historical_balance.rb +1 -1
  61. data/lib/coinbase/client/models/network.rb +3 -3
  62. data/lib/coinbase/client/models/network_identifier.rb +3 -2
  63. data/lib/coinbase/client/models/payload_signature.rb +335 -0
  64. data/lib/coinbase/client/models/payload_signature_list.rb +275 -0
  65. data/lib/coinbase/client/models/seed_creation_event.rb +1 -1
  66. data/lib/coinbase/client/models/seed_creation_event_result.rb +1 -1
  67. data/lib/coinbase/client/models/server_signer.rb +1 -1
  68. data/lib/coinbase/client/models/server_signer_event.rb +1 -1
  69. data/lib/coinbase/client/models/server_signer_event_event.rb +1 -1
  70. data/lib/coinbase/client/models/server_signer_event_list.rb +1 -1
  71. data/lib/coinbase/client/models/server_signer_list.rb +1 -1
  72. data/lib/coinbase/client/models/signature_creation_event.rb +1 -1
  73. data/lib/coinbase/client/models/signature_creation_event_result.rb +1 -1
  74. data/lib/coinbase/client/models/signed_voluntary_exit_message_metadata.rb +1 -1
  75. data/lib/coinbase/client/models/sponsored_send.rb +1 -1
  76. data/lib/coinbase/client/models/staking_balance.rb +1 -1
  77. data/lib/coinbase/client/models/staking_context.rb +1 -1
  78. data/lib/coinbase/client/models/staking_context_context.rb +1 -1
  79. data/lib/coinbase/client/models/staking_operation.rb +1 -1
  80. data/lib/coinbase/client/models/staking_operation_metadata.rb +1 -1
  81. data/lib/coinbase/client/models/staking_reward.rb +1 -1
  82. data/lib/coinbase/client/models/staking_reward_format.rb +1 -1
  83. data/lib/coinbase/client/models/staking_reward_usd_value.rb +1 -1
  84. data/lib/coinbase/client/models/trade.rb +1 -1
  85. data/lib/coinbase/client/models/trade_list.rb +1 -1
  86. data/lib/coinbase/client/models/transaction.rb +36 -7
  87. data/lib/coinbase/client/models/transaction_content.rb +104 -0
  88. data/lib/coinbase/client/models/transaction_type.rb +1 -1
  89. data/lib/coinbase/client/models/transfer.rb +1 -1
  90. data/lib/coinbase/client/models/transfer_list.rb +1 -1
  91. data/lib/coinbase/client/models/update_webhook_request.rb +2 -50
  92. data/lib/coinbase/client/models/user.rb +1 -1
  93. data/lib/coinbase/client/models/validator.rb +1 -1
  94. data/lib/coinbase/client/models/validator_details.rb +1 -1
  95. data/lib/coinbase/client/models/validator_list.rb +1 -1
  96. data/lib/coinbase/client/models/validator_status.rb +1 -1
  97. data/lib/coinbase/client/models/wallet.rb +1 -1
  98. data/lib/coinbase/client/models/wallet_list.rb +1 -1
  99. data/lib/coinbase/client/models/webhook.rb +15 -5
  100. data/lib/coinbase/client/models/webhook_event_filter.rb +1 -1
  101. data/lib/coinbase/client/models/webhook_event_type.rb +1 -1
  102. data/lib/coinbase/client/models/webhook_list.rb +1 -1
  103. data/lib/coinbase/client/version.rb +1 -1
  104. data/lib/coinbase/client.rb +15 -1
  105. data/lib/coinbase/constants.rb +3 -0
  106. data/lib/coinbase/contract_invocation.rb +234 -0
  107. data/lib/coinbase/payload_signature.rb +181 -0
  108. data/lib/coinbase/transaction.rb +21 -0
  109. data/lib/coinbase/version.rb +1 -1
  110. data/lib/coinbase/wallet.rb +11 -1
  111. data/lib/coinbase/webhook.rb +17 -6
  112. data/lib/coinbase.rb +2 -0
  113. metadata +18 -2
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -19,6 +19,12 @@ module Coinbase::Client
19
19
  # The ID of the blockchain network.
20
20
  attr_accessor :network_id
21
21
 
22
+ # The hash of the block at which the transaction was recorded.
23
+ attr_accessor :block_hash
24
+
25
+ # The block height at which the transaction was recorded.
26
+ attr_accessor :block_height
27
+
22
28
  # The onchain address of the sender.
23
29
  attr_accessor :from_address_id
24
30
 
@@ -40,6 +46,8 @@ module Coinbase::Client
40
46
  # The status of the transaction.
41
47
  attr_accessor :status
42
48
 
49
+ attr_accessor :content
50
+
43
51
  class EnumAttributeValidator
44
52
  attr_reader :datatype
45
53
  attr_reader :allowable_values
@@ -66,13 +74,16 @@ module Coinbase::Client
66
74
  def self.attribute_map
67
75
  {
68
76
  :'network_id' => :'network_id',
77
+ :'block_hash' => :'block_hash',
78
+ :'block_height' => :'block_height',
69
79
  :'from_address_id' => :'from_address_id',
70
80
  :'to_address_id' => :'to_address_id',
71
81
  :'unsigned_payload' => :'unsigned_payload',
72
82
  :'signed_payload' => :'signed_payload',
73
83
  :'transaction_hash' => :'transaction_hash',
74
84
  :'transaction_link' => :'transaction_link',
75
- :'status' => :'status'
85
+ :'status' => :'status',
86
+ :'content' => :'content'
76
87
  }
77
88
  end
78
89
 
@@ -85,13 +96,16 @@ module Coinbase::Client
85
96
  def self.openapi_types
86
97
  {
87
98
  :'network_id' => :'String',
99
+ :'block_hash' => :'String',
100
+ :'block_height' => :'String',
88
101
  :'from_address_id' => :'String',
89
102
  :'to_address_id' => :'String',
90
103
  :'unsigned_payload' => :'String',
91
104
  :'signed_payload' => :'String',
92
105
  :'transaction_hash' => :'String',
93
106
  :'transaction_link' => :'String',
94
- :'status' => :'String'
107
+ :'status' => :'String',
108
+ :'content' => :'TransactionContent'
95
109
  }
96
110
  end
97
111
 
@@ -122,6 +136,14 @@ module Coinbase::Client
122
136
  self.network_id = nil
123
137
  end
124
138
 
139
+ if attributes.key?(:'block_hash')
140
+ self.block_hash = attributes[:'block_hash']
141
+ end
142
+
143
+ if attributes.key?(:'block_height')
144
+ self.block_height = attributes[:'block_height']
145
+ end
146
+
125
147
  if attributes.key?(:'from_address_id')
126
148
  self.from_address_id = attributes[:'from_address_id']
127
149
  else
@@ -155,6 +177,10 @@ module Coinbase::Client
155
177
  else
156
178
  self.status = nil
157
179
  end
180
+
181
+ if attributes.key?(:'content')
182
+ self.content = attributes[:'content']
183
+ end
158
184
  end
159
185
 
160
186
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -189,7 +215,7 @@ module Coinbase::Client
189
215
  return false if @from_address_id.nil?
190
216
  return false if @unsigned_payload.nil?
191
217
  return false if @status.nil?
192
- status_validator = EnumAttributeValidator.new('String', ["pending", "signed", "broadcast", "complete", "failed", "unknown_default_open_api"])
218
+ status_validator = EnumAttributeValidator.new('String', ["pending", "signed", "broadcast", "complete", "failed", "unspecified", "unknown_default_open_api"])
193
219
  return false unless status_validator.valid?(@status)
194
220
  true
195
221
  end
@@ -197,7 +223,7 @@ module Coinbase::Client
197
223
  # Custom attribute writer method checking allowed values (enum).
198
224
  # @param [Object] status Object to be assigned
199
225
  def status=(status)
200
- validator = EnumAttributeValidator.new('String', ["pending", "signed", "broadcast", "complete", "failed", "unknown_default_open_api"])
226
+ validator = EnumAttributeValidator.new('String', ["pending", "signed", "broadcast", "complete", "failed", "unspecified", "unknown_default_open_api"])
201
227
  unless validator.valid?(status)
202
228
  fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
203
229
  end
@@ -210,13 +236,16 @@ module Coinbase::Client
210
236
  return true if self.equal?(o)
211
237
  self.class == o.class &&
212
238
  network_id == o.network_id &&
239
+ block_hash == o.block_hash &&
240
+ block_height == o.block_height &&
213
241
  from_address_id == o.from_address_id &&
214
242
  to_address_id == o.to_address_id &&
215
243
  unsigned_payload == o.unsigned_payload &&
216
244
  signed_payload == o.signed_payload &&
217
245
  transaction_hash == o.transaction_hash &&
218
246
  transaction_link == o.transaction_link &&
219
- status == o.status
247
+ status == o.status &&
248
+ content == o.content
220
249
  end
221
250
 
222
251
  # @see the `==` method
@@ -228,7 +257,7 @@ module Coinbase::Client
228
257
  # Calculates hash code according to all attributes.
229
258
  # @return [Integer] Hash code
230
259
  def hash
231
- [network_id, from_address_id, to_address_id, unsigned_payload, signed_payload, transaction_hash, transaction_link, status].hash
260
+ [network_id, block_hash, block_height, from_address_id, to_address_id, unsigned_payload, signed_payload, transaction_hash, transaction_link, status, content].hash
232
261
  end
233
262
 
234
263
  # Builds the object from hash
@@ -0,0 +1,104 @@
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
+
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
+ module TransactionContent
18
+ class << self
19
+ # List of class defined in oneOf (OpenAPI v3)
20
+ def openapi_one_of
21
+ [
22
+ :'EthereumTransaction'
23
+ ]
24
+ end
25
+
26
+ # Builds the object
27
+ # @param [Mixed] Data to be matched against the list of oneOf items
28
+ # @return [Object] Returns the model or the data itself
29
+ def build(data)
30
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
31
+ # Note:
32
+ # - We do not attempt to check whether exactly one item matches.
33
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
34
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
35
+ # - TODO: scalar values are de facto behaving as if they were nullable.
36
+ # - TODO: logging when debugging is set.
37
+ openapi_one_of.each do |klass|
38
+ begin
39
+ next if klass == :AnyType # "nullable: true"
40
+ typed_data = find_and_cast_into_type(klass, data)
41
+ return typed_data if typed_data
42
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
43
+ end
44
+ end
45
+
46
+ openapi_one_of.include?(:AnyType) ? data : nil
47
+ end
48
+
49
+ private
50
+
51
+ SchemaMismatchError = Class.new(StandardError)
52
+
53
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
54
+ def find_and_cast_into_type(klass, data)
55
+ return if data.nil?
56
+
57
+ case klass.to_s
58
+ when 'Boolean'
59
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
60
+ when 'Float'
61
+ return data if data.instance_of?(Float)
62
+ when 'Integer'
63
+ return data if data.instance_of?(Integer)
64
+ when 'Time'
65
+ return Time.parse(data)
66
+ when 'Date'
67
+ return Date.parse(data)
68
+ when 'String'
69
+ return data if data.instance_of?(String)
70
+ when 'Object' # "type: object"
71
+ return data if data.instance_of?(Hash)
72
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
73
+ if data.instance_of?(Array)
74
+ sub_type = Regexp.last_match[:sub_type]
75
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
76
+ end
77
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
78
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
79
+ sub_type = Regexp.last_match[:sub_type]
80
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
81
+ end
82
+ else # model
83
+ const = Coinbase::Client.const_get(klass)
84
+ if const
85
+ if const.respond_to?(:openapi_one_of) # nested oneOf model
86
+ model = const.build(data)
87
+ return model if model
88
+ else
89
+ # raise if data contains keys that are not known to the model
90
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
91
+ model = const.build_from_hash(data)
92
+ return model if model
93
+ end
94
+ end
95
+ end
96
+
97
+ raise # if no match by now, raise
98
+ rescue
99
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
100
+ end
101
+ end
102
+ end
103
+
104
+ end
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -15,44 +15,15 @@ require 'time'
15
15
 
16
16
  module Coinbase::Client
17
17
  class UpdateWebhookRequest
18
- # The ID of the blockchain network
19
- attr_accessor :network_id
20
-
21
- attr_accessor :event_type
22
-
23
18
  # Webhook will monitor all events that matches any one of the event filters.
24
19
  attr_accessor :event_filters
25
20
 
26
21
  # The Webhook uri that updates to
27
22
  attr_accessor :notification_uri
28
23
 
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
24
  # Attribute mapping from ruby-style variable name to JSON key.
52
25
  def self.attribute_map
53
26
  {
54
- :'network_id' => :'network_id',
55
- :'event_type' => :'event_type',
56
27
  :'event_filters' => :'event_filters',
57
28
  :'notification_uri' => :'notification_uri'
58
29
  }
@@ -66,8 +37,6 @@ module Coinbase::Client
66
37
  # Attribute type mapping.
67
38
  def self.openapi_types
68
39
  {
69
- :'network_id' => :'String',
70
- :'event_type' => :'WebhookEventType',
71
40
  :'event_filters' => :'Array<WebhookEventFilter>',
72
41
  :'notification_uri' => :'String'
73
42
  }
@@ -94,16 +63,6 @@ module Coinbase::Client
94
63
  h[k.to_sym] = v
95
64
  }
96
65
 
97
- if attributes.key?(:'network_id')
98
- self.network_id = attributes[:'network_id']
99
- end
100
-
101
- if attributes.key?(:'event_type')
102
- self.event_type = attributes[:'event_type']
103
- else
104
- self.event_type = nil
105
- end
106
-
107
66
  if attributes.key?(:'event_filters')
108
67
  if (value = attributes[:'event_filters']).is_a?(Array)
109
68
  self.event_filters = value
@@ -124,10 +83,6 @@ module Coinbase::Client
124
83
  def list_invalid_properties
125
84
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
126
85
  invalid_properties = Array.new
127
- if @event_type.nil?
128
- invalid_properties.push('invalid value for "event_type", event_type cannot be nil.')
129
- end
130
-
131
86
  if @event_filters.nil?
132
87
  invalid_properties.push('invalid value for "event_filters", event_filters cannot be nil.')
133
88
  end
@@ -143,7 +98,6 @@ module Coinbase::Client
143
98
  # @return true if the model is valid
144
99
  def valid?
145
100
  warn '[DEPRECATED] the `valid?` method is obsolete'
146
- return false if @event_type.nil?
147
101
  return false if @event_filters.nil?
148
102
  return false if @notification_uri.nil?
149
103
  true
@@ -154,8 +108,6 @@ module Coinbase::Client
154
108
  def ==(o)
155
109
  return true if self.equal?(o)
156
110
  self.class == o.class &&
157
- network_id == o.network_id &&
158
- event_type == o.event_type &&
159
111
  event_filters == o.event_filters &&
160
112
  notification_uri == o.notification_uri
161
113
  end
@@ -169,7 +121,7 @@ module Coinbase::Client
169
121
  # Calculates hash code according to all attributes.
170
122
  # @return [Integer] Hash code
171
123
  def hash
172
- [network_id, event_type, event_filters, notification_uri].hash
124
+ [event_filters, notification_uri].hash
173
125
  end
174
126
 
175
127
  # Builds the object from hash
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
- Contact: yuga.cohler@coinbase.com
7
+
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.7.0
10
10
 
@@ -36,6 +36,9 @@ module Coinbase::Client
36
36
  # The date and time the webhook was last updated.
37
37
  attr_accessor :updated_at
38
38
 
39
+ # The header that will contain the signature of the webhook payload.
40
+ attr_accessor :signature_header
41
+
39
42
  class EnumAttributeValidator
40
43
  attr_reader :datatype
41
44
  attr_reader :allowable_values
@@ -67,7 +70,8 @@ module Coinbase::Client
67
70
  :'event_filters' => :'event_filters',
68
71
  :'notification_uri' => :'notification_uri',
69
72
  :'created_at' => :'created_at',
70
- :'updated_at' => :'updated_at'
73
+ :'updated_at' => :'updated_at',
74
+ :'signature_header' => :'signature_header'
71
75
  }
72
76
  end
73
77
 
@@ -85,7 +89,8 @@ module Coinbase::Client
85
89
  :'event_filters' => :'Array<WebhookEventFilter>',
86
90
  :'notification_uri' => :'String',
87
91
  :'created_at' => :'Time',
88
- :'updated_at' => :'Time'
92
+ :'updated_at' => :'Time',
93
+ :'signature_header' => :'String'
89
94
  }
90
95
  end
91
96
 
@@ -139,6 +144,10 @@ module Coinbase::Client
139
144
  if attributes.key?(:'updated_at')
140
145
  self.updated_at = attributes[:'updated_at']
141
146
  end
147
+
148
+ if attributes.key?(:'signature_header')
149
+ self.signature_header = attributes[:'signature_header']
150
+ end
142
151
  end
143
152
 
144
153
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -167,7 +176,8 @@ module Coinbase::Client
167
176
  event_filters == o.event_filters &&
168
177
  notification_uri == o.notification_uri &&
169
178
  created_at == o.created_at &&
170
- updated_at == o.updated_at
179
+ updated_at == o.updated_at &&
180
+ signature_header == o.signature_header
171
181
  end
172
182
 
173
183
  # @see the `==` method
@@ -179,7 +189,7 @@ module Coinbase::Client
179
189
  # Calculates hash code according to all attributes.
180
190
  # @return [Integer] Hash code
181
191
  def hash
182
- [id, network_id, event_type, event_filters, notification_uri, created_at, updated_at].hash
192
+ [id, network_id, event_type, event_filters, notification_uri, created_at, updated_at, signature_header].hash
183
193
  end
184
194
 
185
195
  # Builds the object from hash