pub struct AddDealProductRequest {
pub product_id: i32,
pub item_price: f32,
pub quantity: i32,
pub discount: Option<f32>,
pub discount_type: Option<DiscountType>,
pub duration: Option<f32>,
pub duration_unit: Option<DurationUnit>,
pub product_variation_id: Option<Option<i32>>,
pub comments: Option<String>,
pub tax: Option<f32>,
pub tax_method: Option<TaxMethod>,
pub enabled_flag: Option<bool>,
}Fields§
§product_id: i32The ID of the product to use
item_price: f32The price at which this product will be added to the deal
quantity: i32Quantity – e.g. how many items of this product will be added to the deal
discount: Option<f32>The value of the discount. The discount_type field can be used to specify whether the value is an amount or a percentage.
discount_type: Option<DiscountType>The type of the discount’s value.
duration: Option<f32>The duration of the product. If omitted, will be set to 1.
duration_unit: Option<DurationUnit>§product_variation_id: Option<Option<i32>>The ID of the product variation to use. When omitted, no variation will be used.
comments: Option<String>A textual comment associated with this product-deal attachment
tax: Option<f32>The tax percentage
tax_method: Option<TaxMethod>The tax option to be applied to the products. When using inclusive, the tax percentage will already be included in the price. When using exclusive, the tax will not be included in the price. When using none, no tax will be added. Use the tax field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal.
enabled_flag: Option<bool>Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default.
Implementations§
Trait Implementations§
Source§impl Clone for AddDealProductRequest
impl Clone for AddDealProductRequest
Source§fn clone(&self) -> AddDealProductRequest
fn clone(&self) -> AddDealProductRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more