[][src]Struct shippo::Rate

pub struct Rate {
    pub object_id: String,
    pub object_created: DateTime<Utc>,
    pub object_owner: String,
    pub attributes: Vec<String>,
    pub shipment: String,
    pub amount: String,
    pub currency: String,
    pub amount_local: String,
    pub currency_local: String,
    pub provider: String,
    pub provider_image_75: String,
    pub provider_image_200: String,
    pub servicelevel: ServiceLevel,
    pub estimated_days: Option<i64>,
    pub duration_terms: String,
    pub carrier_account: String,
    pub test: bool,
}

The data type for a rate. A rate is an available service of a shipping provider for a given shipment, typically including the price and transit time. FROM: https://goshippo.com/docs/reference#rates

Fields

object_id: String

Unique identifier of the given Rate object.

object_created: DateTime<Utc>

Date and time of Rate creation.

object_owner: String

Username of the user who created the rate object.

attributes: Vec<String>

An array containing specific attributes of this Rate in context of the entire shipment. Attributes can be assigned 'CHEAPEST', 'FASTEST', or 'BESTVALUE'.

shipment: Stringamount: String

Final Rate price, expressed in the currency used in the sender's country.

currency: String

Currency used in the sender's country, refers to "amount". The official ISO 4217 currency codes are used, e.g. "USD" or "EUR".

amount_local: String

Final Rate price, expressed in the currency used in the recipient's country.

currency_local: String

Currency used in the recipient's country, refers to "amount_local". The official ISO 4217 currency codes are used, e.g. "USD" or "EUR".

provider: String

Carrier offering the rate, e.g., "FedEx" or "Deutsche Post DHL".

provider_image_75: String

URL to the provider logo with max. dimensions of 75*75px. Please refer to the provider's Logo Usage Guidelines before using the logo.

provider_image_200: String

URL to the provider logo with max. dimensions of 200*200px. Please refer to the provider's Logo Usage Guidelines before using the logo.

servicelevel: ServiceLevel

Contains details regarding the service level for the given rate.

estimated_days: Option<i64>

Estimated transit time (duration) in days of the Parcel at the given servicelevel. Please note that this is not binding, but only an average value as given by the provider. Shippo is not able to guarantee any transit times.

duration_terms: String

Further clarification of the transit times. Often, this includes notes that the transit time as given in "days" is only an average, not a guaranteed time.

carrier_account: String

Object ID of the carrier account that has been used to retrieve the rate.

test: bool

Indicates whether the object has been created in test mode.

Trait Implementations

impl Clone for Rate[src]

impl Debug for Rate[src]

impl<'de> Deserialize<'de> for Rate[src]

impl Serialize for Rate[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.