Class: OnlinePayments::SDK::Domain::CurrencyConversionInput

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#accepted_by_usertrue/false

Returns the current value of accepted_by_user.

Returns:

  • (true/false)

    the current value of accepted_by_user



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

def accepted_by_user
  @accepted_by_user
end

#dcc_session_idString

Returns the current value of dcc_session_id.

Returns:

  • (String)

    the current value of dcc_session_id



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

def dcc_session_id
  @dcc_session_id
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

def from_hash(hash)
  super
  if hash.has_key? 'acceptedByUser'
    @accepted_by_user = hash['acceptedByUser']
  end
  if hash.has_key? 'dccSessionId'
    @dcc_session_id = hash['dccSessionId']
  end
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['acceptedByUser'] = @accepted_by_user unless @accepted_by_user.nil?
  hash['dccSessionId'] = @dcc_session_id unless @dcc_session_id.nil?
  hash
end