Class: ThePlaidApi::BusinessVerificationCreateRequestBusiness
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::BusinessVerificationCreateRequestBusiness
- Defined in:
- lib/the_plaid_api/models/business_verification_create_request_business.rb
Overview
Business information provided in the verification request
Instance Attribute Summary collapse
-
#address ⇒ RequestBusinessAddress
Physical address of a business.
-
#alternative_name ⇒ String
The name of the business.
-
#email_address ⇒ String
A valid email address.
-
#name ⇒ String
The name of the business.
-
#phone_number ⇒ String
A phone number in E.164 format.
-
#website ⇒ String
An ‘http’ or ‘https’ URL (must begin with either of those).
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(name: SKIP, alternative_name: SKIP, address: SKIP, website: SKIP, phone_number: SKIP, email_address: SKIP, additional_properties: nil) ⇒ BusinessVerificationCreateRequestBusiness
constructor
A new instance of BusinessVerificationCreateRequestBusiness.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(name: SKIP, alternative_name: SKIP, address: SKIP, website: SKIP, phone_number: SKIP, email_address: SKIP, additional_properties: nil) ⇒ BusinessVerificationCreateRequestBusiness
Returns a new instance of BusinessVerificationCreateRequestBusiness.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/the_plaid_api/models/business_verification_create_request_business.rb', line 71 def initialize(name: SKIP, alternative_name: SKIP, address: SKIP, website: SKIP, phone_number: SKIP, email_address: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name unless name == SKIP @alternative_name = alternative_name unless alternative_name == SKIP @address = address unless address == SKIP @website = website unless website == SKIP @phone_number = phone_number unless phone_number == SKIP @email_address = email_address unless email_address == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#address ⇒ RequestBusinessAddress
Physical address of a business. Used for input requests.
24 25 26 |
# File 'lib/the_plaid_api/models/business_verification_create_request_business.rb', line 24 def address @address end |
#alternative_name ⇒ String
The name of the business. Must have at least one character and a maximum length of 500 characters.
20 21 22 |
# File 'lib/the_plaid_api/models/business_verification_create_request_business.rb', line 20 def alternative_name @alternative_name end |
#email_address ⇒ String
A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see [RFC 3696](datatracker.ietf.org/doc/html/rfc3696).
38 39 40 |
# File 'lib/the_plaid_api/models/business_verification_create_request_business.rb', line 38 def email_address @email_address end |
#name ⇒ String
The name of the business. Must have at least one character and a maximum length of 500 characters.
15 16 17 |
# File 'lib/the_plaid_api/models/business_verification_create_request_business.rb', line 15 def name @name end |
#phone_number ⇒ String
A phone number in E.164 format.
32 33 34 |
# File 'lib/the_plaid_api/models/business_verification_create_request_business.rb', line 32 def phone_number @phone_number end |
#website ⇒ String
An ‘http’ or ‘https’ URL (must begin with either of those).
28 29 30 |
# File 'lib/the_plaid_api/models/business_verification_create_request_business.rb', line 28 def website @website end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/the_plaid_api/models/business_verification_create_request_business.rb', line 87 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP alternative_name = hash.key?('alternative_name') ? hash['alternative_name'] : SKIP address = RequestBusinessAddress.from_hash(hash['address']) if hash['address'] website = hash.key?('website') ? hash['website'] : SKIP phone_number = hash.key?('phone_number') ? hash['phone_number'] : SKIP email_address = hash.key?('email_address') ? hash['email_address'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. BusinessVerificationCreateRequestBusiness.new(name: name, alternative_name: alternative_name, address: address, website: website, phone_number: phone_number, email_address: email_address, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/the_plaid_api/models/business_verification_create_request_business.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['alternative_name'] = 'alternative_name' @_hash['address'] = 'address' @_hash['website'] = 'website' @_hash['phone_number'] = 'phone_number' @_hash['email_address'] = 'email_address' @_hash end |
.nullables ⇒ Object
An array for nullable fields
65 66 67 68 69 |
# File 'lib/the_plaid_api/models/business_verification_create_request_business.rb', line 65 def self.nullables %w[ alternative_name ] end |
.optionals ⇒ Object
An array for optional fields
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/the_plaid_api/models/business_verification_create_request_business.rb', line 53 def self.optionals %w[ name alternative_name address website phone_number email_address ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
125 126 127 128 129 130 131 |
# File 'lib/the_plaid_api/models/business_verification_create_request_business.rb', line 125 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, alternative_name: #{@alternative_name.inspect},"\ " address: #{@address.inspect}, website: #{@website.inspect}, phone_number:"\ " #{@phone_number.inspect}, email_address: #{@email_address.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
117 118 119 120 121 122 |
# File 'lib/the_plaid_api/models/business_verification_create_request_business.rb', line 117 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, alternative_name: #{@alternative_name}, address:"\ " #{@address}, website: #{@website}, phone_number: #{@phone_number}, email_address:"\ " #{@email_address}, additional_properties: #{@additional_properties}>" end |