class Ingenico::Connect::SDK::Domain::Payment::CustomerAccount

@attr [Ingenico::Connect::SDK::Domain::Payment::CustomerAccountAuthentication] authentication @attr [String] change_date @attr [true/false] changed_during_checkout @attr [String] create_date @attr [true/false] had_suspicious_activity @attr [true/false] has_forgotten_password @attr [true/false] has_password @attr [String] password_change_date @attr [true/false] password_changed_during_checkout @attr [Ingenico::Connect::SDK::Domain::Payment::PaymentAccountOnFile] payment_account_on_file @attr [String] payment_account_on_file_type @attr [Ingenico::Connect::SDK::Domain::Payment::CustomerPaymentActivity] payment_activity

Attributes

authentication[RW]
change_date[RW]
changed_during_checkout[RW]
create_date[RW]
had_suspicious_activity[RW]
has_forgotten_password[RW]
has_password[RW]
password_change_date[RW]
password_changed_during_checkout[RW]
payment_account_on_file[RW]
payment_account_on_file_type[RW]
payment_activity[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/payment/customer_account.rb, line 70
def from_hash(hash)
  super
  if hash.has_key? 'authentication'
    raise TypeError, "value '%s' is not a Hash" % [hash['authentication']] unless hash['authentication'].is_a? Hash
    @authentication = Ingenico::Connect::SDK::Domain::Payment::CustomerAccountAuthentication.new_from_hash(hash['authentication'])
  end
  if hash.has_key? 'changeDate'
    @change_date = hash['changeDate']
  end
  if hash.has_key? 'changedDuringCheckout'
    @changed_during_checkout = hash['changedDuringCheckout']
  end
  if hash.has_key? 'createDate'
    @create_date = hash['createDate']
  end
  if hash.has_key? 'hadSuspiciousActivity'
    @had_suspicious_activity = hash['hadSuspiciousActivity']
  end
  if hash.has_key? 'hasForgottenPassword'
    @has_forgotten_password = hash['hasForgottenPassword']
  end
  if hash.has_key? 'hasPassword'
    @has_password = hash['hasPassword']
  end
  if hash.has_key? 'passwordChangeDate'
    @password_change_date = hash['passwordChangeDate']
  end
  if hash.has_key? 'passwordChangedDuringCheckout'
    @password_changed_during_checkout = hash['passwordChangedDuringCheckout']
  end
  if hash.has_key? 'paymentAccountOnFile'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentAccountOnFile']] unless hash['paymentAccountOnFile'].is_a? Hash
    @payment_account_on_file = Ingenico::Connect::SDK::Domain::Payment::PaymentAccountOnFile.new_from_hash(hash['paymentAccountOnFile'])
  end
  if hash.has_key? 'paymentAccountOnFileType'
    @payment_account_on_file_type = hash['paymentAccountOnFileType']
  end
  if hash.has_key? 'paymentActivity'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentActivity']] unless hash['paymentActivity'].is_a? Hash
    @payment_activity = Ingenico::Connect::SDK::Domain::Payment::CustomerPaymentActivity.new_from_hash(hash['paymentActivity'])
  end
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/payment/customer_account.rb, line 53
def to_h
  hash = super
  hash['authentication'] = @authentication.to_h unless @authentication.nil?
  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['hasForgottenPassword'] = @has_forgotten_password unless @has_forgotten_password.nil?
  hash['hasPassword'] = @has_password unless @has_password.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 unless @payment_account_on_file.nil?
  hash['paymentAccountOnFileType'] = @payment_account_on_file_type unless @payment_account_on_file_type.nil?
  hash['paymentActivity'] = @payment_activity.to_h unless @payment_activity.nil?
  hash
end