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,
}
Expand description

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

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

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

Performs the conversion.

The resulting type after obtaining ownership.

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

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

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.