pub struct CustomerResource<'a> { /* private fields */ }
Implementations§
Source§impl<'a> CustomerResource<'a>
impl<'a> CustomerResource<'a>
pub fn new(client: &'a LightspeedClient) -> Self
pub async fn get_all( &self, params: Option<Vec<(&str, &str)>>, ) -> Result<Customers, Box<dyn Error>>
pub async fn get_by_id(&self, id: &str) -> Result<Customer, Box<dyn Error>>
pub async fn create( &self, customer: Customer, ) -> Result<Customer, Box<dyn Error>>
pub async fn update( &self, id: &str, customer: Customer, ) -> Result<Customer, Box<dyn Error>>
pub async fn delete(&self, id: &str) -> Result<Value, 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 CustomerResource<'a>
impl<'a> !RefUnwindSafe for CustomerResource<'a>
impl<'a> Send for CustomerResource<'a>
impl<'a> Sync for CustomerResource<'a>
impl<'a> Unpin for CustomerResource<'a>
impl<'a> !UnwindSafe for CustomerResource<'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