turnkey_client 0.0.9 → 0.0.13

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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/turnkey_client/api/features_api.rb +4 -4
  3. data/lib/turnkey_client/api/organizations_api.rb +60 -2
  4. data/lib/turnkey_client/api/user_auth_api.rb +348 -0
  5. data/lib/turnkey_client/api/users_api.rb +0 -232
  6. data/lib/turnkey_client/api/wallets_api.rb +118 -2
  7. data/lib/turnkey_client/models/activity_type.rb +4 -0
  8. data/lib/turnkey_client/models/address_format.rb +7 -0
  9. data/lib/turnkey_client/models/create_sub_organization_intent_v7.rb +292 -0
  10. data/lib/turnkey_client/models/create_sub_organization_request.rb +2 -2
  11. data/lib/turnkey_client/models/create_sub_organization_result_v7.rb +230 -0
  12. data/lib/turnkey_client/models/credential_type.rb +1 -0
  13. data/lib/turnkey_client/models/email_auth_intent.rb +14 -4
  14. data/lib/turnkey_client/models/email_auth_intent_v2.rb +14 -4
  15. data/lib/turnkey_client/models/feature_name.rb +2 -0
  16. data/lib/turnkey_client/models/get_sub_org_ids_request.rb +1 -1
  17. data/lib/turnkey_client/models/get_verified_sub_org_ids_request.rb +240 -0
  18. data/lib/turnkey_client/models/get_verified_sub_org_ids_response.rb +213 -0
  19. data/lib/turnkey_client/models/get_wallet_account_request.rb +246 -0
  20. data/lib/turnkey_client/models/get_wallet_account_response.rb +210 -0
  21. data/lib/turnkey_client/models/get_wallet_accounts_response.rb +1 -1
  22. data/lib/turnkey_client/models/init_otp_auth_intent.rb +264 -0
  23. data/lib/turnkey_client/models/init_otp_auth_request.rb +288 -0
  24. data/lib/turnkey_client/models/init_otp_auth_result.rb +211 -0
  25. data/lib/turnkey_client/models/intent.rb +40 -4
  26. data/lib/turnkey_client/models/otp_auth_intent.rb +266 -0
  27. data/lib/turnkey_client/models/otp_auth_request.rb +288 -0
  28. data/lib/turnkey_client/models/otp_auth_result.rb +231 -0
  29. data/lib/turnkey_client/models/result.rb +40 -4
  30. data/lib/turnkey_client/models/root_user_params_v4.rb +282 -0
  31. data/lib/turnkey_client/models/sms_customization_params.rb +206 -0
  32. data/lib/turnkey_client/models/update_user_intent.rb +14 -4
  33. data/lib/turnkey_client/models/update_wallet_intent.rb +221 -0
  34. data/lib/turnkey_client/models/update_wallet_request.rb +288 -0
  35. data/lib/turnkey_client/models/update_wallet_result.rb +211 -0
  36. data/lib/turnkey_client/models/user.rb +11 -1
  37. data/lib/turnkey_client/models/wallet_account.rb +16 -1
  38. data/lib/turnkey_client/version.rb +1 -1
  39. data/lib/turnkey_client.rb +17 -0
  40. data/turnkey_client-0.0.12.gem +0 -0
  41. data/turnkey_client-0.0.9.gem +0 -0
  42. metadata +21 -2
@@ -0,0 +1,292 @@
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 CreateSubOrganizationIntentV7
15
+ # Name for this sub-organization
16
+ attr_accessor :sub_organization_name
17
+
18
+ # Root users to create within this sub-organization
19
+ attr_accessor :root_users
20
+
21
+ # The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users
22
+ attr_accessor :root_quorum_threshold
23
+
24
+ attr_accessor :wallet
25
+
26
+ # Disable email recovery for the sub-organization
27
+ attr_accessor :disable_email_recovery
28
+
29
+ # Disable email auth for the sub-organization
30
+ attr_accessor :disable_email_auth
31
+
32
+ # Disable OTP SMS auth for the sub-organization
33
+ attr_accessor :disable_sms_auth
34
+
35
+ # Disable OTP email auth for the sub-organization
36
+ attr_accessor :disable_otp_email_auth
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'sub_organization_name' => :'subOrganizationName',
42
+ :'root_users' => :'rootUsers',
43
+ :'root_quorum_threshold' => :'rootQuorumThreshold',
44
+ :'wallet' => :'wallet',
45
+ :'disable_email_recovery' => :'disableEmailRecovery',
46
+ :'disable_email_auth' => :'disableEmailAuth',
47
+ :'disable_sms_auth' => :'disableSmsAuth',
48
+ :'disable_otp_email_auth' => :'disableOtpEmailAuth'
49
+ }
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+ :'sub_organization_name' => :'Object',
56
+ :'root_users' => :'Object',
57
+ :'root_quorum_threshold' => :'Object',
58
+ :'wallet' => :'Object',
59
+ :'disable_email_recovery' => :'Object',
60
+ :'disable_email_auth' => :'Object',
61
+ :'disable_sms_auth' => :'Object',
62
+ :'disable_otp_email_auth' => :'Object'
63
+ }
64
+ end
65
+
66
+ # List of attributes with nullable: true
67
+ def self.openapi_nullable
68
+ Set.new([
69
+ ])
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateSubOrganizationIntentV7` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!self.class.attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateSubOrganizationIntentV7`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'sub_organization_name')
88
+ self.sub_organization_name = attributes[:'sub_organization_name']
89
+ end
90
+
91
+ if attributes.key?(:'root_users')
92
+ if (value = attributes[:'root_users']).is_a?(Array)
93
+ self.root_users = value
94
+ end
95
+ end
96
+
97
+ if attributes.key?(:'root_quorum_threshold')
98
+ self.root_quorum_threshold = attributes[:'root_quorum_threshold']
99
+ end
100
+
101
+ if attributes.key?(:'wallet')
102
+ self.wallet = attributes[:'wallet']
103
+ end
104
+
105
+ if attributes.key?(:'disable_email_recovery')
106
+ self.disable_email_recovery = attributes[:'disable_email_recovery']
107
+ end
108
+
109
+ if attributes.key?(:'disable_email_auth')
110
+ self.disable_email_auth = attributes[:'disable_email_auth']
111
+ end
112
+
113
+ if attributes.key?(:'disable_sms_auth')
114
+ self.disable_sms_auth = attributes[:'disable_sms_auth']
115
+ end
116
+
117
+ if attributes.key?(:'disable_otp_email_auth')
118
+ self.disable_otp_email_auth = attributes[:'disable_otp_email_auth']
119
+ end
120
+ end
121
+
122
+ # Show invalid properties with the reasons. Usually used together with valid?
123
+ # @return Array for valid properties with the reasons
124
+ def list_invalid_properties
125
+ invalid_properties = Array.new
126
+ if @sub_organization_name.nil?
127
+ invalid_properties.push('invalid value for "sub_organization_name", sub_organization_name cannot be nil.')
128
+ end
129
+
130
+ if @root_users.nil?
131
+ invalid_properties.push('invalid value for "root_users", root_users cannot be nil.')
132
+ end
133
+
134
+ if @root_quorum_threshold.nil?
135
+ invalid_properties.push('invalid value for "root_quorum_threshold", root_quorum_threshold cannot be nil.')
136
+ end
137
+
138
+ invalid_properties
139
+ end
140
+
141
+ # Check to see if the all the properties in the model are valid
142
+ # @return true if the model is valid
143
+ def valid?
144
+ return false if @sub_organization_name.nil?
145
+ return false if @root_users.nil?
146
+ return false if @root_quorum_threshold.nil?
147
+ true
148
+ end
149
+
150
+ # Checks equality by comparing each attribute.
151
+ # @param [Object] Object to be compared
152
+ def ==(o)
153
+ return true if self.equal?(o)
154
+ self.class == o.class &&
155
+ sub_organization_name == o.sub_organization_name &&
156
+ root_users == o.root_users &&
157
+ root_quorum_threshold == o.root_quorum_threshold &&
158
+ wallet == o.wallet &&
159
+ disable_email_recovery == o.disable_email_recovery &&
160
+ disable_email_auth == o.disable_email_auth &&
161
+ disable_sms_auth == o.disable_sms_auth &&
162
+ disable_otp_email_auth == o.disable_otp_email_auth
163
+ end
164
+
165
+ # @see the `==` method
166
+ # @param [Object] Object to be compared
167
+ def eql?(o)
168
+ self == o
169
+ end
170
+
171
+ # Calculates hash code according to all attributes.
172
+ # @return [Integer] Hash code
173
+ def hash
174
+ [sub_organization_name, root_users, root_quorum_threshold, wallet, disable_email_recovery, disable_email_auth, disable_sms_auth, disable_otp_email_auth].hash
175
+ end
176
+
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def self.build_from_hash(attributes)
181
+ new.build_from_hash(attributes)
182
+ end
183
+
184
+ # Builds the object from hash
185
+ # @param [Hash] attributes Model attributes in the form of hash
186
+ # @return [Object] Returns the model itself
187
+ def build_from_hash(attributes)
188
+ return nil unless attributes.is_a?(Hash)
189
+ self.class.openapi_types.each_pair do |key, type|
190
+ if type =~ /\AArray<(.*)>/i
191
+ # check to ensure the input is an array given that the attribute
192
+ # is documented as an array but the input is not
193
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
194
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
195
+ end
196
+ elsif !attributes[self.class.attribute_map[key]].nil?
197
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
198
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
199
+ self.send("#{key}=", nil)
200
+ end
201
+ end
202
+
203
+ self
204
+ end
205
+
206
+ # Deserializes the data based on type
207
+ # @param string type Data type
208
+ # @param string value Value to be deserialized
209
+ # @return [Object] Deserialized data
210
+ def _deserialize(type, value)
211
+ case type.to_sym
212
+ when :DateTime
213
+ DateTime.parse(value)
214
+ when :Date
215
+ Date.parse(value)
216
+ when :String
217
+ value.to_s
218
+ when :Integer
219
+ value.to_i
220
+ when :Float
221
+ value.to_f
222
+ when :Boolean
223
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
224
+ true
225
+ else
226
+ false
227
+ end
228
+ when :Object
229
+ # generic object (usually a Hash), return directly
230
+ value
231
+ when /\AArray<(?<inner_type>.+)>\z/
232
+ inner_type = Regexp.last_match[:inner_type]
233
+ value.map { |v| _deserialize(inner_type, v) }
234
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
235
+ k_type = Regexp.last_match[:k_type]
236
+ v_type = Regexp.last_match[:v_type]
237
+ {}.tap do |hash|
238
+ value.each do |k, v|
239
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
240
+ end
241
+ end
242
+ else # model
243
+ TurnkeyClient.const_get(type).build_from_hash(value)
244
+ end
245
+ end
246
+
247
+ # Returns the string representation of the object
248
+ # @return [String] String presentation of the object
249
+ def to_s
250
+ to_hash.to_s
251
+ end
252
+
253
+ # to_body is an alias to to_hash (backward compatibility)
254
+ # @return [Hash] Returns the object in the form of hash
255
+ def to_body
256
+ to_hash
257
+ end
258
+
259
+ # Returns the object in the form of hash
260
+ # @return [Hash] Returns the object in the form of hash
261
+ def to_hash
262
+ hash = {}
263
+ self.class.attribute_map.each_pair do |attr, param|
264
+ value = self.send(attr)
265
+ if value.nil?
266
+ is_nullable = self.class.openapi_nullable.include?(attr)
267
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
268
+ end
269
+
270
+ hash[param] = _to_hash(value)
271
+ end
272
+ hash
273
+ end
274
+
275
+ # Outputs non-array value in the form of hash
276
+ # For object, use to_hash. Otherwise, just return the value
277
+ # @param [Object] value Any valid value
278
+ # @return [Hash] Returns the value in the form of hash
279
+ def _to_hash(value)
280
+ if value.is_a?(Array)
281
+ value.compact.map { |v| _to_hash(v) }
282
+ elsif value.is_a?(Hash)
283
+ {}.tap do |hash|
284
+ value.each { |k, v| hash[k] = _to_hash(v) }
285
+ end
286
+ elsif value.respond_to? :to_hash
287
+ value.to_hash
288
+ else
289
+ value
290
+ end
291
+ end end
292
+ end
@@ -129,7 +129,7 @@ module TurnkeyClient
129
129
  # @return true if the model is valid
130
130
  def valid?
131
131
  return false if @type.nil?
132
- type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6'])
132
+ type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7'])
133
133
  return false unless type_validator.valid?(@type)
134
134
  return false if @timestamp_ms.nil?
135
135
  return false if @organization_id.nil?
@@ -140,7 +140,7 @@ module TurnkeyClient
140
140
  # Custom attribute writer method checking allowed values (enum).
141
141
  # @param [Object] type Object to be assigned
142
142
  def type=(type)
143
- validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6'])
143
+ validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7'])
144
144
  unless validator.valid?(type)
145
145
  fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
146
146
  end
@@ -0,0 +1,230 @@
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 CreateSubOrganizationResultV7
15
+ attr_accessor :sub_organization_id
16
+
17
+ attr_accessor :wallet
18
+
19
+ attr_accessor :root_user_ids
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'sub_organization_id' => :'subOrganizationId',
25
+ :'wallet' => :'wallet',
26
+ :'root_user_ids' => :'rootUserIds'
27
+ }
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.openapi_types
32
+ {
33
+ :'sub_organization_id' => :'Object',
34
+ :'wallet' => :'Object',
35
+ :'root_user_ids' => :'Object'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateSubOrganizationResultV7` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateSubOrganizationResultV7`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'sub_organization_id')
61
+ self.sub_organization_id = attributes[:'sub_organization_id']
62
+ end
63
+
64
+ if attributes.key?(:'wallet')
65
+ self.wallet = attributes[:'wallet']
66
+ end
67
+
68
+ if attributes.key?(:'root_user_ids')
69
+ if (value = attributes[:'root_user_ids']).is_a?(Array)
70
+ self.root_user_ids = value
71
+ end
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ if @sub_organization_id.nil?
80
+ invalid_properties.push('invalid value for "sub_organization_id", sub_organization_id cannot be nil.')
81
+ end
82
+
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ return false if @sub_organization_id.nil?
90
+ true
91
+ end
92
+
93
+ # Checks equality by comparing each attribute.
94
+ # @param [Object] Object to be compared
95
+ def ==(o)
96
+ return true if self.equal?(o)
97
+ self.class == o.class &&
98
+ sub_organization_id == o.sub_organization_id &&
99
+ wallet == o.wallet &&
100
+ root_user_ids == o.root_user_ids
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [sub_organization_id, wallet, root_user_ids].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ new.build_from_hash(attributes)
120
+ end
121
+
122
+ # Builds the object from hash
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ # @return [Object] Returns the model itself
125
+ def build_from_hash(attributes)
126
+ return nil unless attributes.is_a?(Hash)
127
+ self.class.openapi_types.each_pair do |key, type|
128
+ if type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
132
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
133
+ end
134
+ elsif !attributes[self.class.attribute_map[key]].nil?
135
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
136
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
137
+ self.send("#{key}=", nil)
138
+ end
139
+ end
140
+
141
+ self
142
+ end
143
+
144
+ # Deserializes the data based on type
145
+ # @param string type Data type
146
+ # @param string value Value to be deserialized
147
+ # @return [Object] Deserialized data
148
+ def _deserialize(type, value)
149
+ case type.to_sym
150
+ when :DateTime
151
+ DateTime.parse(value)
152
+ when :Date
153
+ Date.parse(value)
154
+ when :String
155
+ value.to_s
156
+ when :Integer
157
+ value.to_i
158
+ when :Float
159
+ value.to_f
160
+ when :Boolean
161
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
162
+ true
163
+ else
164
+ false
165
+ end
166
+ when :Object
167
+ # generic object (usually a Hash), return directly
168
+ value
169
+ when /\AArray<(?<inner_type>.+)>\z/
170
+ inner_type = Regexp.last_match[:inner_type]
171
+ value.map { |v| _deserialize(inner_type, v) }
172
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
173
+ k_type = Regexp.last_match[:k_type]
174
+ v_type = Regexp.last_match[:v_type]
175
+ {}.tap do |hash|
176
+ value.each do |k, v|
177
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
178
+ end
179
+ end
180
+ else # model
181
+ TurnkeyClient.const_get(type).build_from_hash(value)
182
+ end
183
+ end
184
+
185
+ # Returns the string representation of the object
186
+ # @return [String] String presentation of the object
187
+ def to_s
188
+ to_hash.to_s
189
+ end
190
+
191
+ # to_body is an alias to to_hash (backward compatibility)
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_body
194
+ to_hash
195
+ end
196
+
197
+ # Returns the object in the form of hash
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_hash
200
+ hash = {}
201
+ self.class.attribute_map.each_pair do |attr, param|
202
+ value = self.send(attr)
203
+ if value.nil?
204
+ is_nullable = self.class.openapi_nullable.include?(attr)
205
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
206
+ end
207
+
208
+ hash[param] = _to_hash(value)
209
+ end
210
+ hash
211
+ end
212
+
213
+ # Outputs non-array value in the form of hash
214
+ # For object, use to_hash. Otherwise, just return the value
215
+ # @param [Object] value Any valid value
216
+ # @return [Hash] Returns the value in the form of hash
217
+ def _to_hash(value)
218
+ if value.is_a?(Array)
219
+ value.compact.map { |v| _to_hash(v) }
220
+ elsif value.is_a?(Hash)
221
+ {}.tap do |hash|
222
+ value.each { |k, v| hash[k] = _to_hash(v) }
223
+ end
224
+ elsif value.respond_to? :to_hash
225
+ value.to_hash
226
+ else
227
+ value
228
+ end
229
+ end end
230
+ end
@@ -18,6 +18,7 @@ module TurnkeyClient
18
18
  API_KEY_SECP256_K1 = 'CREDENTIAL_TYPE_API_KEY_SECP256K1'.freeze
19
19
  EMAIL_AUTH_KEY_P256 = 'CREDENTIAL_TYPE_EMAIL_AUTH_KEY_P256'.freeze
20
20
  API_KEY_ED25519 = 'CREDENTIAL_TYPE_API_KEY_ED25519'.freeze
21
+ OTP_AUTH_KEY_P256 = 'CREDENTIAL_TYPE_OTP_AUTH_KEY_P256'.freeze
21
22
 
22
23
  # Builds the enum from string
23
24
  # @param [String] The enum value in the form of the string
@@ -29,6 +29,9 @@ module TurnkeyClient
29
29
  # Invalidate all other previously generated Email Auth API keys
30
30
  attr_accessor :invalidate_existing
31
31
 
32
+ # Optional custom email address from which to send the email
33
+ attr_accessor :send_from_email_address
34
+
32
35
  # Attribute mapping from ruby-style variable name to JSON key.
33
36
  def self.attribute_map
34
37
  {
@@ -37,7 +40,8 @@ module TurnkeyClient
37
40
  :'api_key_name' => :'apiKeyName',
38
41
  :'expiration_seconds' => :'expirationSeconds',
39
42
  :'email_customization' => :'emailCustomization',
40
- :'invalidate_existing' => :'invalidateExisting'
43
+ :'invalidate_existing' => :'invalidateExisting',
44
+ :'send_from_email_address' => :'sendFromEmailAddress'
41
45
  }
42
46
  end
43
47
 
@@ -49,7 +53,8 @@ module TurnkeyClient
49
53
  :'api_key_name' => :'Object',
50
54
  :'expiration_seconds' => :'Object',
51
55
  :'email_customization' => :'Object',
52
- :'invalidate_existing' => :'Object'
56
+ :'invalidate_existing' => :'Object',
57
+ :'send_from_email_address' => :'Object'
53
58
  }
54
59
  end
55
60
 
@@ -97,6 +102,10 @@ module TurnkeyClient
97
102
  if attributes.key?(:'invalidate_existing')
98
103
  self.invalidate_existing = attributes[:'invalidate_existing']
99
104
  end
105
+
106
+ if attributes.key?(:'send_from_email_address')
107
+ self.send_from_email_address = attributes[:'send_from_email_address']
108
+ end
100
109
  end
101
110
 
102
111
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -132,7 +141,8 @@ module TurnkeyClient
132
141
  api_key_name == o.api_key_name &&
133
142
  expiration_seconds == o.expiration_seconds &&
134
143
  email_customization == o.email_customization &&
135
- invalidate_existing == o.invalidate_existing
144
+ invalidate_existing == o.invalidate_existing &&
145
+ send_from_email_address == o.send_from_email_address
136
146
  end
137
147
 
138
148
  # @see the `==` method
@@ -144,7 +154,7 @@ module TurnkeyClient
144
154
  # Calculates hash code according to all attributes.
145
155
  # @return [Integer] Hash code
146
156
  def hash
147
- [email, target_public_key, api_key_name, expiration_seconds, email_customization, invalidate_existing].hash
157
+ [email, target_public_key, api_key_name, expiration_seconds, email_customization, invalidate_existing, send_from_email_address].hash
148
158
  end
149
159
 
150
160
  # Builds the object from hash
@@ -29,6 +29,9 @@ module TurnkeyClient
29
29
  # Invalidate all other previously generated Email Auth API keys
30
30
  attr_accessor :invalidate_existing
31
31
 
32
+ # Optional custom email address from which to send the email
33
+ attr_accessor :send_from_email_address
34
+
32
35
  # Attribute mapping from ruby-style variable name to JSON key.
33
36
  def self.attribute_map
34
37
  {
@@ -37,7 +40,8 @@ module TurnkeyClient
37
40
  :'api_key_name' => :'apiKeyName',
38
41
  :'expiration_seconds' => :'expirationSeconds',
39
42
  :'email_customization' => :'emailCustomization',
40
- :'invalidate_existing' => :'invalidateExisting'
43
+ :'invalidate_existing' => :'invalidateExisting',
44
+ :'send_from_email_address' => :'sendFromEmailAddress'
41
45
  }
42
46
  end
43
47
 
@@ -49,7 +53,8 @@ module TurnkeyClient
49
53
  :'api_key_name' => :'Object',
50
54
  :'expiration_seconds' => :'Object',
51
55
  :'email_customization' => :'Object',
52
- :'invalidate_existing' => :'Object'
56
+ :'invalidate_existing' => :'Object',
57
+ :'send_from_email_address' => :'Object'
53
58
  }
54
59
  end
55
60
 
@@ -97,6 +102,10 @@ module TurnkeyClient
97
102
  if attributes.key?(:'invalidate_existing')
98
103
  self.invalidate_existing = attributes[:'invalidate_existing']
99
104
  end
105
+
106
+ if attributes.key?(:'send_from_email_address')
107
+ self.send_from_email_address = attributes[:'send_from_email_address']
108
+ end
100
109
  end
101
110
 
102
111
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -132,7 +141,8 @@ module TurnkeyClient
132
141
  api_key_name == o.api_key_name &&
133
142
  expiration_seconds == o.expiration_seconds &&
134
143
  email_customization == o.email_customization &&
135
- invalidate_existing == o.invalidate_existing
144
+ invalidate_existing == o.invalidate_existing &&
145
+ send_from_email_address == o.send_from_email_address
136
146
  end
137
147
 
138
148
  # @see the `==` method
@@ -144,7 +154,7 @@ module TurnkeyClient
144
154
  # Calculates hash code according to all attributes.
145
155
  # @return [Integer] Hash code
146
156
  def hash
147
- [email, target_public_key, api_key_name, expiration_seconds, email_customization, invalidate_existing].hash
157
+ [email, target_public_key, api_key_name, expiration_seconds, email_customization, invalidate_existing, send_from_email_address].hash
148
158
  end
149
159
 
150
160
  # Builds the object from hash
@@ -17,6 +17,8 @@ module TurnkeyClient
17
17
  EMAIL_AUTH = 'FEATURE_NAME_EMAIL_AUTH'.freeze
18
18
  EMAIL_RECOVERY = 'FEATURE_NAME_EMAIL_RECOVERY'.freeze
19
19
  WEBHOOK = 'FEATURE_NAME_WEBHOOK'.freeze
20
+ SMS_AUTH = 'FEATURE_NAME_SMS_AUTH'.freeze
21
+ OTP_EMAIL_AUTH = 'FEATURE_NAME_OTP_EMAIL_AUTH'.freeze
20
22
 
21
23
  # Builds the enum from string
22
24
  # @param [String] The enum value in the form of the string
@@ -15,7 +15,7 @@ module TurnkeyClient
15
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', 'OIDC_TOKEN' or 'PUBLIC_KEY'
18
+ # Specifies the type of filter to apply, i.e 'CREDENTIAL_ID', 'NAME', 'USERNAME', 'EMAIL', 'PHONE_NUMBER', 'OIDC_TOKEN' 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.