-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds new recommend_ship_date and estimate_delivery_date functions (#306)
- Loading branch information
Showing
13 changed files
with
554 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class EasyPost::Services::SmartRate < EasyPost::Services::Service | ||
# Retrieve the estimated delivery date of each carrier-service level combination via the | ||
# Smart Deliver By API, based on a specific ship date and origin-destination postal code pair. | ||
def estimate_delivery_date(params = {}) | ||
url = 'smartrate/deliver_by' | ||
|
||
response = @client.make_request(:post, url, params) | ||
EasyPost::InternalUtilities::Json.convert_json_to_object(response, EasyPost::Models::EasyPostObject) | ||
end | ||
|
||
# Retrieve a recommended ship date for each carrier-service level combination via the | ||
# Smart Deliver On API, based on a specific delivery date and origin-destination postal code pair. | ||
def recommend_ship_date(params = {}) | ||
url = 'smartrate/deliver_on' | ||
|
||
response = @client.make_request(:post, url, params) | ||
EasyPost::InternalUtilities::Json.convert_json_to_object(response, EasyPost::Models::EasyPostObject) | ||
end | ||
end |
59 changes: 31 additions & 28 deletions
59
...mated_delivery_date_retrieve_time-in-transit_data_for_each_of_the_Rates_of_a_shipment.yml
Large diffs are not rendered by default.
Oops, something went wrong.
152 changes: 152 additions & 0 deletions
152
...ices_Shipment_retrieve_recommend_ship_date_retrieve_recommend_ship_date_of_a_shipment.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.