CloverCFPLoyaltyHelper

Used by an Activity on the customer facing side to allow loyalty and customer information to be passed between the customer and merchant facing sides.

Allows an integrator to use whatever base class they want to use for their Activity.

Since

4.1.0

Constructors

Link copied to clipboard
public void CloverCFPLoyaltyHelper(Activity activity, CloverCFPLoyaltyHelper.LoyaltyListener loyaltyListener, CFPSessionListener externalSessionListener)
Main constructor.

Types

Link copied to clipboard
public interface LoyaltyListener
Interface implemented on the customer facing side.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public boolean isStopping
Link copied to clipboard
public final static String LOG_TAG

Functions

Link copied to clipboard
public void announceCustomerProvidedData(LoyaltyDataConfig loyaltyDataConfig, String data)
Used by custom activities to announce loyalty data, collected by the custom activity and put it in the loyalty platform.
Link copied to clipboard
public void dispose()
Cleans up the sessionConnector, loyalty connector and Consumers of this class will want to call this method in their Activity's onDestroy method:
  public class CloverLoyaltyCustomActivity extends Activity {
      private CloverCFPLoyaltyHelper cloverCFPLoyaltyHelper;
      ...
      protected void onDestroy() {
          // Tell the helper to clean up everything
          cloverCFPLoyaltyHelper.dispose();
          super.onDestroy();
      }
      ...
  }
Link copied to clipboard
public final void finishActivity()
Finish the activity setting RESULT_OK with a null payload.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Given a config type, returns the corresponding LoyaltyDataConfig.
Link copied to clipboard
Link copied to clipboard
public boolean hasOrder()
Link copied to clipboard
public boolean isStopping()
Use this method to know if dispose() has been called on this class.
Link copied to clipboard
public void onStart()
Mirrors the Activity Lifecycle method (@see Activity#onStart()) Consumers of this class should call this method in their activity's "onStart()" method:
  public class CloverLoyaltyCustomActivity extends Activity {
      private CloverCFPLoyaltyHelper cloverCFPLoyaltyHelper;
      ...
      protected void onStart() {
          super.onStart();
          cloverCFPLoyaltyHelper.onStart();
      }
      ...
  }
Link copied to clipboard
public void onStop()
Mirrors the Activity Lifecycle method (@see Activity#onStop()) Consumers of this class should call this method in their activity's "onStop()" method:
  public class CloverLoyaltyCustomActivity extends Activity {
      private CloverCFPLoyaltyHelper cloverCFPLoyaltyHelper;
      ...
      protected void onStop() {
          super.onStop();
          cloverCFPLoyaltyHelper.onStop();
      }
      ...
  }
Link copied to clipboard
public void sendMessage(String payload)
Send a message back to the POS.
Link copied to clipboard
public void setCustomerInfo(@Nullable() CustomerInfo customerInfo)
Link copied to clipboard
public void setDisplayOrder(DisplayOrder displayOrder)
Link copied to clipboard
public void start(String type)

public void start(String type, @Nullable() Map<String, String> dataExtrasIn, String config)
use to start a loyalty data service.
Link copied to clipboard
public void startLoyaltyServices()
Link copied to clipboard
public void stop(String type)
Used to stop a loyalty data service
public void stop(String type, boolean forceStop)
used to force stop a loyalty data service