pub struct GiftCardsApi { /* private fields */ }
Implementations§
Source§impl GiftCardsApi
impl GiftCardsApi
Sourcepub fn new(config: Configuration, client: HttpClient) -> Self
pub fn new(config: Configuration, client: HttpClient) -> Self
Instantiates a new GiftCardsApi
Sourcepub async fn list_gift_cards(
&self,
params: &ListGiftCardsParameters,
) -> Result<ListGiftCardsResponse, ApiError>
pub async fn list_gift_cards( &self, params: &ListGiftCardsParameters, ) -> Result<ListGiftCardsResponse, ApiError>
Lists all gift cards.
You can specify optional filters to retrieve a subset of the gift cards. Results are sorted by created_at in ascending order.
Sourcepub async fn create_gift_card(
&self,
body: &CreateGiftCardRequest,
) -> Result<CreateGiftCardResponse, ApiError>
pub async fn create_gift_card( &self, body: &CreateGiftCardRequest, ) -> Result<CreateGiftCardResponse, ApiError>
Creates a digital gift card or registers a physical (plastic) gift card.
After the gift card is created, you must call CreateGiftCardActivity to activate the card with an initial balance before it can be used for payment.
Sourcepub async fn retrieve_gift_card_from_gan(
&self,
body: &RetrieveGiftCardFromGANRequest,
) -> Result<RetrieveGiftCardFromGANResponse, ApiError>
pub async fn retrieve_gift_card_from_gan( &self, body: &RetrieveGiftCardFromGANRequest, ) -> Result<RetrieveGiftCardFromGANResponse, ApiError>
Retrieves a gift card using the gift card account number (GAN).
Sourcepub async fn retrieve_gift_card_from_nonce(
&self,
body: &RetrieveGiftCardFromNonceRequest,
) -> Result<RetrieveGiftCardFromNonceResponse, ApiError>
pub async fn retrieve_gift_card_from_nonce( &self, body: &RetrieveGiftCardFromNonceRequest, ) -> Result<RetrieveGiftCardFromNonceResponse, ApiError>
Retrieves a gift card using a secure payment token that represents the gift card.
Sourcepub async fn link_customer_to_gift_card(
&self,
gift_card_id: &str,
body: &LinkCustomerToGiftCardRequest,
) -> Result<LinkCustomerToGiftCardResponse, ApiError>
pub async fn link_customer_to_gift_card( &self, gift_card_id: &str, body: &LinkCustomerToGiftCardRequest, ) -> Result<LinkCustomerToGiftCardResponse, ApiError>
Links a customer to a gift card, which is also referred to as adding a card on file.
gift_card_id
: The ID of the gift card to be linked.
Sourcepub async fn unlink_customer_from_gift_card(
&self,
gift_card_id: &str,
body: &UnlinkCustomerFromGiftCardRequest,
) -> Result<UnlinkCustomerFromGiftCardResponse, ApiError>
pub async fn unlink_customer_from_gift_card( &self, gift_card_id: &str, body: &UnlinkCustomerFromGiftCardRequest, ) -> Result<UnlinkCustomerFromGiftCardResponse, ApiError>
Unlinks a customer from a gift card, which is also referred to as removing a card on file.
gift_card_id
: The ID of the gift card to be linked.
Sourcepub async fn retrieve_gift_card(
&self,
id: &str,
) -> Result<RetrieveGiftCardResponse, ApiError>
pub async fn retrieve_gift_card( &self, id: &str, ) -> Result<RetrieveGiftCardResponse, ApiError>
Retrieves a gift card using the gift card ID.
id
: The ID of the gift card to retrieve.