Class: SyncteraRubySdk::PatchBusiness
- Inherits:
-
Object
- Object
- SyncteraRubySdk::PatchBusiness
- Defined in:
- lib/synctera_ruby_sdk/models/patch_business.rb
Overview
Represents a business customer.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#compliance_restrictions ⇒ Object
The types of compliance that the business needs to adhere to * ‘LICENSED_CANNABIS` – A type of compliance restriction where the business would need a cannabis license in order to operate.
-
#creation_time ⇒ Object
The date and time the resource was created.
-
#ein ⇒ Object
U.S.
-
#email ⇒ Object
Business’s email.
-
#entity_name ⇒ Object
Business’s legal name.
-
#formation_date ⇒ Object
Date the business was legally registered in RFC 3339 full-date format (YYYY-MM-DD).
-
#formation_state ⇒ Object
U.S.
-
#has_accounts ⇒ Object
This flag indicates whether the person or business has accounts.
-
#id ⇒ Object
Business’s unique identifier.
-
#is_customer ⇒ Object
True for personal and business customers with a direct relationship with the fintech or bank.
-
#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.
-
#phone_number ⇒ Object
Business’s phone number with country code in E.164 format.
-
#status ⇒ Object
Status of the business.
-
#structure ⇒ Object
Business’s legal structure.
-
#tenant ⇒ Object
The id of the tenant containing the resource.
-
#trade_names ⇒ Object
Other names by which this business is known.
-
#verification_last_run ⇒ Object
Date and time KYB verification was last run on the business.
-
#verification_status ⇒ Object
Returns the value of attribute verification_status.
-
#website ⇒ Object
Business’s website.
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 = {}) ⇒ PatchBusiness
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 = {}) ⇒ PatchBusiness
Initializes the object
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 270 271 272 273 274 275 276 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 176 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `SyncteraRubySdk::PatchBusiness` 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::PatchBusiness`. 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?(:'compliance_restrictions') if (value = attributes[:'compliance_restrictions']).is_a?(Array) self.compliance_restrictions = value end end if attributes.key?(:'creation_time') self.creation_time = attributes[:'creation_time'] end if attributes.key?(:'ein') self.ein = attributes[:'ein'] end if attributes.key?(:'email') self.email = attributes[:'email'] end if attributes.key?(:'entity_name') self.entity_name = attributes[:'entity_name'] end if attributes.key?(:'formation_date') self.formation_date = attributes[:'formation_date'] end if attributes.key?(:'formation_state') self.formation_state = attributes[:'formation_state'] 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_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?(:'phone_number') self.phone_number = attributes[:'phone_number'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'structure') self.structure = attributes[:'structure'] end if attributes.key?(:'tenant') self.tenant = attributes[:'tenant'] end if attributes.key?(:'trade_names') if (value = attributes[:'trade_names']).is_a?(Array) self.trade_names = value end 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?(:'website') self.website = attributes[:'website'] end end |
Instance Attribute Details
#compliance_restrictions ⇒ Object
The types of compliance that the business needs to adhere to * ‘LICENSED_CANNABIS` – A type of compliance restriction where the business would need a cannabis license in order to operate.
20 21 22 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 20 def compliance_restrictions @compliance_restrictions end |
#creation_time ⇒ Object
The date and time the resource was created.
23 24 25 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 23 def creation_time @creation_time end |
#ein ⇒ Object
U.S. Employer Identification Number (EIN) for this business, in the format xx-xxxxxxx.
26 27 28 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 26 def ein @ein end |
#email ⇒ Object
Business’s email.
29 30 31 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 29 def email @email end |
#entity_name ⇒ Object
Business’s legal name.
32 33 34 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 32 def entity_name @entity_name end |
#formation_date ⇒ Object
Date the business was legally registered in RFC 3339 full-date format (YYYY-MM-DD).
35 36 37 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 35 def formation_date @formation_date end |
#formation_state ⇒ Object
U.S. state where the business is legally registered (2-letter abbreviation).
38 39 40 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 38 def formation_state @formation_state end |
#has_accounts ⇒ Object
This flag indicates whether the person or business has accounts.
41 42 43 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 41 def has_accounts @has_accounts end |
#id ⇒ Object
Business’s unique identifier.
44 45 46 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 44 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.
47 48 49 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 47 def is_customer @is_customer end |
#last_updated_time ⇒ Object
The date and time the resource was last updated.
50 51 52 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 50 def last_updated_time @last_updated_time end |
#legal_address ⇒ Object
Returns the value of attribute legal_address.
52 53 54 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 52 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.
55 56 57 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 55 def @metadata end |
#phone_number ⇒ Object
Business’s phone number with country code in E.164 format. Must have a valid country code. Area code and local phone number are not validated.
58 59 60 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 58 def phone_number @phone_number end |
#status ⇒ Object
Status of the business. One of the following: * ‘PROSPECT` – a potential customer, used for information-gathering and disclosures. * `ACTIVE` – is an integrator defined status. Integrators should set a business to active if they believe the person to be qualified for conducting business. Synctera will combine this status with other statuses such a verification to determine if the business is eligible for specific actions such as initiating transactions or issuing a card. * `FROZEN` – business’s actions are blocked for security, legal, or other reasons. * ‘SANCTION` – business is on a sanctions list and should be carefully monitored. * `DISSOLVED` – an inactive status indicating a business entity has filed articles of dissolution or a certificate of termination to terminate its existence. * `CANCELLED` – an inactive status indicating that a business entity has filed a cancellation or has failed to file its periodic report after notice of forfeiture of its rights to do business. * `SUSPENDED` – an inactive status indicating that the business entity has lost the right to operate in it’s registered jurisdiction. * ‘MERGED` – an inactive status indicating that the business entity has terminated existence by merging into another entity. * `INACTIVE` – an inactive status indicating that the business entity is no longer active. * `CONVERTED` – An inactive status indicating that the business entity has been converted to another type of business entity in the same jurisdiction.
61 62 63 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 61 def status @status end |
#structure ⇒ Object
Business’s legal structure.
64 65 66 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 64 def structure @structure end |
#tenant ⇒ Object
The id of the tenant containing the resource. This is relevant for Fintechs that have multiple workspaces.
67 68 69 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 67 def tenant @tenant end |
#trade_names ⇒ Object
Other names by which this business is known.
70 71 72 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 70 def trade_names @trade_names end |
#verification_last_run ⇒ Object
Date and time KYB verification was last run on the business.
73 74 75 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 73 def verification_last_run @verification_last_run end |
#verification_status ⇒ Object
Returns the value of attribute verification_status.
75 76 77 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 75 def verification_status @verification_status end |
#website ⇒ Object
Business’s website.
78 79 80 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 78 def website @website end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
130 131 132 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 130 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 103 def self.attribute_map { :'compliance_restrictions' => :'compliance_restrictions', :'creation_time' => :'creation_time', :'ein' => :'ein', :'email' => :'email', :'entity_name' => :'entity_name', :'formation_date' => :'formation_date', :'formation_state' => :'formation_state', :'has_accounts' => :'has_accounts', :'id' => :'id', :'is_customer' => :'is_customer', :'last_updated_time' => :'last_updated_time', :'legal_address' => :'legal_address', :'metadata' => :'metadata', :'phone_number' => :'phone_number', :'status' => :'status', :'structure' => :'structure', :'tenant' => :'tenant', :'trade_names' => :'trade_names', :'verification_last_run' => :'verification_last_run', :'verification_status' => :'verification_status', :'website' => :'website' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
375 376 377 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 375 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
168 169 170 171 172 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 168 def self.openapi_all_of [ :'Base' ] end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
162 163 164 165 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 162 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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/patch_business.rb', line 135 def self.openapi_types { :'compliance_restrictions' => :'Array<String>', :'creation_time' => :'Time', :'ein' => :'String', :'email' => :'String', :'entity_name' => :'String', :'formation_date' => :'Date', :'formation_state' => :'String', :'has_accounts' => :'Boolean', :'id' => :'String', :'is_customer' => :'Boolean', :'last_updated_time' => :'Time', :'legal_address' => :'LegalAddress', :'metadata' => :'Object', :'phone_number' => :'String', :'status' => :'String', :'structure' => :'String', :'tenant' => :'String', :'trade_names' => :'Array<String>', :'verification_last_run' => :'Time', :'verification_status' => :'VerificationStatus', :'website' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 334 def ==(o) return true if self.equal?(o) self.class == o.class && compliance_restrictions == o.compliance_restrictions && creation_time == o.creation_time && ein == o.ein && email == o.email && entity_name == o.entity_name && formation_date == o.formation_date && formation_state == o.formation_state && has_accounts == o.has_accounts && id == o.id && is_customer == o.is_customer && last_updated_time == o.last_updated_time && legal_address == o.legal_address && == o. && phone_number == o.phone_number && status == o.status && structure == o.structure && tenant == o.tenant && trade_names == o.trade_names && verification_last_run == o.verification_last_run && verification_status == o.verification_status && website == o.website end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
406 407 408 409 410 411 412 413 414 415 416 417 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 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 406 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
477 478 479 480 481 482 483 484 485 486 487 488 489 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 477 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
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 382 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
362 363 364 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 362 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
368 369 370 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 368 def hash [compliance_restrictions, creation_time, ein, email, entity_name, formation_date, formation_state, has_accounts, id, is_customer, last_updated_time, legal_address, , phone_number, status, structure, tenant, trade_names, verification_last_run, verification_status, website].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
280 281 282 283 284 285 286 287 288 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 280 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)
453 454 455 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 453 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
459 460 461 462 463 464 465 466 467 468 469 470 471 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 459 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
447 448 449 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 447 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
292 293 294 295 296 297 298 299 |
# File 'lib/synctera_ruby_sdk/models/patch_business.rb', line 292 def valid? return false if !@phone_number.nil? && @phone_number !~ Regexp.new(/^\+[1-9]\d{1,14}$/) status_validator = EnumAttributeValidator.new('String', ["PROSPECT", "ACTIVE", "FROZEN", "SANCTION", "DISSOLVED", "CANCELLED", "SUSPENDED", "MERGED", "INACTIVE", "CONVERTED"]) return false unless status_validator.valid?(@status) structure_validator = EnumAttributeValidator.new('String', ["SOLE_PROPRIETORSHIP", "PARTNERSHIP", "LLC", "CORPORATION", "S_CORPORATION", "NON_PROFIT", "OTHER"]) return false unless structure_validator.valid?(@structure) true end |