Class: Ingenico::Connect::SDK::Domain::Payment::MerchantAction
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Payment::MerchantAction
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/merchant_action.rb
Instance Attribute Summary collapse
-
#action_type ⇒ String
The current value of action_type.
-
#form_fields ⇒ Array<Ingenico::Connect::SDK::Domain::Product::PaymentProductField>
The current value of form_fields.
-
#mobile_three_d_secure_challenge_parameters ⇒ Ingenico::Connect::SDK::Domain::Payment::MobileThreeDSecureChallengeParameters
The current value of mobile_three_d_secure_challenge_parameters.
-
#redirect_data ⇒ Ingenico::Connect::SDK::Domain::Payment::RedirectData
The current value of redirect_data.
-
#rendering_data ⇒ String
The current value of rendering_data.
-
#show_data ⇒ Array<Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair>
The current value of show_data.
-
#third_party_data ⇒ Ingenico::Connect::SDK::Domain::Payment::ThirdPartyData
The current value of third_party_data.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#action_type ⇒ String
Returns the current value of action_type.
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant_action.rb', line 23 def action_type @action_type end |
#form_fields ⇒ Array<Ingenico::Connect::SDK::Domain::Product::PaymentProductField>
Returns the current value of form_fields.
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant_action.rb', line 23 def form_fields @form_fields end |
#mobile_three_d_secure_challenge_parameters ⇒ Ingenico::Connect::SDK::Domain::Payment::MobileThreeDSecureChallengeParameters
Returns the current value of mobile_three_d_secure_challenge_parameters.
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant_action.rb', line 23 def mobile_three_d_secure_challenge_parameters @mobile_three_d_secure_challenge_parameters end |
#redirect_data ⇒ Ingenico::Connect::SDK::Domain::Payment::RedirectData
Returns the current value of redirect_data.
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant_action.rb', line 23 def redirect_data @redirect_data end |
#rendering_data ⇒ String
Returns the current value of rendering_data.
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant_action.rb', line 23 def rendering_data @rendering_data end |
#show_data ⇒ Array<Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair>
Returns the current value of show_data.
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant_action.rb', line 23 def show_data @show_data end |
#third_party_data ⇒ Ingenico::Connect::SDK::Domain::Payment::ThirdPartyData
Returns the current value of third_party_data.
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant_action.rb', line 23 def third_party_data @third_party_data end |
Instance Method Details
#from_hash(hash) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant_action.rb', line 52 def from_hash(hash) super if hash.has_key? 'actionType' @action_type = hash['actionType'] end if hash.has_key? 'formFields' raise TypeError, "value '%s' is not an Array" % [hash['formFields']] unless hash['formFields'].is_a? Array @form_fields = [] hash['formFields'].each do |e| @form_fields << Ingenico::Connect::SDK::Domain::Product::PaymentProductField.new_from_hash(e) end 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 = Ingenico::Connect::SDK::Domain::Payment::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 = Ingenico::Connect::SDK::Domain::Payment::RedirectData.new_from_hash(hash['redirectData']) end if hash.has_key? 'renderingData' @rendering_data = hash['renderingData'] end if hash.has_key? 'showData' raise TypeError, "value '%s' is not an Array" % [hash['showData']] unless hash['showData'].is_a? Array @show_data = [] hash['showData'].each do |e| @show_data << Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair.new_from_hash(e) end end if hash.has_key? 'thirdPartyData' raise TypeError, "value '%s' is not a Hash" % [hash['thirdPartyData']] unless hash['thirdPartyData'].is_a? Hash @third_party_data = Ingenico::Connect::SDK::Domain::Payment::ThirdPartyData.new_from_hash(hash['thirdPartyData']) end end |
#to_h ⇒ Hash
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant_action.rb', line 40 def to_h hash = super hash['actionType'] = @action_type unless @action_type.nil? hash['formFields'] = @form_fields.collect{|val| val.to_h} unless @form_fields.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['renderingData'] = @rendering_data unless @rendering_data.nil? hash['showData'] = @show_data.collect{|val| val.to_h} unless @show_data.nil? hash['thirdPartyData'] = @third_party_data.to_h unless @third_party_data.nil? hash end |