Class: OnlinePayments::SDK::Domain::MerchantAction
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::MerchantAction
- Defined in:
- lib/onlinepayments/sdk/domain/merchant_action.rb
Instance Attribute Summary collapse
-
#action_type ⇒ String
The current value of action_type.
-
#mobile_three_d_secure_challenge_parameters ⇒ OnlinePayments::SDK::Domain::MobileThreeDSecureChallengeParameters
The current value of mobile_three_d_secure_challenge_parameters.
-
#redirect_data ⇒ OnlinePayments::SDK::Domain::RedirectData
The current value of redirect_data.
-
#show_form_data ⇒ OnlinePayments::SDK::Domain::ShowFormData
The current value of show_form_data.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#action_type ⇒ String
Returns the current value of action_type.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/merchant_action.rb', line 16 def action_type @action_type end |
#mobile_three_d_secure_challenge_parameters ⇒ OnlinePayments::SDK::Domain::MobileThreeDSecureChallengeParameters
Returns the current value of mobile_three_d_secure_challenge_parameters.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/merchant_action.rb', line 16 def mobile_three_d_secure_challenge_parameters @mobile_three_d_secure_challenge_parameters end |
#redirect_data ⇒ OnlinePayments::SDK::Domain::RedirectData
Returns the current value of redirect_data.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/merchant_action.rb', line 16 def redirect_data @redirect_data end |
#show_form_data ⇒ OnlinePayments::SDK::Domain::ShowFormData
Returns the current value of show_form_data.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/merchant_action.rb', line 16 def show_form_data @show_form_data end |
Instance Method Details
#from_hash(hash) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/onlinepayments/sdk/domain/merchant_action.rb', line 36 def from_hash(hash) super if hash.has_key? 'actionType' @action_type = hash['actionType'] end if hash.has_key? 'mobileThreeDSecureChallengeParameters' raise TypeError, "value '%s' is not a Hash" % [hash['mobileThreeDSecureChallengeParameters']] unless hash['mobileThreeDSecureChallengeParameters'].is_a? Hash @mobile_three_d_secure_challenge_parameters = OnlinePayments::SDK::Domain::MobileThreeDSecureChallengeParameters.new_from_hash(hash['mobileThreeDSecureChallengeParameters']) end if hash.has_key? 'redirectData' raise TypeError, "value '%s' is not a Hash" % [hash['redirectData']] unless hash['redirectData'].is_a? Hash @redirect_data = OnlinePayments::SDK::Domain::RedirectData.new_from_hash(hash['redirectData']) end if hash.has_key? 'showFormData' raise TypeError, "value '%s' is not a Hash" % [hash['showFormData']] unless hash['showFormData'].is_a? Hash @show_form_data = OnlinePayments::SDK::Domain::ShowFormData.new_from_hash(hash['showFormData']) end end |
#to_h ⇒ Hash
27 28 29 30 31 32 33 34 |
# File 'lib/onlinepayments/sdk/domain/merchant_action.rb', line 27 def to_h hash = super hash['actionType'] = @action_type unless @action_type.nil? hash['mobileThreeDSecureChallengeParameters'] = @mobile_three_d_secure_challenge_parameters.to_h unless @mobile_three_d_secure_challenge_parameters.nil? hash['redirectData'] = @redirect_data.to_h unless @redirect_data.nil? hash['showFormData'] = @show_form_data.to_h unless @show_form_data.nil? hash end |