Class: Ingenico::Connect::SDK::Domain::Payment::CustomerAccount

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/customer_account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#authenticationIngenico::Connect::SDK::Domain::Payment::CustomerAccountAuthentication



26
27
28
# File 'lib/ingenico/connect/sdk/domain/payment/customer_account.rb', line 26

def authentication
  @authentication
end

#change_dateString



26
27
28
# File 'lib/ingenico/connect/sdk/domain/payment/customer_account.rb', line 26

def change_date
  @change_date
end

#changed_during_checkouttrue/false



26
27
28
# File 'lib/ingenico/connect/sdk/domain/payment/customer_account.rb', line 26

def changed_during_checkout
  @changed_during_checkout
end

#create_dateString



26
27
28
# File 'lib/ingenico/connect/sdk/domain/payment/customer_account.rb', line 26

def create_date
  @create_date
end

#had_suspicious_activitytrue/false



26
27
28
# File 'lib/ingenico/connect/sdk/domain/payment/customer_account.rb', line 26

def had_suspicious_activity
  @had_suspicious_activity
end

#has_forgotten_passwordtrue/false



26
27
28
# File 'lib/ingenico/connect/sdk/domain/payment/customer_account.rb', line 26

def has_forgotten_password
  @has_forgotten_password
end

#has_passwordtrue/false



26
27
28
# File 'lib/ingenico/connect/sdk/domain/payment/customer_account.rb', line 26

def has_password
  @has_password
end

#password_change_dateString



26
27
28
# File 'lib/ingenico/connect/sdk/domain/payment/customer_account.rb', line 26

def password_change_date
  @password_change_date
end

#password_changed_during_checkouttrue/false



26
27
28
# File 'lib/ingenico/connect/sdk/domain/payment/customer_account.rb', line 26

def password_changed_during_checkout
  @password_changed_during_checkout
end

#payment_account_on_fileIngenico::Connect::SDK::Domain::Payment::PaymentAccountOnFile



26
27
28
# File 'lib/ingenico/connect/sdk/domain/payment/customer_account.rb', line 26

def 
  
end

#payment_account_on_file_typeString



26
27
28
# File 'lib/ingenico/connect/sdk/domain/payment/customer_account.rb', line 26

def 
  
end

#payment_activityIngenico::Connect::SDK::Domain::Payment::CustomerPaymentActivity



26
27
28
# File 'lib/ingenico/connect/sdk/domain/payment/customer_account.rb', line 26

def payment_activity
  @payment_activity
end

Instance Method Details

#from_hash(hash) ⇒ Object



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
102
103
104
105
106
107
108
109
110
111
# 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
     = Ingenico::Connect::SDK::Domain::Payment::PaymentAccountOnFile.new_from_hash(hash['paymentAccountOnFile'])
  end
  if hash.has_key? 'paymentAccountOnFileType'
     = 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_hHash



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# 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'] = .to_h unless .nil?
  hash['paymentAccountOnFileType'] =  unless .nil?
  hash['paymentActivity'] = @payment_activity.to_h unless @payment_activity.nil?
  hash
end