Class: OnlinePayments::SDK::Domain::CustomerAccount
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::CustomerAccount
- Defined in:
- lib/onlinepayments/sdk/domain/customer_account.rb
Instance Attribute Summary collapse
-
#authentication ⇒ OnlinePayments::SDK::Domain::CustomerAccountAuthentication
The current value of authentication.
-
#change_date ⇒ String
The current value of change_date.
-
#changed_during_checkout ⇒ true/false
The current value of changed_during_checkout.
-
#create_date ⇒ String
The current value of create_date.
-
#had_suspicious_activity ⇒ true/false
The current value of had_suspicious_activity.
-
#password_change_date ⇒ String
The current value of password_change_date.
-
#password_changed_during_checkout ⇒ true/false
The current value of password_changed_during_checkout.
-
#payment_account_on_file ⇒ OnlinePayments::SDK::Domain::PaymentAccountOnFile
The current value of payment_account_on_file.
-
#payment_activity ⇒ OnlinePayments::SDK::Domain::CustomerPaymentActivity
The current value of payment_activity.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#authentication ⇒ OnlinePayments::SDK::Domain::CustomerAccountAuthentication
Returns the current value of authentication.
21 22 23 |
# File 'lib/onlinepayments/sdk/domain/customer_account.rb', line 21 def authentication @authentication end |
#change_date ⇒ String
Returns the current value of change_date.
21 22 23 |
# File 'lib/onlinepayments/sdk/domain/customer_account.rb', line 21 def change_date @change_date end |
#changed_during_checkout ⇒ true/false
Returns the current value of changed_during_checkout.
21 22 23 |
# File 'lib/onlinepayments/sdk/domain/customer_account.rb', line 21 def changed_during_checkout @changed_during_checkout end |
#create_date ⇒ String
Returns the current value of create_date.
21 22 23 |
# File 'lib/onlinepayments/sdk/domain/customer_account.rb', line 21 def create_date @create_date end |
#had_suspicious_activity ⇒ true/false
Returns the current value of had_suspicious_activity.
21 22 23 |
# File 'lib/onlinepayments/sdk/domain/customer_account.rb', line 21 def had_suspicious_activity @had_suspicious_activity end |
#password_change_date ⇒ String
Returns the current value of password_change_date.
21 22 23 |
# File 'lib/onlinepayments/sdk/domain/customer_account.rb', line 21 def password_change_date @password_change_date end |
#password_changed_during_checkout ⇒ true/false
Returns the current value of password_changed_during_checkout.
21 22 23 |
# File 'lib/onlinepayments/sdk/domain/customer_account.rb', line 21 def password_changed_during_checkout @password_changed_during_checkout end |
#payment_account_on_file ⇒ OnlinePayments::SDK::Domain::PaymentAccountOnFile
Returns the current value of payment_account_on_file.
21 22 23 |
# File 'lib/onlinepayments/sdk/domain/customer_account.rb', line 21 def payment_account_on_file @payment_account_on_file end |
#payment_activity ⇒ OnlinePayments::SDK::Domain::CustomerPaymentActivity
Returns the current value of payment_activity.
21 22 23 |
# File 'lib/onlinepayments/sdk/domain/customer_account.rb', line 21 def payment_activity @payment_activity end |
Instance Method Details
#from_hash(hash) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/onlinepayments/sdk/domain/customer_account.rb', line 47 def from_hash(hash) super if hash.key? 'authentication' raise TypeError, "value '%s' is not a Hash" % [hash['authentication']] unless hash['authentication'].is_a? Hash @authentication = OnlinePayments::SDK::Domain::CustomerAccountAuthentication.new_from_hash(hash['authentication']) end @change_date = hash['changeDate'] if hash.key? 'changeDate' @changed_during_checkout = hash['changedDuringCheckout'] if hash.key? 'changedDuringCheckout' @create_date = hash['createDate'] if hash.key? 'createDate' @had_suspicious_activity = hash['hadSuspiciousActivity'] if hash.key? 'hadSuspiciousActivity' @password_change_date = hash['passwordChangeDate'] if hash.key? 'passwordChangeDate' @password_changed_during_checkout = hash['passwordChangedDuringCheckout'] if hash.key? 'passwordChangedDuringCheckout' if hash.key? 'paymentAccountOnFile' raise TypeError, "value '%s' is not a Hash" % [hash['paymentAccountOnFile']] unless hash['paymentAccountOnFile'].is_a? Hash @payment_account_on_file = OnlinePayments::SDK::Domain::PaymentAccountOnFile.new_from_hash(hash['paymentAccountOnFile']) end if hash.key? 'paymentActivity' raise TypeError, "value '%s' is not a Hash" % [hash['paymentActivity']] unless hash['paymentActivity'].is_a? Hash @payment_activity = OnlinePayments::SDK::Domain::CustomerPaymentActivity.new_from_hash(hash['paymentActivity']) end end |
#to_h ⇒ Hash
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/onlinepayments/sdk/domain/customer_account.rb', line 33 def to_h hash = super hash['authentication'] = @authentication.to_h if @authentication hash['changeDate'] = @change_date unless @change_date.nil? hash['changedDuringCheckout'] = @changed_during_checkout unless @changed_during_checkout.nil? hash['createDate'] = @create_date unless @create_date.nil? hash['hadSuspiciousActivity'] = @had_suspicious_activity unless @had_suspicious_activity.nil? hash['passwordChangeDate'] = @password_change_date unless @password_change_date.nil? hash['passwordChangedDuringCheckout'] = @password_changed_during_checkout unless @password_changed_during_checkout.nil? hash['paymentAccountOnFile'] = @payment_account_on_file.to_h if @payment_account_on_file hash['paymentActivity'] = @payment_activity.to_h if @payment_activity hash end |