Class: Ingenico::Connect::SDK::Domain::Mandates::CreateMandateResponse
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Mandates::CreateMandateResponse
- Defined in:
- lib/ingenico/connect/sdk/domain/mandates/create_mandate_response.rb
Instance Attribute Summary collapse
-
#mandate ⇒ Ingenico::Connect::SDK::Domain::Mandates::MandateResponse
The current value of mandate.
-
#merchant_action ⇒ Ingenico::Connect::SDK::Domain::Mandates::MandateMerchantAction
The current value of merchant_action.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#mandate ⇒ Ingenico::Connect::SDK::Domain::Mandates::MandateResponse
Returns the current value of mandate.
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/mandates/create_mandate_response.rb', line 15 def mandate @mandate end |
#merchant_action ⇒ Ingenico::Connect::SDK::Domain::Mandates::MandateMerchantAction
Returns the current value of merchant_action.
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/mandates/create_mandate_response.rb', line 15 def merchant_action @merchant_action end |
Instance Method Details
#from_hash(hash) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/ingenico/connect/sdk/domain/mandates/create_mandate_response.rb', line 29 def from_hash(hash) super if hash.has_key? 'mandate' raise TypeError, "value '%s' is not a Hash" % [hash['mandate']] unless hash['mandate'].is_a? Hash @mandate = Ingenico::Connect::SDK::Domain::Mandates::MandateResponse.new_from_hash(hash['mandate']) end if hash.has_key? 'merchantAction' raise TypeError, "value '%s' is not a Hash" % [hash['merchantAction']] unless hash['merchantAction'].is_a? Hash @merchant_action = Ingenico::Connect::SDK::Domain::Mandates::MandateMerchantAction.new_from_hash(hash['merchantAction']) end end |
#to_h ⇒ Hash
22 23 24 25 26 27 |
# File 'lib/ingenico/connect/sdk/domain/mandates/create_mandate_response.rb', line 22 def to_h hash = super hash['mandate'] = @mandate.to_h unless @mandate.nil? hash['merchantAction'] = @merchant_action.to_h unless @merchant_action.nil? hash end |