GiftCardService class
URL: https://developer.squareup.com/reference/square/gift-cards-api Create and access gift cards and link customers to gift cards.
Square gift cards enable sellers to boost sales and attract new customers. Sellers can easily sell, redeem, track, and reload Square gift cards.
Developers can use the Gift Cards API to integrate Square gift cards into third-party applications. In addition, developers can use the Gift Card Activities API to create gift card activities, such as activate a gift card, add funds to a gift card, and redeem a gift card.
Constructors
- GiftCardService.new({required String baseUrl, required AuthenticationService authenticationService})
Properties
- authenticationService → AuthenticationService
-
final
- baseUrl → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createGiftCard(
{required CreateGiftCardRequest request, String? authToken}) → Future< GiftCard> - Creates a digital gift card or registers a physical (plastic) gift card.
-
createGiftCardActivities(
{required CreateGiftCardActivityRequest request, String? authToken}) → Future< GiftCardActivity> - Creates a gift card activity.
-
linkGiftCardToCustomer(
{required String giftCardId, required String customerId, String? authToken}) → Future< GiftCard> - Links a customer to a gift card, which is also referred to as adding a card on file.
-
listGiftCardActivities(
{required ListGiftCardActivityRequest request, String? authToken}) → Future< GiftCardActivityResponse> - Lists gift card activities.
-
listGiftCards(
{required ListGiftCardRequest request, String? authToken}) → Future< GiftCardResponse> - Lists all gift cards.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readGiftCard(
{required String giftCardId, String? authToken}) → Future< GiftCard> - Retrieves a gift card using its ID.
-
readGiftCardFromGan(
{required String gan, String? authToken}) → Future< GiftCard> - Retrieves a gift card using the gift card account number (GAN).
-
readGiftCardFromNonce(
{required String nonce, String? authToken}) → Future< GiftCard> - Retrieves a gift card using a secure payment token that represents the gift card.
-
toString(
) → String -
A string representation of this object.
inherited
-
unlinkGiftCardToCustomer(
{required String giftCardId, required String customerId, String? authToken}) → Future< GiftCard> - Unlinks a customer from a gift card, which is also referred to as removing a card on file.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited