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

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/acquirer_information.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from 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



26
27
28
29
30
31
32
33
34
35
# File 'lib/onlinepayments/sdk/domain/acquirer_information.rb', line 26

def from_hash(hash)
  super
  if hash.has_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
  if hash.has_key? 'name'
    @name = hash['name']
  end
end

#to_hHash

Returns:

  • (Hash)


19
20
21
22
23
24
# File 'lib/onlinepayments/sdk/domain/acquirer_information.rb', line 19

def to_h
  hash = super
  hash['acquirerSelectionInformation'] = @acquirer_selection_information.to_h unless @acquirer_selection_information.nil?
  hash['name'] = @name unless @name.nil?
  hash
end