turnkey_client 0.0.15 → 0.0.18

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 (171) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +39 -0
  3. data/.rspec +2 -0
  4. data/.swagger-codegen/VERSION +1 -0
  5. data/.swagger-codegen-ignore +23 -0
  6. data/lib/turnkey_client/api/app_proof_api.rb +4 -4
  7. data/lib/turnkey_client/api/broadcasting_api.rb +251 -0
  8. data/lib/turnkey_client/api/on_ramp_api.rb +290 -0
  9. data/lib/turnkey_client/api/policies_api.rb +58 -0
  10. data/lib/turnkey_client/api/send_transactions_api.rb +77 -0
  11. data/lib/turnkey_client/api/wallets_api.rb +174 -0
  12. data/lib/turnkey_client/models/activity.rb +1 -1
  13. data/lib/turnkey_client/models/activity_type.rb +16 -0
  14. data/lib/turnkey_client/models/approve_activity_request.rb +14 -4
  15. data/lib/turnkey_client/models/asset_balance.rb +255 -0
  16. data/lib/turnkey_client/models/asset_balance_display.rb +216 -0
  17. data/lib/turnkey_client/models/asset_metadata.rb +246 -0
  18. data/lib/turnkey_client/models/client_signature.rb +255 -0
  19. data/lib/turnkey_client/models/client_signature_scheme.rb +26 -0
  20. data/lib/turnkey_client/models/create_api_keys_request.rb +14 -4
  21. data/lib/turnkey_client/models/create_authenticators_request.rb +14 -4
  22. data/lib/turnkey_client/models/create_fiat_on_ramp_credential_intent.rb +272 -0
  23. data/lib/turnkey_client/models/create_fiat_on_ramp_credential_request.rb +298 -0
  24. data/lib/turnkey_client/models/create_fiat_on_ramp_credential_result.rb +211 -0
  25. data/lib/turnkey_client/models/create_invitations_request.rb +14 -4
  26. data/lib/turnkey_client/models/create_oauth2_credential_request.rb +14 -4
  27. data/lib/turnkey_client/models/create_oauth_providers_request.rb +14 -4
  28. data/lib/turnkey_client/models/create_policies_request.rb +14 -4
  29. data/lib/turnkey_client/models/create_policy_intent_v3.rb +6 -0
  30. data/lib/turnkey_client/models/create_policy_request.rb +14 -4
  31. data/lib/turnkey_client/models/create_private_key_tag_request.rb +14 -4
  32. data/lib/turnkey_client/models/create_private_keys_request.rb +14 -4
  33. data/lib/turnkey_client/models/create_read_only_session_request.rb +14 -4
  34. data/lib/turnkey_client/models/create_read_write_session_request.rb +14 -4
  35. data/lib/turnkey_client/models/create_smart_contract_interface_intent.rb +1 -1
  36. data/lib/turnkey_client/models/create_smart_contract_interface_request.rb +14 -4
  37. data/lib/turnkey_client/models/create_sub_organization_intent_v7.rb +14 -5
  38. data/lib/turnkey_client/models/create_sub_organization_request.rb +14 -4
  39. data/lib/turnkey_client/models/create_tvc_app_intent.rb +277 -0
  40. data/lib/turnkey_client/models/create_tvc_app_result.rb +258 -0
  41. data/lib/turnkey_client/models/create_tvc_deployment_intent.rb +368 -0
  42. data/lib/turnkey_client/models/create_tvc_deployment_result.rb +226 -0
  43. data/lib/turnkey_client/models/create_tvc_manifest_approvals_intent.rb +228 -0
  44. data/lib/turnkey_client/models/create_tvc_manifest_approvals_result.rb +213 -0
  45. data/lib/turnkey_client/models/create_user_tag_request.rb +14 -4
  46. data/lib/turnkey_client/models/create_users_request.rb +14 -4
  47. data/lib/turnkey_client/models/create_wallet_accounts_intent.rb +15 -4
  48. data/lib/turnkey_client/models/create_wallet_accounts_request.rb +14 -4
  49. data/lib/turnkey_client/models/create_wallet_request.rb +14 -4
  50. data/lib/turnkey_client/models/curve.rb +1 -0
  51. data/lib/turnkey_client/models/custom_revert_error.rb +218 -0
  52. data/lib/turnkey_client/models/data_v1_signature_scheme.rb +26 -0
  53. data/lib/turnkey_client/models/delete_api_keys_request.rb +14 -4
  54. data/lib/turnkey_client/models/delete_authenticators_request.rb +14 -4
  55. data/lib/turnkey_client/models/delete_fiat_on_ramp_credential_intent.rb +211 -0
  56. data/lib/turnkey_client/models/delete_fiat_on_ramp_credential_request.rb +298 -0
  57. data/lib/turnkey_client/models/delete_fiat_on_ramp_credential_result.rb +211 -0
  58. data/lib/turnkey_client/models/delete_invitation_request.rb +14 -4
  59. data/lib/turnkey_client/models/delete_oauth2_credential_request.rb +14 -4
  60. data/lib/turnkey_client/models/delete_oauth_providers_request.rb +14 -4
  61. data/lib/turnkey_client/models/delete_policies_intent.rb +213 -0
  62. data/lib/turnkey_client/models/delete_policies_request.rb +298 -0
  63. data/lib/turnkey_client/models/delete_policies_result.rb +213 -0
  64. data/lib/turnkey_client/models/delete_policy_request.rb +14 -4
  65. data/lib/turnkey_client/models/delete_private_key_tags_request.rb +14 -4
  66. data/lib/turnkey_client/models/delete_private_keys_request.rb +14 -4
  67. data/lib/turnkey_client/models/delete_smart_contract_interface_request.rb +14 -4
  68. data/lib/turnkey_client/models/delete_sub_organization_request.rb +14 -4
  69. data/lib/turnkey_client/models/delete_user_tags_request.rb +14 -4
  70. data/lib/turnkey_client/models/delete_users_request.rb +14 -4
  71. data/lib/turnkey_client/models/delete_wallet_accounts_intent.rb +224 -0
  72. data/lib/turnkey_client/models/delete_wallet_accounts_request.rb +298 -0
  73. data/lib/turnkey_client/models/delete_wallet_accounts_result.rb +213 -0
  74. data/lib/turnkey_client/models/delete_wallets_request.rb +14 -4
  75. data/lib/turnkey_client/models/email_auth_customization_params.rb +255 -0
  76. data/lib/turnkey_client/models/email_auth_intent_v3.rb +306 -0
  77. data/lib/turnkey_client/models/email_auth_request.rb +16 -6
  78. data/lib/turnkey_client/models/email_customization_params_v2.rb +240 -0
  79. data/lib/turnkey_client/models/eth_send_raw_transaction_intent.rb +260 -0
  80. data/lib/turnkey_client/models/eth_send_raw_transaction_result.rb +211 -0
  81. data/lib/turnkey_client/models/eth_send_transaction_intent.rb +363 -0
  82. data/lib/turnkey_client/models/eth_send_transaction_request.rb +298 -0
  83. data/lib/turnkey_client/models/eth_send_transaction_result.rb +211 -0
  84. data/lib/turnkey_client/models/eth_send_transaction_status.rb +207 -0
  85. data/lib/turnkey_client/models/export_private_key_request.rb +14 -4
  86. data/lib/turnkey_client/models/export_wallet_account_request.rb +14 -4
  87. data/lib/turnkey_client/models/export_wallet_request.rb +14 -4
  88. data/lib/turnkey_client/models/fiat_on_ramp_credential.rb +330 -0
  89. data/lib/turnkey_client/models/get_gas_usage_request.rb +211 -0
  90. data/lib/turnkey_client/models/get_gas_usage_response.rb +241 -0
  91. data/lib/turnkey_client/models/get_nonces_request.rb +295 -0
  92. data/lib/turnkey_client/models/get_nonces_response.rb +218 -0
  93. data/lib/turnkey_client/models/get_on_ramp_transaction_status_request.rb +237 -0
  94. data/lib/turnkey_client/models/get_on_ramp_transaction_status_response.rb +211 -0
  95. data/lib/turnkey_client/models/get_send_transaction_status_request.rb +226 -0
  96. data/lib/turnkey_client/models/get_send_transaction_status_response.rb +240 -0
  97. data/lib/turnkey_client/models/get_wallet_address_balances_request.rb +275 -0
  98. data/lib/turnkey_client/models/get_wallet_address_balances_response.rb +208 -0
  99. data/lib/turnkey_client/models/import_private_key_request.rb +14 -4
  100. data/lib/turnkey_client/models/import_wallet_request.rb +14 -4
  101. data/lib/turnkey_client/models/init_fiat_on_ramp_request.rb +14 -4
  102. data/lib/turnkey_client/models/init_import_private_key_request.rb +14 -4
  103. data/lib/turnkey_client/models/init_import_wallet_request.rb +14 -4
  104. data/lib/turnkey_client/models/init_otp_auth_intent_v3.rb +336 -0
  105. data/lib/turnkey_client/models/init_otp_auth_request.rb +16 -6
  106. data/lib/turnkey_client/models/init_otp_intent_v2.rb +336 -0
  107. data/lib/turnkey_client/models/init_otp_request.rb +16 -6
  108. data/lib/turnkey_client/models/init_user_email_recovery_intent.rb +37 -4
  109. data/lib/turnkey_client/models/init_user_email_recovery_intent_v2.rb +284 -0
  110. data/lib/turnkey_client/models/init_user_email_recovery_request.rb +16 -6
  111. data/lib/turnkey_client/models/intent.rb +148 -4
  112. data/lib/turnkey_client/models/list_fiat_on_ramp_credentials_request.rb +211 -0
  113. data/lib/turnkey_client/models/list_fiat_on_ramp_credentials_response.rb +212 -0
  114. data/lib/turnkey_client/models/list_supported_assets_request.rb +260 -0
  115. data/lib/turnkey_client/models/list_supported_assets_response.rb +208 -0
  116. data/lib/turnkey_client/models/native_revert_error.rb +229 -0
  117. data/lib/turnkey_client/models/oauth2_authenticate_request.rb +14 -4
  118. data/lib/turnkey_client/models/oauth_login_request.rb +14 -4
  119. data/lib/turnkey_client/models/oauth_request.rb +14 -4
  120. data/lib/turnkey_client/models/otp_auth_request.rb +14 -4
  121. data/lib/turnkey_client/models/otp_login_intent.rb +0 -2
  122. data/lib/turnkey_client/models/otp_login_request.rb +14 -4
  123. data/lib/turnkey_client/models/recover_user_request.rb +14 -4
  124. data/lib/turnkey_client/models/reject_activity_request.rb +14 -4
  125. data/lib/turnkey_client/models/remove_organization_feature_request.rb +14 -4
  126. data/lib/turnkey_client/models/result.rb +112 -4
  127. data/lib/turnkey_client/models/revert_chain_entry.rb +253 -0
  128. data/lib/turnkey_client/models/set_organization_feature_request.rb +14 -4
  129. data/lib/turnkey_client/models/sign_raw_payload_request.rb +14 -4
  130. data/lib/turnkey_client/models/sign_raw_payloads_request.rb +14 -4
  131. data/lib/turnkey_client/models/sign_transaction_request.rb +14 -4
  132. data/lib/turnkey_client/models/sol_send_transaction_intent.rb +297 -0
  133. data/lib/turnkey_client/models/sol_send_transaction_request.rb +298 -0
  134. data/lib/turnkey_client/models/sol_send_transaction_result.rb +211 -0
  135. data/lib/turnkey_client/models/stamp_login_request.rb +14 -4
  136. data/lib/turnkey_client/models/transaction_type.rb +2 -0
  137. data/lib/turnkey_client/models/tvc_manifest_approval.rb +226 -0
  138. data/lib/turnkey_client/models/tvc_operator_params.rb +226 -0
  139. data/lib/turnkey_client/models/tvc_operator_set_params.rb +250 -0
  140. data/lib/turnkey_client/models/tx_error.rb +218 -0
  141. data/lib/turnkey_client/models/unknown_revert_error.rb +218 -0
  142. data/lib/turnkey_client/models/update_auth_proxy_config_intent.rb +27 -5
  143. data/lib/turnkey_client/models/update_fiat_on_ramp_credential_intent.rb +277 -0
  144. data/lib/turnkey_client/models/update_fiat_on_ramp_credential_request.rb +298 -0
  145. data/lib/turnkey_client/models/update_fiat_on_ramp_credential_result.rb +211 -0
  146. data/lib/turnkey_client/models/update_oauth2_credential_request.rb +14 -4
  147. data/lib/turnkey_client/models/update_policy_request.rb +14 -4
  148. data/lib/turnkey_client/models/update_private_key_tag_request.rb +14 -4
  149. data/lib/turnkey_client/models/update_root_quorum_request.rb +14 -4
  150. data/lib/turnkey_client/models/update_user_email_request.rb +14 -4
  151. data/lib/turnkey_client/models/update_user_name_request.rb +14 -4
  152. data/lib/turnkey_client/models/update_user_phone_number_request.rb +14 -4
  153. data/lib/turnkey_client/models/update_user_request.rb +14 -4
  154. data/lib/turnkey_client/models/update_user_tag_request.rb +14 -4
  155. data/lib/turnkey_client/models/update_wallet_request.rb +14 -4
  156. data/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb +252 -0
  157. data/lib/turnkey_client/models/upsert_gas_usage_config_result.rb +211 -0
  158. data/lib/turnkey_client/models/verify_otp_request.rb +14 -4
  159. data/lib/turnkey_client/version.rb +1 -1
  160. data/lib/turnkey_client.rb +70 -2
  161. data/turnkey_client.gemspec +1 -1
  162. metadata +76 -12
  163. data/turnkey_client-0.0.12.gem +0 -0
  164. data/turnkey_client-0.0.13.gem +0 -0
  165. data/turnkey_client-0.0.14.gem +0 -0
  166. data/turnkey_client-0.0.2.gem +0 -0
  167. data/turnkey_client-0.0.3.gem +0 -0
  168. data/turnkey_client-0.0.4.gem +0 -0
  169. data/turnkey_client-0.0.7.gem +0 -0
  170. data/turnkey_client-0.0.8.gem +0 -0
  171. data/turnkey_client-0.0.9.gem +0 -0
@@ -0,0 +1,275 @@
1
+ =begin
2
+ #API Reference
3
+
4
+ #Review our [API Introduction](../api-introduction) to get started.
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ =end
10
+
11
+ require 'date'
12
+
13
+ module TurnkeyClient
14
+ class GetWalletAddressBalancesRequest
15
+ # Unique identifier for a given organization.
16
+ attr_accessor :organization_id
17
+
18
+ # Address corresponding to a wallet account.
19
+ attr_accessor :address
20
+
21
+ # CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet).
22
+ attr_accessor :caip2
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'organization_id' => :'organizationId',
50
+ :'address' => :'address',
51
+ :'caip2' => :'caip2'
52
+ }
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'organization_id' => :'Object',
59
+ :'address' => :'Object',
60
+ :'caip2' => :'Object'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetWalletAddressBalancesRequest` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ attributes = attributes.each_with_object({}) { |(k, v), h|
79
+ if (!self.class.attribute_map.key?(k.to_sym))
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetWalletAddressBalancesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
+ end
82
+ h[k.to_sym] = v
83
+ }
84
+
85
+ if attributes.key?(:'organization_id')
86
+ self.organization_id = attributes[:'organization_id']
87
+ end
88
+
89
+ if attributes.key?(:'address')
90
+ self.address = attributes[:'address']
91
+ end
92
+
93
+ if attributes.key?(:'caip2')
94
+ self.caip2 = attributes[:'caip2']
95
+ end
96
+ end
97
+
98
+ # Show invalid properties with the reasons. Usually used together with valid?
99
+ # @return Array for valid properties with the reasons
100
+ def list_invalid_properties
101
+ invalid_properties = Array.new
102
+ if @organization_id.nil?
103
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
104
+ end
105
+
106
+ if @address.nil?
107
+ invalid_properties.push('invalid value for "address", address cannot be nil.')
108
+ end
109
+
110
+ if @caip2.nil?
111
+ invalid_properties.push('invalid value for "caip2", caip2 cannot be nil.')
112
+ end
113
+
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ return false if @organization_id.nil?
121
+ return false if @address.nil?
122
+ return false if @caip2.nil?
123
+ caip2_validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002'])
124
+ return false unless caip2_validator.valid?(@caip2)
125
+ true
126
+ end
127
+
128
+ # Custom attribute writer method checking allowed values (enum).
129
+ # @param [Object] caip2 Object to be assigned
130
+ def caip2=(caip2)
131
+ validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002'])
132
+ unless validator.valid?(caip2)
133
+ fail ArgumentError, "invalid value for \"caip2\", must be one of #{validator.allowable_values}."
134
+ end
135
+ @caip2 = caip2
136
+ end
137
+
138
+ # Checks equality by comparing each attribute.
139
+ # @param [Object] Object to be compared
140
+ def ==(o)
141
+ return true if self.equal?(o)
142
+ self.class == o.class &&
143
+ organization_id == o.organization_id &&
144
+ address == o.address &&
145
+ caip2 == o.caip2
146
+ end
147
+
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Integer] Hash code
156
+ def hash
157
+ [organization_id, address, caip2].hash
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def self.build_from_hash(attributes)
164
+ new.build_from_hash(attributes)
165
+ end
166
+
167
+ # Builds the object from hash
168
+ # @param [Hash] attributes Model attributes in the form of hash
169
+ # @return [Object] Returns the model itself
170
+ def build_from_hash(attributes)
171
+ return nil unless attributes.is_a?(Hash)
172
+ self.class.openapi_types.each_pair do |key, type|
173
+ if type =~ /\AArray<(.*)>/i
174
+ # check to ensure the input is an array given that the attribute
175
+ # is documented as an array but the input is not
176
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
177
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
178
+ end
179
+ elsif !attributes[self.class.attribute_map[key]].nil?
180
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
181
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
182
+ self.send("#{key}=", nil)
183
+ end
184
+ end
185
+
186
+ self
187
+ end
188
+
189
+ # Deserializes the data based on type
190
+ # @param string type Data type
191
+ # @param string value Value to be deserialized
192
+ # @return [Object] Deserialized data
193
+ def _deserialize(type, value)
194
+ case type.to_sym
195
+ when :DateTime
196
+ DateTime.parse(value)
197
+ when :Date
198
+ Date.parse(value)
199
+ when :String
200
+ value.to_s
201
+ when :Integer
202
+ value.to_i
203
+ when :Float
204
+ value.to_f
205
+ when :Boolean
206
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
207
+ true
208
+ else
209
+ false
210
+ end
211
+ when :Object
212
+ # generic object (usually a Hash), return directly
213
+ value
214
+ when /\AArray<(?<inner_type>.+)>\z/
215
+ inner_type = Regexp.last_match[:inner_type]
216
+ value.map { |v| _deserialize(inner_type, v) }
217
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
218
+ k_type = Regexp.last_match[:k_type]
219
+ v_type = Regexp.last_match[:v_type]
220
+ {}.tap do |hash|
221
+ value.each do |k, v|
222
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
223
+ end
224
+ end
225
+ else # model
226
+ TurnkeyClient.const_get(type).build_from_hash(value)
227
+ end
228
+ end
229
+
230
+ # Returns the string representation of the object
231
+ # @return [String] String presentation of the object
232
+ def to_s
233
+ to_hash.to_s
234
+ end
235
+
236
+ # to_body is an alias to to_hash (backward compatibility)
237
+ # @return [Hash] Returns the object in the form of hash
238
+ def to_body
239
+ to_hash
240
+ end
241
+
242
+ # Returns the object in the form of hash
243
+ # @return [Hash] Returns the object in the form of hash
244
+ def to_hash
245
+ hash = {}
246
+ self.class.attribute_map.each_pair do |attr, param|
247
+ value = self.send(attr)
248
+ if value.nil?
249
+ is_nullable = self.class.openapi_nullable.include?(attr)
250
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
251
+ end
252
+
253
+ hash[param] = _to_hash(value)
254
+ end
255
+ hash
256
+ end
257
+
258
+ # Outputs non-array value in the form of hash
259
+ # For object, use to_hash. Otherwise, just return the value
260
+ # @param [Object] value Any valid value
261
+ # @return [Hash] Returns the value in the form of hash
262
+ def _to_hash(value)
263
+ if value.is_a?(Array)
264
+ value.compact.map { |v| _to_hash(v) }
265
+ elsif value.is_a?(Hash)
266
+ {}.tap do |hash|
267
+ value.each { |k, v| hash[k] = _to_hash(v) }
268
+ end
269
+ elsif value.respond_to? :to_hash
270
+ value.to_hash
271
+ else
272
+ value
273
+ end
274
+ end end
275
+ end
@@ -0,0 +1,208 @@
1
+ =begin
2
+ #API Reference
3
+
4
+ #Review our [API Introduction](../api-introduction) to get started.
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ =end
10
+
11
+ require 'date'
12
+
13
+ module TurnkeyClient
14
+ class GetWalletAddressBalancesResponse
15
+ # List of asset balances
16
+ attr_accessor :balances
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'balances' => :'balances'
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.openapi_types
27
+ {
28
+ :'balances' => :'Object'
29
+ }
30
+ end
31
+
32
+ # List of attributes with nullable: true
33
+ def self.openapi_nullable
34
+ Set.new([
35
+ ])
36
+ end
37
+
38
+ # Initializes the object
39
+ # @param [Hash] attributes Model attributes in the form of hash
40
+ def initialize(attributes = {})
41
+ if (!attributes.is_a?(Hash))
42
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetWalletAddressBalancesResponse` initialize method"
43
+ end
44
+
45
+ # check to see if the attribute exists and convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h|
47
+ if (!self.class.attribute_map.key?(k.to_sym))
48
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetWalletAddressBalancesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
49
+ end
50
+ h[k.to_sym] = v
51
+ }
52
+
53
+ if attributes.key?(:'balances')
54
+ if (value = attributes[:'balances']).is_a?(Array)
55
+ self.balances = value
56
+ end
57
+ end
58
+ end
59
+
60
+ # Show invalid properties with the reasons. Usually used together with valid?
61
+ # @return Array for valid properties with the reasons
62
+ def list_invalid_properties
63
+ invalid_properties = Array.new
64
+ invalid_properties
65
+ end
66
+
67
+ # Check to see if the all the properties in the model are valid
68
+ # @return true if the model is valid
69
+ def valid?
70
+ true
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param [Object] Object to be compared
75
+ def ==(o)
76
+ return true if self.equal?(o)
77
+ self.class == o.class &&
78
+ balances == o.balances
79
+ end
80
+
81
+ # @see the `==` method
82
+ # @param [Object] Object to be compared
83
+ def eql?(o)
84
+ self == o
85
+ end
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Integer] Hash code
89
+ def hash
90
+ [balances].hash
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def self.build_from_hash(attributes)
97
+ new.build_from_hash(attributes)
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def build_from_hash(attributes)
104
+ return nil unless attributes.is_a?(Hash)
105
+ self.class.openapi_types.each_pair do |key, type|
106
+ if type =~ /\AArray<(.*)>/i
107
+ # check to ensure the input is an array given that the attribute
108
+ # is documented as an array but the input is not
109
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
110
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
111
+ end
112
+ elsif !attributes[self.class.attribute_map[key]].nil?
113
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
115
+ self.send("#{key}=", nil)
116
+ end
117
+ end
118
+
119
+ self
120
+ end
121
+
122
+ # Deserializes the data based on type
123
+ # @param string type Data type
124
+ # @param string value Value to be deserialized
125
+ # @return [Object] Deserialized data
126
+ def _deserialize(type, value)
127
+ case type.to_sym
128
+ when :DateTime
129
+ DateTime.parse(value)
130
+ when :Date
131
+ Date.parse(value)
132
+ when :String
133
+ value.to_s
134
+ when :Integer
135
+ value.to_i
136
+ when :Float
137
+ value.to_f
138
+ when :Boolean
139
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
140
+ true
141
+ else
142
+ false
143
+ end
144
+ when :Object
145
+ # generic object (usually a Hash), return directly
146
+ value
147
+ when /\AArray<(?<inner_type>.+)>\z/
148
+ inner_type = Regexp.last_match[:inner_type]
149
+ value.map { |v| _deserialize(inner_type, v) }
150
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
151
+ k_type = Regexp.last_match[:k_type]
152
+ v_type = Regexp.last_match[:v_type]
153
+ {}.tap do |hash|
154
+ value.each do |k, v|
155
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
156
+ end
157
+ end
158
+ else # model
159
+ TurnkeyClient.const_get(type).build_from_hash(value)
160
+ end
161
+ end
162
+
163
+ # Returns the string representation of the object
164
+ # @return [String] String presentation of the object
165
+ def to_s
166
+ to_hash.to_s
167
+ end
168
+
169
+ # to_body is an alias to to_hash (backward compatibility)
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_body
172
+ to_hash
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ if value.nil?
182
+ is_nullable = self.class.openapi_nullable.include?(attr)
183
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
184
+ end
185
+
186
+ hash[param] = _to_hash(value)
187
+ end
188
+ hash
189
+ end
190
+
191
+ # Outputs non-array value in the form of hash
192
+ # For object, use to_hash. Otherwise, just return the value
193
+ # @param [Object] value Any valid value
194
+ # @return [Hash] Returns the value in the form of hash
195
+ def _to_hash(value)
196
+ if value.is_a?(Array)
197
+ value.compact.map { |v| _to_hash(v) }
198
+ elsif value.is_a?(Hash)
199
+ {}.tap do |hash|
200
+ value.each { |k, v| hash[k] = _to_hash(v) }
201
+ end
202
+ elsif value.respond_to? :to_hash
203
+ value.to_hash
204
+ else
205
+ value
206
+ end
207
+ end end
208
+ end
@@ -22,6 +22,8 @@ module TurnkeyClient
22
22
 
23
23
  attr_accessor :parameters
24
24
 
25
+ attr_accessor :generate_app_proofs
26
+
25
27
  class EnumAttributeValidator
26
28
  attr_reader :datatype
27
29
  attr_reader :allowable_values
@@ -50,7 +52,8 @@ module TurnkeyClient
50
52
  :'type' => :'type',
51
53
  :'timestamp_ms' => :'timestampMs',
52
54
  :'organization_id' => :'organizationId',
53
- :'parameters' => :'parameters'
55
+ :'parameters' => :'parameters',
56
+ :'generate_app_proofs' => :'generateAppProofs'
54
57
  }
55
58
  end
56
59
 
@@ -60,13 +63,15 @@ module TurnkeyClient
60
63
  :'type' => :'Object',
61
64
  :'timestamp_ms' => :'Object',
62
65
  :'organization_id' => :'Object',
63
- :'parameters' => :'Object'
66
+ :'parameters' => :'Object',
67
+ :'generate_app_proofs' => :'Object'
64
68
  }
65
69
  end
66
70
 
67
71
  # List of attributes with nullable: true
68
72
  def self.openapi_nullable
69
73
  Set.new([
74
+ :'generate_app_proofs'
70
75
  ])
71
76
  end
72
77
 
@@ -100,6 +105,10 @@ module TurnkeyClient
100
105
  if attributes.key?(:'parameters')
101
106
  self.parameters = attributes[:'parameters']
102
107
  end
108
+
109
+ if attributes.key?(:'generate_app_proofs')
110
+ self.generate_app_proofs = attributes[:'generate_app_proofs']
111
+ end
103
112
  end
104
113
 
105
114
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -155,7 +164,8 @@ module TurnkeyClient
155
164
  type == o.type &&
156
165
  timestamp_ms == o.timestamp_ms &&
157
166
  organization_id == o.organization_id &&
158
- parameters == o.parameters
167
+ parameters == o.parameters &&
168
+ generate_app_proofs == o.generate_app_proofs
159
169
  end
160
170
 
161
171
  # @see the `==` method
@@ -167,7 +177,7 @@ module TurnkeyClient
167
177
  # Calculates hash code according to all attributes.
168
178
  # @return [Integer] Hash code
169
179
  def hash
170
- [type, timestamp_ms, organization_id, parameters].hash
180
+ [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash
171
181
  end
172
182
 
173
183
  # Builds the object from hash
@@ -22,6 +22,8 @@ module TurnkeyClient
22
22
 
23
23
  attr_accessor :parameters
24
24
 
25
+ attr_accessor :generate_app_proofs
26
+
25
27
  class EnumAttributeValidator
26
28
  attr_reader :datatype
27
29
  attr_reader :allowable_values
@@ -50,7 +52,8 @@ module TurnkeyClient
50
52
  :'type' => :'type',
51
53
  :'timestamp_ms' => :'timestampMs',
52
54
  :'organization_id' => :'organizationId',
53
- :'parameters' => :'parameters'
55
+ :'parameters' => :'parameters',
56
+ :'generate_app_proofs' => :'generateAppProofs'
54
57
  }
55
58
  end
56
59
 
@@ -60,13 +63,15 @@ module TurnkeyClient
60
63
  :'type' => :'Object',
61
64
  :'timestamp_ms' => :'Object',
62
65
  :'organization_id' => :'Object',
63
- :'parameters' => :'Object'
66
+ :'parameters' => :'Object',
67
+ :'generate_app_proofs' => :'Object'
64
68
  }
65
69
  end
66
70
 
67
71
  # List of attributes with nullable: true
68
72
  def self.openapi_nullable
69
73
  Set.new([
74
+ :'generate_app_proofs'
70
75
  ])
71
76
  end
72
77
 
@@ -100,6 +105,10 @@ module TurnkeyClient
100
105
  if attributes.key?(:'parameters')
101
106
  self.parameters = attributes[:'parameters']
102
107
  end
108
+
109
+ if attributes.key?(:'generate_app_proofs')
110
+ self.generate_app_proofs = attributes[:'generate_app_proofs']
111
+ end
103
112
  end
104
113
 
105
114
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -155,7 +164,8 @@ module TurnkeyClient
155
164
  type == o.type &&
156
165
  timestamp_ms == o.timestamp_ms &&
157
166
  organization_id == o.organization_id &&
158
- parameters == o.parameters
167
+ parameters == o.parameters &&
168
+ generate_app_proofs == o.generate_app_proofs
159
169
  end
160
170
 
161
171
  # @see the `==` method
@@ -167,7 +177,7 @@ module TurnkeyClient
167
177
  # Calculates hash code according to all attributes.
168
178
  # @return [Integer] Hash code
169
179
  def hash
170
- [type, timestamp_ms, organization_id, parameters].hash
180
+ [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash
171
181
  end
172
182
 
173
183
  # Builds the object from hash
@@ -22,6 +22,8 @@ module TurnkeyClient
22
22
 
23
23
  attr_accessor :parameters
24
24
 
25
+ attr_accessor :generate_app_proofs
26
+
25
27
  class EnumAttributeValidator
26
28
  attr_reader :datatype
27
29
  attr_reader :allowable_values
@@ -50,7 +52,8 @@ module TurnkeyClient
50
52
  :'type' => :'type',
51
53
  :'timestamp_ms' => :'timestampMs',
52
54
  :'organization_id' => :'organizationId',
53
- :'parameters' => :'parameters'
55
+ :'parameters' => :'parameters',
56
+ :'generate_app_proofs' => :'generateAppProofs'
54
57
  }
55
58
  end
56
59
 
@@ -60,13 +63,15 @@ module TurnkeyClient
60
63
  :'type' => :'Object',
61
64
  :'timestamp_ms' => :'Object',
62
65
  :'organization_id' => :'Object',
63
- :'parameters' => :'Object'
66
+ :'parameters' => :'Object',
67
+ :'generate_app_proofs' => :'Object'
64
68
  }
65
69
  end
66
70
 
67
71
  # List of attributes with nullable: true
68
72
  def self.openapi_nullable
69
73
  Set.new([
74
+ :'generate_app_proofs'
70
75
  ])
71
76
  end
72
77
 
@@ -100,6 +105,10 @@ module TurnkeyClient
100
105
  if attributes.key?(:'parameters')
101
106
  self.parameters = attributes[:'parameters']
102
107
  end
108
+
109
+ if attributes.key?(:'generate_app_proofs')
110
+ self.generate_app_proofs = attributes[:'generate_app_proofs']
111
+ end
103
112
  end
104
113
 
105
114
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -155,7 +164,8 @@ module TurnkeyClient
155
164
  type == o.type &&
156
165
  timestamp_ms == o.timestamp_ms &&
157
166
  organization_id == o.organization_id &&
158
- parameters == o.parameters
167
+ parameters == o.parameters &&
168
+ generate_app_proofs == o.generate_app_proofs
159
169
  end
160
170
 
161
171
  # @see the `==` method
@@ -167,7 +177,7 @@ module TurnkeyClient
167
177
  # Calculates hash code according to all attributes.
168
178
  # @return [Integer] Hash code
169
179
  def hash
170
- [type, timestamp_ms, organization_id, parameters].hash
180
+ [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash
171
181
  end
172
182
 
173
183
  # Builds the object from hash