pub struct OrderReturn {
    pub uid: Option<String>,
    pub source_order_id: Option<String>,
    pub return_line_items: Option<Vec<OrderReturnLineItem>>,
    pub return_service_charges: Option<Vec<OrderReturnServiceCharge>>,
    pub return_taxes: Option<Vec<OrderReturnTax>>,
    pub return_discounts: Option<Vec<OrderReturnDiscount>>,
    pub rounding_adjustment: Option<OrderRoundingAdjustment>,
    pub return_amounts: Option<OrderMoneyAmounts>,
}
Expand description

The set of line items, service charges, taxes, discounts, tips, and other items being returned in an order.

Fields

uid: Option<String>

A unique ID that identifies the return only within this order.

source_order_id: Option<String>

An order that contains the original sale of these return line items. This is unset for unlinked returns.

return_line_items: Option<Vec<OrderReturnLineItem>>

A collection of line items that are being returned.

return_service_charges: Option<Vec<OrderReturnServiceCharge>>

Read only A collection of service charges that are being returned.

return_taxes: Option<Vec<OrderReturnTax>>

A collection of references to taxes being returned for an order, including the total applied tax amount to be returned. The taxes must reference a top-level tax ID from the source order.

return_discounts: Option<Vec<OrderReturnDiscount>>

A collection of references to discounts being returned for an order, including the total applied discount amount to be returned. The discounts must reference a top-level discount ID from the source order.

rounding_adjustment: Option<OrderRoundingAdjustment>

A positive or negative rounding adjustment to the total value being returned. Adjustments are commonly used to apply cash rounding when the minimum unit of the account is smaller than the lowest physical denomination of the currency.

return_amounts: Option<OrderMoneyAmounts>

An aggregate monetary value being returned by this return entry.

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
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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
Compare self to key and return true if they are equal.

Returns the argument unchanged.

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

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more