Class: SpreeUberDirect::DeliveryMapping
- Inherits:
-
Object
- Object
- SpreeUberDirect::DeliveryMapping
- Defined in:
- app/models/spree_uber_direct/delivery_mapping.rb
Overview
Maps a Spree::Order to the Uber Direct delivery it was dispatched to on
acceptance — the Uber Direct analog of SpreeDoordash::DeliveryMapping.
Unlike DoorDash (which reuses the accepted quote's own id for the
delivery's whole lifecycle), Uber mints a genuinely separate
del_-prefixed id on POST /deliveries (confirmed directly against the
real CreateDeliveryResp schema) — external_delivery_id here is always
that new id, never the quote's dqt_... id.
Instance Method Summary collapse
Instance Method Details
#mark_failed!(error) ⇒ Object
23 24 25 |
# File 'app/models/spree_uber_direct/delivery_mapping.rb', line 23 def mark_failed!(error) update!(dispatch_error: error.to_s.truncate(2000)) end |