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 AReceiptrepresents 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 voidgetReceipt(ReceiptParams receiptParams, boolean clearCache, ListenerModel<BaseModel<Receipt>,Receipt> listener)Gets a specific receipt by IDvoidgetReceipts(ReceiptParams receiptParams, boolean clearCache, ListenerModel<BaseModel<Receipts>,Receipts> listener)Get all the receipts submitted by the membervoidsubmitReceipt(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- theReceiptParamsfor 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- theReceiptParamsfor Receipts APIclearCache- set totrueto 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
-
-