Class: OnlinePayments::SDK::Domain::AcquirerInformation
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::AcquirerInformation
- Defined in:
- lib/onlinepayments/sdk/domain/acquirer_information.rb
Instance Attribute Summary collapse
-
#acquirer_selection_information ⇒ OnlinePayments::SDK::Domain::AcquirerSelectionInformation
The current value of acquirer_selection_information.
-
#name ⇒ String
The current value of name.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#acquirer_selection_information ⇒ OnlinePayments::SDK::Domain::AcquirerSelectionInformation
Returns the current value of acquirer_selection_information.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/acquirer_information.rb', line 12 def acquirer_selection_information @acquirer_selection_information end |
#name ⇒ String
Returns the current value of name.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/acquirer_information.rb', line 12 def name @name end |
Instance Method Details
#from_hash(hash) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/onlinepayments/sdk/domain/acquirer_information.rb', line 24 def from_hash(hash) super if hash.key? 'acquirerSelectionInformation' raise TypeError, "value '%s' is not a Hash" % [hash['acquirerSelectionInformation']] unless hash['acquirerSelectionInformation'].is_a? Hash @acquirer_selection_information = OnlinePayments::SDK::Domain::AcquirerSelectionInformation.new_from_hash(hash['acquirerSelectionInformation']) end @name = hash['name'] if hash.key? 'name' end |
#to_h ⇒ Hash
17 18 19 20 21 22 |
# File 'lib/onlinepayments/sdk/domain/acquirer_information.rb', line 17 def to_h hash = super hash['acquirerSelectionInformation'] = @acquirer_selection_information.to_h if @acquirer_selection_information hash['name'] = @name unless @name.nil? hash end |