pub struct UpdateOrderBuilder { /* private fields */ }

Implementations§

source§

impl UpdateOrderBuilder

source

pub fn new() -> Self

source

pub fn id(self, id: i32) -> Self

Unique identifier for the resource.

source

pub fn parent_id(self, parent_id: i32) -> Self

Parent order ID.

source

pub fn status(self, order_status: OrderStatus) -> Self

Order status.

source

pub fn currency(self, currency: CurrencyISO) -> Self

Currency the order was created with, in ISO format.

source

pub fn customer_id(self, customer_id: i32) -> Self

User ID who owns the order. 0 for guests. Default is 0.

source

pub fn customer_note(self, customer_note: impl Into<String>) -> Self

Note left by customer during checkout.

source

pub fn billing_first_name(self, first_name: impl Into<String>) -> Self

billing first name.

source

pub fn billing_last_name(self, last_name: impl Into<String>) -> Self

billing last name.

source

pub fn billing_company(self, company: impl Into<String>) -> Self

billing company name.

source

pub fn billing_address_1(self, address_1: impl Into<String>) -> Self

billing address line 1

source

pub fn billing_address_2(self, address_2: impl Into<String>) -> Self

billing address line 2

source

pub fn billing_city(self, city: impl Into<String>) -> Self

billing city name.

source

pub fn billing_state(self, state: impl Into<String>) -> Self

billing ISO code or name of the state, province or district.

source

pub fn billing_postcode(self, postcode: impl Into<String>) -> Self

billing postal code.

source

pub fn billing_country(self, country: impl Into<String>) -> Self

billing ISO code of the country.

source

pub fn billing_email(self, email: impl Into<String>) -> Self

billing email address.

source

pub fn billing_phone(self, phone: impl Into<String>) -> Self

billing phone number.

source

pub fn shipping_first_name(self, first_name: impl Into<String>) -> Self

shipping first name.

source

pub fn shipping_last_name(self, last_name: impl Into<String>) -> Self

shipping last name.

source

pub fn shipping_company(self, company: impl Into<String>) -> Self

shipping company name.

source

pub fn shipping_address_1(self, address_1: impl Into<String>) -> Self

shipping address line 1

source

pub fn shipping_address_2(self, address_2: impl Into<String>) -> Self

shipping address line 2

source

pub fn shipping_city(self, city: impl Into<String>) -> Self

shipping city name.

source

pub fn shipping_state(self, state: impl Into<String>) -> Self

shipping ISO code or name of the state, province or district.

source

pub fn shipping_postcode(self, postcode: impl Into<String>) -> Self

shipping postal code.

source

pub fn shipping_country(self, country: impl Into<String>) -> Self

shipping ISO code of the country.

source

pub fn payment_method(self, payment_method: impl Into<String>) -> Self

Payment method ID.

source

pub fn payment_method_title( self, payment_method_title: impl Into<String> ) -> Self

Payment method title.

source

pub fn transaction_id(self, transaction_id: impl Into<String>) -> Self

Unique transaction ID.

source

pub fn meta_data(self, key: impl Into<String>, value: impl Serialize) -> Self

Meta data.

source

pub fn line_item(self, line_item: OrderLineItemCreate) -> Self

Line items data.

source

pub fn shipping_line(self, shipping_line: ShippingLineCreate) -> Self

Shipping lines data.

source

pub fn fee_line(self, fee_line: OrderFeeLineCreate) -> Self

Fee lines data.

source

pub fn coupon_line(self, code: impl Into<String>) -> Self

Coupons line data.

source

pub fn set_paid(self, paid: bool) -> Self

Define if the order is paid. It will set the status to processing and reduce stock items. Default is false.

source

pub fn build(self) -> UpdateOrder

Trait Implementations§

source§

impl Clone for UpdateOrderBuilder

source§

fn clone(&self) -> UpdateOrderBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for UpdateOrderBuilder

source§

fn default() -> UpdateOrderBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more