Class: Unit::Types::PowerOfAttorneyAgent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(full_name, ssn, nationality, date_of_birth, address, phone, email, passport = nil, jwt_subject = nil) ⇒ PowerOfAttorneyAgent

Returns a new instance of PowerOfAttorneyAgent.

Parameters:

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

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



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/unit/types/power_of_attorney_agent.rb', line 18

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

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



6
7
8
# File 'lib/unit/types/power_of_attorney_agent.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/power_of_attorney_agent.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/power_of_attorney_agent.rb', line 6

def email
  @email
end

#full_nameObject (readonly)

Returns the value of attribute full_name.



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

def full_name
  @full_name
end

#jwt_subjectObject (readonly)

Returns the value of attribute jwt_subject.



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

def jwt_subject
  @jwt_subject
end

#nationalityObject (readonly)

Returns the value of attribute nationality.



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

def nationality
  @nationality
end

#passportObject (readonly)

Returns the value of attribute passport.



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

def passport
  @passport
end

#phoneObject (readonly)

Returns the value of attribute phone.



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

def phone
  @phone
end

#ssnObject (readonly)

Returns the value of attribute ssn.



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

def ssn
  @ssn
end

Instance Method Details

#representObject



30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/unit/types/power_of_attorney_agent.rb', line 30

def represent
  {
    fullName: full_name.represent,
    ssn: ssn,
    passport: passport,
    nationality: nationality,
    dateOfBirth: date_of_birth,
    address: address.represent,
    phone: phone.represent,
    email: email,
    jwtSubject: jwt_subject
  }.compact!
end