telvri_security 1.0.0

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.
@@ -0,0 +1,201 @@
1
+ =begin
2
+ #Telvri Security API Gateway
3
+
4
+ #Developer-first Identity and Security Platform for real-time telco fraud mitigation, including SIM-swap intelligence for trusted application workflows.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TelvriSecurity
17
+ class LoginDto < ApiModelBase
18
+ # Developer account email address.
19
+ attr_accessor :email
20
+
21
+ # Account password.
22
+ attr_accessor :password
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'email' => :'email',
28
+ :'password' => :'password'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'email' => :'String',
46
+ :'password' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TelvriSecurity::LoginDto` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TelvriSecurity::LoginDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'email')
73
+ self.email = attributes[:'email']
74
+ else
75
+ self.email = nil
76
+ end
77
+
78
+ if attributes.key?(:'password')
79
+ self.password = attributes[:'password']
80
+ else
81
+ self.password = nil
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
+ invalid_properties = Array.new
90
+ if @email.nil?
91
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
92
+ end
93
+
94
+ if @password.nil?
95
+ invalid_properties.push('invalid value for "password", password cannot be nil.')
96
+ end
97
+
98
+ if @password.to_s.length < 8
99
+ invalid_properties.push('invalid value for "password", the character length must be greater than or equal to 8.')
100
+ end
101
+
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
109
+ return false if @email.nil?
110
+ return false if @password.nil?
111
+ return false if @password.to_s.length < 8
112
+ true
113
+ end
114
+
115
+ # Custom attribute writer method with validation
116
+ # @param [Object] email Value to be assigned
117
+ def email=(email)
118
+ if email.nil?
119
+ fail ArgumentError, 'email cannot be nil'
120
+ end
121
+
122
+ @email = email
123
+ end
124
+
125
+ # Custom attribute writer method with validation
126
+ # @param [Object] password Value to be assigned
127
+ def password=(password)
128
+ if password.nil?
129
+ fail ArgumentError, 'password cannot be nil'
130
+ end
131
+
132
+ if password.to_s.length < 8
133
+ fail ArgumentError, 'invalid value for "password", the character length must be greater than or equal to 8.'
134
+ end
135
+
136
+ @password = password
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ email == o.email &&
145
+ password == o.password
146
+ end
147
+
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Integer] Hash code
156
+ def hash
157
+ [email, password].hash
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def self.build_from_hash(attributes)
164
+ return nil unless attributes.is_a?(Hash)
165
+ attributes = attributes.transform_keys(&:to_sym)
166
+ transformed_hash = {}
167
+ openapi_types.each_pair do |key, type|
168
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = nil
170
+ elsif type =~ /\AArray<(.*)>/i
171
+ # check to ensure the input is an array given that the attribute
172
+ # is documented as an array but the input is not
173
+ if attributes[attribute_map[key]].is_a?(Array)
174
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
175
+ end
176
+ elsif !attributes[attribute_map[key]].nil?
177
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
178
+ end
179
+ end
180
+ new(transformed_hash)
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ end
200
+
201
+ end
@@ -0,0 +1,274 @@
1
+ =begin
2
+ #Telvri Security API Gateway
3
+
4
+ #Developer-first Identity and Security Platform for real-time telco fraud mitigation, including SIM-swap intelligence for trusted application workflows.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TelvriSecurity
17
+ class SignupDto < ApiModelBase
18
+ # Full name for the developer account.
19
+ attr_accessor :full_name
20
+
21
+ # Work email used for dashboard access and API key delivery.
22
+ attr_accessor :email
23
+
24
+ # Company or team name.
25
+ attr_accessor :company
26
+
27
+ # Account password.
28
+ attr_accessor :password
29
+
30
+ # Password confirmation.
31
+ attr_accessor :confirm_password
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'full_name' => :'fullName',
37
+ :'email' => :'email',
38
+ :'company' => :'company',
39
+ :'password' => :'password',
40
+ :'confirm_password' => :'confirmPassword'
41
+ }
42
+ end
43
+
44
+ # Returns attribute mapping this model knows about
45
+ def self.acceptable_attribute_map
46
+ attribute_map
47
+ end
48
+
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ acceptable_attribute_map.values
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.openapi_types
56
+ {
57
+ :'full_name' => :'String',
58
+ :'email' => :'String',
59
+ :'company' => :'String',
60
+ :'password' => :'String',
61
+ :'confirm_password' => :'String'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TelvriSecurity::SignupDto` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ acceptable_attribute_map = self.class.acceptable_attribute_map
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!acceptable_attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TelvriSecurity::SignupDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'full_name')
88
+ self.full_name = attributes[:'full_name']
89
+ else
90
+ self.full_name = nil
91
+ end
92
+
93
+ if attributes.key?(:'email')
94
+ self.email = attributes[:'email']
95
+ else
96
+ self.email = nil
97
+ end
98
+
99
+ if attributes.key?(:'company')
100
+ self.company = attributes[:'company']
101
+ end
102
+
103
+ if attributes.key?(:'password')
104
+ self.password = attributes[:'password']
105
+ else
106
+ self.password = nil
107
+ end
108
+
109
+ if attributes.key?(:'confirm_password')
110
+ self.confirm_password = attributes[:'confirm_password']
111
+ else
112
+ self.confirm_password = nil
113
+ end
114
+ end
115
+
116
+ # Show invalid properties with the reasons. Usually used together with valid?
117
+ # @return Array for valid properties with the reasons
118
+ def list_invalid_properties
119
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
120
+ invalid_properties = Array.new
121
+ if @full_name.nil?
122
+ invalid_properties.push('invalid value for "full_name", full_name cannot be nil.')
123
+ end
124
+
125
+ if @email.nil?
126
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
127
+ end
128
+
129
+ if @password.nil?
130
+ invalid_properties.push('invalid value for "password", password cannot be nil.')
131
+ end
132
+
133
+ if @password.to_s.length < 8
134
+ invalid_properties.push('invalid value for "password", the character length must be greater than or equal to 8.')
135
+ end
136
+
137
+ if @confirm_password.nil?
138
+ invalid_properties.push('invalid value for "confirm_password", confirm_password cannot be nil.')
139
+ end
140
+
141
+ if @confirm_password.to_s.length < 8
142
+ invalid_properties.push('invalid value for "confirm_password", the character length must be greater than or equal to 8.')
143
+ end
144
+
145
+ invalid_properties
146
+ end
147
+
148
+ # Check to see if the all the properties in the model are valid
149
+ # @return true if the model is valid
150
+ def valid?
151
+ warn '[DEPRECATED] the `valid?` method is obsolete'
152
+ return false if @full_name.nil?
153
+ return false if @email.nil?
154
+ return false if @password.nil?
155
+ return false if @password.to_s.length < 8
156
+ return false if @confirm_password.nil?
157
+ return false if @confirm_password.to_s.length < 8
158
+ true
159
+ end
160
+
161
+ # Custom attribute writer method with validation
162
+ # @param [Object] full_name Value to be assigned
163
+ def full_name=(full_name)
164
+ if full_name.nil?
165
+ fail ArgumentError, 'full_name cannot be nil'
166
+ end
167
+
168
+ @full_name = full_name
169
+ end
170
+
171
+ # Custom attribute writer method with validation
172
+ # @param [Object] email Value to be assigned
173
+ def email=(email)
174
+ if email.nil?
175
+ fail ArgumentError, 'email cannot be nil'
176
+ end
177
+
178
+ @email = email
179
+ end
180
+
181
+ # Custom attribute writer method with validation
182
+ # @param [Object] password Value to be assigned
183
+ def password=(password)
184
+ if password.nil?
185
+ fail ArgumentError, 'password cannot be nil'
186
+ end
187
+
188
+ if password.to_s.length < 8
189
+ fail ArgumentError, 'invalid value for "password", the character length must be greater than or equal to 8.'
190
+ end
191
+
192
+ @password = password
193
+ end
194
+
195
+ # Custom attribute writer method with validation
196
+ # @param [Object] confirm_password Value to be assigned
197
+ def confirm_password=(confirm_password)
198
+ if confirm_password.nil?
199
+ fail ArgumentError, 'confirm_password cannot be nil'
200
+ end
201
+
202
+ if confirm_password.to_s.length < 8
203
+ fail ArgumentError, 'invalid value for "confirm_password", the character length must be greater than or equal to 8.'
204
+ end
205
+
206
+ @confirm_password = confirm_password
207
+ end
208
+
209
+ # Checks equality by comparing each attribute.
210
+ # @param [Object] Object to be compared
211
+ def ==(o)
212
+ return true if self.equal?(o)
213
+ self.class == o.class &&
214
+ full_name == o.full_name &&
215
+ email == o.email &&
216
+ company == o.company &&
217
+ password == o.password &&
218
+ confirm_password == o.confirm_password
219
+ end
220
+
221
+ # @see the `==` method
222
+ # @param [Object] Object to be compared
223
+ def eql?(o)
224
+ self == o
225
+ end
226
+
227
+ # Calculates hash code according to all attributes.
228
+ # @return [Integer] Hash code
229
+ def hash
230
+ [full_name, email, company, password, confirm_password].hash
231
+ end
232
+
233
+ # Builds the object from hash
234
+ # @param [Hash] attributes Model attributes in the form of hash
235
+ # @return [Object] Returns the model itself
236
+ def self.build_from_hash(attributes)
237
+ return nil unless attributes.is_a?(Hash)
238
+ attributes = attributes.transform_keys(&:to_sym)
239
+ transformed_hash = {}
240
+ openapi_types.each_pair do |key, type|
241
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
242
+ transformed_hash["#{key}"] = nil
243
+ elsif type =~ /\AArray<(.*)>/i
244
+ # check to ensure the input is an array given that the attribute
245
+ # is documented as an array but the input is not
246
+ if attributes[attribute_map[key]].is_a?(Array)
247
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
248
+ end
249
+ elsif !attributes[attribute_map[key]].nil?
250
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
251
+ end
252
+ end
253
+ new(transformed_hash)
254
+ end
255
+
256
+ # Returns the object in the form of hash
257
+ # @return [Hash] Returns the object in the form of hash
258
+ def to_hash
259
+ hash = {}
260
+ self.class.attribute_map.each_pair do |attr, param|
261
+ value = self.send(attr)
262
+ if value.nil?
263
+ is_nullable = self.class.openapi_nullable.include?(attr)
264
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
265
+ end
266
+
267
+ hash[param] = _to_hash(value)
268
+ end
269
+ hash
270
+ end
271
+
272
+ end
273
+
274
+ end