Struct rust_woocommerce::controllers::orders::CreateOrderBuilder
source · pub struct CreateOrderBuilder { /* private fields */ }Implementations§
source§impl CreateOrderBuilder
impl CreateOrderBuilder
pub fn new() -> Self
sourcepub fn status(self, order_status: OrderStatus) -> Self
pub fn status(self, order_status: OrderStatus) -> Self
Order status.
sourcepub fn currency(self, currency: CurrencyISO) -> Self
pub fn currency(self, currency: CurrencyISO) -> Self
Currency the order was created with, in ISO format.
sourcepub fn customer_id(self, customer_id: i32) -> Self
pub fn customer_id(self, customer_id: i32) -> Self
User ID who owns the order. 0 for guests. Default is 0.
sourcepub fn customer_note(self, customer_note: impl Into<String>) -> Self
pub fn customer_note(self, customer_note: impl Into<String>) -> Self
Note left by customer during checkout.
sourcepub fn billing_first_name(self, first_name: impl Into<String>) -> Self
pub fn billing_first_name(self, first_name: impl Into<String>) -> Self
billing first name.
sourcepub fn billing_last_name(self, last_name: impl Into<String>) -> Self
pub fn billing_last_name(self, last_name: impl Into<String>) -> Self
billing last name.
sourcepub fn billing_company(self, company: impl Into<String>) -> Self
pub fn billing_company(self, company: impl Into<String>) -> Self
billing company name.
sourcepub fn billing_address_1(self, address_1: impl Into<String>) -> Self
pub fn billing_address_1(self, address_1: impl Into<String>) -> Self
billing address line 1
sourcepub fn billing_address_2(self, address_2: impl Into<String>) -> Self
pub fn billing_address_2(self, address_2: impl Into<String>) -> Self
billing address line 2
sourcepub fn billing_city(self, city: impl Into<String>) -> Self
pub fn billing_city(self, city: impl Into<String>) -> Self
billing city name.
sourcepub fn billing_state(self, state: impl Into<String>) -> Self
pub fn billing_state(self, state: impl Into<String>) -> Self
billing ISO code or name of the state, province or district.
sourcepub fn billing_postcode(self, postcode: impl Into<String>) -> Self
pub fn billing_postcode(self, postcode: impl Into<String>) -> Self
billing postal code.
sourcepub fn billing_country(self, country: impl Into<String>) -> Self
pub fn billing_country(self, country: impl Into<String>) -> Self
billing ISO code of the country.
sourcepub fn billing_email(self, email: impl Into<String>) -> Self
pub fn billing_email(self, email: impl Into<String>) -> Self
billing email address.
sourcepub fn billing_phone(self, phone: impl Into<String>) -> Self
pub fn billing_phone(self, phone: impl Into<String>) -> Self
billing phone number.
sourcepub fn shipping_first_name(self, first_name: impl Into<String>) -> Self
pub fn shipping_first_name(self, first_name: impl Into<String>) -> Self
shipping first name.
sourcepub fn shipping_last_name(self, last_name: impl Into<String>) -> Self
pub fn shipping_last_name(self, last_name: impl Into<String>) -> Self
shipping last name.
sourcepub fn shipping_company(self, company: impl Into<String>) -> Self
pub fn shipping_company(self, company: impl Into<String>) -> Self
shipping company name.
sourcepub fn shipping_address_1(self, address_1: impl Into<String>) -> Self
pub fn shipping_address_1(self, address_1: impl Into<String>) -> Self
shipping address line 1
sourcepub fn shipping_address_2(self, address_2: impl Into<String>) -> Self
pub fn shipping_address_2(self, address_2: impl Into<String>) -> Self
shipping address line 2
sourcepub fn shipping_city(self, city: impl Into<String>) -> Self
pub fn shipping_city(self, city: impl Into<String>) -> Self
shipping city name.
sourcepub fn shipping_state(self, state: impl Into<String>) -> Self
pub fn shipping_state(self, state: impl Into<String>) -> Self
shipping ISO code or name of the state, province or district.
sourcepub fn shipping_postcode(self, postcode: impl Into<String>) -> Self
pub fn shipping_postcode(self, postcode: impl Into<String>) -> Self
shipping postal code.
sourcepub fn shipping_country(self, country: impl Into<String>) -> Self
pub fn shipping_country(self, country: impl Into<String>) -> Self
shipping ISO code of the country.
sourcepub fn payment_method(self, payment_method: impl Into<String>) -> Self
pub fn payment_method(self, payment_method: impl Into<String>) -> Self
Payment method ID.
sourcepub fn payment_method_title(
self,
payment_method_title: impl Into<String>
) -> Self
pub fn payment_method_title( self, payment_method_title: impl Into<String> ) -> Self
Payment method title.
sourcepub fn transaction_id(self, transaction_id: impl Into<String>) -> Self
pub fn transaction_id(self, transaction_id: impl Into<String>) -> Self
Unique transaction ID.
sourcepub fn line_item(self, line_item: OrderLineItemCreate) -> Self
pub fn line_item(self, line_item: OrderLineItemCreate) -> Self
Line items data.
sourcepub fn shipping_line(self, shipping_line: ShippingLineCreate) -> Self
pub fn shipping_line(self, shipping_line: ShippingLineCreate) -> Self
Shipping lines data.
sourcepub fn fee_line(self, fee_line: OrderFeeLineCreate) -> Self
pub fn fee_line(self, fee_line: OrderFeeLineCreate) -> Self
Fee lines data.
sourcepub fn coupon_line(self, code: impl Into<String>) -> Self
pub fn coupon_line(self, code: impl Into<String>) -> Self
Coupons line data.
sourcepub fn set_paid(self, paid: bool) -> Self
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.
pub fn build(self) -> Result<CreateOrder>
Trait Implementations§
source§impl Clone for CreateOrderBuilder
impl Clone for CreateOrderBuilder
source§fn clone(&self) -> CreateOrderBuilder
fn clone(&self) -> CreateOrderBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more