Class: OnlinePayments::SDK::Domain::ApplePayLineItem
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::ApplePayLineItem
- Defined in:
- lib/onlinepayments/sdk/domain/apple_pay_line_item.rb
Instance Attribute Summary collapse
-
#amount ⇒ String
The current value of amount.
-
#label ⇒ String
The current value of label.
-
#payment_timing ⇒ String
The current value of payment_timing.
-
#recurring_payment_end_date ⇒ String
The current value of recurring_payment_end_date.
-
#recurring_payment_interval_count ⇒ Integer
The current value of recurring_payment_interval_count.
-
#recurring_payment_interval_unit ⇒ String
The current value of recurring_payment_interval_unit.
-
#recurring_payment_start_date ⇒ String
The current value of recurring_payment_start_date.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#amount ⇒ String
Returns the current value of amount.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_line_item.rb', line 16 def amount @amount end |
#label ⇒ String
Returns the current value of label.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_line_item.rb', line 16 def label @label end |
#payment_timing ⇒ String
Returns the current value of payment_timing.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_line_item.rb', line 16 def payment_timing @payment_timing end |
#recurring_payment_end_date ⇒ String
Returns the current value of recurring_payment_end_date.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_line_item.rb', line 16 def recurring_payment_end_date @recurring_payment_end_date end |
#recurring_payment_interval_count ⇒ Integer
Returns the current value of recurring_payment_interval_count.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_line_item.rb', line 16 def recurring_payment_interval_count @recurring_payment_interval_count end |
#recurring_payment_interval_unit ⇒ String
Returns the current value of recurring_payment_interval_unit.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_line_item.rb', line 16 def recurring_payment_interval_unit @recurring_payment_interval_unit end |
#recurring_payment_start_date ⇒ String
Returns the current value of recurring_payment_start_date.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_line_item.rb', line 16 def recurring_payment_start_date @recurring_payment_start_date end |
Instance Method Details
#from_hash(hash) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_line_item.rb', line 45 def from_hash(hash) super if hash.has_key? 'amount' @amount = hash['amount'] end if hash.has_key? 'label' @label = hash['label'] end if hash.has_key? 'paymentTiming' @payment_timing = hash['paymentTiming'] end if hash.has_key? 'recurringPaymentEndDate' @recurring_payment_end_date = hash['recurringPaymentEndDate'] end if hash.has_key? 'recurringPaymentIntervalCount' @recurring_payment_interval_count = hash['recurringPaymentIntervalCount'] end if hash.has_key? 'recurringPaymentIntervalUnit' @recurring_payment_interval_unit = hash['recurringPaymentIntervalUnit'] end if hash.has_key? 'recurringPaymentStartDate' @recurring_payment_start_date = hash['recurringPaymentStartDate'] end end |
#to_h ⇒ Hash
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_line_item.rb', line 33 def to_h hash = super hash['amount'] = @amount unless @amount.nil? hash['label'] = @label unless @label.nil? hash['paymentTiming'] = @payment_timing unless @payment_timing.nil? hash['recurringPaymentEndDate'] = @recurring_payment_end_date unless @recurring_payment_end_date.nil? hash['recurringPaymentIntervalCount'] = @recurring_payment_interval_count unless @recurring_payment_interval_count.nil? hash['recurringPaymentIntervalUnit'] = @recurring_payment_interval_unit unless @recurring_payment_interval_unit.nil? hash['recurringPaymentStartDate'] = @recurring_payment_start_date unless @recurring_payment_start_date.nil? hash end |