pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub fn new(api_base_url: String) -> Self
Sourcepub async fn get_access_token(
&self,
id: &ClientId,
secret: &ClientSecret,
) -> Result<AuthToken>
pub async fn get_access_token( &self, id: &ClientId, secret: &ClientSecret, ) -> Result<AuthToken>
Attempt to fetch a new AccessToken
pub async fn create_qr<'a, 'b>( &'a self, payload: &CreateQR<'b>, token: &'a AccessToken, ) -> Result<CreateQRResponse>
pub async fn get_qr( &self, qr_id: &QRId, token: &AccessToken, ) -> Result<GetQRDetails>
pub async fn cancel_qr( &self, qr_id: &QRId, payload: &CancelQR, token: &AccessToken, ) -> Result<CancelQR>
pub async fn get_payment( &self, id: &PaymentId, token: &AccessToken, ) -> Result<PaymentDetails>
pub async fn refund_payment( &self, id: &PaymentId, payload: &RefundPayment, token: &AccessToken, ) -> Result<RefundPayment>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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