turnkey_client 0.0.8 → 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 +118 -2
- data/lib/turnkey_client/api/private_keys_api.rb +2 -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 +60 -2
- data/lib/turnkey_client/models/activity_type.rb +6 -0
- data/lib/turnkey_client/models/address_format.rb +29 -0
- data/lib/turnkey_client/models/create_read_write_session_intent_v2.rb +241 -0
- data/lib/turnkey_client/models/create_read_write_session_request.rb +2 -2
- data/lib/turnkey_client/models/create_read_write_session_result_v2.rb +286 -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/delete_sub_organization_intent.rb +206 -0
- data/lib/turnkey_client/models/delete_sub_organization_request.rb +288 -0
- data/lib/turnkey_client/models/delete_sub_organization_result.rb +211 -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 +58 -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 +58 -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/transaction_type.rb +2 -1
- 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 +20 -0
- data/turnkey_client-0.0.8.gem +0 -0
- data/turnkey_client-0.0.9.gem +0 -0
- metadata +24 -2
@@ -0,0 +1,282 @@
|
|
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 RootUserParamsV4
|
15
|
+
# Human-readable name for a User.
|
16
|
+
attr_accessor :user_name
|
17
|
+
|
18
|
+
# The user's email address.
|
19
|
+
attr_accessor :user_email
|
20
|
+
|
21
|
+
# The user's phone number in E.164 format e.g. +13214567890
|
22
|
+
attr_accessor :user_phone_number
|
23
|
+
|
24
|
+
# A list of API Key parameters.
|
25
|
+
attr_accessor :api_keys
|
26
|
+
|
27
|
+
# A list of Authenticator parameters.
|
28
|
+
attr_accessor :authenticators
|
29
|
+
|
30
|
+
# A list of Oauth providers.
|
31
|
+
attr_accessor :oauth_providers
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'user_name' => :'userName',
|
37
|
+
:'user_email' => :'userEmail',
|
38
|
+
:'user_phone_number' => :'userPhoneNumber',
|
39
|
+
:'api_keys' => :'apiKeys',
|
40
|
+
:'authenticators' => :'authenticators',
|
41
|
+
:'oauth_providers' => :'oauthProviders'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.openapi_types
|
47
|
+
{
|
48
|
+
:'user_name' => :'Object',
|
49
|
+
:'user_email' => :'Object',
|
50
|
+
:'user_phone_number' => :'Object',
|
51
|
+
:'api_keys' => :'Object',
|
52
|
+
:'authenticators' => :'Object',
|
53
|
+
:'oauth_providers' => :'Object'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# List of attributes with nullable: true
|
58
|
+
def self.openapi_nullable
|
59
|
+
Set.new([
|
60
|
+
])
|
61
|
+
end
|
62
|
+
|
63
|
+
# Initializes the object
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
65
|
+
def initialize(attributes = {})
|
66
|
+
if (!attributes.is_a?(Hash))
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::RootUserParamsV4` initialize method"
|
68
|
+
end
|
69
|
+
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
72
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::RootUserParamsV4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
74
|
+
end
|
75
|
+
h[k.to_sym] = v
|
76
|
+
}
|
77
|
+
|
78
|
+
if attributes.key?(:'user_name')
|
79
|
+
self.user_name = attributes[:'user_name']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'user_email')
|
83
|
+
self.user_email = attributes[:'user_email']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'user_phone_number')
|
87
|
+
self.user_phone_number = attributes[:'user_phone_number']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'api_keys')
|
91
|
+
if (value = attributes[:'api_keys']).is_a?(Array)
|
92
|
+
self.api_keys = value
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.key?(:'authenticators')
|
97
|
+
if (value = attributes[:'authenticators']).is_a?(Array)
|
98
|
+
self.authenticators = value
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'oauth_providers')
|
103
|
+
if (value = attributes[:'oauth_providers']).is_a?(Array)
|
104
|
+
self.oauth_providers = value
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
110
|
+
# @return Array for valid properties with the reasons
|
111
|
+
def list_invalid_properties
|
112
|
+
invalid_properties = Array.new
|
113
|
+
if @user_name.nil?
|
114
|
+
invalid_properties.push('invalid value for "user_name", user_name cannot be nil.')
|
115
|
+
end
|
116
|
+
|
117
|
+
if @api_keys.nil?
|
118
|
+
invalid_properties.push('invalid value for "api_keys", api_keys cannot be nil.')
|
119
|
+
end
|
120
|
+
|
121
|
+
if @authenticators.nil?
|
122
|
+
invalid_properties.push('invalid value for "authenticators", authenticators cannot be nil.')
|
123
|
+
end
|
124
|
+
|
125
|
+
if @oauth_providers.nil?
|
126
|
+
invalid_properties.push('invalid value for "oauth_providers", oauth_providers cannot be nil.')
|
127
|
+
end
|
128
|
+
|
129
|
+
invalid_properties
|
130
|
+
end
|
131
|
+
|
132
|
+
# Check to see if the all the properties in the model are valid
|
133
|
+
# @return true if the model is valid
|
134
|
+
def valid?
|
135
|
+
return false if @user_name.nil?
|
136
|
+
return false if @api_keys.nil?
|
137
|
+
return false if @authenticators.nil?
|
138
|
+
return false if @oauth_providers.nil?
|
139
|
+
true
|
140
|
+
end
|
141
|
+
|
142
|
+
# Checks equality by comparing each attribute.
|
143
|
+
# @param [Object] Object to be compared
|
144
|
+
def ==(o)
|
145
|
+
return true if self.equal?(o)
|
146
|
+
self.class == o.class &&
|
147
|
+
user_name == o.user_name &&
|
148
|
+
user_email == o.user_email &&
|
149
|
+
user_phone_number == o.user_phone_number &&
|
150
|
+
api_keys == o.api_keys &&
|
151
|
+
authenticators == o.authenticators &&
|
152
|
+
oauth_providers == o.oauth_providers
|
153
|
+
end
|
154
|
+
|
155
|
+
# @see the `==` method
|
156
|
+
# @param [Object] Object to be compared
|
157
|
+
def eql?(o)
|
158
|
+
self == o
|
159
|
+
end
|
160
|
+
|
161
|
+
# Calculates hash code according to all attributes.
|
162
|
+
# @return [Integer] Hash code
|
163
|
+
def hash
|
164
|
+
[user_name, user_email, user_phone_number, api_keys, authenticators, oauth_providers].hash
|
165
|
+
end
|
166
|
+
|
167
|
+
# Builds the object from hash
|
168
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
169
|
+
# @return [Object] Returns the model itself
|
170
|
+
def self.build_from_hash(attributes)
|
171
|
+
new.build_from_hash(attributes)
|
172
|
+
end
|
173
|
+
|
174
|
+
# Builds the object from hash
|
175
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
176
|
+
# @return [Object] Returns the model itself
|
177
|
+
def build_from_hash(attributes)
|
178
|
+
return nil unless attributes.is_a?(Hash)
|
179
|
+
self.class.openapi_types.each_pair do |key, type|
|
180
|
+
if type =~ /\AArray<(.*)>/i
|
181
|
+
# check to ensure the input is an array given that the attribute
|
182
|
+
# is documented as an array but the input is not
|
183
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
184
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
185
|
+
end
|
186
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
187
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
188
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
189
|
+
self.send("#{key}=", nil)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
self
|
194
|
+
end
|
195
|
+
|
196
|
+
# Deserializes the data based on type
|
197
|
+
# @param string type Data type
|
198
|
+
# @param string value Value to be deserialized
|
199
|
+
# @return [Object] Deserialized data
|
200
|
+
def _deserialize(type, value)
|
201
|
+
case type.to_sym
|
202
|
+
when :DateTime
|
203
|
+
DateTime.parse(value)
|
204
|
+
when :Date
|
205
|
+
Date.parse(value)
|
206
|
+
when :String
|
207
|
+
value.to_s
|
208
|
+
when :Integer
|
209
|
+
value.to_i
|
210
|
+
when :Float
|
211
|
+
value.to_f
|
212
|
+
when :Boolean
|
213
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
214
|
+
true
|
215
|
+
else
|
216
|
+
false
|
217
|
+
end
|
218
|
+
when :Object
|
219
|
+
# generic object (usually a Hash), return directly
|
220
|
+
value
|
221
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
222
|
+
inner_type = Regexp.last_match[:inner_type]
|
223
|
+
value.map { |v| _deserialize(inner_type, v) }
|
224
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
225
|
+
k_type = Regexp.last_match[:k_type]
|
226
|
+
v_type = Regexp.last_match[:v_type]
|
227
|
+
{}.tap do |hash|
|
228
|
+
value.each do |k, v|
|
229
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
230
|
+
end
|
231
|
+
end
|
232
|
+
else # model
|
233
|
+
TurnkeyClient.const_get(type).build_from_hash(value)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
# Returns the string representation of the object
|
238
|
+
# @return [String] String presentation of the object
|
239
|
+
def to_s
|
240
|
+
to_hash.to_s
|
241
|
+
end
|
242
|
+
|
243
|
+
# to_body is an alias to to_hash (backward compatibility)
|
244
|
+
# @return [Hash] Returns the object in the form of hash
|
245
|
+
def to_body
|
246
|
+
to_hash
|
247
|
+
end
|
248
|
+
|
249
|
+
# Returns the object in the form of hash
|
250
|
+
# @return [Hash] Returns the object in the form of hash
|
251
|
+
def to_hash
|
252
|
+
hash = {}
|
253
|
+
self.class.attribute_map.each_pair do |attr, param|
|
254
|
+
value = self.send(attr)
|
255
|
+
if value.nil?
|
256
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
257
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
258
|
+
end
|
259
|
+
|
260
|
+
hash[param] = _to_hash(value)
|
261
|
+
end
|
262
|
+
hash
|
263
|
+
end
|
264
|
+
|
265
|
+
# Outputs non-array value in the form of hash
|
266
|
+
# For object, use to_hash. Otherwise, just return the value
|
267
|
+
# @param [Object] value Any valid value
|
268
|
+
# @return [Hash] Returns the value in the form of hash
|
269
|
+
def _to_hash(value)
|
270
|
+
if value.is_a?(Array)
|
271
|
+
value.compact.map { |v| _to_hash(v) }
|
272
|
+
elsif value.is_a?(Hash)
|
273
|
+
{}.tap do |hash|
|
274
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
275
|
+
end
|
276
|
+
elsif value.respond_to? :to_hash
|
277
|
+
value.to_hash
|
278
|
+
else
|
279
|
+
value
|
280
|
+
end
|
281
|
+
end end
|
282
|
+
end
|
@@ -0,0 +1,206 @@
|
|
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 SmsCustomizationParams
|
15
|
+
# Template containing references to .OtpCode i.e Your OTP is {{.OtpCode}}
|
16
|
+
attr_accessor :template
|
17
|
+
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
19
|
+
def self.attribute_map
|
20
|
+
{
|
21
|
+
:'template' => :'template'
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
# Attribute type mapping.
|
26
|
+
def self.openapi_types
|
27
|
+
{
|
28
|
+
:'template' => :'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::SmsCustomizationParams` 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::SmsCustomizationParams`. 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?(:'template')
|
54
|
+
self.template = attributes[:'template']
|
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
|
+
invalid_properties
|
63
|
+
end
|
64
|
+
|
65
|
+
# Check to see if the all the properties in the model are valid
|
66
|
+
# @return true if the model is valid
|
67
|
+
def valid?
|
68
|
+
true
|
69
|
+
end
|
70
|
+
|
71
|
+
# Checks equality by comparing each attribute.
|
72
|
+
# @param [Object] Object to be compared
|
73
|
+
def ==(o)
|
74
|
+
return true if self.equal?(o)
|
75
|
+
self.class == o.class &&
|
76
|
+
template == o.template
|
77
|
+
end
|
78
|
+
|
79
|
+
# @see the `==` method
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def eql?(o)
|
82
|
+
self == o
|
83
|
+
end
|
84
|
+
|
85
|
+
# Calculates hash code according to all attributes.
|
86
|
+
# @return [Integer] Hash code
|
87
|
+
def hash
|
88
|
+
[template].hash
|
89
|
+
end
|
90
|
+
|
91
|
+
# Builds the object from hash
|
92
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
93
|
+
# @return [Object] Returns the model itself
|
94
|
+
def self.build_from_hash(attributes)
|
95
|
+
new.build_from_hash(attributes)
|
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 build_from_hash(attributes)
|
102
|
+
return nil unless attributes.is_a?(Hash)
|
103
|
+
self.class.openapi_types.each_pair do |key, type|
|
104
|
+
if type =~ /\AArray<(.*)>/i
|
105
|
+
# check to ensure the input is an array given that the attribute
|
106
|
+
# is documented as an array but the input is not
|
107
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
108
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
109
|
+
end
|
110
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
111
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
112
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
113
|
+
self.send("#{key}=", nil)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
self
|
118
|
+
end
|
119
|
+
|
120
|
+
# Deserializes the data based on type
|
121
|
+
# @param string type Data type
|
122
|
+
# @param string value Value to be deserialized
|
123
|
+
# @return [Object] Deserialized data
|
124
|
+
def _deserialize(type, value)
|
125
|
+
case type.to_sym
|
126
|
+
when :DateTime
|
127
|
+
DateTime.parse(value)
|
128
|
+
when :Date
|
129
|
+
Date.parse(value)
|
130
|
+
when :String
|
131
|
+
value.to_s
|
132
|
+
when :Integer
|
133
|
+
value.to_i
|
134
|
+
when :Float
|
135
|
+
value.to_f
|
136
|
+
when :Boolean
|
137
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
138
|
+
true
|
139
|
+
else
|
140
|
+
false
|
141
|
+
end
|
142
|
+
when :Object
|
143
|
+
# generic object (usually a Hash), return directly
|
144
|
+
value
|
145
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
146
|
+
inner_type = Regexp.last_match[:inner_type]
|
147
|
+
value.map { |v| _deserialize(inner_type, v) }
|
148
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
149
|
+
k_type = Regexp.last_match[:k_type]
|
150
|
+
v_type = Regexp.last_match[:v_type]
|
151
|
+
{}.tap do |hash|
|
152
|
+
value.each do |k, v|
|
153
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
else # model
|
157
|
+
TurnkeyClient.const_get(type).build_from_hash(value)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# Returns the string representation of the object
|
162
|
+
# @return [String] String presentation of the object
|
163
|
+
def to_s
|
164
|
+
to_hash.to_s
|
165
|
+
end
|
166
|
+
|
167
|
+
# to_body is an alias to to_hash (backward compatibility)
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
169
|
+
def to_body
|
170
|
+
to_hash
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the object in the form of hash
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
175
|
+
def to_hash
|
176
|
+
hash = {}
|
177
|
+
self.class.attribute_map.each_pair do |attr, param|
|
178
|
+
value = self.send(attr)
|
179
|
+
if value.nil?
|
180
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
181
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
182
|
+
end
|
183
|
+
|
184
|
+
hash[param] = _to_hash(value)
|
185
|
+
end
|
186
|
+
hash
|
187
|
+
end
|
188
|
+
|
189
|
+
# Outputs non-array value in the form of hash
|
190
|
+
# For object, use to_hash. Otherwise, just return the value
|
191
|
+
# @param [Object] value Any valid value
|
192
|
+
# @return [Hash] Returns the value in the form of hash
|
193
|
+
def _to_hash(value)
|
194
|
+
if value.is_a?(Array)
|
195
|
+
value.compact.map { |v| _to_hash(v) }
|
196
|
+
elsif value.is_a?(Hash)
|
197
|
+
{}.tap do |hash|
|
198
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
199
|
+
end
|
200
|
+
elsif value.respond_to? :to_hash
|
201
|
+
value.to_hash
|
202
|
+
else
|
203
|
+
value
|
204
|
+
end
|
205
|
+
end end
|
206
|
+
end
|
@@ -12,7 +12,8 @@ require 'date'
|
|
12
12
|
|
13
13
|
module TurnkeyClient
|
14
14
|
class TransactionType
|
15
|
-
|
15
|
+
ETHEREUM = 'TRANSACTION_TYPE_ETHEREUM'.freeze
|
16
|
+
SOLANA = 'TRANSACTION_TYPE_SOLANA'.freeze
|
16
17
|
|
17
18
|
# Builds the enum from string
|
18
19
|
# @param [String] The enum value in the form of the string
|
@@ -24,13 +24,17 @@ module TurnkeyClient
|
|
24
24
|
# An updated list of User Tags to apply to this User.
|
25
25
|
attr_accessor :user_tag_ids
|
26
26
|
|
27
|
+
# The user's phone number in E.164 format e.g. +13214567890
|
28
|
+
attr_accessor :user_phone_number
|
29
|
+
|
27
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
31
|
def self.attribute_map
|
29
32
|
{
|
30
33
|
:'user_id' => :'userId',
|
31
34
|
:'user_name' => :'userName',
|
32
35
|
:'user_email' => :'userEmail',
|
33
|
-
:'user_tag_ids' => :'userTagIds'
|
36
|
+
:'user_tag_ids' => :'userTagIds',
|
37
|
+
:'user_phone_number' => :'userPhoneNumber'
|
34
38
|
}
|
35
39
|
end
|
36
40
|
|
@@ -40,7 +44,8 @@ module TurnkeyClient
|
|
40
44
|
:'user_id' => :'Object',
|
41
45
|
:'user_name' => :'Object',
|
42
46
|
:'user_email' => :'Object',
|
43
|
-
:'user_tag_ids' => :'Object'
|
47
|
+
:'user_tag_ids' => :'Object',
|
48
|
+
:'user_phone_number' => :'Object'
|
44
49
|
}
|
45
50
|
end
|
46
51
|
|
@@ -82,6 +87,10 @@ module TurnkeyClient
|
|
82
87
|
self.user_tag_ids = value
|
83
88
|
end
|
84
89
|
end
|
90
|
+
|
91
|
+
if attributes.key?(:'user_phone_number')
|
92
|
+
self.user_phone_number = attributes[:'user_phone_number']
|
93
|
+
end
|
85
94
|
end
|
86
95
|
|
87
96
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -110,7 +119,8 @@ module TurnkeyClient
|
|
110
119
|
user_id == o.user_id &&
|
111
120
|
user_name == o.user_name &&
|
112
121
|
user_email == o.user_email &&
|
113
|
-
user_tag_ids == o.user_tag_ids
|
122
|
+
user_tag_ids == o.user_tag_ids &&
|
123
|
+
user_phone_number == o.user_phone_number
|
114
124
|
end
|
115
125
|
|
116
126
|
# @see the `==` method
|
@@ -122,7 +132,7 @@ module TurnkeyClient
|
|
122
132
|
# Calculates hash code according to all attributes.
|
123
133
|
# @return [Integer] Hash code
|
124
134
|
def hash
|
125
|
-
[user_id, user_name, user_email, user_tag_ids].hash
|
135
|
+
[user_id, user_name, user_email, user_tag_ids, user_phone_number].hash
|
126
136
|
end
|
127
137
|
|
128
138
|
# Builds the object from hash
|