coinbase-sdk 0.3.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/lib/coinbase/address/wallet_address.rb +35 -2
  3. data/lib/coinbase/address.rb +5 -1
  4. data/lib/coinbase/client/api/addresses_api.rb +10 -10
  5. data/lib/coinbase/client/api/assets_api.rb +2 -2
  6. data/lib/coinbase/client/api/balance_history_api.rb +107 -0
  7. data/lib/coinbase/client/api/contract_events_api.rb +4 -4
  8. data/lib/coinbase/client/api/contract_invocations_api.rb +5 -5
  9. data/lib/coinbase/client/api/external_addresses_api.rb +5 -90
  10. data/lib/coinbase/client/api/networks_api.rb +2 -2
  11. data/lib/coinbase/client/api/server_signers_api.rb +7 -7
  12. data/lib/coinbase/client/api/smart_contracts_api.rb +332 -0
  13. data/lib/coinbase/client/api/stake_api.rb +6 -14
  14. data/lib/coinbase/client/api/trades_api.rb +5 -5
  15. data/lib/coinbase/client/api/transfers_api.rb +5 -5
  16. data/lib/coinbase/client/api/users_api.rb +2 -2
  17. data/lib/coinbase/client/api/validators_api.rb +3 -3
  18. data/lib/coinbase/client/api/wallet_stake_api.rb +4 -4
  19. data/lib/coinbase/client/api/wallets_api.rb +6 -6
  20. data/lib/coinbase/client/api/webhooks_api.rb +5 -5
  21. data/lib/coinbase/client/api_client.rb +30 -24
  22. data/lib/coinbase/client/api_error.rb +1 -1
  23. data/lib/coinbase/client/configuration.rb +1 -1
  24. data/lib/coinbase/client/models/address.rb +1 -1
  25. data/lib/coinbase/client/models/address_balance_list.rb +1 -1
  26. data/lib/coinbase/client/models/address_historical_balance_list.rb +1 -1
  27. data/lib/coinbase/client/models/address_list.rb +1 -1
  28. data/lib/coinbase/client/models/address_transaction_list.rb +1 -1
  29. data/lib/coinbase/client/models/asset.rb +1 -1
  30. data/lib/coinbase/client/models/balance.rb +1 -1
  31. data/lib/coinbase/client/models/broadcast_contract_invocation_request.rb +1 -1
  32. data/lib/coinbase/client/models/broadcast_staking_operation_request.rb +1 -1
  33. data/lib/coinbase/client/models/broadcast_trade_request.rb +1 -1
  34. data/lib/coinbase/client/models/broadcast_transfer_request.rb +1 -1
  35. data/lib/coinbase/client/models/build_staking_operation_request.rb +1 -1
  36. data/lib/coinbase/client/models/contract_event.rb +1 -1
  37. data/lib/coinbase/client/models/contract_event_list.rb +1 -1
  38. data/lib/coinbase/client/models/contract_invocation.rb +19 -2
  39. data/lib/coinbase/client/models/contract_invocation_list.rb +1 -1
  40. data/lib/coinbase/client/models/create_address_request.rb +1 -1
  41. data/lib/coinbase/client/models/create_contract_invocation_request.rb +15 -5
  42. data/lib/coinbase/client/models/create_payload_signature_request.rb +1 -1
  43. data/lib/coinbase/client/models/create_server_signer_request.rb +1 -1
  44. data/lib/coinbase/client/models/create_smart_contract_request.rb +259 -0
  45. data/lib/coinbase/client/models/create_staking_operation_request.rb +1 -1
  46. data/lib/coinbase/client/models/create_trade_request.rb +1 -1
  47. data/lib/coinbase/client/models/create_transfer_request.rb +2 -2
  48. data/lib/coinbase/client/models/create_wallet_request.rb +1 -1
  49. data/lib/coinbase/client/models/create_wallet_request_wallet.rb +1 -1
  50. data/lib/coinbase/client/models/create_webhook_request.rb +11 -9
  51. data/lib/coinbase/client/models/deploy_smart_contract_request.rb +222 -0
  52. data/lib/coinbase/client/models/erc20_transfer_event.rb +336 -0
  53. data/lib/coinbase/client/models/erc721_transfer_event.rb +336 -0
  54. data/lib/coinbase/client/models/error.rb +15 -5
  55. data/lib/coinbase/client/models/ethereum_transaction.rb +1 -1
  56. data/lib/coinbase/client/models/ethereum_transaction_access.rb +1 -1
  57. data/lib/coinbase/client/models/ethereum_transaction_access_list.rb +1 -1
  58. data/lib/coinbase/client/models/ethereum_transaction_flattened_trace.rb +1 -1
  59. data/lib/coinbase/client/models/ethereum_validator_metadata.rb +1 -1
  60. data/lib/coinbase/client/models/faucet_transaction.rb +1 -1
  61. data/lib/coinbase/client/models/feature_set.rb +1 -1
  62. data/lib/coinbase/client/models/fetch_historical_staking_balances200_response.rb +1 -1
  63. data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +1 -1
  64. data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +1 -1
  65. data/lib/coinbase/client/models/get_staking_context_request.rb +1 -1
  66. data/lib/coinbase/client/models/historical_balance.rb +1 -1
  67. data/lib/coinbase/client/models/network.rb +1 -1
  68. data/lib/coinbase/client/models/network_identifier.rb +3 -2
  69. data/lib/coinbase/client/models/nft_contract_options.rb +240 -0
  70. data/lib/coinbase/client/models/payload_signature.rb +1 -1
  71. data/lib/coinbase/client/models/payload_signature_list.rb +1 -1
  72. data/lib/coinbase/client/models/seed_creation_event.rb +1 -1
  73. data/lib/coinbase/client/models/seed_creation_event_result.rb +1 -1
  74. data/lib/coinbase/client/models/server_signer.rb +1 -1
  75. data/lib/coinbase/client/models/server_signer_event.rb +1 -1
  76. data/lib/coinbase/client/models/server_signer_event_event.rb +1 -1
  77. data/lib/coinbase/client/models/server_signer_event_list.rb +1 -1
  78. data/lib/coinbase/client/models/server_signer_list.rb +1 -1
  79. data/lib/coinbase/client/models/signature_creation_event.rb +1 -1
  80. data/lib/coinbase/client/models/signature_creation_event_result.rb +1 -1
  81. data/lib/coinbase/client/models/signed_voluntary_exit_message_metadata.rb +1 -1
  82. data/lib/coinbase/client/models/smart_contract.rb +378 -0
  83. data/lib/coinbase/client/models/smart_contract_list.rb +257 -0
  84. data/lib/coinbase/client/models/smart_contract_options.rb +106 -0
  85. data/lib/coinbase/client/models/smart_contract_type.rb +41 -0
  86. data/lib/coinbase/client/models/sponsored_send.rb +1 -1
  87. data/lib/coinbase/client/models/staking_balance.rb +3 -3
  88. data/lib/coinbase/client/models/staking_context.rb +1 -1
  89. data/lib/coinbase/client/models/staking_context_context.rb +1 -1
  90. data/lib/coinbase/client/models/staking_operation.rb +1 -1
  91. data/lib/coinbase/client/models/staking_operation_metadata.rb +1 -1
  92. data/lib/coinbase/client/models/staking_reward.rb +3 -3
  93. data/lib/coinbase/client/models/staking_reward_format.rb +1 -1
  94. data/lib/coinbase/client/models/staking_reward_usd_value.rb +1 -1
  95. data/lib/coinbase/client/models/token_contract_options.rb +257 -0
  96. data/lib/coinbase/client/models/trade.rb +1 -1
  97. data/lib/coinbase/client/models/trade_list.rb +1 -1
  98. data/lib/coinbase/client/models/transaction.rb +1 -1
  99. data/lib/coinbase/client/models/transaction_content.rb +1 -1
  100. data/lib/coinbase/client/models/transaction_type.rb +1 -1
  101. data/lib/coinbase/client/models/transfer.rb +1 -1
  102. data/lib/coinbase/client/models/transfer_list.rb +1 -1
  103. data/lib/coinbase/client/models/update_webhook_request.rb +11 -9
  104. data/lib/coinbase/client/models/user.rb +1 -1
  105. data/lib/coinbase/client/models/validator.rb +1 -1
  106. data/lib/coinbase/client/models/validator_details.rb +1 -1
  107. data/lib/coinbase/client/models/validator_list.rb +1 -1
  108. data/lib/coinbase/client/models/validator_status.rb +1 -1
  109. data/lib/coinbase/client/models/wallet.rb +1 -1
  110. data/lib/coinbase/client/models/wallet_list.rb +1 -1
  111. data/lib/coinbase/client/models/webhook.rb +11 -2
  112. data/lib/coinbase/client/models/webhook_event_filter.rb +4 -4
  113. data/lib/coinbase/client/models/webhook_event_type.rb +3 -2
  114. data/lib/coinbase/client/models/webhook_event_type_filter.rb +105 -0
  115. data/lib/coinbase/client/models/webhook_list.rb +1 -1
  116. data/lib/coinbase/client/models/webhook_wallet_activity_filter.rb +228 -0
  117. data/lib/coinbase/client/version.rb +1 -1
  118. data/lib/coinbase/client.rb +15 -1
  119. data/lib/coinbase/contract_invocation.rb +34 -10
  120. data/lib/coinbase/smart_contract.rb +216 -45
  121. data/lib/coinbase/transaction.rb +3 -0
  122. data/lib/coinbase/transfer.rb +1 -1
  123. data/lib/coinbase/version.rb +1 -1
  124. data/lib/coinbase/wallet.rb +11 -2
  125. metadata +16 -2
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -22,11 +22,15 @@ module Coinbase::Client
22
22
  # A human-readable message providing more details about the error.
23
23
  attr_accessor :message
24
24
 
25
+ # A unique identifier for the request that generated the error. This can be used to help debug issues with the API.
26
+ attr_accessor :correlation_id
27
+
25
28
  # Attribute mapping from ruby-style variable name to JSON key.
26
29
  def self.attribute_map
27
30
  {
28
31
  :'code' => :'code',
29
- :'message' => :'message'
32
+ :'message' => :'message',
33
+ :'correlation_id' => :'correlation_id'
30
34
  }
31
35
  end
32
36
 
@@ -39,7 +43,8 @@ module Coinbase::Client
39
43
  def self.openapi_types
40
44
  {
41
45
  :'code' => :'String',
42
- :'message' => :'String'
46
+ :'message' => :'String',
47
+ :'correlation_id' => :'String'
43
48
  }
44
49
  end
45
50
 
@@ -75,6 +80,10 @@ module Coinbase::Client
75
80
  else
76
81
  self.message = nil
77
82
  end
83
+
84
+ if attributes.key?(:'correlation_id')
85
+ self.correlation_id = attributes[:'correlation_id']
86
+ end
78
87
  end
79
88
 
80
89
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -146,7 +155,8 @@ module Coinbase::Client
146
155
  return true if self.equal?(o)
147
156
  self.class == o.class &&
148
157
  code == o.code &&
149
- message == o.message
158
+ message == o.message &&
159
+ correlation_id == o.correlation_id
150
160
  end
151
161
 
152
162
  # @see the `==` method
@@ -158,7 +168,7 @@ module Coinbase::Client
158
168
  # Calculates hash code according to all attributes.
159
169
  # @return [Integer] Hash code
160
170
  def hash
161
- [code, message].hash
171
+ [code, message, correlation_id].hash
162
172
  end
163
173
 
164
174
  # Builds the object from hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -21,10 +21,11 @@ module Coinbase::Client
21
21
  ETHEREUM_MAINNET = "ethereum-mainnet".freeze
22
22
  POLYGON_MAINNET = "polygon-mainnet".freeze
23
23
  SOLANA_DEVNET = "solana-devnet".freeze
24
+ ARBITRUM_MAINNET = "arbitrum-mainnet".freeze
24
25
  UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
25
26
 
26
27
  def self.all_vars
27
- @all_vars ||= [BASE_SEPOLIA, BASE_MAINNET, ETHEREUM_HOLESKY, ETHEREUM_MAINNET, POLYGON_MAINNET, SOLANA_DEVNET, UNKNOWN_DEFAULT_OPEN_API].freeze
28
+ @all_vars ||= [BASE_SEPOLIA, BASE_MAINNET, ETHEREUM_HOLESKY, ETHEREUM_MAINNET, POLYGON_MAINNET, SOLANA_DEVNET, ARBITRUM_MAINNET, UNKNOWN_DEFAULT_OPEN_API].freeze
28
29
  end
29
30
 
30
31
  # Builds the enum from string
@@ -0,0 +1,240 @@
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.8.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Coinbase::Client
17
+ # Options for NFT contract creation
18
+ class NFTContractOptions
19
+ # The name of the NFT
20
+ attr_accessor :name
21
+
22
+ # The symbol of the NFT
23
+ attr_accessor :symbol
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'name' => :'name',
29
+ :'symbol' => :'symbol'
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
+ :'name' => :'String',
42
+ :'symbol' => :'String'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Coinbase::Client::NFTContractOptions` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Coinbase::Client::NFTContractOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'name')
68
+ self.name = attributes[:'name']
69
+ else
70
+ self.name = nil
71
+ end
72
+
73
+ if attributes.key?(:'symbol')
74
+ self.symbol = attributes[:'symbol']
75
+ else
76
+ self.symbol = nil
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
84
+ invalid_properties = Array.new
85
+ if @name.nil?
86
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
87
+ end
88
+
89
+ if @symbol.nil?
90
+ invalid_properties.push('invalid value for "symbol", symbol cannot be nil.')
91
+ end
92
+
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
100
+ return false if @name.nil?
101
+ return false if @symbol.nil?
102
+ true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ name == o.name &&
111
+ symbol == o.symbol
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [name, symbol].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ transformed_hash = {}
133
+ openapi_types.each_pair do |key, type|
134
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = nil
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[attribute_map[key]].is_a?(Array)
140
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
+ end
142
+ elsif !attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
+ end
145
+ end
146
+ new(transformed_hash)
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def self._deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = Coinbase::Client.const_get(type)
188
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12