Struct square_api_client::api::CardsApi
source · [−]pub struct CardsApi { /* private fields */ }
Expand description
Use the Cards API to save a credit or debit card on file.
Implementations
sourceimpl 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 !RefUnwindSafe for CardsApi
impl Send for CardsApi
impl Sync for CardsApi
impl Unpin for CardsApi
impl !UnwindSafe for CardsApi
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more