Struct shippo::Rate[][src]

pub struct Rate {
Show fields 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]

fn clone(&self) -> Rate[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Rate[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

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

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for Rate[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

impl RefUnwindSafe for Rate

impl Send for Rate

impl Sync for Rate

impl Unpin for Rate

impl UnwindSafe for Rate

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn __clone_box(&self, Private) -> *mut ()[src]

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

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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