Class: SyncteraRubySdk::BasePerson1
- Inherits:
-
Object
- Object
- SyncteraRubySdk::BasePerson1
- Defined in:
- lib/synctera_ruby_sdk/models/base_person1.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#ban_status ⇒ Object
Returns the value of attribute ban_status.
-
#chosen_name ⇒ Object
Person’s chosen name.
-
#creation_time ⇒ Object
The date and time the resource was created.
-
#dob ⇒ Object
Person’s date of birth in RFC 3339 full-date format (YYYY-MM-DD).
-
#email ⇒ Object
Person’s email.
-
#first_name ⇒ Object
Person’s first name.
-
#has_accounts ⇒ Object
This flag indicates whether the person or business has accounts.
-
#id ⇒ Object
Person’s unique identifier.
-
#is_customer ⇒ Object
True for personal and business customers with a direct relationship with the fintech or bank.
-
#last_name ⇒ Object
Person’s last name.
-
#last_updated_time ⇒ Object
The date and time the resource was last updated.
-
#legal_address ⇒ Object
Returns the value of attribute legal_address.
-
#metadata ⇒ Object
Optional field to store additional information about the resource.
-
#middle_name ⇒ Object
Person’s middle name.
-
#phone_number ⇒ Object
Person’s mobile phone number with country code in E.164 format.
-
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
-
#ssn ⇒ Object
Person’s full tax ID eg SSN formatted with hyphens.
-
#ssn_source ⇒ Object
Returns the value of attribute ssn_source.
-
#status ⇒ Object
Returns the value of attribute status.
-
#tenant ⇒ Object
The id of the tenant containing the resource.
-
#verification_last_run ⇒ Object
Date and time KYC verification was last run on the person.
-
#verification_status ⇒ Object
Returns the value of attribute verification_status.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ BasePerson1
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ BasePerson1
Initializes the object
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 169 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `SyncteraRubySdk::BasePerson1` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `SyncteraRubySdk::BasePerson1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'ban_status') self.ban_status = attributes[:'ban_status'] end if attributes.key?(:'chosen_name') self.chosen_name = attributes[:'chosen_name'] end if attributes.key?(:'creation_time') self.creation_time = attributes[:'creation_time'] end if attributes.key?(:'dob') self.dob = attributes[:'dob'] end if attributes.key?(:'email') self.email = attributes[:'email'] end if attributes.key?(:'first_name') self.first_name = attributes[:'first_name'] end if attributes.key?(:'has_accounts') self.has_accounts = attributes[:'has_accounts'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'is_customer') self.is_customer = attributes[:'is_customer'] end if attributes.key?(:'last_name') self.last_name = attributes[:'last_name'] end if attributes.key?(:'last_updated_time') self.last_updated_time = attributes[:'last_updated_time'] end if attributes.key?(:'legal_address') self.legal_address = attributes[:'legal_address'] end if attributes.key?(:'metadata') self. = attributes[:'metadata'] end if attributes.key?(:'middle_name') self.middle_name = attributes[:'middle_name'] end if attributes.key?(:'phone_number') self.phone_number = attributes[:'phone_number'] end if attributes.key?(:'shipping_address') self.shipping_address = attributes[:'shipping_address'] end if attributes.key?(:'ssn') self.ssn = attributes[:'ssn'] end if attributes.key?(:'ssn_source') self.ssn_source = attributes[:'ssn_source'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'tenant') self.tenant = attributes[:'tenant'] end if attributes.key?(:'verification_last_run') self.verification_last_run = attributes[:'verification_last_run'] end if attributes.key?(:'verification_status') self.verification_status = attributes[:'verification_status'] end end |
Instance Attribute Details
#ban_status ⇒ Object
Returns the value of attribute ban_status.
18 19 20 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 18 def ban_status @ban_status end |
#chosen_name ⇒ Object
Person’s chosen name.
21 22 23 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 21 def chosen_name @chosen_name end |
#creation_time ⇒ Object
The date and time the resource was created.
24 25 26 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 24 def creation_time @creation_time end |
#dob ⇒ Object
Person’s date of birth in RFC 3339 full-date format (YYYY-MM-DD).
27 28 29 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 27 def dob @dob end |
#email ⇒ Object
Person’s email.
30 31 32 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 30 def email @email end |
#first_name ⇒ Object
Person’s first name.
33 34 35 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 33 def first_name @first_name end |
#has_accounts ⇒ Object
This flag indicates whether the person or business has accounts.
36 37 38 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 36 def has_accounts @has_accounts end |
#id ⇒ Object
Person’s unique identifier.
39 40 41 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 39 def id @id end |
#is_customer ⇒ Object
True for personal and business customers with a direct relationship with the fintech or bank. Set this to true for any customer related to an account.
42 43 44 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 42 def is_customer @is_customer end |
#last_name ⇒ Object
Person’s last name.
45 46 47 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 45 def last_name @last_name end |
#last_updated_time ⇒ Object
The date and time the resource was last updated.
48 49 50 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 48 def last_updated_time @last_updated_time end |
#legal_address ⇒ Object
Returns the value of attribute legal_address.
50 51 52 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 50 def legal_address @legal_address end |
#metadata ⇒ Object
Optional field to store additional information about the resource. Intended to be used by the integrator to store non-sensitive data.
53 54 55 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 53 def @metadata end |
#middle_name ⇒ Object
Person’s middle name.
56 57 58 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 56 def middle_name @middle_name end |
#phone_number ⇒ Object
Person’s mobile phone number with country code in E.164 format. Must have a valid country code. Area code and local phone number are not validated
59 60 61 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 59 def phone_number @phone_number end |
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
61 62 63 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 61 def shipping_address @shipping_address end |
#ssn ⇒ Object
Person’s full tax ID eg SSN formatted with hyphens. The response contains the last 4 digits only (e.g. 6789).
64 65 66 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 64 def ssn @ssn end |
#ssn_source ⇒ Object
Returns the value of attribute ssn_source.
66 67 68 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 66 def ssn_source @ssn_source end |
#status ⇒ Object
Returns the value of attribute status.
68 69 70 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 68 def status @status end |
#tenant ⇒ Object
The id of the tenant containing the resource. This is relevant for Fintechs that have multiple workspaces.
71 72 73 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 71 def tenant @tenant end |
#verification_last_run ⇒ Object
Date and time KYC verification was last run on the person.
74 75 76 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 74 def verification_last_run @verification_last_run end |
#verification_status ⇒ Object
Returns the value of attribute verification_status.
76 77 78 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 76 def verification_status @verification_status end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
129 130 131 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 129 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 101 def self.attribute_map { :'ban_status' => :'ban_status', :'chosen_name' => :'chosen_name', :'creation_time' => :'creation_time', :'dob' => :'dob', :'email' => :'email', :'first_name' => :'first_name', :'has_accounts' => :'has_accounts', :'id' => :'id', :'is_customer' => :'is_customer', :'last_name' => :'last_name', :'last_updated_time' => :'last_updated_time', :'legal_address' => :'legal_address', :'metadata' => :'metadata', :'middle_name' => :'middle_name', :'phone_number' => :'phone_number', :'shipping_address' => :'shipping_address', :'ssn' => :'ssn', :'ssn_source' => :'ssn_source', :'status' => :'status', :'tenant' => :'tenant', :'verification_last_run' => :'verification_last_run', :'verification_status' => :'verification_status' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
345 346 347 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 345 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
162 163 164 165 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 162 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 134 def self.openapi_types { :'ban_status' => :'BanStatus', :'chosen_name' => :'String', :'creation_time' => :'Time', :'dob' => :'Date', :'email' => :'String', :'first_name' => :'String', :'has_accounts' => :'Boolean', :'id' => :'String', :'is_customer' => :'Boolean', :'last_name' => :'String', :'last_updated_time' => :'Time', :'legal_address' => :'LegalAddress', :'metadata' => :'Object', :'middle_name' => :'String', :'phone_number' => :'String', :'shipping_address' => :'ShippingAddress', :'ssn' => :'String', :'ssn_source' => :'SsnSource', :'status' => :'Status2', :'tenant' => :'String', :'verification_last_run' => :'Time', :'verification_status' => :'VerificationStatus' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 303 def ==(o) return true if self.equal?(o) self.class == o.class && ban_status == o.ban_status && chosen_name == o.chosen_name && creation_time == o.creation_time && dob == o.dob && email == o.email && first_name == o.first_name && has_accounts == o.has_accounts && id == o.id && is_customer == o.is_customer && last_name == o.last_name && last_updated_time == o.last_updated_time && legal_address == o.legal_address && == o. && middle_name == o.middle_name && phone_number == o.phone_number && shipping_address == o.shipping_address && ssn == o.ssn && ssn_source == o.ssn_source && status == o.status && tenant == o.tenant && verification_last_run == o.verification_last_run && verification_status == o.verification_status end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 376 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = SyncteraRubySdk.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
447 448 449 450 451 452 453 454 455 456 457 458 459 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 447 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 352 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
332 333 334 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 332 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
338 339 340 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 338 def hash [ban_status, chosen_name, creation_time, dob, email, first_name, has_accounts, id, is_customer, last_name, last_updated_time, legal_address, , middle_name, phone_number, shipping_address, ssn, ssn_source, status, tenant, verification_last_run, verification_status].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
273 274 275 276 277 278 279 280 281 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 273 def list_invalid_properties invalid_properties = Array.new pattern = Regexp.new(/^\+[1-9]\d{1,14}$/) if !@phone_number.nil? && @phone_number !~ pattern invalid_properties.push("invalid value for \"phone_number\", must conform to the pattern #{pattern}.") end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
423 424 425 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 423 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
429 430 431 432 433 434 435 436 437 438 439 440 441 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 429 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
417 418 419 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 417 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
285 286 287 288 |
# File 'lib/synctera_ruby_sdk/models/base_person1.rb', line 285 def valid? return false if !@phone_number.nil? && @phone_number !~ Regexp.new(/^\+[1-9]\d{1,14}$/) true end |