Class: Worldline::Acquiring::SDK::V1::Domain::RateData
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::RateData
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/rate_data.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 ⇒ float
The current value of mark_up.
-
#mark_up_basis ⇒ String
The current value of mark_up_basis.
-
#quotation_date_time ⇒ DateTime
The current value of quotation_date_time.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#exchange_rate ⇒ float
Returns the current value of exchange_rate.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/rate_data.rb', line 18 def exchange_rate @exchange_rate end |
#inverted_exchange_rate ⇒ float
Returns the current value of inverted_exchange_rate.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/rate_data.rb', line 18 def inverted_exchange_rate @inverted_exchange_rate end |
#mark_up ⇒ float
Returns the current value of mark_up.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/rate_data.rb', line 18 def mark_up @mark_up end |
#mark_up_basis ⇒ String
Returns the current value of mark_up_basis.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/rate_data.rb', line 18 def mark_up_basis @mark_up_basis end |
#quotation_date_time ⇒ DateTime
Returns the current value of quotation_date_time.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/rate_data.rb', line 18 def quotation_date_time @quotation_date_time end |
Instance Method Details
#from_hash(hash) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/worldline/acquiring/sdk/v1/domain/rate_data.rb', line 41 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? 'markUp' @mark_up = hash['markUp'] end if hash.has_key? 'markUpBasis' @mark_up_basis = hash['markUpBasis'] end if hash.has_key? 'quotationDateTime' @quotation_date_time = DateTime.parse(hash['quotationDateTime']) end end |
#to_h ⇒ Hash
31 32 33 34 35 36 37 38 39 |
# File 'lib/worldline/acquiring/sdk/v1/domain/rate_data.rb', line 31 def to_h hash = super hash['exchangeRate'] = @exchange_rate unless @exchange_rate.nil? hash['invertedExchangeRate'] = @inverted_exchange_rate unless @inverted_exchange_rate.nil? hash['markUp'] = @mark_up unless @mark_up.nil? hash['markUpBasis'] = @mark_up_basis unless @mark_up_basis.nil? hash['quotationDateTime'] = @quotation_date_time.iso8601(3) unless @quotation_date_time.nil? hash end |