Class OfferDetailsPresenter<T extends OfferDetailsView>

    • Constructor Detail

      • OfferDetailsPresenter

        public OfferDetailsPresenter​(java.lang.String id)
      • OfferDetailsPresenter

        public OfferDetailsPresenter​(java.lang.String id,
                                     OfferParams offerParams)
        Create the presenter with a given OfferParams
        Parameters:
        id - id of the offer
        offerParams - the OfferParams
    • Method Detail

      • unclipOffer

        public void unclipOffer​(int id)
        Unclip an offer
        Parameters:
        id - id of offer to unclip
      • unclipOffer

        public void unclipOffer​(int id,
                                OfferParams offerParams)
        Unclip an offer
        Parameters:
        id - id of offer to unclip
        offerParams - custom OfferParams
      • clipOffer

        public void clipOffer​(int id)
        Clip an offer
        Parameters:
        id - id of offer to clip
      • clipOffer

        public void clipOffer​(int id,
                              OfferParams offerParams)
        Clip an offer
        Parameters:
        id - id of offer to clip
        offerParams - custom OfferParams
      • sendOffer

        public void sendOffer​(int id)
        Respond to an offer
        Parameters:
        id - id of offer to be responded
      • sendOffer

        public void sendOffer​(int id,
                              OfferParams offerParams)
        Respond to an offer
        Parameters:
        id - id of offer to be responded
        offerParams - custom OfferParams
      • favoriteOffer

        public void favoriteOffer​(int id)
        Set clipping state of Offer to clipped
        Parameters:
        id - id of offer to be updated
      • favoriteOffer

        public void favoriteOffer​(int id,
                                  OfferParams offerParams)
        Set clipping state of Offer to clipped
        Parameters:
        id - id of offer to be updated
        offerParams - custom OfferParams
      • unfavoriteOffer

        public void unfavoriteOffer​(int id)
        Set clipping state of Offer to unclipped
        Parameters:
        id - id of offer to be updated
      • unfavoriteOffer

        public void unfavoriteOffer​(int id,
                                    OfferParams offerParams)
        Set clipping state of Offer to unclipped
        Parameters:
        id - id of offer to be updated
        offerParams - custom OfferParams
      • generateBarcode

        public void generateBarcode​(java.lang.String barcodeData,
                                    java.lang.String barcodeFormat,
                                    int outputImageWidth,
                                    int outputImageHeight)
        Generate a barcode bitmap image
        Parameters:
        barcodeData - the String data of the Barcode
        barcodeFormat - output barcode format
        outputImageWidth - output image width
        outputImageHeight - output image height
      • onOfferReceivedSuccess

        protected void onOfferReceivedSuccess​(Offer data)
        Called when get offer is successful
        Parameters:
        data - Offer
      • onOfferReceivedFailure

        protected void onOfferReceivedFailure​(java.lang.String error)
        Called when get offer fails
        Parameters:
        error - error message
      • onOfferClippingFailure

        protected void onOfferClippingFailure​(java.lang.String error)
        Called when clip/unclip fails
        Parameters:
        error - error message
      • onOfferClippingSuccess

        protected void onOfferClippingSuccess()
        Called when clip/unclip is successful
      • onFavoriteOfferFailure

        protected void onFavoriteOfferFailure​(java.lang.String error)
        Called when clipping offer fails
        Parameters:
        error - error message
      • onFavoriteOfferSuccess

        protected void onFavoriteOfferSuccess()
        Called when clipping offer is successful
      • onUnfavoriteOfferFailure

        protected void onUnfavoriteOfferFailure​(java.lang.String error)
        Called when unclipping offer fails
        Parameters:
        error - error message
      • onUnfavoriteOfferSuccess

        protected void onUnfavoriteOfferSuccess()
        Called when unclipping offer is successful
      • showGeneratedBarcode

        protected void showGeneratedBarcode​(android.graphics.Bitmap barcodeImage)
        Called when barcode is generated
        Parameters:
        barcodeImage - barcode image