Class: OnlinePayments::SDK::Domain::MobilePaymentProduct302SpecificInput
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::MobilePaymentProduct302SpecificInput
- Defined in:
- lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb
Instance Attribute Summary collapse
-
#apple_pay_recurring_payment_request ⇒ OnlinePayments::SDK::Domain::ApplePayRecurringPaymentRequest
The current value of apple_pay_recurring_payment_request.
-
#is_recurring ⇒ true/false
The current value of is_recurring.
-
#recurring ⇒ OnlinePayments::SDK::Domain::Product302Recurring
The current value of recurring.
-
#tokenize ⇒ true/false
The current value of tokenize.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#apple_pay_recurring_payment_request ⇒ OnlinePayments::SDK::Domain::ApplePayRecurringPaymentRequest
Returns the current value of apple_pay_recurring_payment_request.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb', line 15 def apple_pay_recurring_payment_request @apple_pay_recurring_payment_request end |
#is_recurring ⇒ true/false
Returns the current value of is_recurring.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb', line 15 def is_recurring @is_recurring end |
#recurring ⇒ OnlinePayments::SDK::Domain::Product302Recurring
Returns the current value of recurring.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb', line 15 def recurring @recurring end |
#tokenize ⇒ true/false
Returns the current value of tokenize.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb', line 15 def tokenize @tokenize end |
Instance Method Details
#from_hash(hash) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb', line 35 def from_hash(hash) super if hash.has_key? 'applePayRecurringPaymentRequest' raise TypeError, "value '%s' is not a Hash" % [hash['applePayRecurringPaymentRequest']] unless hash['applePayRecurringPaymentRequest'].is_a? Hash @apple_pay_recurring_payment_request = OnlinePayments::SDK::Domain::ApplePayRecurringPaymentRequest.new_from_hash(hash['applePayRecurringPaymentRequest']) end if hash.has_key? 'isRecurring' @is_recurring = hash['isRecurring'] end if hash.has_key? 'recurring' raise TypeError, "value '%s' is not a Hash" % [hash['recurring']] unless hash['recurring'].is_a? Hash @recurring = OnlinePayments::SDK::Domain::Product302Recurring.new_from_hash(hash['recurring']) end if hash.has_key? 'tokenize' @tokenize = hash['tokenize'] end end |
#to_h ⇒ Hash
26 27 28 29 30 31 32 33 |
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb', line 26 def to_h hash = super hash['applePayRecurringPaymentRequest'] = @apple_pay_recurring_payment_request.to_h unless @apple_pay_recurring_payment_request.nil? hash['isRecurring'] = @is_recurring unless @is_recurring.nil? hash['recurring'] = @recurring.to_h unless @recurring.nil? hash['tokenize'] = @tokenize unless @tokenize.nil? hash end |