Method: EasyPost::Services::Shipment#retrieve_estimated_delivery_date

Defined in:
lib/easypost/services/shipment.rb

#retrieve_estimated_delivery_date(id, planned_ship_date) ⇒ Object

Retrieves the estimated delivery date of each Rate via SmartRate.



100
101
102
103
104
105
# File 'lib/easypost/services/shipment.rb', line 100

def retrieve_estimated_delivery_date(id, planned_ship_date)
  url = "shipments/#{id}/smartrate/delivery_date"
  params = { planned_ship_date: planned_ship_date }

  @client.make_request(:get, url, MODEL_CLASS, params).rates
end