Class GiftcardsAPI

  • All Implemented Interfaces:
    com.cheetahdigital.corekit.rest.RestController

    public class GiftcardsAPI
    extends com.cheetahdigital.corekit.models.module.Controller
    Class for setting the query parameters of Giftcards API. All Nullable parameters means you can remove the parameter by passing a null value.
    • Field Summary

      • Fields inherited from class com.cheetahdigital.corekit.models.module.Controller

        STANDARD_DATE_FORMAT, TIMEZONE_DATE_FORMAT
    • Constructor Summary

      Constructors 
      Constructor Description
      GiftcardsAPI()  
    • Constructor Detail

      • GiftcardsAPI

        public GiftcardsAPI()
    • Method Detail

      • getGiftcardsClientToken

        public void getGiftcardsClientToken​(GiftcardParams queryParams,
                                            boolean clearCache,
                                            com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<ClientToken>,​ClientToken> listener)
        Gets the client token required for the Braintree SDK
        Parameters:
        queryParams - the GiftcardParams for Giftcards API
        clearCache - clear previously stored cache
        listener - callback to handle the results
      • getGiftcards

        public void getGiftcards​(GiftcardParams queryParams,
                                 boolean clearCache,
                                 com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Giftcards>,​Giftcards> listener)
        Gets the list of gift cards
        Parameters:
        queryParams - the GiftcardParams for Giftcards API
        clearCache - clear previously stored cache
        listener - callback to handle the results
      • getGiftcard

        public void getGiftcard​(GiftcardParams queryParams,
                                boolean clearCache,
                                com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Giftcard>,​Giftcard> listener)
        Gets the details of the gift card. Remember to set the card number by BaseParams.setId(String)
        Parameters:
        queryParams - the GiftcardParams for Giftcards API
        clearCache - clear previously stored cache
        listener - callback to handle the results
      • linkGiftcard

        public void linkGiftcard​(GiftcardParams queryParams,
                                 GiftcardFields fieldParams,
                                 com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Giftcard>,​Giftcard> listener)
        Add a gift card to the account of the member Remember to set the following:
        Parameters:
        queryParams - the GiftcardParams for Giftcards API
        fieldParams - the GiftcardFields for Giftcards API
        listener - callback to handle the results
      • unlinkGiftcard

        public void unlinkGiftcard​(GiftcardParams queryParams,
                                   com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Giftcard>,​Giftcard> listener)
        Remove a gift card from the account of the member. Remember to set the card number by BaseParams.setId(String)
        Parameters:
        queryParams - the GiftcardParams for Giftcards API
        listener - callback to handle the results
      • getTransactions

        public void getTransactions​(GiftcardParams queryParams,
                                    boolean clearCache,
                                    com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Transactions>,​Transactions> listener)
        Gets the history of activities. Remember to set the card number by BaseParams.setId(String)
        Parameters:
        queryParams - the GiftcardParams for Giftcards API
        clearCache - clear previously stored cache
        listener - callback to handle the results
      • getClasses

        public void getClasses​(GiftcardParams queryParams,
                               boolean clearCache,
                               com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<CardClasses>,​CardClasses> listener)
        Gets the list of giftcard classes
        Parameters:
        queryParams - the GiftcardParams for Giftcards API
        clearCache - clear previously stored cache
        listener - callback to handle the results