turnkey_client 0.0.9 → 0.0.12
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.
- checksums.yaml +4 -4
- data/lib/turnkey_client/api/features_api.rb +4 -4
- data/lib/turnkey_client/api/organizations_api.rb +60 -2
- data/lib/turnkey_client/api/user_auth_api.rb +348 -0
- data/lib/turnkey_client/api/users_api.rb +0 -232
- data/lib/turnkey_client/api/wallets_api.rb +58 -0
- data/lib/turnkey_client/models/activity_type.rb +4 -0
- data/lib/turnkey_client/models/address_format.rb +7 -0
- data/lib/turnkey_client/models/create_sub_organization_intent_v7.rb +292 -0
- data/lib/turnkey_client/models/create_sub_organization_request.rb +2 -2
- data/lib/turnkey_client/models/create_sub_organization_result_v7.rb +230 -0
- data/lib/turnkey_client/models/credential_type.rb +1 -0
- data/lib/turnkey_client/models/email_auth_intent.rb +14 -4
- data/lib/turnkey_client/models/email_auth_intent_v2.rb +14 -4
- data/lib/turnkey_client/models/feature_name.rb +2 -0
- data/lib/turnkey_client/models/get_sub_org_ids_request.rb +1 -1
- data/lib/turnkey_client/models/get_verified_sub_org_ids_request.rb +240 -0
- data/lib/turnkey_client/models/get_verified_sub_org_ids_response.rb +213 -0
- data/lib/turnkey_client/models/init_otp_auth_intent.rb +264 -0
- data/lib/turnkey_client/models/init_otp_auth_request.rb +288 -0
- data/lib/turnkey_client/models/init_otp_auth_result.rb +211 -0
- data/lib/turnkey_client/models/intent.rb +40 -4
- data/lib/turnkey_client/models/otp_auth_intent.rb +266 -0
- data/lib/turnkey_client/models/otp_auth_request.rb +288 -0
- data/lib/turnkey_client/models/otp_auth_result.rb +231 -0
- data/lib/turnkey_client/models/result.rb +40 -4
- data/lib/turnkey_client/models/root_user_params_v4.rb +282 -0
- data/lib/turnkey_client/models/sms_customization_params.rb +206 -0
- data/lib/turnkey_client/models/update_user_intent.rb +14 -4
- data/lib/turnkey_client/models/update_wallet_intent.rb +221 -0
- data/lib/turnkey_client/models/update_wallet_request.rb +288 -0
- data/lib/turnkey_client/models/update_wallet_result.rb +211 -0
- data/lib/turnkey_client/models/user.rb +11 -1
- data/lib/turnkey_client/models/wallet_account.rb +16 -1
- data/lib/turnkey_client/version.rb +1 -1
- data/lib/turnkey_client.rb +15 -0
- data/turnkey_client-0.0.9.gem +0 -0
- metadata +18 -2
@@ -0,0 +1,288 @@
|
|
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 UpdateWalletRequest
|
15
|
+
attr_accessor :type
|
16
|
+
|
17
|
+
# Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
|
18
|
+
attr_accessor :timestamp_ms
|
19
|
+
|
20
|
+
# Unique identifier for a given Organization.
|
21
|
+
attr_accessor :organization_id
|
22
|
+
|
23
|
+
attr_accessor :parameters
|
24
|
+
|
25
|
+
class EnumAttributeValidator
|
26
|
+
attr_reader :datatype
|
27
|
+
attr_reader :allowable_values
|
28
|
+
|
29
|
+
def initialize(datatype, allowable_values)
|
30
|
+
@allowable_values = allowable_values.map do |value|
|
31
|
+
case datatype.to_s
|
32
|
+
when /Integer/i
|
33
|
+
value.to_i
|
34
|
+
when /Float/i
|
35
|
+
value.to_f
|
36
|
+
else
|
37
|
+
value
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def valid?(value)
|
43
|
+
!value || allowable_values.include?(value)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'type' => :'type',
|
51
|
+
:'timestamp_ms' => :'timestampMs',
|
52
|
+
:'organization_id' => :'organizationId',
|
53
|
+
:'parameters' => :'parameters'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.openapi_types
|
59
|
+
{
|
60
|
+
:'type' => :'Object',
|
61
|
+
:'timestamp_ms' => :'Object',
|
62
|
+
:'organization_id' => :'Object',
|
63
|
+
:'parameters' => :'Object'
|
64
|
+
}
|
65
|
+
end
|
66
|
+
|
67
|
+
# List of attributes with nullable: true
|
68
|
+
def self.openapi_nullable
|
69
|
+
Set.new([
|
70
|
+
])
|
71
|
+
end
|
72
|
+
|
73
|
+
# Initializes the object
|
74
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
75
|
+
def initialize(attributes = {})
|
76
|
+
if (!attributes.is_a?(Hash))
|
77
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateWalletRequest` initialize method"
|
78
|
+
end
|
79
|
+
|
80
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
82
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateWalletRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
84
|
+
end
|
85
|
+
h[k.to_sym] = v
|
86
|
+
}
|
87
|
+
|
88
|
+
if attributes.key?(:'type')
|
89
|
+
self.type = attributes[:'type']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.key?(:'timestamp_ms')
|
93
|
+
self.timestamp_ms = attributes[:'timestamp_ms']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.key?(:'organization_id')
|
97
|
+
self.organization_id = attributes[:'organization_id']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.key?(:'parameters')
|
101
|
+
self.parameters = attributes[:'parameters']
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
106
|
+
# @return Array for valid properties with the reasons
|
107
|
+
def list_invalid_properties
|
108
|
+
invalid_properties = Array.new
|
109
|
+
if @type.nil?
|
110
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
111
|
+
end
|
112
|
+
|
113
|
+
if @timestamp_ms.nil?
|
114
|
+
invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.')
|
115
|
+
end
|
116
|
+
|
117
|
+
if @organization_id.nil?
|
118
|
+
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
119
|
+
end
|
120
|
+
|
121
|
+
if @parameters.nil?
|
122
|
+
invalid_properties.push('invalid value for "parameters", parameters cannot be nil.')
|
123
|
+
end
|
124
|
+
|
125
|
+
invalid_properties
|
126
|
+
end
|
127
|
+
|
128
|
+
# Check to see if the all the properties in the model are valid
|
129
|
+
# @return true if the model is valid
|
130
|
+
def valid?
|
131
|
+
return false if @type.nil?
|
132
|
+
type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_UPDATE_WALLET'])
|
133
|
+
return false unless type_validator.valid?(@type)
|
134
|
+
return false if @timestamp_ms.nil?
|
135
|
+
return false if @organization_id.nil?
|
136
|
+
return false if @parameters.nil?
|
137
|
+
true
|
138
|
+
end
|
139
|
+
|
140
|
+
# Custom attribute writer method checking allowed values (enum).
|
141
|
+
# @param [Object] type Object to be assigned
|
142
|
+
def type=(type)
|
143
|
+
validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_UPDATE_WALLET'])
|
144
|
+
unless validator.valid?(type)
|
145
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
146
|
+
end
|
147
|
+
@type = type
|
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
|
+
type == o.type &&
|
156
|
+
timestamp_ms == o.timestamp_ms &&
|
157
|
+
organization_id == o.organization_id &&
|
158
|
+
parameters == o.parameters
|
159
|
+
end
|
160
|
+
|
161
|
+
# @see the `==` method
|
162
|
+
# @param [Object] Object to be compared
|
163
|
+
def eql?(o)
|
164
|
+
self == o
|
165
|
+
end
|
166
|
+
|
167
|
+
# Calculates hash code according to all attributes.
|
168
|
+
# @return [Integer] Hash code
|
169
|
+
def hash
|
170
|
+
[type, timestamp_ms, organization_id, parameters].hash
|
171
|
+
end
|
172
|
+
|
173
|
+
# Builds the object from hash
|
174
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
175
|
+
# @return [Object] Returns the model itself
|
176
|
+
def self.build_from_hash(attributes)
|
177
|
+
new.build_from_hash(attributes)
|
178
|
+
end
|
179
|
+
|
180
|
+
# Builds the object from hash
|
181
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
182
|
+
# @return [Object] Returns the model itself
|
183
|
+
def build_from_hash(attributes)
|
184
|
+
return nil unless attributes.is_a?(Hash)
|
185
|
+
self.class.openapi_types.each_pair do |key, type|
|
186
|
+
if type =~ /\AArray<(.*)>/i
|
187
|
+
# check to ensure the input is an array given that the attribute
|
188
|
+
# is documented as an array but the input is not
|
189
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
190
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
191
|
+
end
|
192
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
193
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
194
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
195
|
+
self.send("#{key}=", nil)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
self
|
200
|
+
end
|
201
|
+
|
202
|
+
# Deserializes the data based on type
|
203
|
+
# @param string type Data type
|
204
|
+
# @param string value Value to be deserialized
|
205
|
+
# @return [Object] Deserialized data
|
206
|
+
def _deserialize(type, value)
|
207
|
+
case type.to_sym
|
208
|
+
when :DateTime
|
209
|
+
DateTime.parse(value)
|
210
|
+
when :Date
|
211
|
+
Date.parse(value)
|
212
|
+
when :String
|
213
|
+
value.to_s
|
214
|
+
when :Integer
|
215
|
+
value.to_i
|
216
|
+
when :Float
|
217
|
+
value.to_f
|
218
|
+
when :Boolean
|
219
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
220
|
+
true
|
221
|
+
else
|
222
|
+
false
|
223
|
+
end
|
224
|
+
when :Object
|
225
|
+
# generic object (usually a Hash), return directly
|
226
|
+
value
|
227
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
228
|
+
inner_type = Regexp.last_match[:inner_type]
|
229
|
+
value.map { |v| _deserialize(inner_type, v) }
|
230
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
231
|
+
k_type = Regexp.last_match[:k_type]
|
232
|
+
v_type = Regexp.last_match[:v_type]
|
233
|
+
{}.tap do |hash|
|
234
|
+
value.each do |k, v|
|
235
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
236
|
+
end
|
237
|
+
end
|
238
|
+
else # model
|
239
|
+
TurnkeyClient.const_get(type).build_from_hash(value)
|
240
|
+
end
|
241
|
+
end
|
242
|
+
|
243
|
+
# Returns the string representation of the object
|
244
|
+
# @return [String] String presentation of the object
|
245
|
+
def to_s
|
246
|
+
to_hash.to_s
|
247
|
+
end
|
248
|
+
|
249
|
+
# to_body is an alias to to_hash (backward compatibility)
|
250
|
+
# @return [Hash] Returns the object in the form of hash
|
251
|
+
def to_body
|
252
|
+
to_hash
|
253
|
+
end
|
254
|
+
|
255
|
+
# Returns the object in the form of hash
|
256
|
+
# @return [Hash] Returns the object in the form of hash
|
257
|
+
def to_hash
|
258
|
+
hash = {}
|
259
|
+
self.class.attribute_map.each_pair do |attr, param|
|
260
|
+
value = self.send(attr)
|
261
|
+
if value.nil?
|
262
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
263
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
264
|
+
end
|
265
|
+
|
266
|
+
hash[param] = _to_hash(value)
|
267
|
+
end
|
268
|
+
hash
|
269
|
+
end
|
270
|
+
|
271
|
+
# Outputs non-array value in the form of hash
|
272
|
+
# For object, use to_hash. Otherwise, just return the value
|
273
|
+
# @param [Object] value Any valid value
|
274
|
+
# @return [Hash] Returns the value in the form of hash
|
275
|
+
def _to_hash(value)
|
276
|
+
if value.is_a?(Array)
|
277
|
+
value.compact.map { |v| _to_hash(v) }
|
278
|
+
elsif value.is_a?(Hash)
|
279
|
+
{}.tap do |hash|
|
280
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
281
|
+
end
|
282
|
+
elsif value.respond_to? :to_hash
|
283
|
+
value.to_hash
|
284
|
+
else
|
285
|
+
value
|
286
|
+
end
|
287
|
+
end end
|
288
|
+
end
|
@@ -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 UpdateWalletResult
|
15
|
+
# A Wallet ID.
|
16
|
+
attr_accessor :wallet_id
|
17
|
+
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
19
|
+
def self.attribute_map
|
20
|
+
{
|
21
|
+
:'wallet_id' => :'walletId'
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
# Attribute type mapping.
|
26
|
+
def self.openapi_types
|
27
|
+
{
|
28
|
+
:'wallet_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::UpdateWalletResult` 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::UpdateWalletResult`. 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?(:'wallet_id')
|
54
|
+
self.wallet_id = attributes[:'wallet_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 @wallet_id.nil?
|
63
|
+
invalid_properties.push('invalid value for "wallet_id", wallet_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 @wallet_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
|
+
wallet_id == o.wallet_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
|
+
[wallet_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
|
@@ -21,6 +21,9 @@ module TurnkeyClient
|
|
21
21
|
# The user's email address.
|
22
22
|
attr_accessor :user_email
|
23
23
|
|
24
|
+
# The user's phone number in E.164 format e.g. +13214567890
|
25
|
+
attr_accessor :user_phone_number
|
26
|
+
|
24
27
|
# A list of Authenticator parameters.
|
25
28
|
attr_accessor :authenticators
|
26
29
|
|
@@ -43,6 +46,7 @@ module TurnkeyClient
|
|
43
46
|
:'user_id' => :'userId',
|
44
47
|
:'user_name' => :'userName',
|
45
48
|
:'user_email' => :'userEmail',
|
49
|
+
:'user_phone_number' => :'userPhoneNumber',
|
46
50
|
:'authenticators' => :'authenticators',
|
47
51
|
:'api_keys' => :'apiKeys',
|
48
52
|
:'user_tags' => :'userTags',
|
@@ -58,6 +62,7 @@ module TurnkeyClient
|
|
58
62
|
:'user_id' => :'Object',
|
59
63
|
:'user_name' => :'Object',
|
60
64
|
:'user_email' => :'Object',
|
65
|
+
:'user_phone_number' => :'Object',
|
61
66
|
:'authenticators' => :'Object',
|
62
67
|
:'api_keys' => :'Object',
|
63
68
|
:'user_tags' => :'Object',
|
@@ -100,6 +105,10 @@ module TurnkeyClient
|
|
100
105
|
self.user_email = attributes[:'user_email']
|
101
106
|
end
|
102
107
|
|
108
|
+
if attributes.key?(:'user_phone_number')
|
109
|
+
self.user_phone_number = attributes[:'user_phone_number']
|
110
|
+
end
|
111
|
+
|
103
112
|
if attributes.key?(:'authenticators')
|
104
113
|
if (value = attributes[:'authenticators']).is_a?(Array)
|
105
114
|
self.authenticators = value
|
@@ -194,6 +203,7 @@ module TurnkeyClient
|
|
194
203
|
user_id == o.user_id &&
|
195
204
|
user_name == o.user_name &&
|
196
205
|
user_email == o.user_email &&
|
206
|
+
user_phone_number == o.user_phone_number &&
|
197
207
|
authenticators == o.authenticators &&
|
198
208
|
api_keys == o.api_keys &&
|
199
209
|
user_tags == o.user_tags &&
|
@@ -211,7 +221,7 @@ module TurnkeyClient
|
|
211
221
|
# Calculates hash code according to all attributes.
|
212
222
|
# @return [Integer] Hash code
|
213
223
|
def hash
|
214
|
-
[user_id, user_name, user_email, authenticators, api_keys, user_tags, oauth_providers, created_at, updated_at].hash
|
224
|
+
[user_id, user_name, user_email, user_phone_number, authenticators, api_keys, user_tags, oauth_providers, created_at, updated_at].hash
|
215
225
|
end
|
216
226
|
|
217
227
|
# Builds the object from hash
|
@@ -12,6 +12,9 @@ require 'date'
|
|
12
12
|
|
13
13
|
module TurnkeyClient
|
14
14
|
class WalletAccount
|
15
|
+
# Unique identifier for a given Wallet Account.
|
16
|
+
attr_accessor :wallet_account_id
|
17
|
+
|
15
18
|
# The Organization the Account belongs to.
|
16
19
|
attr_accessor :organization_id
|
17
20
|
|
@@ -37,6 +40,7 @@ module TurnkeyClient
|
|
37
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
41
|
def self.attribute_map
|
39
42
|
{
|
43
|
+
:'wallet_account_id' => :'walletAccountId',
|
40
44
|
:'organization_id' => :'organizationId',
|
41
45
|
:'wallet_id' => :'walletId',
|
42
46
|
:'curve' => :'curve',
|
@@ -52,6 +56,7 @@ module TurnkeyClient
|
|
52
56
|
# Attribute type mapping.
|
53
57
|
def self.openapi_types
|
54
58
|
{
|
59
|
+
:'wallet_account_id' => :'Object',
|
55
60
|
:'organization_id' => :'Object',
|
56
61
|
:'wallet_id' => :'Object',
|
57
62
|
:'curve' => :'Object',
|
@@ -85,6 +90,10 @@ module TurnkeyClient
|
|
85
90
|
h[k.to_sym] = v
|
86
91
|
}
|
87
92
|
|
93
|
+
if attributes.key?(:'wallet_account_id')
|
94
|
+
self.wallet_account_id = attributes[:'wallet_account_id']
|
95
|
+
end
|
96
|
+
|
88
97
|
if attributes.key?(:'organization_id')
|
89
98
|
self.organization_id = attributes[:'organization_id']
|
90
99
|
end
|
@@ -126,6 +135,10 @@ module TurnkeyClient
|
|
126
135
|
# @return Array for valid properties with the reasons
|
127
136
|
def list_invalid_properties
|
128
137
|
invalid_properties = Array.new
|
138
|
+
if @wallet_account_id.nil?
|
139
|
+
invalid_properties.push('invalid value for "wallet_account_id", wallet_account_id cannot be nil.')
|
140
|
+
end
|
141
|
+
|
129
142
|
if @organization_id.nil?
|
130
143
|
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
131
144
|
end
|
@@ -168,6 +181,7 @@ module TurnkeyClient
|
|
168
181
|
# Check to see if the all the properties in the model are valid
|
169
182
|
# @return true if the model is valid
|
170
183
|
def valid?
|
184
|
+
return false if @wallet_account_id.nil?
|
171
185
|
return false if @organization_id.nil?
|
172
186
|
return false if @wallet_id.nil?
|
173
187
|
return false if @curve.nil?
|
@@ -185,6 +199,7 @@ module TurnkeyClient
|
|
185
199
|
def ==(o)
|
186
200
|
return true if self.equal?(o)
|
187
201
|
self.class == o.class &&
|
202
|
+
wallet_account_id == o.wallet_account_id &&
|
188
203
|
organization_id == o.organization_id &&
|
189
204
|
wallet_id == o.wallet_id &&
|
190
205
|
curve == o.curve &&
|
@@ -205,7 +220,7 @@ module TurnkeyClient
|
|
205
220
|
# Calculates hash code according to all attributes.
|
206
221
|
# @return [Integer] Hash code
|
207
222
|
def hash
|
208
|
-
[organization_id, wallet_id, curve, path_format, path, address_format, address, created_at, updated_at].hash
|
223
|
+
[wallet_account_id, organization_id, wallet_id, curve, path_format, path, address_format, address, created_at, updated_at].hash
|
209
224
|
end
|
210
225
|
|
211
226
|
# Builds the object from hash
|
data/lib/turnkey_client.rb
CHANGED
@@ -91,12 +91,14 @@ require 'turnkey_client/models/create_sub_organization_intent_v3'
|
|
91
91
|
require 'turnkey_client/models/create_sub_organization_intent_v4'
|
92
92
|
require 'turnkey_client/models/create_sub_organization_intent_v5'
|
93
93
|
require 'turnkey_client/models/create_sub_organization_intent_v6'
|
94
|
+
require 'turnkey_client/models/create_sub_organization_intent_v7'
|
94
95
|
require 'turnkey_client/models/create_sub_organization_request'
|
95
96
|
require 'turnkey_client/models/create_sub_organization_result'
|
96
97
|
require 'turnkey_client/models/create_sub_organization_result_v3'
|
97
98
|
require 'turnkey_client/models/create_sub_organization_result_v4'
|
98
99
|
require 'turnkey_client/models/create_sub_organization_result_v5'
|
99
100
|
require 'turnkey_client/models/create_sub_organization_result_v6'
|
101
|
+
require 'turnkey_client/models/create_sub_organization_result_v7'
|
100
102
|
require 'turnkey_client/models/create_user_tag_intent'
|
101
103
|
require 'turnkey_client/models/create_user_tag_request'
|
102
104
|
require 'turnkey_client/models/create_user_tag_result'
|
@@ -202,6 +204,8 @@ require 'turnkey_client/models/get_user_request'
|
|
202
204
|
require 'turnkey_client/models/get_user_response'
|
203
205
|
require 'turnkey_client/models/get_users_request'
|
204
206
|
require 'turnkey_client/models/get_users_response'
|
207
|
+
require 'turnkey_client/models/get_verified_sub_org_ids_request'
|
208
|
+
require 'turnkey_client/models/get_verified_sub_org_ids_response'
|
205
209
|
require 'turnkey_client/models/get_wallet_accounts_request'
|
206
210
|
require 'turnkey_client/models/get_wallet_accounts_response'
|
207
211
|
require 'turnkey_client/models/get_wallet_request'
|
@@ -223,6 +227,9 @@ require 'turnkey_client/models/init_import_private_key_result'
|
|
223
227
|
require 'turnkey_client/models/init_import_wallet_intent'
|
224
228
|
require 'turnkey_client/models/init_import_wallet_request'
|
225
229
|
require 'turnkey_client/models/init_import_wallet_result'
|
230
|
+
require 'turnkey_client/models/init_otp_auth_intent'
|
231
|
+
require 'turnkey_client/models/init_otp_auth_request'
|
232
|
+
require 'turnkey_client/models/init_otp_auth_result'
|
226
233
|
require 'turnkey_client/models/init_user_email_recovery_intent'
|
227
234
|
require 'turnkey_client/models/init_user_email_recovery_request'
|
228
235
|
require 'turnkey_client/models/init_user_email_recovery_result'
|
@@ -239,6 +246,9 @@ require 'turnkey_client/models/oauth_provider_params'
|
|
239
246
|
require 'turnkey_client/models/oauth_request'
|
240
247
|
require 'turnkey_client/models/oauth_result'
|
241
248
|
require 'turnkey_client/models/operator'
|
249
|
+
require 'turnkey_client/models/otp_auth_intent'
|
250
|
+
require 'turnkey_client/models/otp_auth_request'
|
251
|
+
require 'turnkey_client/models/otp_auth_result'
|
242
252
|
require 'turnkey_client/models/pagination'
|
243
253
|
require 'turnkey_client/models/path_format'
|
244
254
|
require 'turnkey_client/models/payload_encoding'
|
@@ -259,6 +269,7 @@ require 'turnkey_client/models/result'
|
|
259
269
|
require 'turnkey_client/models/root_user_params'
|
260
270
|
require 'turnkey_client/models/root_user_params_v2'
|
261
271
|
require 'turnkey_client/models/root_user_params_v3'
|
272
|
+
require 'turnkey_client/models/root_user_params_v4'
|
262
273
|
require 'turnkey_client/models/selector'
|
263
274
|
require 'turnkey_client/models/selector_v2'
|
264
275
|
require 'turnkey_client/models/set_organization_feature_intent'
|
@@ -279,6 +290,7 @@ require 'turnkey_client/models/sign_transaction_intent_v2'
|
|
279
290
|
require 'turnkey_client/models/sign_transaction_request'
|
280
291
|
require 'turnkey_client/models/sign_transaction_result'
|
281
292
|
require 'turnkey_client/models/simple_client_extension_results'
|
293
|
+
require 'turnkey_client/models/sms_customization_params'
|
282
294
|
require 'turnkey_client/models/status'
|
283
295
|
require 'turnkey_client/models/tag_type'
|
284
296
|
require 'turnkey_client/models/transaction_type'
|
@@ -299,6 +311,9 @@ require 'turnkey_client/models/update_user_result'
|
|
299
311
|
require 'turnkey_client/models/update_user_tag_intent'
|
300
312
|
require 'turnkey_client/models/update_user_tag_request'
|
301
313
|
require 'turnkey_client/models/update_user_tag_result'
|
314
|
+
require 'turnkey_client/models/update_wallet_intent'
|
315
|
+
require 'turnkey_client/models/update_wallet_request'
|
316
|
+
require 'turnkey_client/models/update_wallet_result'
|
302
317
|
require 'turnkey_client/models/user'
|
303
318
|
require 'turnkey_client/models/user_params'
|
304
319
|
require 'turnkey_client/models/user_params_v2'
|
Binary file
|