Class: Unit::Types::BeneficialOwner

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(full_name, date_of_birth, address, phone, email, ssn, status = nil, passport = nil, nationality = nil, percentage = nil) ⇒ BeneficialOwner

Parameters:

  • full_name (FullName)
  • date_of_birth (Date)
  • address (Address)
  • phone (Phone)
  • email (String)
  • ssn (String)
  • status (String) (defaults to: nil)
    • optional

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

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

  • percentage (Integer) (defaults to: nil)
    • optional

  • evaluation_params (EvaluationParams)
    • optional

  • id_theft_score (Integer)
    • optional

  • occupation (String)
    • optional

  • annual_income (String)
    • optional

  • source_of_income (String)
    • optional



25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/unit/types/beneficial_owner.rb', line 25

def initialize(full_name, date_of_birth, address, phone, email, ssn, status = nil, passport = nil,
               nationality = nil, percentage = nil)
  @full_name = full_name
  @date_of_birth = date_of_birth
  @address = address
  @phone = phone
  @email = email
  @status = status
  @ssn = ssn
  @passport = passport
  @nationality = nationality
  @percentage = percentage
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



6
7
8
# File 'lib/unit/types/beneficial_owner.rb', line 6

def address
  @address
end

#date_of_birthObject (readonly)

Returns the value of attribute date_of_birth.



6
7
8
# File 'lib/unit/types/beneficial_owner.rb', line 6

def date_of_birth
  @date_of_birth
end

#emailObject (readonly)

Returns the value of attribute email.



6
7
8
# File 'lib/unit/types/beneficial_owner.rb', line 6

def email
  @email
end

#full_nameObject (readonly)

Returns the value of attribute full_name.



6
7
8
# File 'lib/unit/types/beneficial_owner.rb', line 6

def full_name
  @full_name
end

#nationalityObject (readonly)

Returns the value of attribute nationality.



6
7
8
# File 'lib/unit/types/beneficial_owner.rb', line 6

def nationality
  @nationality
end

#passportObject (readonly)

Returns the value of attribute passport.



6
7
8
# File 'lib/unit/types/beneficial_owner.rb', line 6

def passport
  @passport
end

#percentageObject (readonly)

Returns the value of attribute percentage.



6
7
8
# File 'lib/unit/types/beneficial_owner.rb', line 6

def percentage
  @percentage
end

#phoneObject (readonly)

Returns the value of attribute phone.



6
7
8
# File 'lib/unit/types/beneficial_owner.rb', line 6

def phone
  @phone
end

#ssnObject (readonly)

Returns the value of attribute ssn.



6
7
8
# File 'lib/unit/types/beneficial_owner.rb', line 6

def ssn
  @ssn
end

#statusObject (readonly)

Returns the value of attribute status.



6
7
8
# File 'lib/unit/types/beneficial_owner.rb', line 6

def status
  @status
end

Instance Method Details

#representObject



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/unit/types/beneficial_owner.rb', line 39

def represent
  payload =
    {
      fullName: full_name.represent,
      dateOfBirth: date_of_birth,
      address: address.represent,
      phone: phone.represent,
      email: email,
      ssn: ssn,
      status: status,
      passport: passport,
      nationality: nationality,
      percentage: percentage
    }
  payload.compact
end