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
@@ -92,6 +92,20 @@ module TurnkeyClient
92
92
  OTP_AUTH = 'ACTIVITY_TYPE_OTP_AUTH'.freeze
93
93
  CREATE_SUB_ORGANIZATION_V7 = 'ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7'.freeze
94
94
  UPDATE_WALLET = 'ACTIVITY_TYPE_UPDATE_WALLET'.freeze
95
+ UPDATE_POLICY_V2 = 'ACTIVITY_TYPE_UPDATE_POLICY_V2'.freeze
96
+ CREATE_USERS_V3 = 'ACTIVITY_TYPE_CREATE_USERS_V3'.freeze
97
+ INIT_OTP_AUTH_V2 = 'ACTIVITY_TYPE_INIT_OTP_AUTH_V2'.freeze
98
+ INIT_OTP = 'ACTIVITY_TYPE_INIT_OTP'.freeze
99
+ VERIFY_OTP = 'ACTIVITY_TYPE_VERIFY_OTP'.freeze
100
+ OTP_LOGIN = 'ACTIVITY_TYPE_OTP_LOGIN'.freeze
101
+ STAMP_LOGIN = 'ACTIVITY_TYPE_STAMP_LOGIN'.freeze
102
+ OAUTH_LOGIN = 'ACTIVITY_TYPE_OAUTH_LOGIN'.freeze
103
+ UPDATE_USER_NAME = 'ACTIVITY_TYPE_UPDATE_USER_NAME'.freeze
104
+ UPDATE_USER_EMAIL = 'ACTIVITY_TYPE_UPDATE_USER_EMAIL'.freeze
105
+ UPDATE_USER_PHONE_NUMBER = 'ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER'.freeze
106
+ INIT_FIAT_ON_RAMP = 'ACTIVITY_TYPE_INIT_FIAT_ON_RAMP'.freeze
107
+ CREATE_SMART_CONTRACT_INTERFACE = 'ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE'.freeze
108
+ DELETE_SMART_CONTRACT_INTERFACE = 'ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE'.freeze
95
109
 
96
110
  # Builds the enum from string
97
111
  # @param [String] The enum value in the form of the string
@@ -0,0 +1,287 @@
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 ActivityV1PolicyEvaluation
15
+ # Unique identifier for a given policy evaluation.
16
+ attr_accessor :id
17
+
18
+ # Unique identifier for a given Activity.
19
+ attr_accessor :activity_id
20
+
21
+ # Unique identifier for the Organization the Activity belongs to.
22
+ attr_accessor :organization_id
23
+
24
+ # Unique identifier for the Vote associated with this policy evaluation.
25
+ attr_accessor :vote_id
26
+
27
+ # Detailed evaluation result for each Policy that was run.
28
+ attr_accessor :policy_evaluations
29
+
30
+ attr_accessor :created_at
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'id' => :'id',
36
+ :'activity_id' => :'activityId',
37
+ :'organization_id' => :'organizationId',
38
+ :'vote_id' => :'voteId',
39
+ :'policy_evaluations' => :'policyEvaluations',
40
+ :'created_at' => :'createdAt'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'id' => :'Object',
48
+ :'activity_id' => :'Object',
49
+ :'organization_id' => :'Object',
50
+ :'vote_id' => :'Object',
51
+ :'policy_evaluations' => :'Object',
52
+ :'created_at' => :'Object'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::ActivityV1PolicyEvaluation` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::ActivityV1PolicyEvaluation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'id')
78
+ self.id = attributes[:'id']
79
+ end
80
+
81
+ if attributes.key?(:'activity_id')
82
+ self.activity_id = attributes[:'activity_id']
83
+ end
84
+
85
+ if attributes.key?(:'organization_id')
86
+ self.organization_id = attributes[:'organization_id']
87
+ end
88
+
89
+ if attributes.key?(:'vote_id')
90
+ self.vote_id = attributes[:'vote_id']
91
+ end
92
+
93
+ if attributes.key?(:'policy_evaluations')
94
+ if (value = attributes[:'policy_evaluations']).is_a?(Array)
95
+ self.policy_evaluations = value
96
+ end
97
+ end
98
+
99
+ if attributes.key?(:'created_at')
100
+ self.created_at = attributes[:'created_at']
101
+ end
102
+ end
103
+
104
+ # Show invalid properties with the reasons. Usually used together with valid?
105
+ # @return Array for valid properties with the reasons
106
+ def list_invalid_properties
107
+ invalid_properties = Array.new
108
+ if @id.nil?
109
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
110
+ end
111
+
112
+ if @activity_id.nil?
113
+ invalid_properties.push('invalid value for "activity_id", activity_id cannot be nil.')
114
+ end
115
+
116
+ if @organization_id.nil?
117
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
118
+ end
119
+
120
+ if @vote_id.nil?
121
+ invalid_properties.push('invalid value for "vote_id", vote_id cannot be nil.')
122
+ end
123
+
124
+ if @policy_evaluations.nil?
125
+ invalid_properties.push('invalid value for "policy_evaluations", policy_evaluations cannot be nil.')
126
+ end
127
+
128
+ if @created_at.nil?
129
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
130
+ end
131
+
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ return false if @id.nil?
139
+ return false if @activity_id.nil?
140
+ return false if @organization_id.nil?
141
+ return false if @vote_id.nil?
142
+ return false if @policy_evaluations.nil?
143
+ return false if @created_at.nil?
144
+ true
145
+ end
146
+
147
+ # Checks equality by comparing each attribute.
148
+ # @param [Object] Object to be compared
149
+ def ==(o)
150
+ return true if self.equal?(o)
151
+ self.class == o.class &&
152
+ id == o.id &&
153
+ activity_id == o.activity_id &&
154
+ organization_id == o.organization_id &&
155
+ vote_id == o.vote_id &&
156
+ policy_evaluations == o.policy_evaluations &&
157
+ created_at == o.created_at
158
+ end
159
+
160
+ # @see the `==` method
161
+ # @param [Object] Object to be compared
162
+ def eql?(o)
163
+ self == o
164
+ end
165
+
166
+ # Calculates hash code according to all attributes.
167
+ # @return [Integer] Hash code
168
+ def hash
169
+ [id, activity_id, organization_id, vote_id, policy_evaluations, created_at].hash
170
+ end
171
+
172
+ # Builds the object from hash
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ # @return [Object] Returns the model itself
175
+ def self.build_from_hash(attributes)
176
+ new.build_from_hash(attributes)
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def build_from_hash(attributes)
183
+ return nil unless attributes.is_a?(Hash)
184
+ self.class.openapi_types.each_pair do |key, type|
185
+ if type =~ /\AArray<(.*)>/i
186
+ # check to ensure the input is an array given that the attribute
187
+ # is documented as an array but the input is not
188
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
189
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
190
+ end
191
+ elsif !attributes[self.class.attribute_map[key]].nil?
192
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
193
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
194
+ self.send("#{key}=", nil)
195
+ end
196
+ end
197
+
198
+ self
199
+ end
200
+
201
+ # Deserializes the data based on type
202
+ # @param string type Data type
203
+ # @param string value Value to be deserialized
204
+ # @return [Object] Deserialized data
205
+ def _deserialize(type, value)
206
+ case type.to_sym
207
+ when :DateTime
208
+ DateTime.parse(value)
209
+ when :Date
210
+ Date.parse(value)
211
+ when :String
212
+ value.to_s
213
+ when :Integer
214
+ value.to_i
215
+ when :Float
216
+ value.to_f
217
+ when :Boolean
218
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
219
+ true
220
+ else
221
+ false
222
+ end
223
+ when :Object
224
+ # generic object (usually a Hash), return directly
225
+ value
226
+ when /\AArray<(?<inner_type>.+)>\z/
227
+ inner_type = Regexp.last_match[:inner_type]
228
+ value.map { |v| _deserialize(inner_type, v) }
229
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
230
+ k_type = Regexp.last_match[:k_type]
231
+ v_type = Regexp.last_match[:v_type]
232
+ {}.tap do |hash|
233
+ value.each do |k, v|
234
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
235
+ end
236
+ end
237
+ else # model
238
+ TurnkeyClient.const_get(type).build_from_hash(value)
239
+ end
240
+ end
241
+
242
+ # Returns the string representation of the object
243
+ # @return [String] String presentation of the object
244
+ def to_s
245
+ to_hash.to_s
246
+ end
247
+
248
+ # to_body is an alias to to_hash (backward compatibility)
249
+ # @return [Hash] Returns the object in the form of hash
250
+ def to_body
251
+ to_hash
252
+ end
253
+
254
+ # Returns the object in the form of hash
255
+ # @return [Hash] Returns the object in the form of hash
256
+ def to_hash
257
+ hash = {}
258
+ self.class.attribute_map.each_pair do |attr, param|
259
+ value = self.send(attr)
260
+ if value.nil?
261
+ is_nullable = self.class.openapi_nullable.include?(attr)
262
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
263
+ end
264
+
265
+ hash[param] = _to_hash(value)
266
+ end
267
+ hash
268
+ end
269
+
270
+ # Outputs non-array value in the form of hash
271
+ # For object, use to_hash. Otherwise, just return the value
272
+ # @param [Object] value Any valid value
273
+ # @return [Hash] Returns the value in the form of hash
274
+ def _to_hash(value)
275
+ if value.is_a?(Array)
276
+ value.compact.map { |v| _to_hash(v) }
277
+ elsif value.is_a?(Hash)
278
+ {}.tap do |hash|
279
+ value.each { |k, v| hash[k] = _to_hash(v) }
280
+ end
281
+ elsif value.respond_to? :to_hash
282
+ value.to_hash
283
+ else
284
+ value
285
+ end
286
+ end end
287
+ end
@@ -46,6 +46,7 @@ module TurnkeyClient
46
46
  DOGE_TESTNET = 'ADDRESS_FORMAT_DOGE_TESTNET'.freeze
47
47
  TON_V3_R2 = 'ADDRESS_FORMAT_TON_V3R2'.freeze
48
48
  TON_V4_R2 = 'ADDRESS_FORMAT_TON_V4R2'.freeze
49
+ TON_V5_R1 = 'ADDRESS_FORMAT_TON_V5R1'.freeze
49
50
  XRP = 'ADDRESS_FORMAT_XRP'.freeze
50
51
 
51
52
  # Builds the enum from string
@@ -54,6 +54,7 @@ module TurnkeyClient
54
54
  # List of attributes with nullable: true
55
55
  def self.openapi_nullable
56
56
  Set.new([
57
+ :'expiration_seconds'
57
58
  ])
58
59
  end
59
60
 
@@ -42,6 +42,7 @@ module TurnkeyClient
42
42
  # List of attributes with nullable: true
43
43
  def self.openapi_nullable
44
44
  Set.new([
45
+ :'expiration_seconds'
45
46
  ])
46
47
  end
47
48
 
@@ -46,6 +46,7 @@ module TurnkeyClient
46
46
  # List of attributes with nullable: true
47
47
  def self.openapi_nullable
48
48
  Set.new([
49
+ :'expiration_seconds'
49
50
  ])
50
51
  end
51
52
 
@@ -18,10 +18,10 @@ module TurnkeyClient
18
18
  # The email address for this API-only User (optional).
19
19
  attr_accessor :user_email
20
20
 
21
- # A list of tags assigned to the new API-only User.
21
+ # A list of tags assigned to the new API-only User. This field, if not needed, should be an empty array in your request body.
22
22
  attr_accessor :user_tags
23
23
 
24
- # A list of API Key parameters.
24
+ # A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
25
25
  attr_accessor :api_keys
26
26
 
27
27
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -47,6 +47,7 @@ module TurnkeyClient
47
47
  # List of attributes with nullable: true
48
48
  def self.openapi_nullable
49
49
  Set.new([
50
+ :'user_email',
50
51
  ])
51
52
  end
52
53
 
@@ -46,6 +46,7 @@ module TurnkeyClient
46
46
  # List of attributes with nullable: true
47
47
  def self.openapi_nullable
48
48
  Set.new([
49
+ :'root_user_id'
49
50
  ])
50
51
  end
51
52
 
@@ -46,6 +46,7 @@ module TurnkeyClient
46
46
  # List of attributes with nullable: true
47
47
  def self.openapi_nullable
48
48
  Set.new([
49
+ :'root_user_id'
49
50
  ])
50
51
  end
51
52
 
@@ -50,6 +50,8 @@ module TurnkeyClient
50
50
  # List of attributes with nullable: true
51
51
  def self.openapi_nullable
52
52
  Set.new([
53
+ :'condition',
54
+ :'consensus',
53
55
  ])
54
56
  end
55
57
 
@@ -21,7 +21,7 @@ module TurnkeyClient
21
21
  # Optional human-readable name for an API Key. If none provided, default to Read Write Session - <Timestamp>
22
22
  attr_accessor :api_key_name
23
23
 
24
- # Expiration window (in seconds) indicating how long the API key is valid. If not provided, a default of 15 minutes will be used.
24
+ # Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
25
25
  attr_accessor :expiration_seconds
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
+ :'api_key_name',
51
+ :'expiration_seconds'
50
52
  ])
51
53
  end
52
54
 
@@ -21,16 +21,20 @@ module TurnkeyClient
21
21
  # Optional human-readable name for an API Key. If none provided, default to Read Write Session - <Timestamp>
22
22
  attr_accessor :api_key_name
23
23
 
24
- # Expiration window (in seconds) indicating how long the API key is valid. If not provided, a default of 15 minutes will be used.
24
+ # Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
25
25
  attr_accessor :expiration_seconds
26
26
 
27
+ # Invalidate all other previously generated ReadWriteSession API keys
28
+ attr_accessor :invalidate_existing
29
+
27
30
  # Attribute mapping from ruby-style variable name to JSON key.
28
31
  def self.attribute_map
29
32
  {
30
33
  :'target_public_key' => :'targetPublicKey',
31
34
  :'user_id' => :'userId',
32
35
  :'api_key_name' => :'apiKeyName',
33
- :'expiration_seconds' => :'expirationSeconds'
36
+ :'expiration_seconds' => :'expirationSeconds',
37
+ :'invalidate_existing' => :'invalidateExisting'
34
38
  }
35
39
  end
36
40
 
@@ -40,13 +44,18 @@ module TurnkeyClient
40
44
  :'target_public_key' => :'Object',
41
45
  :'user_id' => :'Object',
42
46
  :'api_key_name' => :'Object',
43
- :'expiration_seconds' => :'Object'
47
+ :'expiration_seconds' => :'Object',
48
+ :'invalidate_existing' => :'Object'
44
49
  }
45
50
  end
46
51
 
47
52
  # List of attributes with nullable: true
48
53
  def self.openapi_nullable
49
54
  Set.new([
55
+ :'user_id',
56
+ :'api_key_name',
57
+ :'expiration_seconds',
58
+ :'invalidate_existing'
50
59
  ])
51
60
  end
52
61
 
@@ -80,6 +89,10 @@ module TurnkeyClient
80
89
  if attributes.key?(:'expiration_seconds')
81
90
  self.expiration_seconds = attributes[:'expiration_seconds']
82
91
  end
92
+
93
+ if attributes.key?(:'invalidate_existing')
94
+ self.invalidate_existing = attributes[:'invalidate_existing']
95
+ end
83
96
  end
84
97
 
85
98
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -108,7 +121,8 @@ module TurnkeyClient
108
121
  target_public_key == o.target_public_key &&
109
122
  user_id == o.user_id &&
110
123
  api_key_name == o.api_key_name &&
111
- expiration_seconds == o.expiration_seconds
124
+ expiration_seconds == o.expiration_seconds &&
125
+ invalidate_existing == o.invalidate_existing
112
126
  end
113
127
 
114
128
  # @see the `==` method
@@ -120,7 +134,7 @@ module TurnkeyClient
120
134
  # Calculates hash code according to all attributes.
121
135
  # @return [Integer] Hash code
122
136
  def hash
123
- [target_public_key, user_id, api_key_name, expiration_seconds].hash
137
+ [target_public_key, user_id, api_key_name, expiration_seconds, invalidate_existing].hash
124
138
  end
125
139
 
126
140
  # Builds the object from hash