Class: Rome2rio::IndicativePrice

Inherits:
Object
  • Object
show all
Defined in:
lib/rome2rio/response/indicative_price.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#currencyObject (readonly)

Returns the value of attribute currency.



3
4
5
# File 'lib/rome2rio/response/indicative_price.rb', line 3

def currency
  @currency
end

#isFreeTransferObject (readonly)

Returns the value of attribute isFreeTransfer.



3
4
5
# File 'lib/rome2rio/response/indicative_price.rb', line 3

def isFreeTransfer
  @isFreeTransfer
end

#nativeCurrencyObject (readonly)

Returns the value of attribute nativeCurrency.



3
4
5
# File 'lib/rome2rio/response/indicative_price.rb', line 3

def nativeCurrency
  @nativeCurrency
end

#nativePriceObject (readonly)

Returns the value of attribute nativePrice.



3
4
5
# File 'lib/rome2rio/response/indicative_price.rb', line 3

def nativePrice
  @nativePrice
end

#priceObject (readonly)

Returns the value of attribute price.



3
4
5
# File 'lib/rome2rio/response/indicative_price.rb', line 3

def price
  @price
end