pub struct CardsApi { /* private fields */ }
Expand description
Use the Cards API to save a credit or debit card on file.
Implementations§
Source§impl CardsApi
impl CardsApi
Sourcepub fn new(config: Configuration, client: HttpClient) -> Self
pub fn new(config: Configuration, client: HttpClient) -> Self
Instantiates a new CardsApi
Sourcepub async fn create_card(
&self,
body: &CreateCardRequest,
) -> Result<CreateCardResponse, ApiError>
pub async fn create_card( &self, body: &CreateCardRequest, ) -> Result<CreateCardResponse, ApiError>
Adds a card on file to an existing merchant.
Sourcepub async fn disable_card(
&self,
card_id: &str,
) -> Result<DisableCardResponse, ApiError>
pub async fn disable_card( &self, card_id: &str, ) -> Result<DisableCardResponse, ApiError>
Disables the card, preventing any further updates or charges.
Disabling an already disabled card is allowed but has no effect.
Sourcepub async fn list_cards(
&self,
params: &ListCardsParameters,
) -> Result<ListCardsResponse, ApiError>
pub async fn list_cards( &self, params: &ListCardsParameters, ) -> Result<ListCardsResponse, ApiError>
Retrieves a list of cards owned by the account making the request.
A max of 25 cards will be returned.
Sourcepub async fn retrieve_card(
&self,
card_id: &str,
) -> Result<RetrieveCardResponse, ApiError>
pub async fn retrieve_card( &self, card_id: &str, ) -> Result<RetrieveCardResponse, ApiError>
Retrieves details for a specific Card.
Auto Trait Implementations§
impl Freeze for CardsApi
impl !RefUnwindSafe for CardsApi
impl Send for CardsApi
impl Sync for CardsApi
impl Unpin for CardsApi
impl !UnwindSafe for CardsApi
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