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(square_client: SquareClient) -> CardsApi
pub fn new(square_client: SquareClient) -> CardsApi
Instantiates a new CardsApi
sourcepub async fn create_card(
&self,
body: &CreateCardRequest
) -> Result<CreateCardResponse, SquareApiError>
pub async fn create_card( &self, body: &CreateCardRequest ) -> Result<CreateCardResponse, SquareApiError>
Adds a card on file to an existing merchant.
sourcepub async fn disable_card(
&self,
card_id: &str
) -> Result<DisableCardResponse, SquareApiError>
pub async fn disable_card( &self, card_id: &str ) -> Result<DisableCardResponse, SquareApiError>
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, SquareApiError>
pub async fn list_cards( &self, params: &ListCardsParameters ) -> Result<ListCardsResponse, SquareApiError>
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, SquareApiError>
pub async fn retrieve_card( &self, card_id: &str ) -> Result<RetrieveCardResponse, SquareApiError>
Retrieves details for a specific Card.
Auto Trait Implementations§
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