pub struct AddProductRequest {
pub name: String,
pub code: Option<String>,
pub unit: Option<String>,
pub tax: Option<f32>,
pub active_flag: Option<bool>,
pub selectable: Option<bool>,
pub visible_to: Option<VisibleTo>,
pub owner_id: Option<i32>,
pub prices: Option<Vec<Value>>,
}
Fields§
§name: String
The name of the product
code: Option<String>
The product code
unit: Option<String>
The unit in which this product is sold
tax: Option<f32>
The tax percentage
active_flag: Option<bool>
Whether this product will be made active or not
selectable: Option<bool>
Whether this product can be selected in deals or not
visible_to: Option<VisibleTo>
§owner_id: Option<i32>
The ID of the user who will be marked as the owner of this product. When omitted, the authorized user ID will be used.
prices: Option<Vec<Value>>
An array of objects, each containing: currency
(string), price
(number), cost
(number, optional), overhead_cost
(number, optional). Note that there can only be one price per product per currency. When prices
is omitted altogether, a default price of 0 and a default currency based on the company’s currency will be assigned.
Implementations§
Source§impl AddProductRequest
impl AddProductRequest
pub fn new(name: String) -> AddProductRequest
Trait Implementations§
Source§impl Clone for AddProductRequest
impl Clone for AddProductRequest
Source§fn clone(&self) -> AddProductRequest
fn clone(&self) -> AddProductRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AddProductRequest
impl Debug for AddProductRequest
Source§impl<'de> Deserialize<'de> for AddProductRequest
impl<'de> Deserialize<'de> for AddProductRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AddProductRequest
impl PartialEq for AddProductRequest
Source§impl Serialize for AddProductRequest
impl Serialize for AddProductRequest
impl StructuralPartialEq for AddProductRequest
Auto Trait Implementations§
impl Freeze for AddProductRequest
impl RefUnwindSafe for AddProductRequest
impl Send for AddProductRequest
impl Sync for AddProductRequest
impl Unpin for AddProductRequest
impl UnwindSafe for AddProductRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more