Class: OnlinePayments::SDK::Domain::AcquirerInformation

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/acquirer_information.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#acquirer_selection_informationOnlinePayments::SDK::Domain::AcquirerSelectionInformation

Returns the current value of acquirer_selection_information.

Returns:



12
13
14
# File 'lib/onlinepayments/sdk/domain/acquirer_information.rb', line 12

def acquirer_selection_information
  @acquirer_selection_information
end

#nameString

Returns the current value of name.

Returns:

  • (String)

    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_hHash

Returns:

  • (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