Class: OnlinePayments::SDK::Domain::RateDetails
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::RateDetails
- Defined in:
- lib/onlinepayments/sdk/domain/rate_details.rb
Instance Attribute Summary collapse
-
#exchange_rate ⇒ Float
The current value of exchange_rate.
-
#inverted_exchange_rate ⇒ Float
The current value of inverted_exchange_rate.
-
#mark_up_rate ⇒ Float
The current value of mark_up_rate.
-
#quotation_date_time ⇒ String
The current value of quotation_date_time.
-
#source ⇒ String
The current value of source.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#exchange_rate ⇒ Float
Returns the current value of exchange_rate.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/rate_details.rb', line 14 def exchange_rate @exchange_rate end |
#inverted_exchange_rate ⇒ Float
Returns the current value of inverted_exchange_rate.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/rate_details.rb', line 14 def inverted_exchange_rate @inverted_exchange_rate end |
#mark_up_rate ⇒ Float
Returns the current value of mark_up_rate.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/rate_details.rb', line 14 def mark_up_rate @mark_up_rate end |
#quotation_date_time ⇒ String
Returns the current value of quotation_date_time.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/rate_details.rb', line 14 def quotation_date_time @quotation_date_time end |
#source ⇒ String
Returns the current value of source.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/rate_details.rb', line 14 def source @source end |
Instance Method Details
#from_hash(hash) ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/onlinepayments/sdk/domain/rate_details.rb', line 32 def from_hash(hash) super @exchange_rate = hash['exchangeRate'] if hash.key? 'exchangeRate' @inverted_exchange_rate = hash['invertedExchangeRate'] if hash.key? 'invertedExchangeRate' @mark_up_rate = hash['markUpRate'] if hash.key? 'markUpRate' @quotation_date_time = hash['quotationDateTime'] if hash.key? 'quotationDateTime' @source = hash['source'] if hash.key? 'source' end |
#to_h ⇒ Hash
22 23 24 25 26 27 28 29 30 |
# File 'lib/onlinepayments/sdk/domain/rate_details.rb', line 22 def to_h hash = super hash['exchangeRate'] = @exchange_rate unless @exchange_rate.nil? hash['invertedExchangeRate'] = @inverted_exchange_rate unless @inverted_exchange_rate.nil? hash['markUpRate'] = @mark_up_rate unless @mark_up_rate.nil? hash['quotationDateTime'] = @quotation_date_time unless @quotation_date_time.nil? hash['source'] = @source unless @source.nil? hash end |