Class: Unit::Types::ApplicationFormPrefill

Inherits:
Object
  • Object
show all
Defined in:
lib/unit/types/application_form_prefill.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(application_type = nil, full_name = nil, ssn = nil, passport = nil, nationality = nil, date_of_birth = nil, email = nil, name = nil, state_of_incorporation = nil, entity_type = nil, contact = nil, officer = nil, beneficial_owners = nil, website = nil, dba = nil, ein = nil, industry = nil, address = nil, phone = nil, jwt_subject = nil) ⇒ ApplicationFormPrefill

Returns a new instance of ApplicationFormPrefill.

Parameters:

  • application_type (Array<String>) (defaults to: nil)
    • optional

  • full_name (FullName) (defaults to: nil)
    • optional

  • ssn (String) (defaults to: nil)
    • optional

  • passport (String) (defaults to: nil)
    • optional

  • nationality (String) (defaults to: nil)
    • optional

  • date_of_birth (Date) (defaults to: nil)
    • optional

  • email (String) (defaults to: nil)
    • optional

  • name (String) (defaults to: nil)
    • optional

  • state_of_incorporation (String) (defaults to: nil)
    • optional

  • entity_type (String) (defaults to: nil)
    • optional

  • contact (BusinessContact) (defaults to: nil)
    • optional

  • officer (Officer) (defaults to: nil)
    • optional

  • beneficial_owners (Array<BeneficialOwner>) (defaults to: nil)
    • optional

  • website (String) (defaults to: nil)
    • optional

  • dba (String) (defaults to: nil)
    • optional

  • ein (String) (defaults to: nil)
    • optional

  • industry (String) (defaults to: nil)
    • optional

  • address (Address) (defaults to: nil)
    • optional

  • phone (Phone) (defaults to: nil)
    • optional



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/unit/types/application_form_prefill.rb', line 31

def initialize(application_type = nil, full_name = nil, ssn = nil, passport = nil, nationality = nil,
               date_of_birth = nil, email = nil, name = nil, state_of_incorporation = nil, entity_type = nil,
               contact = nil, officer = nil, beneficial_owners = nil, website = nil, dba = nil, ein = nil,
               industry = nil, address = nil, phone = nil, jwt_subject = nil)
  @application_type = application_type
  @full_name = full_name
  @ssn = ssn
  @passport = passport
  @nationality = nationality
  @date_of_birth = date_of_birth
  @email = email
  @name = name
  @state_of_incorporation = state_of_incorporation
  @entity_type = entity_type
  @contact = contact
  @officer = officer
  @beneficial_owners = beneficial_owners
  @website = website
  @dba = dba
  @ein = ein
  @industry = industry
  @address = address
  @phone = phone
  @jwt_subject = jwt_subject
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def address
  @address
end

#application_typeObject (readonly)

Returns the value of attribute application_type.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def application_type
  @application_type
end

#beneficial_ownersObject (readonly)

Returns the value of attribute beneficial_owners.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def beneficial_owners
  @beneficial_owners
end

#contactObject (readonly)

Returns the value of attribute contact.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def contact
  @contact
end

#date_of_birthObject (readonly)

Returns the value of attribute date_of_birth.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def date_of_birth
  @date_of_birth
end

#dbaObject (readonly)

Returns the value of attribute dba.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def dba
  @dba
end

#einObject (readonly)

Returns the value of attribute ein.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def ein
  @ein
end

#emailObject (readonly)

Returns the value of attribute email.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def email
  @email
end

#entity_typeObject (readonly)

Returns the value of attribute entity_type.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def entity_type
  @entity_type
end

#full_nameObject (readonly)

Returns the value of attribute full_name.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def full_name
  @full_name
end

#industryObject (readonly)

Returns the value of attribute industry.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def industry
  @industry
end

#jwt_subjectObject (readonly)

Returns the value of attribute jwt_subject.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def jwt_subject
  @jwt_subject
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def name
  @name
end

#nationalityObject (readonly)

Returns the value of attribute nationality.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def nationality
  @nationality
end

#officerObject (readonly)

Returns the value of attribute officer.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def officer
  @officer
end

#passportObject (readonly)

Returns the value of attribute passport.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def passport
  @passport
end

#phoneObject (readonly)

Returns the value of attribute phone.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def phone
  @phone
end

#ssnObject (readonly)

Returns the value of attribute ssn.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def ssn
  @ssn
end

#state_of_incorporationObject (readonly)

Returns the value of attribute state_of_incorporation.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def state_of_incorporation
  @state_of_incorporation
end

#websiteObject (readonly)

Returns the value of attribute website.



8
9
10
# File 'lib/unit/types/application_form_prefill.rb', line 8

def website
  @website
end

Instance Method Details

#representObject



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/unit/types/application_form_prefill.rb', line 57

def represent
  payload = {
    applicationType: application_type,
    fullName: full_name&.represent,
    ssn: ssn,
    passport: passport,
    nationality: nationality,
    dateOfBirth: date_of_birth,
    email: email,
    name: name,
    stateOfIncorporation: state_of_incorporation,
    entityType: entity_type,
    contact: contact&.represent,
    officer: officer&.represent,
    beneficialOwners: beneficial_owners,
    website: website,
    dba: dba,
    ein: ein,
    industry: industry,
    address: address&.represent,
    phone: phone&.represent,
    jwtSubject: jwt_subject
  }
  payload.compact
end