Class: OnlinePayments::SDK::Domain::PaymentProduct5002SpecificData

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#api_parametersOnlinePayments::SDK::Domain::ApiParameters?

Returns the current value of api_parameters.

Returns:



11
12
13
# File 'lib/onlinepayments/sdk/domain/payment_product5002_specific_data.rb', line 11

def api_parameters
  @api_parameters
end

Instance Method Details

#from_hash(hash) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/onlinepayments/sdk/domain/payment_product5002_specific_data.rb', line 22

def from_hash(hash)
  super
  if hash.has_key? 'apiParameters'
    raise TypeError, "value '%s' is not a Hash" % [hash['apiParameters']] unless hash['apiParameters'].is_a? Hash
    @api_parameters = OnlinePayments::SDK::Domain::ApiParameters.new_from_hash(hash['apiParameters'])
  end
end

#to_hHash

Returns:

  • (Hash)


16
17
18
19
20
# File 'lib/onlinepayments/sdk/domain/payment_product5002_specific_data.rb', line 16

def to_h
  hash = super
  hash['apiParameters'] = @api_parameters.to_h unless @api_parameters.nil?
  hash
end