[][src]Struct shippo::Shipment

pub struct Shipment {
    pub status: String,
    pub object_created: DateTime<Utc>,
    pub object_updated: DateTime<Utc>,
    pub object_id: String,
    pub object_owner: String,
    pub address_from: Address,
    pub address_to: Address,
    pub address_return: Address,
    pub parcels: Vec<Parcel>,
    pub shipment_date: DateTime<Utc>,
    pub customs_declaration: Option<CustomsDeclaration>,
    pub metadata: String,
    pub rates: Vec<Rate>,
    pub test: bool,
}

The data type for a Shipment. FROM: https://goshippo.com/docs/reference#shipments

Fields

status: String

"Waiting" shipments have been successfully submitted but not yet been processed. "Queued" shipments are currently being processed. "Success" shipments have been processed successfully, meaning that rate generation has concluded. "Error" does not occur currently and is reserved for future use. "WAITING" | "QUEUED" | "SUCCESS" | "ERROR"

object_created: DateTime<Utc>

Date and time of Shipment creation.

object_updated: DateTime<Utc>

Date and time of last Shipment update.

object_id: String

Unique identifier of the given Shipment object.

object_owner: String

Username of the user who created the Shipment object.

address_from: Address

Address object that should be used as sender Address.

address_to: Address

Address object that should be used as recipient Address.

address_return: Address

Address object where the shipment will be sent back to if it is not delivered (Only available for UPS, USPS, and Fedex shipments). If this field is not set, your shipments will be returned to the address_from.

parcels: Vec<Parcel>

Parcel objects to be shipped.

shipment_date: DateTime<Utc>

Date the shipment will be tendered to the carrier. Must be in the format "2014-01-18T00:35:03.463Z". Defaults to current date and time if no value is provided. Please note that some carriers require this value to be in the future, on a working day, or similar.

customs_declaration: Option<CustomsDeclaration>

Customs Declarations object for an international shipment.

metadata: String

A string of up to 100 characters that can be filled with any additional information you want to attach to the object.

rates: Vec<Rate>

An array with all available rates. If async has been set to false in the request, this will be populated with all available rates in the response. Otherwise rates will be created asynchronously and this array will initially be empty.

test: bool

Indicates whether the object has been created in test mode.

Trait Implementations

impl Clone for Shipment[src]

impl Debug for Shipment[src]

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

impl Serialize for Shipment[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.