Class: OnlinePayments::SDK::Domain::MobilePaymentProduct320SpecificInput
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::MobilePaymentProduct320SpecificInput
- Defined in:
- lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb
Instance Attribute Summary collapse
-
#is_recurring ⇒ true/false
The current value of is_recurring.
-
#recurring ⇒ OnlinePayments::SDK::Domain::Product320Recurring
The current value of recurring.
-
#three_d_secure ⇒ OnlinePayments::SDK::Domain::GPayThreeDSecure
The current value of three_d_secure.
-
#tokenize ⇒ true/false
The current value of tokenize.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#is_recurring ⇒ true/false
Returns the current value of is_recurring.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb', line 15 def is_recurring @is_recurring end |
#recurring ⇒ OnlinePayments::SDK::Domain::Product320Recurring
Returns the current value of recurring.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb', line 15 def recurring @recurring end |
#three_d_secure ⇒ OnlinePayments::SDK::Domain::GPayThreeDSecure
Returns the current value of three_d_secure.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb', line 15 def three_d_secure @three_d_secure end |
#tokenize ⇒ true/false
Returns the current value of tokenize.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product320_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_product320_specific_input.rb', line 35 def from_hash(hash) super 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::Product320Recurring.new_from_hash(hash['recurring']) end if hash.has_key? 'threeDSecure' raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecure']] unless hash['threeDSecure'].is_a? Hash @three_d_secure = OnlinePayments::SDK::Domain::GPayThreeDSecure.new_from_hash(hash['threeDSecure']) 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_product320_specific_input.rb', line 26 def to_h hash = super hash['isRecurring'] = @is_recurring unless @is_recurring.nil? hash['recurring'] = @recurring.to_h unless @recurring.nil? hash['threeDSecure'] = @three_d_secure.to_h unless @three_d_secure.nil? hash['tokenize'] = @tokenize unless @tokenize.nil? hash end |