Class: OnlinePayments::SDK::Domain::RateDetails
- Inherits:
-
DataObject
- Object
- 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 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
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/onlinepayments/sdk/domain/rate_details.rb', line 37 def from_hash(hash) super if hash.has_key? 'exchangeRate' @exchange_rate = hash['exchangeRate'] end if hash.has_key? 'invertedExchangeRate' @inverted_exchange_rate = hash['invertedExchangeRate'] end if hash.has_key? 'markUpRate' @mark_up_rate = hash['markUpRate'] end if hash.has_key? 'quotationDateTime' @quotation_date_time = hash['quotationDateTime'] end if hash.has_key? 'source' @source = hash['source'] end end |
#to_h ⇒ Hash
27 28 29 30 31 32 33 34 35 |
# File 'lib/onlinepayments/sdk/domain/rate_details.rb', line 27 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 |