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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::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



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

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

#to_hHash

Returns:

  • (Hash)


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

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