class Postmates::Quote

Attributes

created_at[R]
currency[R]
dropoff_eta[R]
duration[R]
expires_at[R]
fee[R]
id[R]

Public Class Methods

new(hash) click to toggle source
# File lib/postmates/quote.rb, line 9
def initialize(hash)
  @id          =         hash['id']
  @fee         =         hash['fee']
  @currency    =         hash['currency']
  @duration    =         hash['duration']
  @created_at  = timeify hash['created']
  @expires_at  = timeify hash['expires']
  @dropoff_eta = timeify hash['dropoff_eta']
end

Public Instance Methods

expired?() click to toggle source
# File lib/postmates/quote.rb, line 19
def expired?
  Time.now.utc.to_datetime > expires_at
end