turnkey_client 0.0.13 → 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 (167) 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 +48 -48
  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 +6 -4
  89. data/lib/turnkey_client/models/get_wallet_accounts_request.rb +3 -7
  90. data/lib/turnkey_client/models/get_wallet_accounts_response.rb +1 -1
  91. data/lib/turnkey_client/models/get_wallet_request.rb +2 -2
  92. data/lib/turnkey_client/models/get_wallets_request.rb +1 -1
  93. data/lib/turnkey_client/models/get_wallets_response.rb +1 -1
  94. data/lib/turnkey_client/models/get_whoami_request.rb +1 -1
  95. data/lib/turnkey_client/models/get_whoami_response.rb +4 -4
  96. data/lib/turnkey_client/models/init_fiat_on_ramp_intent.rb +315 -0
  97. data/lib/turnkey_client/models/init_fiat_on_ramp_request.rb +288 -0
  98. data/lib/turnkey_client/models/init_fiat_on_ramp_result.rb +226 -0
  99. data/lib/turnkey_client/models/init_otp_auth_intent.rb +28 -4
  100. data/lib/turnkey_client/models/init_otp_auth_intent_v2.rb +310 -0
  101. data/lib/turnkey_client/models/init_otp_auth_request.rb +2 -2
  102. data/lib/turnkey_client/models/init_otp_auth_result_v2.rb +211 -0
  103. data/lib/turnkey_client/models/init_otp_intent.rb +321 -0
  104. data/lib/turnkey_client/models/init_otp_request.rb +288 -0
  105. data/lib/turnkey_client/models/init_otp_result.rb +211 -0
  106. data/lib/turnkey_client/models/init_user_email_recovery_intent.rb +2 -1
  107. data/lib/turnkey_client/models/intent.rb +130 -4
  108. data/lib/turnkey_client/models/invitation_params.rb +1 -1
  109. data/lib/turnkey_client/models/list_private_key_tags_request.rb +1 -1
  110. data/lib/turnkey_client/models/list_private_key_tags_response.rb +1 -1
  111. data/lib/turnkey_client/models/list_user_tags_request.rb +1 -1
  112. data/lib/turnkey_client/models/list_user_tags_response.rb +1 -1
  113. data/lib/turnkey_client/models/oauth_intent.rb +18 -5
  114. data/lib/turnkey_client/models/oauth_login_intent.rb +248 -0
  115. data/lib/turnkey_client/models/oauth_login_request.rb +288 -0
  116. data/lib/turnkey_client/models/oauth_login_result.rb +211 -0
  117. data/lib/turnkey_client/models/otp_auth_intent.rb +10 -2
  118. data/lib/turnkey_client/models/otp_login_intent.rb +248 -0
  119. data/lib/turnkey_client/models/otp_login_request.rb +288 -0
  120. data/lib/turnkey_client/models/otp_login_result.rb +211 -0
  121. data/lib/turnkey_client/models/outcome.rb +31 -0
  122. data/lib/turnkey_client/models/payload_encoding.rb +1 -0
  123. data/lib/turnkey_client/models/policy.rb +2 -0
  124. data/lib/turnkey_client/models/private_key_params.rb +1 -1
  125. data/lib/turnkey_client/models/result.rb +121 -4
  126. data/lib/turnkey_client/models/root_user_params.rb +3 -2
  127. data/lib/turnkey_client/models/root_user_params_v2.rb +4 -3
  128. data/lib/turnkey_client/models/root_user_params_v3.rb +4 -3
  129. data/lib/turnkey_client/models/root_user_params_v4.rb +5 -3
  130. data/lib/turnkey_client/models/set_organization_feature_intent.rb +1 -0
  131. data/lib/turnkey_client/models/simple_client_extension_results.rb +2 -0
  132. data/lib/turnkey_client/models/smart_contract_interface_type.rb +27 -0
  133. data/lib/turnkey_client/models/sms_customization_params.rb +1 -0
  134. data/lib/turnkey_client/models/stamp_login_intent.rb +233 -0
  135. data/lib/turnkey_client/models/stamp_login_request.rb +288 -0
  136. data/lib/turnkey_client/models/stamp_login_result.rb +211 -0
  137. data/lib/turnkey_client/models/transaction_type.rb +1 -0
  138. data/lib/turnkey_client/models/ump_v1_policy_evaluation.rb +214 -0
  139. data/lib/turnkey_client/models/update_policy_intent.rb +4 -0
  140. data/lib/turnkey_client/models/update_policy_intent_v2.rb +264 -0
  141. data/lib/turnkey_client/models/update_policy_request.rb +2 -2
  142. data/lib/turnkey_client/models/update_policy_result_v2.rb +211 -0
  143. data/lib/turnkey_client/models/update_private_key_tag_intent.rb +1 -0
  144. data/lib/turnkey_client/models/update_user_email_intent.rb +237 -0
  145. data/lib/turnkey_client/models/update_user_email_request.rb +288 -0
  146. data/lib/turnkey_client/models/update_user_email_result.rb +211 -0
  147. data/lib/turnkey_client/models/update_user_intent.rb +4 -1
  148. data/lib/turnkey_client/models/update_user_name_intent.rb +226 -0
  149. data/lib/turnkey_client/models/update_user_name_request.rb +288 -0
  150. data/lib/turnkey_client/models/update_user_name_result.rb +211 -0
  151. data/lib/turnkey_client/models/update_user_phone_number_intent.rb +237 -0
  152. data/lib/turnkey_client/models/update_user_phone_number_request.rb +288 -0
  153. data/lib/turnkey_client/models/update_user_phone_number_result.rb +211 -0
  154. data/lib/turnkey_client/models/update_user_tag_intent.rb +1 -0
  155. data/lib/turnkey_client/models/user.rb +3 -1
  156. data/lib/turnkey_client/models/user_params.rb +4 -3
  157. data/lib/turnkey_client/models/user_params_v2.rb +4 -3
  158. data/lib/turnkey_client/models/user_params_v3.rb +301 -0
  159. data/lib/turnkey_client/models/verify_otp_intent.rb +237 -0
  160. data/lib/turnkey_client/models/verify_otp_request.rb +288 -0
  161. data/lib/turnkey_client/models/verify_otp_result.rb +211 -0
  162. data/lib/turnkey_client/models/wallet_account.rb +15 -4
  163. data/lib/turnkey_client/models/wallet_params.rb +2 -1
  164. data/lib/turnkey_client/version.rb +1 -1
  165. data/lib/turnkey_client.rb +57 -0
  166. data/turnkey_client-0.0.13.gem +0 -0
  167. metadata +60 -2
@@ -0,0 +1,211 @@
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 GetSmartContractInterfacesRequest
15
+ # Unique identifier for a given organization.
16
+ attr_accessor :organization_id
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'organization_id' => :'organizationId'
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.openapi_types
27
+ {
28
+ :'organization_id' => :'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::GetSmartContractInterfacesRequest` 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::GetSmartContractInterfacesRequest`. 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?(:'organization_id')
54
+ self.organization_id = attributes[:'organization_id']
55
+ end
56
+ end
57
+
58
+ # Show invalid properties with the reasons. Usually used together with valid?
59
+ # @return Array for valid properties with the reasons
60
+ def list_invalid_properties
61
+ invalid_properties = Array.new
62
+ if @organization_id.nil?
63
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
64
+ end
65
+
66
+ invalid_properties
67
+ end
68
+
69
+ # Check to see if the all the properties in the model are valid
70
+ # @return true if the model is valid
71
+ def valid?
72
+ return false if @organization_id.nil?
73
+ true
74
+ end
75
+
76
+ # Checks equality by comparing each attribute.
77
+ # @param [Object] Object to be compared
78
+ def ==(o)
79
+ return true if self.equal?(o)
80
+ self.class == o.class &&
81
+ organization_id == o.organization_id
82
+ end
83
+
84
+ # @see the `==` method
85
+ # @param [Object] Object to be compared
86
+ def eql?(o)
87
+ self == o
88
+ end
89
+
90
+ # Calculates hash code according to all attributes.
91
+ # @return [Integer] Hash code
92
+ def hash
93
+ [organization_id].hash
94
+ end
95
+
96
+ # Builds the object from hash
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ # @return [Object] Returns the model itself
99
+ def self.build_from_hash(attributes)
100
+ new.build_from_hash(attributes)
101
+ end
102
+
103
+ # Builds the object from hash
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ # @return [Object] Returns the model itself
106
+ def build_from_hash(attributes)
107
+ return nil unless attributes.is_a?(Hash)
108
+ self.class.openapi_types.each_pair do |key, type|
109
+ if type =~ /\AArray<(.*)>/i
110
+ # check to ensure the input is an array given that the attribute
111
+ # is documented as an array but the input is not
112
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
113
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
114
+ end
115
+ elsif !attributes[self.class.attribute_map[key]].nil?
116
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
117
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
118
+ self.send("#{key}=", nil)
119
+ end
120
+ end
121
+
122
+ self
123
+ end
124
+
125
+ # Deserializes the data based on type
126
+ # @param string type Data type
127
+ # @param string value Value to be deserialized
128
+ # @return [Object] Deserialized data
129
+ def _deserialize(type, value)
130
+ case type.to_sym
131
+ when :DateTime
132
+ DateTime.parse(value)
133
+ when :Date
134
+ Date.parse(value)
135
+ when :String
136
+ value.to_s
137
+ when :Integer
138
+ value.to_i
139
+ when :Float
140
+ value.to_f
141
+ when :Boolean
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+ when :Object
148
+ # generic object (usually a Hash), return directly
149
+ value
150
+ when /\AArray<(?<inner_type>.+)>\z/
151
+ inner_type = Regexp.last_match[:inner_type]
152
+ value.map { |v| _deserialize(inner_type, v) }
153
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
+ k_type = Regexp.last_match[:k_type]
155
+ v_type = Regexp.last_match[:v_type]
156
+ {}.tap do |hash|
157
+ value.each do |k, v|
158
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
+ end
160
+ end
161
+ else # model
162
+ TurnkeyClient.const_get(type).build_from_hash(value)
163
+ end
164
+ end
165
+
166
+ # Returns the string representation of the object
167
+ # @return [String] String presentation of the object
168
+ def to_s
169
+ to_hash.to_s
170
+ end
171
+
172
+ # to_body is an alias to to_hash (backward compatibility)
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_body
175
+ to_hash
176
+ end
177
+
178
+ # Returns the object in the form of hash
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_hash
181
+ hash = {}
182
+ self.class.attribute_map.each_pair do |attr, param|
183
+ value = self.send(attr)
184
+ if value.nil?
185
+ is_nullable = self.class.openapi_nullable.include?(attr)
186
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
187
+ end
188
+
189
+ hash[param] = _to_hash(value)
190
+ end
191
+ hash
192
+ end
193
+
194
+ # Outputs non-array value in the form of hash
195
+ # For object, use to_hash. Otherwise, just return the value
196
+ # @param [Object] value Any valid value
197
+ # @return [Hash] Returns the value in the form of hash
198
+ def _to_hash(value)
199
+ if value.is_a?(Array)
200
+ value.compact.map { |v| _to_hash(v) }
201
+ elsif value.is_a?(Hash)
202
+ {}.tap do |hash|
203
+ value.each { |k, v| hash[k] = _to_hash(v) }
204
+ end
205
+ elsif value.respond_to? :to_hash
206
+ value.to_hash
207
+ else
208
+ value
209
+ end
210
+ end end
211
+ end
@@ -0,0 +1,213 @@
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 GetSmartContractInterfacesResponse
15
+ # A list of smart contract interfaces.
16
+ attr_accessor :smart_contract_interfaces
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'smart_contract_interfaces' => :'smartContractInterfaces'
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.openapi_types
27
+ {
28
+ :'smart_contract_interfaces' => :'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::GetSmartContractInterfacesResponse` 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::GetSmartContractInterfacesResponse`. 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?(:'smart_contract_interfaces')
54
+ if (value = attributes[:'smart_contract_interfaces']).is_a?(Array)
55
+ self.smart_contract_interfaces = 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
+ if @smart_contract_interfaces.nil?
65
+ invalid_properties.push('invalid value for "smart_contract_interfaces", smart_contract_interfaces cannot be nil.')
66
+ end
67
+
68
+ invalid_properties
69
+ end
70
+
71
+ # Check to see if the all the properties in the model are valid
72
+ # @return true if the model is valid
73
+ def valid?
74
+ return false if @smart_contract_interfaces.nil?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ smart_contract_interfaces == o.smart_contract_interfaces
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [smart_contract_interfaces].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ self.class.openapi_types.each_pair do |key, type|
111
+ if type =~ /\AArray<(.*)>/i
112
+ # check to ensure the input is an array given that the attribute
113
+ # is documented as an array but the input is not
114
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
115
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
116
+ end
117
+ elsif !attributes[self.class.attribute_map[key]].nil?
118
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
119
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
120
+ self.send("#{key}=", nil)
121
+ end
122
+ end
123
+
124
+ self
125
+ end
126
+
127
+ # Deserializes the data based on type
128
+ # @param string type Data type
129
+ # @param string value Value to be deserialized
130
+ # @return [Object] Deserialized data
131
+ def _deserialize(type, value)
132
+ case type.to_sym
133
+ when :DateTime
134
+ DateTime.parse(value)
135
+ when :Date
136
+ Date.parse(value)
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :Boolean
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else # model
164
+ TurnkeyClient.const_get(type).build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ if value.nil?
187
+ is_nullable = self.class.openapi_nullable.include?(attr)
188
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
189
+ end
190
+
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map { |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end end
213
+ end
@@ -12,10 +12,10 @@ require 'date'
12
12
 
13
13
  module TurnkeyClient
14
14
  class GetSubOrgIdsRequest
15
- # Unique identifier for the parent Organization. This is used to find sub-organizations within it.
15
+ # Unique identifier for the parent organization. This is used to find sub-organizations within it.
16
16
  attr_accessor :organization_id
17
17
 
18
- # Specifies the type of filter to apply, i.e 'CREDENTIAL_ID', 'NAME', 'USERNAME', 'EMAIL', 'PHONE_NUMBER', 'OIDC_TOKEN' or 'PUBLIC_KEY'
18
+ # Specifies the type of filter to apply, i.e 'CREDENTIAL_ID', 'NAME', 'USERNAME', 'EMAIL', 'PHONE_NUMBER', 'OIDC_TOKEN', 'WALLET_ACCOUNT_ADDRESS' or 'PUBLIC_KEY'
19
19
  attr_accessor :filter_type
20
20
 
21
21
  # The value of the filter to apply for the specified type. For example, a specific email or name string.
@@ -12,10 +12,10 @@ require 'date'
12
12
 
13
13
  module TurnkeyClient
14
14
  class GetUserRequest
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 User.
18
+ # Unique identifier for a given user.
19
19
  attr_accessor :user_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 GetUsersRequest
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 GetUsersResponse
15
- # A list of Users.
15
+ # A list of users.
16
16
  attr_accessor :users
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 GetVerifiedSubOrgIdsRequest
15
- # Unique identifier for the parent Organization. This is used to find sub-organizations within it.
15
+ # Unique identifier for the parent organization. This is used to find sub-organizations within it.
16
16
  attr_accessor :organization_id
17
17
 
18
- # Specifies the type of filter to apply, i.e 'EMAIL', 'PHONE_NUMBER'
18
+ # Specifies the type of filter to apply, i.e 'EMAIL', 'PHONE_NUMBER'.
19
19
  attr_accessor :filter_type
20
20
 
21
21
  # The value of the filter to apply for the specified type. For example, a specific email or phone number string.
@@ -12,16 +12,16 @@ require 'date'
12
12
 
13
13
  module TurnkeyClient
14
14
  class GetWalletAccountRequest
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
- # Address corresponding to a Wallet Account.
21
+ # Address corresponding to a wallet account.
22
22
  attr_accessor :address
23
23
 
24
- # Path corresponding to a Wallet Account.
24
+ # Path corresponding to a wallet account.
25
25
  attr_accessor :path
26
26
 
27
27
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -47,6 +47,8 @@ module TurnkeyClient
47
47
  # List of attributes with nullable: true
48
48
  def self.openapi_nullable
49
49
  Set.new([
50
+ :'address',
51
+ :'path'
50
52
  ])
51
53
  end
52
54
 
@@ -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.