turnkey_client 0.0.12 → 0.0.14

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 (169) hide show
  1. checksums.yaml +4 -4
  2. data/lib/turnkey_client/api/activities_api.rb +66 -8
  3. data/lib/turnkey_client/api/api_keys_api.rb +14 -14
  4. data/lib/turnkey_client/api/authenticators_api.rb +16 -16
  5. data/lib/turnkey_client/api/consensus_api.rb +8 -8
  6. data/lib/turnkey_client/api/features_api.rb +8 -8
  7. data/lib/turnkey_client/api/invitations_api.rb +8 -8
  8. data/lib/turnkey_client/api/on_ramp_api.rb +77 -0
  9. data/lib/turnkey_client/api/organizations_api.rb +18 -18
  10. data/lib/turnkey_client/api/policies_api.rb +256 -24
  11. data/lib/turnkey_client/api/private_key_tags_api.rb +12 -12
  12. data/lib/turnkey_client/api/private_keys_api.rb +28 -28
  13. data/lib/turnkey_client/api/sessions_api.rb +184 -10
  14. data/lib/turnkey_client/api/signing_api.rb +12 -12
  15. data/lib/turnkey_client/api/user_auth_api.rb +20 -20
  16. data/lib/turnkey_client/api/user_recovery_api.rb +6 -6
  17. data/lib/turnkey_client/api/user_tags_api.rb +12 -12
  18. data/lib/turnkey_client/api/user_verification_api.rb +135 -0
  19. data/lib/turnkey_client/api/users_api.rb +194 -20
  20. data/lib/turnkey_client/api/wallets_api.rb +102 -44
  21. data/lib/turnkey_client/models/activity_type.rb +14 -0
  22. data/lib/turnkey_client/models/activity_v1_policy_evaluation.rb +287 -0
  23. data/lib/turnkey_client/models/address_format.rb +1 -0
  24. data/lib/turnkey_client/models/api_key.rb +1 -0
  25. data/lib/turnkey_client/models/api_key_params.rb +1 -0
  26. data/lib/turnkey_client/models/api_key_params_v2.rb +1 -0
  27. data/lib/turnkey_client/models/api_only_user_params.rb +3 -2
  28. data/lib/turnkey_client/models/create_organization_intent.rb +1 -0
  29. data/lib/turnkey_client/models/create_organization_intent_v2.rb +1 -0
  30. data/lib/turnkey_client/models/create_policy_intent_v3.rb +2 -0
  31. data/lib/turnkey_client/models/create_read_write_session_intent.rb +3 -1
  32. data/lib/turnkey_client/models/create_read_write_session_intent_v2.rb +19 -5
  33. data/lib/turnkey_client/models/create_smart_contract_interface_intent.rb +265 -0
  34. data/lib/turnkey_client/models/create_smart_contract_interface_request.rb +288 -0
  35. data/lib/turnkey_client/models/create_smart_contract_interface_result.rb +211 -0
  36. data/lib/turnkey_client/models/create_sub_organization_intent_v4.rb +2 -0
  37. data/lib/turnkey_client/models/create_sub_organization_intent_v5.rb +2 -0
  38. data/lib/turnkey_client/models/create_sub_organization_intent_v6.rb +2 -0
  39. data/lib/turnkey_client/models/create_sub_organization_intent_v7.rb +4 -0
  40. data/lib/turnkey_client/models/create_users_intent_v3.rb +213 -0
  41. data/lib/turnkey_client/models/create_users_request.rb +2 -2
  42. data/lib/turnkey_client/models/create_wallet_intent.rb +2 -1
  43. data/lib/turnkey_client/models/credential_type.rb +3 -0
  44. data/lib/turnkey_client/models/data_v1_smart_contract_interface.rb +329 -0
  45. data/lib/turnkey_client/models/delete_payment_method_intent.rb +1 -0
  46. data/lib/turnkey_client/models/delete_private_keys_intent.rb +1 -0
  47. data/lib/turnkey_client/models/delete_smart_contract_interface_intent.rb +211 -0
  48. data/lib/turnkey_client/models/delete_smart_contract_interface_request.rb +288 -0
  49. data/lib/turnkey_client/models/delete_smart_contract_interface_result.rb +211 -0
  50. data/lib/turnkey_client/models/delete_sub_organization_intent.rb +1 -0
  51. data/lib/turnkey_client/models/delete_wallets_intent.rb +1 -0
  52. data/lib/turnkey_client/models/email_auth_intent.rb +31 -5
  53. data/lib/turnkey_client/models/email_auth_intent_v2.rb +31 -5
  54. data/lib/turnkey_client/models/email_customization_params.rb +5 -0
  55. data/lib/turnkey_client/models/feature.rb +1 -0
  56. data/lib/turnkey_client/models/fiat_on_ramp_blockchain_network.rb +29 -0
  57. data/lib/turnkey_client/models/fiat_on_ramp_crypto_currency.rb +29 -0
  58. data/lib/turnkey_client/models/fiat_on_ramp_currency.rb +59 -0
  59. data/lib/turnkey_client/models/fiat_on_ramp_payment_method.rb +38 -0
  60. data/lib/turnkey_client/models/fiat_on_ramp_provider.rb +27 -0
  61. data/lib/turnkey_client/models/get_activities_request.rb +3 -3
  62. data/lib/turnkey_client/models/get_activities_response.rb +1 -1
  63. data/lib/turnkey_client/models/get_activity_request.rb +2 -2
  64. data/lib/turnkey_client/models/get_api_key_request.rb +1 -1
  65. data/lib/turnkey_client/models/get_api_keys_request.rb +3 -2
  66. data/lib/turnkey_client/models/get_authenticator_request.rb +2 -2
  67. data/lib/turnkey_client/models/get_authenticators_request.rb +2 -2
  68. data/lib/turnkey_client/models/get_oauth_providers_request.rb +3 -2
  69. data/lib/turnkey_client/models/get_oauth_providers_response.rb +1 -1
  70. data/lib/turnkey_client/models/get_organization_configs_request.rb +1 -1
  71. data/lib/turnkey_client/models/get_policies_request.rb +1 -1
  72. data/lib/turnkey_client/models/get_policies_response.rb +1 -1
  73. data/lib/turnkey_client/models/get_policy_evaluations_request.rb +226 -0
  74. data/lib/turnkey_client/models/get_policy_evaluations_response.rb +212 -0
  75. data/lib/turnkey_client/models/get_policy_request.rb +2 -2
  76. data/lib/turnkey_client/models/get_private_key_request.rb +2 -2
  77. data/lib/turnkey_client/models/get_private_keys_request.rb +1 -1
  78. data/lib/turnkey_client/models/get_private_keys_response.rb +1 -1
  79. data/lib/turnkey_client/models/get_smart_contract_interface_request.rb +226 -0
  80. data/lib/turnkey_client/models/get_smart_contract_interface_response.rb +210 -0
  81. data/lib/turnkey_client/models/get_smart_contract_interfaces_request.rb +211 -0
  82. data/lib/turnkey_client/models/get_smart_contract_interfaces_response.rb +213 -0
  83. data/lib/turnkey_client/models/get_sub_org_ids_request.rb +2 -2
  84. data/lib/turnkey_client/models/get_user_request.rb +2 -2
  85. data/lib/turnkey_client/models/get_users_request.rb +1 -1
  86. data/lib/turnkey_client/models/get_users_response.rb +1 -1
  87. data/lib/turnkey_client/models/get_verified_sub_org_ids_request.rb +2 -2
  88. data/lib/turnkey_client/models/get_wallet_account_request.rb +248 -0
  89. data/lib/turnkey_client/models/get_wallet_account_response.rb +210 -0
  90. data/lib/turnkey_client/models/get_wallet_accounts_request.rb +3 -7
  91. data/lib/turnkey_client/models/get_wallet_accounts_response.rb +1 -1
  92. data/lib/turnkey_client/models/get_wallet_request.rb +2 -2
  93. data/lib/turnkey_client/models/get_wallets_request.rb +1 -1
  94. data/lib/turnkey_client/models/get_wallets_response.rb +1 -1
  95. data/lib/turnkey_client/models/get_whoami_request.rb +1 -1
  96. data/lib/turnkey_client/models/get_whoami_response.rb +4 -4
  97. data/lib/turnkey_client/models/init_fiat_on_ramp_intent.rb +315 -0
  98. data/lib/turnkey_client/models/init_fiat_on_ramp_request.rb +288 -0
  99. data/lib/turnkey_client/models/init_fiat_on_ramp_result.rb +226 -0
  100. data/lib/turnkey_client/models/init_otp_auth_intent.rb +28 -4
  101. data/lib/turnkey_client/models/init_otp_auth_intent_v2.rb +310 -0
  102. data/lib/turnkey_client/models/init_otp_auth_request.rb +2 -2
  103. data/lib/turnkey_client/models/init_otp_auth_result_v2.rb +211 -0
  104. data/lib/turnkey_client/models/init_otp_intent.rb +321 -0
  105. data/lib/turnkey_client/models/init_otp_request.rb +288 -0
  106. data/lib/turnkey_client/models/init_otp_result.rb +211 -0
  107. data/lib/turnkey_client/models/init_user_email_recovery_intent.rb +2 -1
  108. data/lib/turnkey_client/models/intent.rb +130 -4
  109. data/lib/turnkey_client/models/invitation_params.rb +1 -1
  110. data/lib/turnkey_client/models/list_private_key_tags_request.rb +1 -1
  111. data/lib/turnkey_client/models/list_private_key_tags_response.rb +1 -1
  112. data/lib/turnkey_client/models/list_user_tags_request.rb +1 -1
  113. data/lib/turnkey_client/models/list_user_tags_response.rb +1 -1
  114. data/lib/turnkey_client/models/oauth_intent.rb +18 -5
  115. data/lib/turnkey_client/models/oauth_login_intent.rb +248 -0
  116. data/lib/turnkey_client/models/oauth_login_request.rb +288 -0
  117. data/lib/turnkey_client/models/oauth_login_result.rb +211 -0
  118. data/lib/turnkey_client/models/otp_auth_intent.rb +10 -2
  119. data/lib/turnkey_client/models/otp_login_intent.rb +248 -0
  120. data/lib/turnkey_client/models/otp_login_request.rb +288 -0
  121. data/lib/turnkey_client/models/otp_login_result.rb +211 -0
  122. data/lib/turnkey_client/models/outcome.rb +31 -0
  123. data/lib/turnkey_client/models/payload_encoding.rb +1 -0
  124. data/lib/turnkey_client/models/policy.rb +2 -0
  125. data/lib/turnkey_client/models/private_key_params.rb +1 -1
  126. data/lib/turnkey_client/models/result.rb +121 -4
  127. data/lib/turnkey_client/models/root_user_params.rb +3 -2
  128. data/lib/turnkey_client/models/root_user_params_v2.rb +4 -3
  129. data/lib/turnkey_client/models/root_user_params_v3.rb +4 -3
  130. data/lib/turnkey_client/models/root_user_params_v4.rb +5 -3
  131. data/lib/turnkey_client/models/set_organization_feature_intent.rb +1 -0
  132. data/lib/turnkey_client/models/simple_client_extension_results.rb +2 -0
  133. data/lib/turnkey_client/models/smart_contract_interface_type.rb +27 -0
  134. data/lib/turnkey_client/models/sms_customization_params.rb +1 -0
  135. data/lib/turnkey_client/models/stamp_login_intent.rb +233 -0
  136. data/lib/turnkey_client/models/stamp_login_request.rb +288 -0
  137. data/lib/turnkey_client/models/stamp_login_result.rb +211 -0
  138. data/lib/turnkey_client/models/transaction_type.rb +1 -0
  139. data/lib/turnkey_client/models/ump_v1_policy_evaluation.rb +214 -0
  140. data/lib/turnkey_client/models/update_policy_intent.rb +4 -0
  141. data/lib/turnkey_client/models/update_policy_intent_v2.rb +264 -0
  142. data/lib/turnkey_client/models/update_policy_request.rb +2 -2
  143. data/lib/turnkey_client/models/update_policy_result_v2.rb +211 -0
  144. data/lib/turnkey_client/models/update_private_key_tag_intent.rb +1 -0
  145. data/lib/turnkey_client/models/update_user_email_intent.rb +237 -0
  146. data/lib/turnkey_client/models/update_user_email_request.rb +288 -0
  147. data/lib/turnkey_client/models/update_user_email_result.rb +211 -0
  148. data/lib/turnkey_client/models/update_user_intent.rb +4 -1
  149. data/lib/turnkey_client/models/update_user_name_intent.rb +226 -0
  150. data/lib/turnkey_client/models/update_user_name_request.rb +288 -0
  151. data/lib/turnkey_client/models/update_user_name_result.rb +211 -0
  152. data/lib/turnkey_client/models/update_user_phone_number_intent.rb +237 -0
  153. data/lib/turnkey_client/models/update_user_phone_number_request.rb +288 -0
  154. data/lib/turnkey_client/models/update_user_phone_number_result.rb +211 -0
  155. data/lib/turnkey_client/models/update_user_tag_intent.rb +1 -0
  156. data/lib/turnkey_client/models/user.rb +3 -1
  157. data/lib/turnkey_client/models/user_params.rb +4 -3
  158. data/lib/turnkey_client/models/user_params_v2.rb +4 -3
  159. data/lib/turnkey_client/models/user_params_v3.rb +301 -0
  160. data/lib/turnkey_client/models/verify_otp_intent.rb +237 -0
  161. data/lib/turnkey_client/models/verify_otp_request.rb +288 -0
  162. data/lib/turnkey_client/models/verify_otp_result.rb +211 -0
  163. data/lib/turnkey_client/models/wallet_account.rb +15 -4
  164. data/lib/turnkey_client/models/wallet_params.rb +2 -1
  165. data/lib/turnkey_client/version.rb +1 -1
  166. data/lib/turnkey_client.rb +59 -0
  167. data/turnkey_client-0.0.12.gem +0 -0
  168. data/turnkey_client-0.0.13.gem +0 -0
  169. metadata +63 -2
@@ -0,0 +1,248 @@
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 GetWalletAccountRequest
15
+ # Unique identifier for a given organization.
16
+ attr_accessor :organization_id
17
+
18
+ # Unique identifier for a given wallet.
19
+ attr_accessor :wallet_id
20
+
21
+ # Address corresponding to a wallet account.
22
+ attr_accessor :address
23
+
24
+ # Path corresponding to a wallet account.
25
+ attr_accessor :path
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'organization_id' => :'organizationId',
31
+ :'wallet_id' => :'walletId',
32
+ :'address' => :'address',
33
+ :'path' => :'path'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'organization_id' => :'Object',
41
+ :'wallet_id' => :'Object',
42
+ :'address' => :'Object',
43
+ :'path' => :'Object'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ :'address',
51
+ :'path'
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetWalletAccountRequest` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetWalletAccountRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'organization_id')
71
+ self.organization_id = attributes[:'organization_id']
72
+ end
73
+
74
+ if attributes.key?(:'wallet_id')
75
+ self.wallet_id = attributes[:'wallet_id']
76
+ end
77
+
78
+ if attributes.key?(:'address')
79
+ self.address = attributes[:'address']
80
+ end
81
+
82
+ if attributes.key?(:'path')
83
+ self.path = attributes[:'path']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ invalid_properties = Array.new
91
+ if @organization_id.nil?
92
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
93
+ end
94
+
95
+ if @wallet_id.nil?
96
+ invalid_properties.push('invalid value for "wallet_id", wallet_id cannot be nil.')
97
+ end
98
+
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ return false if @organization_id.nil?
106
+ return false if @wallet_id.nil?
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ organization_id == o.organization_id &&
116
+ wallet_id == o.wallet_id &&
117
+ address == o.address &&
118
+ path == o.path
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [organization_id, wallet_id, address, path].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ new.build_from_hash(attributes)
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ self.class.openapi_types.each_pair do |key, type|
146
+ if type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
150
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
151
+ end
152
+ elsif !attributes[self.class.attribute_map[key]].nil?
153
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
155
+ self.send("#{key}=", nil)
156
+ end
157
+ end
158
+
159
+ self
160
+ end
161
+
162
+ # Deserializes the data based on type
163
+ # @param string type Data type
164
+ # @param string value Value to be deserialized
165
+ # @return [Object] Deserialized data
166
+ def _deserialize(type, value)
167
+ case type.to_sym
168
+ when :DateTime
169
+ DateTime.parse(value)
170
+ when :Date
171
+ Date.parse(value)
172
+ when :String
173
+ value.to_s
174
+ when :Integer
175
+ value.to_i
176
+ when :Float
177
+ value.to_f
178
+ when :Boolean
179
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
180
+ true
181
+ else
182
+ false
183
+ end
184
+ when :Object
185
+ # generic object (usually a Hash), return directly
186
+ value
187
+ when /\AArray<(?<inner_type>.+)>\z/
188
+ inner_type = Regexp.last_match[:inner_type]
189
+ value.map { |v| _deserialize(inner_type, v) }
190
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
191
+ k_type = Regexp.last_match[:k_type]
192
+ v_type = Regexp.last_match[:v_type]
193
+ {}.tap do |hash|
194
+ value.each do |k, v|
195
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
196
+ end
197
+ end
198
+ else # model
199
+ TurnkeyClient.const_get(type).build_from_hash(value)
200
+ end
201
+ end
202
+
203
+ # Returns the string representation of the object
204
+ # @return [String] String presentation of the object
205
+ def to_s
206
+ to_hash.to_s
207
+ end
208
+
209
+ # to_body is an alias to to_hash (backward compatibility)
210
+ # @return [Hash] Returns the object in the form of hash
211
+ def to_body
212
+ to_hash
213
+ end
214
+
215
+ # Returns the object in the form of hash
216
+ # @return [Hash] Returns the object in the form of hash
217
+ def to_hash
218
+ hash = {}
219
+ self.class.attribute_map.each_pair do |attr, param|
220
+ value = self.send(attr)
221
+ if value.nil?
222
+ is_nullable = self.class.openapi_nullable.include?(attr)
223
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
224
+ end
225
+
226
+ hash[param] = _to_hash(value)
227
+ end
228
+ hash
229
+ end
230
+
231
+ # Outputs non-array value in the form of hash
232
+ # For object, use to_hash. Otherwise, just return the value
233
+ # @param [Object] value Any valid value
234
+ # @return [Hash] Returns the value in the form of hash
235
+ def _to_hash(value)
236
+ if value.is_a?(Array)
237
+ value.compact.map { |v| _to_hash(v) }
238
+ elsif value.is_a?(Hash)
239
+ {}.tap do |hash|
240
+ value.each { |k, v| hash[k] = _to_hash(v) }
241
+ end
242
+ elsif value.respond_to? :to_hash
243
+ value.to_hash
244
+ else
245
+ value
246
+ end
247
+ end end
248
+ end
@@ -0,0 +1,210 @@
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 GetWalletAccountResponse
15
+ attr_accessor :account
16
+
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ :'account' => :'account'
21
+ }
22
+ end
23
+
24
+ # Attribute type mapping.
25
+ def self.openapi_types
26
+ {
27
+ :'account' => :'Object'
28
+ }
29
+ end
30
+
31
+ # List of attributes with nullable: true
32
+ def self.openapi_nullable
33
+ Set.new([
34
+ ])
35
+ end
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ def initialize(attributes = {})
40
+ if (!attributes.is_a?(Hash))
41
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetWalletAccountResponse` initialize method"
42
+ end
43
+
44
+ # check to see if the attribute exists and convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h|
46
+ if (!self.class.attribute_map.key?(k.to_sym))
47
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetWalletAccountResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
48
+ end
49
+ h[k.to_sym] = v
50
+ }
51
+
52
+ if attributes.key?(:'account')
53
+ self.account = attributes[:'account']
54
+ end
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properties with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ if @account.nil?
62
+ invalid_properties.push('invalid value for "account", account cannot be nil.')
63
+ end
64
+
65
+ invalid_properties
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ return false if @account.nil?
72
+ true
73
+ end
74
+
75
+ # Checks equality by comparing each attribute.
76
+ # @param [Object] Object to be compared
77
+ def ==(o)
78
+ return true if self.equal?(o)
79
+ self.class == o.class &&
80
+ account == o.account
81
+ end
82
+
83
+ # @see the `==` method
84
+ # @param [Object] Object to be compared
85
+ def eql?(o)
86
+ self == o
87
+ end
88
+
89
+ # Calculates hash code according to all attributes.
90
+ # @return [Integer] Hash code
91
+ def hash
92
+ [account].hash
93
+ end
94
+
95
+ # Builds the object from hash
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ # @return [Object] Returns the model itself
98
+ def self.build_from_hash(attributes)
99
+ new.build_from_hash(attributes)
100
+ end
101
+
102
+ # Builds the object from hash
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ # @return [Object] Returns the model itself
105
+ def build_from_hash(attributes)
106
+ return nil unless attributes.is_a?(Hash)
107
+ self.class.openapi_types.each_pair do |key, type|
108
+ if type =~ /\AArray<(.*)>/i
109
+ # check to ensure the input is an array given that the attribute
110
+ # is documented as an array but the input is not
111
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
112
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
113
+ end
114
+ elsif !attributes[self.class.attribute_map[key]].nil?
115
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
117
+ self.send("#{key}=", nil)
118
+ end
119
+ end
120
+
121
+ self
122
+ end
123
+
124
+ # Deserializes the data based on type
125
+ # @param string type Data type
126
+ # @param string value Value to be deserialized
127
+ # @return [Object] Deserialized data
128
+ def _deserialize(type, value)
129
+ case type.to_sym
130
+ when :DateTime
131
+ DateTime.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :Boolean
141
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when :Object
147
+ # generic object (usually a Hash), return directly
148
+ value
149
+ when /\AArray<(?<inner_type>.+)>\z/
150
+ inner_type = Regexp.last_match[:inner_type]
151
+ value.map { |v| _deserialize(inner_type, v) }
152
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
+ k_type = Regexp.last_match[:k_type]
154
+ v_type = Regexp.last_match[:v_type]
155
+ {}.tap do |hash|
156
+ value.each do |k, v|
157
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
+ end
159
+ end
160
+ else # model
161
+ TurnkeyClient.const_get(type).build_from_hash(value)
162
+ end
163
+ end
164
+
165
+ # Returns the string representation of the object
166
+ # @return [String] String presentation of the object
167
+ def to_s
168
+ to_hash.to_s
169
+ end
170
+
171
+ # to_body is an alias to to_hash (backward compatibility)
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_body
174
+ to_hash
175
+ end
176
+
177
+ # Returns the object in the form of hash
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_hash
180
+ hash = {}
181
+ self.class.attribute_map.each_pair do |attr, param|
182
+ value = self.send(attr)
183
+ if value.nil?
184
+ is_nullable = self.class.openapi_nullable.include?(attr)
185
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
186
+ end
187
+
188
+ hash[param] = _to_hash(value)
189
+ end
190
+ hash
191
+ end
192
+
193
+ # Outputs non-array value in the form of hash
194
+ # For object, use to_hash. Otherwise, just return the value
195
+ # @param [Object] value Any valid value
196
+ # @return [Hash] Returns the value in the form of hash
197
+ def _to_hash(value)
198
+ if value.is_a?(Array)
199
+ value.compact.map { |v| _to_hash(v) }
200
+ elsif value.is_a?(Hash)
201
+ {}.tap do |hash|
202
+ value.each { |k, v| hash[k] = _to_hash(v) }
203
+ end
204
+ elsif value.respond_to? :to_hash
205
+ value.to_hash
206
+ else
207
+ value
208
+ end
209
+ end end
210
+ end
@@ -12,10 +12,10 @@ require 'date'
12
12
 
13
13
  module TurnkeyClient
14
14
  class GetWalletAccountsRequest
15
- # Unique identifier for a given Organization.
15
+ # Unique identifier for a given organization.
16
16
  attr_accessor :organization_id
17
17
 
18
- # Unique identifier for a given Wallet.
18
+ # Unique identifier for a given wallet. If not provided, all accounts for the organization will be returned.
19
19
  attr_accessor :wallet_id
20
20
 
21
21
  attr_accessor :pagination_options
@@ -41,6 +41,7 @@ module TurnkeyClient
41
41
  # List of attributes with nullable: true
42
42
  def self.openapi_nullable
43
43
  Set.new([
44
+ :'wallet_id',
44
45
  ])
45
46
  end
46
47
 
@@ -80,10 +81,6 @@ module TurnkeyClient
80
81
  invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
81
82
  end
82
83
 
83
- if @wallet_id.nil?
84
- invalid_properties.push('invalid value for "wallet_id", wallet_id cannot be nil.')
85
- end
86
-
87
84
  invalid_properties
88
85
  end
89
86
 
@@ -91,7 +88,6 @@ module TurnkeyClient
91
88
  # @return true if the model is valid
92
89
  def valid?
93
90
  return false if @organization_id.nil?
94
- return false if @wallet_id.nil?
95
91
  true
96
92
  end
97
93
 
@@ -12,7 +12,7 @@ require 'date'
12
12
 
13
13
  module TurnkeyClient
14
14
  class GetWalletAccountsResponse
15
- # A list of Accounts generated from a Wallet that share a common seed
15
+ # A list of accounts generated from a wallet that share a common seed.
16
16
  attr_accessor :accounts
17
17
 
18
18
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -12,10 +12,10 @@ require 'date'
12
12
 
13
13
  module TurnkeyClient
14
14
  class GetWalletRequest
15
- # Unique identifier for a given Organization.
15
+ # Unique identifier for a given organization.
16
16
  attr_accessor :organization_id
17
17
 
18
- # Unique identifier for a given Wallet.
18
+ # Unique identifier for a given wallet.
19
19
  attr_accessor :wallet_id
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -12,7 +12,7 @@ require 'date'
12
12
 
13
13
  module TurnkeyClient
14
14
  class GetWalletsRequest
15
- # Unique identifier for a given Organization.
15
+ # Unique identifier for a given organization.
16
16
  attr_accessor :organization_id
17
17
 
18
18
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -12,7 +12,7 @@ require 'date'
12
12
 
13
13
  module TurnkeyClient
14
14
  class GetWalletsResponse
15
- # A list of Wallets.
15
+ # A list of wallets.
16
16
  attr_accessor :wallets
17
17
 
18
18
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -12,7 +12,7 @@ require 'date'
12
12
 
13
13
  module TurnkeyClient
14
14
  class GetWhoamiRequest
15
- # Unique identifier for a given Organization. If the request is being made by a WebAuthN user and their Sub-Organization ID is unknown, this can be the Parent Organization ID; using the Sub-Organization ID when possible is preferred due to performance reasons.
15
+ # Unique identifier for a given organization. If the request is being made by a WebAuthN user and their sub-organization ID is unknown, this can be the parent organization ID; using the sub-organization ID when possible is preferred due to performance reasons.
16
16
  attr_accessor :organization_id
17
17
 
18
18
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -12,16 +12,16 @@ require 'date'
12
12
 
13
13
  module TurnkeyClient
14
14
  class GetWhoamiResponse
15
- # Unique identifier for a given Organization.
15
+ # Unique identifier for a given organization.
16
16
  attr_accessor :organization_id
17
17
 
18
- # Human-readable name for an Organization.
18
+ # Human-readable name for an organization.
19
19
  attr_accessor :organization_name
20
20
 
21
- # Unique identifier for a given User.
21
+ # Unique identifier for a given user.
22
22
  attr_accessor :user_id
23
23
 
24
- # Human-readable name for a User.
24
+ # Human-readable name for a user.
25
25
  attr_accessor :username
26
26
 
27
27
  # Attribute mapping from ruby-style variable name to JSON key.