Class: Worldline::Connect::SDK::V1::Domain::MerchantAction
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::MerchantAction
- Defined in:
- lib/worldline/connect/sdk/v1/domain/merchant_action.rb
Instance Attribute Summary collapse
-
#action_type ⇒ String
The current value of action_type.
-
#form_fields ⇒ Array<Worldline::Connect::SDK::V1::Domain::PaymentProductField>
The current value of form_fields.
-
#mobile_three_d_secure_challenge_parameters ⇒ Worldline::Connect::SDK::V1::Domain::MobileThreeDSecureChallengeParameters
The current value of mobile_three_d_secure_challenge_parameters.
-
#redirect_data ⇒ Worldline::Connect::SDK::V1::Domain::RedirectData
The current value of redirect_data.
-
#rendering_data ⇒ String
The current value of rendering_data.
-
#show_data ⇒ Array<Worldline::Connect::SDK::V1::Domain::KeyValuePair>
The current value of show_data.
-
#third_party_data ⇒ Worldline::Connect::SDK::V1::Domain::ThirdPartyData
The current value of third_party_data.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#action_type ⇒ String
Returns the current value of action_type.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/merchant_action.rb', line 24 def action_type @action_type end |
#form_fields ⇒ Array<Worldline::Connect::SDK::V1::Domain::PaymentProductField>
Returns the current value of form_fields.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/merchant_action.rb', line 24 def form_fields @form_fields end |
#mobile_three_d_secure_challenge_parameters ⇒ Worldline::Connect::SDK::V1::Domain::MobileThreeDSecureChallengeParameters
Returns the current value of mobile_three_d_secure_challenge_parameters.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/merchant_action.rb', line 24 def mobile_three_d_secure_challenge_parameters @mobile_three_d_secure_challenge_parameters end |
#redirect_data ⇒ Worldline::Connect::SDK::V1::Domain::RedirectData
Returns the current value of redirect_data.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/merchant_action.rb', line 24 def redirect_data @redirect_data end |
#rendering_data ⇒ String
Returns the current value of rendering_data.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/merchant_action.rb', line 24 def rendering_data @rendering_data end |
#show_data ⇒ Array<Worldline::Connect::SDK::V1::Domain::KeyValuePair>
Returns the current value of show_data.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/merchant_action.rb', line 24 def show_data @show_data end |
#third_party_data ⇒ Worldline::Connect::SDK::V1::Domain::ThirdPartyData
Returns the current value of third_party_data.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/merchant_action.rb', line 24 def third_party_data @third_party_data end |
Instance Method Details
#from_hash(hash) ⇒ Object
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 87 |
# File 'lib/worldline/connect/sdk/v1/domain/merchant_action.rb', line 53 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 << Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::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 = Worldline::Connect::SDK::V1::Domain::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 << Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::ThirdPartyData.new_from_hash(hash['thirdPartyData']) end end |
#to_h ⇒ Hash
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/worldline/connect/sdk/v1/domain/merchant_action.rb', line 41 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 |