Class ReceiptAPI

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

    public class ReceiptAPI
    extends com.cheetahdigital.corekit.models.module.Controller
    Cheetah Loyalty Receipts Module A Receipt represents one User's Receipt.
    • Field Summary

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

        STANDARD_DATE_FORMAT, TIMEZONE_DATE_FORMAT
    • Constructor Summary

      Constructors 
      Constructor Description
      ReceiptAPI()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void getReceipt​(ReceiptParams receiptParams, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Receipt>,​Receipt> listener)
      Gets a specific receipt by ID
      void getReceipts​(ReceiptParams receiptParams, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Receipts>,​Receipts> listener)
      Get all the receipts submitted by the member
      void submitReceipt​(com.cheetahdigital.uikit.helper.video.MediaFile receipt, ReceiptParams receiptParams, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Receipt>,​Receipt> listener)
      Use to submit a receipt to the API
      • Methods inherited from class com.cheetahdigital.corekit.models.module.Controller

        createCache, createHttpClient, createRetrofitInterface, evictAllCache, getGsonConfiguration, getRestAdapter, getTimeoutConnectionInSeconds, getTimeoutSocketInSeconds, initialize, removeResponsesFromCache
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReceiptAPI

        public ReceiptAPI()
    • Method Detail

      • getReceipts

        public void getReceipts​(ReceiptParams receiptParams,
                                boolean clearCache,
                                com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Receipts>,​Receipts> listener)
        Get all the receipts submitted by the member
        Parameters:
        receiptParams - the ReceiptParams for Receipts API
        clearCache - true to clear cache, else false
        listener - handles the result from the API
      • getReceipt

        public void getReceipt​(ReceiptParams receiptParams,
                               boolean clearCache,
                               com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Receipt>,​Receipt> listener)
        Gets a specific receipt by ID
        Parameters:
        receiptParams - the ReceiptParams for Receipts API
        clearCache - set to true to clear previously stored cache
        listener - handles the result from the API
      • submitReceipt

        public void submitReceipt​(com.cheetahdigital.uikit.helper.video.MediaFile receipt,
                                  ReceiptParams receiptParams,
                                  com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<Receipt>,​Receipt> listener)
        Use to submit a receipt to the API
        Parameters:
        receipt - the image file of the receipt
        receiptParams - query param for Receipt API
        listener - handles the response from the API