pub struct CreateWarranty {Show 18 fields
pub customer_id: CustomerId,
pub order_id: Option<OrderId>,
pub order_item_id: Option<OrderItemId>,
pub product_id: Option<ProductId>,
pub sku: Option<String>,
pub serial_number: Option<String>,
pub warranty_type: Option<WarrantyType>,
pub provider: Option<String>,
pub coverage_description: Option<String>,
pub purchase_date: Option<DateTime<Utc>>,
pub start_date: Option<DateTime<Utc>>,
pub end_date: Option<DateTime<Utc>>,
pub duration_months: Option<i32>,
pub max_coverage_amount: Option<Decimal>,
pub deductible: Option<Decimal>,
pub max_claims: Option<i32>,
pub terms: Option<String>,
pub notes: Option<String>,
}Expand description
Input for creating a warranty
Fields§
§customer_id: CustomerIdCustomer ID
order_id: Option<OrderId>Order ID
order_item_id: Option<OrderItemId>Order item ID
product_id: Option<ProductId>Product ID
sku: Option<String>Product SKU
serial_number: Option<String>Serial number
warranty_type: Option<WarrantyType>Warranty type
provider: Option<String>Provider
coverage_description: Option<String>Coverage description
purchase_date: Option<DateTime<Utc>>Purchase date (defaults to now)
start_date: Option<DateTime<Utc>>Start date (defaults to purchase date)
end_date: Option<DateTime<Utc>>End date (calculated from duration if not provided)
duration_months: Option<i32>Duration in months
max_coverage_amount: Option<Decimal>Max coverage amount
deductible: Option<Decimal>Deductible
max_claims: Option<i32>Max claims allowed
terms: Option<String>Terms and conditions
notes: Option<String>Notes
Trait Implementations§
Source§impl Clone for CreateWarranty
impl Clone for CreateWarranty
Source§fn clone(&self) -> CreateWarranty
fn clone(&self) -> CreateWarranty
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateWarranty
impl Debug for CreateWarranty
Source§impl Default for CreateWarranty
impl Default for CreateWarranty
Source§fn default() -> CreateWarranty
fn default() -> CreateWarranty
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CreateWarranty
impl<'de> Deserialize<'de> for CreateWarranty
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateWarranty, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateWarranty, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CreateWarranty
impl Serialize for CreateWarranty
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CreateWarranty
impl RefUnwindSafe for CreateWarranty
impl Send for CreateWarranty
impl Sync for CreateWarranty
impl Unpin for CreateWarranty
impl UnsafeUnpin for CreateWarranty
impl UnwindSafe for CreateWarranty
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