Class ReceiptAPI
- java.lang.Object
-
- com.cheetahdigital.corekit.models.module.Controller
-
- com.cheetahdigital.receipt.core.api.ReceiptAPI
-
- All Implemented Interfaces:
RestController
public class ReceiptAPI extends Controller
Cheetah Loyalty Receipts Module AReceipt
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, ListenerModel<BaseModel<Receipt>,Receipt> listener)
Gets a specific receipt by IDvoid
getReceipts(ReceiptParams receiptParams, boolean clearCache, ListenerModel<BaseModel<Receipts>,Receipts> listener)
Get all the receipts submitted by the membervoid
submitReceipt(MediaFile receipt, ReceiptParams receiptParams, ListenerModel<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
-
-
-
-
Method Detail
-
getReceipts
public void getReceipts(ReceiptParams receiptParams, boolean clearCache, ListenerModel<BaseModel<Receipts>,Receipts> listener)
Get all the receipts submitted by the member- Parameters:
receiptParams
- theReceiptParams
for Receipts APIclearCache
- true to clear cache, else falselistener
- handles the result from the API
-
getReceipt
public void getReceipt(ReceiptParams receiptParams, boolean clearCache, ListenerModel<BaseModel<Receipt>,Receipt> listener)
Gets a specific receipt by ID- Parameters:
receiptParams
- theReceiptParams
for Receipts APIclearCache
- set totrue
to clear previously stored cachelistener
- handles the result from the API
-
submitReceipt
public void submitReceipt(MediaFile receipt, ReceiptParams receiptParams, ListenerModel<BaseModel<Receipt>,Receipt> listener)
Use to submit a receipt to the API- Parameters:
receipt
- the image file of the receiptreceiptParams
- query param for Receipt APIlistener
- handles the response from the API
-
-