Struct shippo::Shipment[][src]

pub struct Shipment {
Show fields 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,
}
Expand description

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

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.