pub struct ProductResource<'a> { /* private fields */ }Implementations§
Source§impl<'a> ProductResource<'a>
impl<'a> ProductResource<'a>
pub fn new(client: &'a LightspeedClient) -> Self
pub async fn get_all( &self, params: Option<Vec<(&str, &str)>>, ) -> Result<Products, Box<dyn Error>>
pub async fn get_by_id(&self, id: &str) -> Result<Product, Box<dyn Error>>
pub async fn create(&self, product: Product) -> Result<Product, Box<dyn Error>>
pub async fn update( &self, id: &str, product: Product, ) -> Result<Product, Box<dyn Error>>
pub async fn delete(&self, id: &str) -> Result<(), Box<dyn Error>>
pub async fn count( &self, params: Option<Vec<(&str, &str)>>, ) -> Result<Count, Box<dyn Error>>
Auto Trait Implementations§
impl<'a> Freeze for ProductResource<'a>
impl<'a> !RefUnwindSafe for ProductResource<'a>
impl<'a> Send for ProductResource<'a>
impl<'a> Sync for ProductResource<'a>
impl<'a> Unpin for ProductResource<'a>
impl<'a> !UnwindSafe for ProductResource<'a>
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