Class ReferralAPI

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

    public class ReferralAPI
    extends com.cheetahdigital.corekit.models.module.Controller
    Class for setting the query parameters of Referral API. All Nullable parameters means you can remove the parameter by passing a null value.
    • Field Summary

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

        STANDARD_DATE_FORMAT, TIMEZONE_DATE_FORMAT
    • Constructor Summary

      Constructors 
      Constructor Description
      ReferralAPI()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void getReferralCodes​(ReferralParams referralParams, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<java.util.List<ReferralCode>>,​java.util.List<ReferralCode>> listener)
      Retrieve referral codes
      void getReferralCodeSuggestions​(ReferralParams referralParams, boolean clearCache, com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<java.util.List<java.lang.String>>,​java.util.List<java.lang.String>> listener)
      Retrieve referral code suggestions
      void saveReferralCode​(ReferralParams referralParams, com.cheetahdigital.corekit.models.module.Listener<com.cheetahdigital.corekit.models.responses.SuccessResponse> listener)
      Save referral code
      • 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

      • ReferralAPI

        public ReferralAPI()
    • Method Detail

      • getReferralCodes

        public void getReferralCodes​(ReferralParams referralParams,
                                     boolean clearCache,
                                     com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<java.util.List<ReferralCode>>,​java.util.List<ReferralCode>> listener)
        Retrieve referral codes
        Parameters:
        referralParams - the ReferralParams for Referral API
        clearCache - set to true to clear previously stored cache
        listener - callback to handle the results
      • getReferralCodeSuggestions

        public void getReferralCodeSuggestions​(ReferralParams referralParams,
                                               boolean clearCache,
                                               com.cheetahdigital.corekit.models.module.ListenerModel<com.cheetahdigital.corekit.models.BaseModel<java.util.List<java.lang.String>>,​java.util.List<java.lang.String>> listener)
        Retrieve referral code suggestions
        Parameters:
        referralParams - the ReferralParams for Referral API
        clearCache - set to true to clear previously stored cache
        listener - callback to handle the results
      • saveReferralCode

        public void saveReferralCode​(ReferralParams referralParams,
                                     com.cheetahdigital.corekit.models.module.Listener<com.cheetahdigital.corekit.models.responses.SuccessResponse> listener)
        Save referral code
        Parameters:
        referralParams - the ReferralParams for Referral API
        listener - callback to handle the results