Class: SpreeDoordash::QuoteMapping

Inherits:
Object
  • Object
show all
Defined in:
app/models/spree_doordash/quote_mapping.rb

Overview

Tracks the most recent DoorDash Drive quote requested for an order, generated as checkout progresses (see Spree::Calculator::Shipping:: DoordashQuote) and consulted again at order.completed to decide whether to accept it as-is or re-quote (see SpreeDoordash::DeliveryDispatcher, M4) — DoorDash quotes are only valid 5 minutes, and checkout can easily take longer than that.

Instance Method Summary collapse

Instance Method Details

#expired?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'app/models/spree_doordash/quote_mapping.rb', line 16

def expired?
  quote_expires_at.blank? || quote_expires_at <= Time.current
end