pub struct AddProductRequest1 {
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 AddProductRequest1
impl AddProductRequest1
pub fn new(name: String) -> AddProductRequest1
Trait Implementations§
Source§impl Clone for AddProductRequest1
impl Clone for AddProductRequest1
Source§fn clone(&self) -> AddProductRequest1
fn clone(&self) -> AddProductRequest1
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 AddProductRequest1
impl Debug for AddProductRequest1
Source§impl<'de> Deserialize<'de> for AddProductRequest1
impl<'de> Deserialize<'de> for AddProductRequest1
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 AddProductRequest1
impl PartialEq for AddProductRequest1
Source§impl Serialize for AddProductRequest1
impl Serialize for AddProductRequest1
impl StructuralPartialEq for AddProductRequest1
Auto Trait Implementations§
impl Freeze for AddProductRequest1
impl RefUnwindSafe for AddProductRequest1
impl Send for AddProductRequest1
impl Sync for AddProductRequest1
impl Unpin for AddProductRequest1
impl UnwindSafe for AddProductRequest1
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