Class: SixSaferpay::PayerProfile
- Inherits:
-
Object
- Object
- SixSaferpay::PayerProfile
- Defined in:
- lib/six_saferpay/models/payer_profile.rb
Instance Attribute Summary collapse
-
#company ⇒ Object
Returns the value of attribute company.
-
#creation_date ⇒ Object
Returns the value of attribute creation_date.
-
#date_of_birth ⇒ Object
Returns the value of attribute date_of_birth.
-
#email ⇒ Object
Returns the value of attribute email.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#gender ⇒ Object
Returns the value of attribute gender.
-
#has_account ⇒ Object
Returns the value of attribute has_account.
-
#has_password ⇒ Object
Returns the value of attribute has_password.
-
#last_login_date ⇒ Object
Returns the value of attribute last_login_date.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#password_forgotten ⇒ Object
Returns the value of attribute password_forgotten.
-
#password_last_change_date ⇒ Object
Returns the value of attribute password_last_change_date.
-
#secondary_email ⇒ Object
Returns the value of attribute secondary_email.
Instance Method Summary collapse
-
#initialize(has_account: nil, has_password: nil, password_forgotten: nil, first_name: nil, last_name: nil, company: nil, date_of_birth: nil, last_login_date: nil, gender: nil, creation_date: nil, password_last_change_date: nil, email: nil, secondary_email: nil, phone: nil) ⇒ PayerProfile
constructor
A new instance of PayerProfile.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(has_account: nil, has_password: nil, password_forgotten: nil, first_name: nil, last_name: nil, company: nil, date_of_birth: nil, last_login_date: nil, gender: nil, creation_date: nil, password_last_change_date: nil, email: nil, secondary_email: nil, phone: nil) ⇒ PayerProfile
Returns a new instance of PayerProfile.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 21 def initialize( has_account: nil, has_password: nil, password_forgotten: nil, first_name: nil, last_name: nil, company: nil, date_of_birth: nil, last_login_date: nil, gender: nil, creation_date: nil, password_last_change_date: nil, email: nil, secondary_email: nil, phone: nil ) @has_account = has_account @has_password = has_password @password_forgotten = password_forgotten @first_name = first_name @last_name = last_name @company = company @date_of_birth = date_of_birth @last_login_date = last_login_date @gender = gender @creation_date = creation_date @password_last_change_date = password_last_change_date @email = email @secondary_email = secondary_email if phone @phone = SixSaferpay::Phone.new(**phone.to_h) end end |
Instance Attribute Details
#company ⇒ Object
Returns the value of attribute company.
4 5 6 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 4 def company @company end |
#creation_date ⇒ Object
Returns the value of attribute creation_date.
4 5 6 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 4 def creation_date @creation_date end |
#date_of_birth ⇒ Object
Returns the value of attribute date_of_birth.
4 5 6 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 4 def date_of_birth @date_of_birth end |
#email ⇒ Object
Returns the value of attribute email.
4 5 6 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 4 def email @email end |
#first_name ⇒ Object
Returns the value of attribute first_name.
4 5 6 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 4 def first_name @first_name end |
#gender ⇒ Object
Returns the value of attribute gender.
4 5 6 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 4 def gender @gender end |
#has_account ⇒ Object
Returns the value of attribute has_account.
4 5 6 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 4 def has_account @has_account end |
#has_password ⇒ Object
Returns the value of attribute has_password.
4 5 6 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 4 def has_password @has_password end |
#last_login_date ⇒ Object
Returns the value of attribute last_login_date.
4 5 6 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 4 def last_login_date @last_login_date end |
#last_name ⇒ Object
Returns the value of attribute last_name.
4 5 6 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 4 def last_name @last_name end |
#password_forgotten ⇒ Object
Returns the value of attribute password_forgotten.
4 5 6 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 4 def password_forgotten @password_forgotten end |
#password_last_change_date ⇒ Object
Returns the value of attribute password_last_change_date.
4 5 6 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 4 def password_last_change_date @password_last_change_date end |
#secondary_email ⇒ Object
Returns the value of attribute secondary_email.
4 5 6 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 4 def secondary_email @secondary_email end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
56 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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/six_saferpay/models/payer_profile.rb', line 56 def to_hash hash = Hash.new if !@has_account.nil? hash.merge!(has_account: @has_account) end if !@has_password.nil? hash.merge!(has_password: @has_password) end if !@password_forgotten.nil? hash.merge!(password_forgotten: @password_forgotten) end if @first_name hash.merge!(first_name: @first_name) end if @last_name hash.merge!(last_name: @last_name) end if @company hash.merge!(company: @company) end if @date_of_birth hash.merge!(date_of_birth: @date_of_birth) end if @last_login_date hash.merge!(last_login_date: @last_login_date) end if @gender hash.merge!(gender: @gender) end if @creation_date hash.merge!(creation_date: @creation_date) end if @password_last_change_date hash.merge!(password_last_change_date: @password_last_change_date) end if @email hash.merge!(email: @email) end if @secondary_email hash.merge!(secondary_email: @secondary_email) end if @phone hash.merge!(phone: @phone.to_h) end hash end |