Class: SyncteraRubySdk::PostPerson
- Inherits:
-
Object
- Object
- SyncteraRubySdk::PostPerson
- Defined in:
- lib/synctera_ruby_sdk/models/post_person.rb
Overview
Details of a person
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.
-
#note ⇒ Object
Text to be added to a note when creating a person.
-
#personal_ids ⇒ Object
> 🚧 Beta > This is a Beta property.
-
#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_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3).
-
.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 = {}) ⇒ PostPerson
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 = {}) ⇒ PostPerson
Initializes the object
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 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 189 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `SyncteraRubySdk::PostPerson` 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::PostPerson`. 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 if attributes.key?(:'personal_ids') if (value = attributes[:'personal_ids']).is_a?(Array) self.personal_ids = value end end if attributes.key?(:'note') self.note = attributes[:'note'] end end |
Instance Attribute Details
#ban_status ⇒ Object
Returns the value of attribute ban_status.
19 20 21 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 19 def ban_status @ban_status end |
#chosen_name ⇒ Object
Person’s chosen name.
22 23 24 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 22 def chosen_name @chosen_name end |
#creation_time ⇒ Object
The date and time the resource was created.
25 26 27 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 25 def creation_time @creation_time end |
#dob ⇒ Object
Person’s date of birth in RFC 3339 full-date format (YYYY-MM-DD).
28 29 30 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 28 def dob @dob end |
#email ⇒ Object
Person’s email.
31 32 33 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 31 def email @email end |
#first_name ⇒ Object
Person’s first name.
34 35 36 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 34 def first_name @first_name end |
#has_accounts ⇒ Object
This flag indicates whether the person or business has accounts.
37 38 39 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 37 def has_accounts @has_accounts end |
#id ⇒ Object
Person’s unique identifier.
40 41 42 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 40 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.
43 44 45 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 43 def is_customer @is_customer end |
#last_name ⇒ Object
Person’s last name.
46 47 48 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 46 def last_name @last_name end |
#last_updated_time ⇒ Object
The date and time the resource was last updated.
49 50 51 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 49 def last_updated_time @last_updated_time end |
#legal_address ⇒ Object
Returns the value of attribute legal_address.
51 52 53 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 51 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.
54 55 56 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 54 def @metadata end |
#middle_name ⇒ Object
Person’s middle name.
57 58 59 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 57 def middle_name @middle_name end |
#note ⇒ Object
Text to be added to a note when creating a person. A note is required when creating a person with a ban_status of SUSPENDED.
83 84 85 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 83 def note @note end |
#personal_ids ⇒ Object
> 🚧 Beta > This is a Beta property. Feedback from the community is welcome. We may make breaking changes to this property. Array of personal identifiers
80 81 82 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 80 def personal_ids @personal_ids 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
60 61 62 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 60 def phone_number @phone_number end |
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
62 63 64 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 62 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).
65 66 67 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 65 def ssn @ssn end |
#ssn_source ⇒ Object
Returns the value of attribute ssn_source.
67 68 69 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 67 def ssn_source @ssn_source end |
#status ⇒ Object
Returns the value of attribute status.
69 70 71 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 69 def status @status end |
#tenant ⇒ Object
The id of the tenant containing the resource. This is relevant for Fintechs that have multiple workspaces.
72 73 74 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 72 def tenant @tenant end |
#verification_last_run ⇒ Object
Date and time KYC verification was last run on the person.
75 76 77 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 75 def verification_last_run @verification_last_run end |
#verification_status ⇒ Object
Returns the value of attribute verification_status.
77 78 79 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 77 def verification_status @verification_status end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
138 139 140 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 138 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 108 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', :'personal_ids' => :'personal_ids', :'note' => :'note' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
387 388 389 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 387 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
179 180 181 182 183 184 185 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 179 def self.openapi_all_of [ :'BasePerson1', :'PostPersonAllOf', :'PostPersonalIdsArray' ] end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
173 174 175 176 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 173 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 143 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', :'personal_ids' => :'Array<PostPersonalId>', :'note' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
343 344 345 346 347 348 349 350 351 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/post_person.rb', line 343 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 && personal_ids == o.personal_ids && note == o.note end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 418 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
489 490 491 492 493 494 495 496 497 498 499 500 501 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 489 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
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 394 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
374 375 376 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 374 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
380 381 382 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 380 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, personal_ids, note].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 303 def list_invalid_properties invalid_properties = Array.new if @is_customer.nil? invalid_properties.push('invalid value for "is_customer", is_customer cannot be nil.') end 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 if @status.nil? invalid_properties.push('invalid value for "status", status cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
465 466 467 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 465 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
471 472 473 474 475 476 477 478 479 480 481 482 483 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 471 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
459 460 461 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 459 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
323 324 325 326 327 328 |
# File 'lib/synctera_ruby_sdk/models/post_person.rb', line 323 def valid? return false if @is_customer.nil? return false if !@phone_number.nil? && @phone_number !~ Regexp.new(/^\+[1-9]\d{1,14}$/) return false if @status.nil? true end |