Class: Ingenico::Connect::SDK::Domain::Payment::CustomerPaymentActivity
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Payment::CustomerPaymentActivity
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/customer_payment_activity.rb
Instance Attribute Summary collapse
-
#number_of_payment_attempts_last24_hours ⇒ Integer
The current value of number_of_payment_attempts_last24_hours.
-
#number_of_payment_attempts_last_year ⇒ Integer
The current value of number_of_payment_attempts_last_year.
-
#number_of_purchases_last6_months ⇒ Integer
The current value of number_of_purchases_last6_months.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#number_of_payment_attempts_last24_hours ⇒ Integer
Returns the current value of number_of_payment_attempts_last24_hours.
14 15 16 |
# File 'lib/ingenico/connect/sdk/domain/payment/customer_payment_activity.rb', line 14 def number_of_payment_attempts_last24_hours @number_of_payment_attempts_last24_hours end |
#number_of_payment_attempts_last_year ⇒ Integer
Returns the current value of number_of_payment_attempts_last_year.
14 15 16 |
# File 'lib/ingenico/connect/sdk/domain/payment/customer_payment_activity.rb', line 14 def number_of_payment_attempts_last_year @number_of_payment_attempts_last_year end |
#number_of_purchases_last6_months ⇒ Integer
Returns the current value of number_of_purchases_last6_months.
14 15 16 |
# File 'lib/ingenico/connect/sdk/domain/payment/customer_payment_activity.rb', line 14 def number_of_purchases_last6_months @number_of_purchases_last6_months end |
Instance Method Details
#from_hash(hash) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ingenico/connect/sdk/domain/payment/customer_payment_activity.rb', line 31 def from_hash(hash) super if hash.has_key? 'numberOfPaymentAttemptsLast24Hours' @number_of_payment_attempts_last24_hours = hash['numberOfPaymentAttemptsLast24Hours'] end if hash.has_key? 'numberOfPaymentAttemptsLastYear' @number_of_payment_attempts_last_year = hash['numberOfPaymentAttemptsLastYear'] end if hash.has_key? 'numberOfPurchasesLast6Months' @number_of_purchases_last6_months = hash['numberOfPurchasesLast6Months'] end end |
#to_h ⇒ Hash
23 24 25 26 27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/payment/customer_payment_activity.rb', line 23 def to_h hash = super hash['numberOfPaymentAttemptsLast24Hours'] = @number_of_payment_attempts_last24_hours unless @number_of_payment_attempts_last24_hours.nil? hash['numberOfPaymentAttemptsLastYear'] = @number_of_payment_attempts_last_year unless @number_of_payment_attempts_last_year.nil? hash['numberOfPurchasesLast6Months'] = @number_of_purchases_last6_months unless @number_of_purchases_last6_months.nil? hash end |