pub struct ReceiptsApi<'a> { /* private fields */ }Expand description
Receipts API.
Implementations§
Source§impl<'a> ReceiptsApi<'a>
impl<'a> ReceiptsApi<'a>
pub fn new(client: &'a ConcurClient) -> Self
Sourcepub async fn index(&self) -> Result<ReceiptIndex>
pub async fn index(&self) -> Result<ReceiptIndex>
Get service index.
Sourcepub async fn schemas(&self, schema_id: Option<&str>) -> Result<Value>
pub async fn schemas(&self, schema_id: Option<&str>) -> Result<Value>
Get supported receipt schemas.
Sourcepub async fn status(&self, receipt_id: &str) -> Result<ReceiptStatus>
pub async fn status(&self, receipt_id: &str) -> Result<ReceiptStatus>
Get receipt processing status.
Sourcepub async fn post_receipt(
&self,
user_id: &str,
receipt: &Value,
schema_url: &str,
) -> Result<PostReceiptResponse>
pub async fn post_receipt( &self, user_id: &str, receipt: &Value, schema_url: &str, ) -> Result<PostReceiptResponse>
Post a receipt (JSON only).
Sourcepub async fn get_user_receipts(&self, user_id: &str) -> Result<Vec<Value>>
pub async fn get_user_receipts(&self, user_id: &str) -> Result<Vec<Value>>
Get a user’s receipts.
Sourcepub async fn get_receipt(&self, receipt_id: &str) -> Result<Value>
pub async fn get_receipt(&self, receipt_id: &str) -> Result<Value>
Get a receipt by ID.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ReceiptsApi<'a>
impl<'a> !UnwindSafe for ReceiptsApi<'a>
impl<'a> Forget for ReceiptsApi<'a>
impl<'a> Freeze for ReceiptsApi<'a>
impl<'a> Send for ReceiptsApi<'a>
impl<'a> Sync for ReceiptsApi<'a>
impl<'a> Unpin for ReceiptsApi<'a>
impl<'a> UnsafeUnpin for ReceiptsApi<'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