Class GiftcardManagePresenter<V extends GiftcardManageView>

  • Type Parameters:
    V - an interface which extends GiftcardManageView
    All Implemented Interfaces:
    com.cheetahdigital.uikit.architecture.mvp.MvpPresenter<V>

    public class GiftcardManagePresenter<V extends GiftcardManageView>
    extends com.cheetahdigital.uikit.architecture.mvp.Presenter<V>
    This presenter class contains API calls for managing the Gift Card. This is a child class of Presenter which is bound to the GiftcardManageView, which means that this will be used to display the Giftcard object to a view of type GiftcardManageView
    • Constructor Detail

      • GiftcardManagePresenter

        public GiftcardManagePresenter()
    • Method Detail

      • getGiftcardLinkReceivedListener

        protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Giftcard>,​Giftcard> getGiftcardLinkReceivedListener()
        Create a listener for GiftcardsAPI
        Returns:
        listener to handle GiftcardsAPI requests
      • getGiftcardUnLinkReceivedListener

        protected com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Giftcard>,​Giftcard> getGiftcardUnLinkReceivedListener()
        Create a listener for GiftcardsAPI
        Returns:
        listener to handle GiftcardsAPI requests
      • linkGiftcard

        public void linkGiftcard​(java.lang.String cardNumber,
                                 @NonNull
                                 java.lang.String pin)
        Adds a gift card to the account of the member. Remember to set the pin of the gift card by using GiftcardFields.setPin(String).
        Parameters:
        cardNumber - the code of gift card
        pin - the GiftcardFields to link a gift card to an account
      • linkGiftcard

        public void linkGiftcard​(java.lang.String cardNumber,
                                 @NonNull
                                 java.lang.String pin,
                                 GiftcardFields fieldParams,
                                 GiftcardParams queryParams)
        Adds a gift card to the account of the member. Remember to set the pin of the gift card by using GiftcardFields.setPin(String).
        Parameters:
        cardNumber - the code of gift card
        pin - the GiftcardFields to link a gift card to an account
        fieldParams - the GiftcardFields to link a gift card to an account
        queryParams - the GiftcardParams to use for linking a gift card
      • unlinkGiftcard

        public void unlinkGiftcard​(java.lang.String cardNumber)
        Removes a gift card from the account of the member
        Parameters:
        cardNumber - the code of the gift card to remove
      • unlinkGiftcard

        public void unlinkGiftcard​(java.lang.String cardNumber,
                                   GiftcardParams queryParams)
        Removes a gift card from the account of the member
        Parameters:
        cardNumber - the code of the gift card to remove
        queryParams - GiftcardParams to use for unlinking giftcard