Class: Rome2rio::IndicativePrice
- Inherits:
-
Object
- Object
- Rome2rio::IndicativePrice
- Defined in:
- lib/rome2rio/response/indicative_price.rb
Instance Attribute Summary collapse
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#isFreeTransfer ⇒ Object
readonly
Returns the value of attribute isFreeTransfer.
-
#nativeCurrency ⇒ Object
readonly
Returns the value of attribute nativeCurrency.
-
#nativePrice ⇒ Object
readonly
Returns the value of attribute nativePrice.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
Instance Method Summary collapse
-
#initialize(json) ⇒ IndicativePrice
constructor
A new instance of IndicativePrice.
Constructor Details
#initialize(json) ⇒ IndicativePrice
Returns a new instance of IndicativePrice.
4 5 6 7 8 9 10 |
# File 'lib/rome2rio/response/indicative_price.rb', line 4 def initialize(json) @price = json["price"] if json["price"] @currency = json["currency"] if json["currency"] @nativePrice = json["nativePrice"] if json["nativePrice"] @nativeCurrency = json["nativeCurrency"] if json["nativeCurrency"] @isFreeTransfer = json["isFreeTransfer"] == 1 if json["isFreeTransfer"] end |
Instance Attribute Details
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
3 4 5 |
# File 'lib/rome2rio/response/indicative_price.rb', line 3 def currency @currency end |
#isFreeTransfer ⇒ Object (readonly)
Returns the value of attribute isFreeTransfer.
3 4 5 |
# File 'lib/rome2rio/response/indicative_price.rb', line 3 def isFreeTransfer @isFreeTransfer end |
#nativeCurrency ⇒ Object (readonly)
Returns the value of attribute nativeCurrency.
3 4 5 |
# File 'lib/rome2rio/response/indicative_price.rb', line 3 def nativeCurrency @nativeCurrency end |
#nativePrice ⇒ Object (readonly)
Returns the value of attribute nativePrice.
3 4 5 |
# File 'lib/rome2rio/response/indicative_price.rb', line 3 def nativePrice @nativePrice end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
3 4 5 |
# File 'lib/rome2rio/response/indicative_price.rb', line 3 def price @price end |