pub struct ItemsClient<'a> { /* private fields */ }Expand description
Item endpoints. Obtain one from RazorpayClient::items.
Implementations§
Source§impl<'a> ItemsClient<'a>
impl<'a> ItemsClient<'a>
Sourcepub async fn create(&self, params: ItemParams) -> Result<Item, RazorpayError>
pub async fn create(&self, params: ItemParams) -> Result<Item, RazorpayError>
Create an item — POST /v1/items.
Sourcepub async fn fetch(&self, id: &str) -> Result<Item, RazorpayError>
pub async fn fetch(&self, id: &str) -> Result<Item, RazorpayError>
Fetch one item by id — GET /v1/items/{id}.
Sourcepub async fn all(
&self,
options: ListOptions,
) -> Result<Collection<Item>, RazorpayError>
pub async fn all( &self, options: ListOptions, ) -> Result<Collection<Item>, RazorpayError>
List items — GET /v1/items.
Sourcepub async fn edit(
&self,
id: &str,
params: ItemParams,
) -> Result<Item, RazorpayError>
pub async fn edit( &self, id: &str, params: ItemParams, ) -> Result<Item, RazorpayError>
Update an item — PATCH /v1/items/{id}.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ItemsClient<'a>
impl<'a> !UnwindSafe for ItemsClient<'a>
impl<'a> Freeze for ItemsClient<'a>
impl<'a> Send for ItemsClient<'a>
impl<'a> Sync for ItemsClient<'a>
impl<'a> Unpin for ItemsClient<'a>
impl<'a> UnsafeUnpin for ItemsClient<'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