pub struct ExpensesApi<'a> { /* private fields */ }Expand description
Expenses (entries) API.
Implementations§
Source§impl<'a> ExpensesApi<'a>
impl<'a> ExpensesApi<'a>
pub fn new(client: &'a ConcurClient) -> Self
Sourcepub async fn list(
&self,
user_id: &str,
context: &str,
report_id: &str,
) -> Result<Vec<Expense>>
pub async fn list( &self, user_id: &str, context: &str, report_id: &str, ) -> Result<Vec<Expense>>
List expenses on a report.
Sourcepub async fn get(
&self,
user_id: &str,
context: &str,
report_id: &str,
expense_id: &str,
) -> Result<Expense>
pub async fn get( &self, user_id: &str, context: &str, report_id: &str, expense_id: &str, ) -> Result<Expense>
Get a single expense.
Sourcepub async fn create(
&self,
user_id: &str,
context: &str,
report_id: &str,
expense: &CreateExpense,
) -> Result<CreateExpenseResponse>
pub async fn create( &self, user_id: &str, context: &str, report_id: &str, expense: &CreateExpense, ) -> Result<CreateExpenseResponse>
Create an expense on a report.
Sourcepub async fn update(
&self,
user_id: &str,
context: &str,
report_id: &str,
expense_id: &str,
patch: &CreateExpense,
) -> Result<()>
pub async fn update( &self, user_id: &str, context: &str, report_id: &str, expense_id: &str, patch: &CreateExpense, ) -> Result<()>
Update an expense (JSON Merge Patch).
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ExpensesApi<'a>
impl<'a> !UnwindSafe for ExpensesApi<'a>
impl<'a> Forget for ExpensesApi<'a>
impl<'a> Freeze for ExpensesApi<'a>
impl<'a> Send for ExpensesApi<'a>
impl<'a> Sync for ExpensesApi<'a>
impl<'a> Unpin for ExpensesApi<'a>
impl<'a> UnsafeUnpin for ExpensesApi<'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