Struct shippo::Shippo [−][src]
pub struct Shippo { /* fields omitted */ }
Expand description
Entrypoint for interacting with the Shippo API.
Implementations
Create a new Shippo client struct. It takes a type that can convert into
an &str (String
or Vec<u8>
for example). As long as the function is
given a valid API Token your requests will work.
Create a new Shippo client struct from environment variables. It
takes a type that can convert into
an &str (String
or Vec<u8>
for example). As long as the function is
given a valid API Token and your requests will work.
List shipments. FROM: https://goshippo.com/docs/reference#shipments-list A maximum date range of 90 days is permitted. Provided dates should be ISO 8601 UTC dates.
Create a shipment. FROM: https://goshippo.com/docs/reference#shipments-create
List the orders. FROM: https://goshippo.com/docs/reference#orders-list
List the carrier accounts. FROM: https://goshippo.com/docs/reference#carrier-accounts
Get a shipment. FROM: https://goshippo.com/docs/reference#shipments-retrieve
Get a rate. FORMAT: https://goshippo.com/docs/reference#rates-retrieve
Create a pickup. FROM: https://goshippo.com/docs/reference#pickups-create
Create a customs item. FROM: https://goshippo.com/docs/reference#customs-items-create
pub async fn create_shipping_label_from_rate(
&self,
nt: NewTransaction
) -> Result<Transaction, APIError>
pub async fn create_shipping_label_from_rate(
&self,
nt: NewTransaction
) -> Result<Transaction, APIError>
Create a shipping label based on a rate. FROM: https://goshippo.com/docs/reference#transactions-create
Get a shipping label. FROM: https://goshippo.com/docs/reference#transactions-retrieve
List shiping labels. FROM: https://goshippo.com/docs/reference#transactions-list
pub async fn register_tracking_webhook(
&self,
carrier: &str,
tracking_number: &str
) -> Result<TrackingStatus, APIError>
pub async fn register_tracking_webhook(
&self,
carrier: &str,
tracking_number: &str
) -> Result<TrackingStatus, APIError>
Register a tracking webhook. You can register your webhook(s) for a Shipment (and request the current status at the same time) by POSTing to the tracking endpoint. This way Shippo will send HTTP notifications to your track_updated webhook(s) whenever the status changes. FROM: https://goshippo.com/docs/reference#tracks-create
pub async fn get_tracking_status(
&self,
carrier: &str,
tracking_number: &str
) -> Result<TrackingStatus, APIError>
pub async fn get_tracking_status(
&self,
carrier: &str,
tracking_number: &str
) -> Result<TrackingStatus, APIError>
Request the tracking status of a shipment by sending a GET request. FROM: https://goshippo.com/docs/reference#tracks-retrieve
Auto Trait Implementations
impl !RefUnwindSafe for Shippo
impl !UnwindSafe for Shippo