pub struct Credits<'a> { /* private fields */ }Expand description
Credits resource — purchase prepaid credits and check balances.
Implementations§
Source§impl<'a> Credits<'a>
impl<'a> Credits<'a>
Sourcepub async fn purchase(
&self,
req: &PurchaseCreditsRequest,
) -> Result<PurchaseCreditsResponse, VynFiError>
pub async fn purchase( &self, req: &PurchaseCreditsRequest, ) -> Result<PurchaseCreditsResponse, VynFiError>
Purchase a prepaid credit pack. Returns a Stripe checkout URL.
Valid packs: "10k", "50k", "100k", "500k", "1m".
Sourcepub async fn balance(&self) -> Result<PrepaidBalanceResponse, VynFiError>
pub async fn balance(&self) -> Result<PrepaidBalanceResponse, VynFiError>
Get the current prepaid credit balance and active batches.
Sourcepub async fn history(&self) -> Result<PrepaidHistoryResponse, VynFiError>
pub async fn history(&self) -> Result<PrepaidHistoryResponse, VynFiError>
Get the full prepaid credit history (including expired batches).
Auto Trait Implementations§
impl<'a> Freeze for Credits<'a>
impl<'a> !RefUnwindSafe for Credits<'a>
impl<'a> Send for Credits<'a>
impl<'a> Sync for Credits<'a>
impl<'a> Unpin for Credits<'a>
impl<'a> UnsafeUnpin for Credits<'a>
impl<'a> !UnwindSafe for Credits<'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