markerIdsToDissociate,
+ out ResultStatus resultStatus);
+
}
diff --git a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/inventory/Marker.aidl b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/inventory/Marker.aidl
new file mode 100644
index 0000000000..80019d2652
--- /dev/null
+++ b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/inventory/Marker.aidl
@@ -0,0 +1,3 @@
+package com.clover.sdk.v3.inventory;
+
+parcelable Marker;
\ No newline at end of file
diff --git a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/AddLineItemOperation.aidl b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/AddLineItemOperation.aidl
new file mode 100644
index 0000000000..6ec4714a84
--- /dev/null
+++ b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/AddLineItemOperation.aidl
@@ -0,0 +1,3 @@
+package com.clover.sdk.v3.order;
+
+parcelable AddLineItemOperation;
diff --git a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/AddModificationsOperation.aidl b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/AddModificationsOperation.aidl
new file mode 100644
index 0000000000..ba7729907a
--- /dev/null
+++ b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/AddModificationsOperation.aidl
@@ -0,0 +1,3 @@
+package com.clover.sdk.v3.order;
+
+parcelable AddModificationsOperation;
diff --git a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/DeleteModificationsOperation.aidl b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/DeleteModificationsOperation.aidl
new file mode 100644
index 0000000000..ac7cda977b
--- /dev/null
+++ b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/DeleteModificationsOperation.aidl
@@ -0,0 +1,3 @@
+package com.clover.sdk.v3.order;
+
+parcelable DeleteModificationsOperation;
diff --git a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/IOrderServiceV3_1.aidl b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/IOrderServiceV3_1.aidl
index 668602e3e7..41c0a0a920 100644
--- a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/IOrderServiceV3_1.aidl
+++ b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/IOrderServiceV3_1.aidl
@@ -36,6 +36,9 @@ import com.clover.sdk.v3.payments.AdditionalChargeAmount;
import com.clover.sdk.v3.payments.AuthorizationFdParcelable;
import com.clover.sdk.v3.order.LineItem;
import com.clover.sdk.v3.order.LineItemInfo;
+import com.clover.sdk.v3.order.UpdateBundleComponent;
+import com.clover.sdk.v3.order.UpdateBundleComponentFdParcelable;
+import com.clover.sdk.v3.shipping.ShippingOrderDetails;
/**
* An interface for interacting with the Clover order service.
@@ -1064,4 +1067,32 @@ interface IOrderServiceV3_1 {
*/
OrderFdParcelable voidAlternatePayment(String orderId, String paymentId, String iccContainer, in VoidReason reason, String source, out ResultStatus status);
+ /**
+ * Add a bundle line item to an order. Bundle line item is a composite line item having more then one line items as children.
+ *
+ * @param orderId The ID of the order to which to add the line item.
+ * @param lineItem The bundle line item to be added to the order.
+ * @param list of lineItems The children line items of this bundle line item.
+ * @clover.perm ORDERS_W
+ */
+ OrderFdParcelable addBundleLineItem(String orderId, in LineItemFdParcelable bundleLineItem, in LineItemListFdParcelable childLineItems, out ResultStatus status);
+
+ /**
+ * Atomically updates bundle line item within an order.
+ *
+ * @param orderId The ID of the order to which to update the line item.
+ * @param lineItem The bundle line item to be updated.
+ * @param updateBundleComponent The component object holding all necessary updates.
+ * @clover.perm ORDERS_W
+ */
+ OrderFdParcelable updateBundleLineItem(String orderId, in LineItemFdParcelable bundleLineItem, in UpdateBundleComponentFdParcelable updateBundleComponent, out ResultStatus status);
+
+ /**
+ * Get the shipping details associated with an order.
+ *
+ * @param orderId The ID of the order for which to retrieve shipping details.
+ * @return The {@link ShippingOrderDetails} for the given order, or null if the order has no
+ * shipping details.
+ */
+ ShippingOrderDetails getShippingOrder(String orderId, out ResultStatus status);
}
diff --git a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/UpdateBundleComponent.aidl b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/UpdateBundleComponent.aidl
new file mode 100644
index 0000000000..2f1175e201
--- /dev/null
+++ b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/UpdateBundleComponent.aidl
@@ -0,0 +1,3 @@
+package com.clover.sdk.v3.order;
+
+parcelable UpdateBundleComponent;
diff --git a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/UpdateBundleComponentFdParcelable.aidl b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/UpdateBundleComponentFdParcelable.aidl
new file mode 100644
index 0000000000..5874ac44c1
--- /dev/null
+++ b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/UpdateBundleComponentFdParcelable.aidl
@@ -0,0 +1,3 @@
+package com.clover.sdk.v3.order;
+
+parcelable UpdateBundleComponentFdParcelable;
diff --git a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/UpdateBundleGroup.aidl b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/UpdateBundleGroup.aidl
new file mode 100644
index 0000000000..751ebc79c7
--- /dev/null
+++ b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/order/UpdateBundleGroup.aidl
@@ -0,0 +1,3 @@
+package com.clover.sdk.v3.order;
+
+parcelable UpdateBundleGroup;
diff --git a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/payment/raw/model/GetManualCardRequest.aidl b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/payment/raw/model/GetManualCardRequest.aidl
new file mode 100644
index 0000000000..6535f356a4
--- /dev/null
+++ b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/payment/raw/model/GetManualCardRequest.aidl
@@ -0,0 +1,4 @@
+// GetManualCardRequest.aidl
+package com.clover.sdk.v3.payment.raw.model;
+
+parcelable GetManualCardRequest;
diff --git a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/payment/raw/service/IRawExtTransactionService.aidl b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/payment/raw/service/IRawExtTransactionService.aidl
index eeddae7b12..b667a44258 100644
--- a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/payment/raw/service/IRawExtTransactionService.aidl
+++ b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/payment/raw/service/IRawExtTransactionService.aidl
@@ -13,6 +13,7 @@ import com.clover.sdk.v3.payment.raw.model.GetCardDataDetailsRequest;
import com.clover.sdk.v3.payment.raw.model.EncryptBufferRequest;
import com.clover.sdk.v3.payment.raw.model.CheckEventRequest;
import com.clover.sdk.v3.payment.raw.model.ExchangeCommandRequest;
+import com.clover.sdk.v3.payment.raw.model.GetManualCardRequest;
import com.clover.sdk.v3.payment.raw.listener.IRawExtTransactionServiceListener;
interface IRawExtTransactionService {
@@ -49,4 +50,6 @@ interface IRawExtTransactionService {
oneway void checkForEvent(in CheckEventRequest request);
oneway void exchangeCommand(in ExchangeCommandRequest request);
+
+ oneway void getManualCardData(in GetManualCardRequest request);
}
\ No newline at end of file
diff --git a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/shipping/ShippingOrderDetails.aidl b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/shipping/ShippingOrderDetails.aidl
new file mode 100644
index 0000000000..355bf9c20e
--- /dev/null
+++ b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/shipping/ShippingOrderDetails.aidl
@@ -0,0 +1,4 @@
+ package com.clover.sdk.v3.shipping;
+
+parcelable ShippingOrderDetails;
+
diff --git a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/vas/IVasReaderService.aidl b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/vas/IVasReaderService.aidl
new file mode 100644
index 0000000000..455776afb2
--- /dev/null
+++ b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/vas/IVasReaderService.aidl
@@ -0,0 +1,64 @@
+package com.clover.sdk.v3.vas;
+
+import com.clover.sdk.v3.payments.IVasProvider;
+import com.clover.sdk.v3.payments.VasSettings;
+import com.clover.sdk.v3.payments.VasPayloadResponse;
+import com.clover.sdk.v3.vas.IVasReaderSessionListener;
+
+import android.os.IBinder;
+
+/**
+ * An interface for interacting with the Clover VAS (Value Added
+ * Services) Reader Service.
+ *
+ * Interact with this service through the {@link VasReaderClient}
+ * class, which manages session lifecycle and binding automatically.
+ *
+ * All methods require APPLE_VAS_R permission. Applications must be submitted
+ * to Clover and have APPLE_VAS_R granted before they can bind to this
+ * service.
+ */
+interface IVasReaderService {
+
+ /**
+ * Open a VAS reader session with the given providers.
+ *
+ * @param vasProviderBinders List of IBinders for IVasProvider implementations.
+ * @param sessionListener Callback for session-level events.
+ * @return true if the session was opened successfully, false otherwise.
+ * @clover.perm APPLE_VAS_R
+ */
+ boolean openSession(in List vasProviderBinders, in IVasReaderSessionListener sessionListener);
+
+ /**
+ * Resets the active session timeout without reconnecting or reinjecting providers.
+ * @clover.perm APPLE_VAS_R
+ */
+ void resetTimeout();
+
+ /**
+ * Cancel any in-progress VAS read operation.
+ *
+ * @clover.perm APPLE_VAS_R
+ */
+ void cancel();
+
+ /**
+ * Close the current VAS reader session and release hardware resources.
+ *
+ * @clover.perm APPLE_VAS_R
+ */
+ void closeSession();
+
+ /**
+ * Read VAS payload from a mobile device or card using the provided
+ * settings. Blocks until a payload is read or the operation is
+ * cancelled.
+ *
+ * @param vasSettings Configuration for the VAS read operation.
+ * @return A {@link VasPayloadResponse} if data was read, or null if
+ * the read was cancelled or failed.
+ * @clover.perm APPLE_VAS_R
+ */
+ VasPayloadResponse startVasRead(in VasSettings vasSettings);
+}
\ No newline at end of file
diff --git a/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/vas/IVasReaderSessionListener.aidl b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/vas/IVasReaderSessionListener.aidl
new file mode 100644
index 0000000000..de2e549a5b
--- /dev/null
+++ b/clover-android-sdk/src/main/aidl/com/clover/sdk/v3/vas/IVasReaderSessionListener.aidl
@@ -0,0 +1,7 @@
+package com.clover.sdk.v3.vas;
+
+interface IVasReaderSessionListener {
+ void onUserInterventionRequired();
+ void onUserInterventionCleared();
+ void onVasReadTimeout();
+}
\ No newline at end of file
diff --git a/clover-android-sdk/src/main/java/com/clover/common2/payments/PayIntent.java b/clover-android-sdk/src/main/java/com/clover/common2/payments/PayIntent.java
index 2e7fb00bd5..638852cc25 100644
--- a/clover-android-sdk/src/main/java/com/clover/common2/payments/PayIntent.java
+++ b/clover-android-sdk/src/main/java/com/clover/common2/payments/PayIntent.java
@@ -148,6 +148,7 @@ public static class Builder {
private Credit originatingCredit;
private Refund refund;
private Tender customerTender;
+ private boolean requiresCustomTender;
// Optional map of values passed through to the server NOT used in payment processing or persisted
private Map passThroughValues;
//Optional map of application specific values
@@ -170,6 +171,7 @@ public static class Builder {
private String applyRealtimeDiscountForPkgName;
private Long serviceFeeAmount;
private String dynamicTipSelection;
+ private String localeFulfilmentRequest;
public Builder intent(Intent intent) {
action = intent.getAction();
@@ -284,6 +286,9 @@ public Builder intent(Intent intent) {
if (intent.hasExtra(Intents.EXTRA_CUSTOMER_TENDER)) {
customerTender = intent.getParcelableExtra(Intents.EXTRA_CUSTOMER_TENDER);
}
+ if (intent.hasExtra(Intents.EXTRA_CUSTOMER_TENDER_REQUIRED)) {
+ requiresCustomTender = intent.getBooleanExtra(Intents.EXTRA_CUSTOMER_TENDER_REQUIRED, false);
+ }
if (intent.hasExtra(Intents.EXTRA_ORIGINATING_PAYMENT_PACKAGE)) {
originatingPaymentPackage = intent.getStringExtra(Intents.EXTRA_ORIGINATING_PAYMENT_PACKAGE);
}
@@ -340,6 +345,10 @@ public Builder intent(Intent intent) {
if (intent.hasExtra(Intents.EXTRA_DYNAMIC_TIP_SELECTION)) {
dynamicTipSelection = intent.getStringExtra(Intents.EXTRA_DYNAMIC_TIP_SELECTION);
}
+
+ if (intent.hasExtra(Intents.EXTRA_LOCALE_FULFILMENT_REQUEST)) {
+ localeFulfilmentRequest = intent.getStringExtra(Intents.EXTRA_LOCALE_FULFILMENT_REQUEST);
+ }
// As a general rule, the transactionSettings assignment should always be the last one
// prior to the return statement. This is to ensure any new/added overrides don't get
// reset by follow-on assignments and aids in preventing backward compatibility issues.
@@ -468,6 +477,7 @@ public Builder payIntent(PayIntent payIntent) {
}
this.refund = payIntent.refund;
this.customerTender = payIntent.customerTender;
+ this.requiresCustomTender = payIntent.requiresCustomTender;
this.isDisableCreditSurcharge = payIntent.isDisableCreditSurcharge;
this.isPresentQrcOnly = payIntent.isPresentQrcOnly;
this.isManualCardEntryByPassMode = payIntent.isManualCardEntryByPassMode;
@@ -486,6 +496,7 @@ public Builder payIntent(PayIntent payIntent) {
this.applyRealtimeDiscountForPkgName = payIntent.applyRealtimeDiscountForPkgName;
this.serviceFeeAmount = payIntent.serviceFeeAmount;
this.dynamicTipSelection = payIntent.dynamicTipSelection;
+ this.localeFulfilmentRequest = payIntent.localeFulfilmentRequest;
// As a general rule, the transactionSettings assignment should always be the last one
// prior to the return statement. This is to ensure any new/added overrides don't get
@@ -800,6 +811,11 @@ public Builder customerTender(Tender customerTender) {
return this;
}
+ public Builder requiresCustomTender(boolean requiresCustomTender) {
+ this.requiresCustomTender = requiresCustomTender;
+ return this;
+ }
+
public Builder disableCreditSurcharge(boolean disableCreditSurcharge) {
this.isDisableCreditSurcharge = disableCreditSurcharge;
if (transactionSettings != null) { // ** Backward Compatibility **
@@ -899,6 +915,11 @@ public Builder dynamicTipSelection(String dynamicTipSelection) {
return this;
}
+ public Builder localeFulfilmentRequest(String localeFulfilmentRequest) {
+ this.localeFulfilmentRequest = localeFulfilmentRequest;
+ return this;
+ }
+
public PayIntent build() {
return new PayIntent(action, amount, tippableAmount, tipAmount, taxAmount, cashbackAmount, orderId, paymentId, employeeId,
transactionType, taxableAmountRates, serviceChargeAmount, isDisableCashBack, isTesting, cardEntryMethods,
@@ -909,7 +930,7 @@ public PayIntent build() {
originatingPayment != null ? originatingPayment.getCardTransaction() : originatingTransaction,
themeName, originatingPayment, originatingCredit, passThroughValues, applicationSpecificValues, refund,
customerTender, isDisableCreditSurcharge, isPresentQrcOnly, isManualCardEntryByPassMode,isAllowManualCardEntryOnMFD, quickPaymentTransactionUuid,
- authorization,tokenizeCardRequest,tokenizeCardResponse, dataReadMode, refundReason, thresholdManagerName, thresholdManagerId, ebtManualCardEntryScreenFlow, paymentType, createAuth, applyRealtimeDiscountForPkgName, serviceFeeAmount, dynamicTipSelection);
+ authorization,tokenizeCardRequest,tokenizeCardResponse, dataReadMode, refundReason, thresholdManagerName, thresholdManagerId, ebtManualCardEntryScreenFlow, paymentType, createAuth, applyRealtimeDiscountForPkgName, serviceFeeAmount, dynamicTipSelection, requiresCustomTender, localeFulfilmentRequest);
}
}
@@ -1002,6 +1023,7 @@ public PayIntent build() {
public final Credit originatingCredit;
public final Refund refund;
public final Tender customerTender;
+ public final boolean requiresCustomTender;
public final Map passThroughValues;
public final Map applicationSpecificValues;
public boolean isDisableCreditSurcharge;
@@ -1022,6 +1044,7 @@ public PayIntent build() {
public String applyRealtimeDiscountForPkgName;
public Long serviceFeeAmount;
public String dynamicTipSelection;
+ public String localeFulfilmentRequest;
private PayIntent(String action, Long amount, Long tippableAmount,
@@ -1041,7 +1064,7 @@ private PayIntent(String action, Long amount, Long tippableAmount,
boolean isPresntQrcOnly, boolean isManualCardEntryByPassMode, boolean isAllowManualCardEntryOnMFD, String quickPaymentTransactionUuid,
Authorization authorization,TokenizeCardRequest tokenizeCardRequest, TokenizeCardResponse tokenizeCardResponse, String dataReadMode,
String refundReason, String thresholdManagerName, String thresholdManagerId, String ebtManualCardEntryScreenFlow,
- String paymentType, Boolean createAuth, String applyRealtimeDiscountForPkgName, Long serviceFeeAmount, String dynamicTipSelection) {
+ String paymentType, Boolean createAuth, String applyRealtimeDiscountForPkgName, Long serviceFeeAmount, String dynamicTipSelection, boolean requiresCustomTender, String localeFulfilmentRequest) {
this.action = action;
this.amount = amount;
this.tippableAmount = tippableAmount;
@@ -1087,6 +1110,7 @@ private PayIntent(String action, Long amount, Long tippableAmount,
this.originatingCredit = originatingCredit;
this.refund = refund;
this.customerTender = customerTender;
+ this.requiresCustomTender = requiresCustomTender;
this.isDisableCreditSurcharge = isDisableCreditSurcharge;
this.isPresentQrcOnly = isPresntQrcOnly;
this.isManualCardEntryByPassMode = isManualCardEntryByPassMode;
@@ -1108,6 +1132,7 @@ private PayIntent(String action, Long amount, Long tippableAmount,
this.passThroughValues = passThroughValues;
this.applicationSpecificValues = applicationSpecificValues;
this.dynamicTipSelection = dynamicTipSelection;
+ this.localeFulfilmentRequest = localeFulfilmentRequest;
// As a general rule, the transactionSettings assignment should always be the last one
// prior to the return statement. This is to ensure any new/added overrides don't get
@@ -1369,6 +1394,7 @@ public void addTo(Intent intent) {
}
if (customerTender != null) {
intent.putExtra(Intents.EXTRA_CUSTOMER_TENDER, customerTender);
+ intent.putExtra(Intents.EXTRA_CUSTOMER_TENDER_REQUIRED, requiresCustomTender);
}
intent.putExtra(Intents.EXTRA_DISABLE_CREDIT_SURCHARGE, isDisableCreditSurcharge);
intent.putExtra(Intents.EXTRA_PRESENT_QRC_ONLY, isPresentQrcOnly);
@@ -1439,6 +1465,10 @@ public void addTo(Intent intent) {
if (dynamicTipSelection != null) {
intent.putExtra(Intents.EXTRA_DYNAMIC_TIP_SELECTION, dynamicTipSelection);
}
+
+ if (localeFulfilmentRequest != null) {
+ intent.putExtra(Intents.EXTRA_LOCALE_FULFILMENT_REQUEST, localeFulfilmentRequest);
+ }
}
@Override
@@ -1489,6 +1519,7 @@ public String toString() {
", applicationSpecificValues=" + applicationSpecificValues +
", refund=" + refund +
", customerTender=" + customerTender +
+ ", requiresCustomTender=" + requiresCustomTender +
", isDisableCreditSurcharge=" + isDisableCreditSurcharge +
", isPresentQrcOnly=" + isPresentQrcOnly +
", isManualCardEntryByPassMode" + isManualCardEntryByPassMode +
@@ -1506,6 +1537,7 @@ public String toString() {
", applyRealtimeDiscountForPkgName=" + applyRealtimeDiscountForPkgName +
", serviceFeeAmount=" + serviceFeeAmount +
", dynamicTipSelection=" + dynamicTipSelection +
+ ", localeFulfilmentRequest=" + localeFulfilmentRequest +
'}';
}
@@ -1672,6 +1704,7 @@ public void writeToParcel(Parcel out, int flags) {
if (customerTender != null) {
bundle.putParcelable(Intents.EXTRA_CUSTOMER_TENDER, customerTender);
+ bundle.putBoolean(Intents.EXTRA_CUSTOMER_TENDER_REQUIRED, requiresCustomTender);
}
bundle.putBoolean(Intents.EXTRA_DISABLE_CREDIT_SURCHARGE, isDisableCreditSurcharge);
@@ -1732,6 +1765,10 @@ public void writeToParcel(Parcel out, int flags) {
bundle.putString(Intents.EXTRA_DYNAMIC_TIP_SELECTION, dynamicTipSelection);
}
+ if (localeFulfilmentRequest != null) {
+ bundle.putString(Intents.EXTRA_LOCALE_FULFILMENT_REQUEST, localeFulfilmentRequest);
+ }
+
// write out
out.writeBundle(bundle);
}
@@ -1935,6 +1972,10 @@ public PayIntent createFromParcel(Parcel in) {
}
}
+ if (bundle.containsKey(Intents.EXTRA_CUSTOMER_TENDER_REQUIRED)) {
+ builder.requiresCustomTender(bundle.getBoolean(Intents.EXTRA_CUSTOMER_TENDER_REQUIRED, false));
+ }
+
builder.disableCreditSurcharge(bundle.getBoolean(Intents.EXTRA_DISABLE_CREDIT_SURCHARGE, false));
builder.isPresentQrcOnly(bundle.getBoolean(Intents.EXTRA_PRESENT_QRC_ONLY, false));
@@ -1991,6 +2032,10 @@ public PayIntent createFromParcel(Parcel in) {
builder.dynamicTipSelection(bundle.getString(Intents.EXTRA_DYNAMIC_TIP_SELECTION));
}
+ if (bundle.containsKey(Intents.EXTRA_LOCALE_FULFILMENT_REQUEST)) {
+ builder.localeFulfilmentRequest(bundle.getString(Intents.EXTRA_LOCALE_FULFILMENT_REQUEST));
+ }
+
// build
return builder.build();
}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/GenericClient.java b/clover-android-sdk/src/main/java/com/clover/sdk/GenericClient.java
index 3c9196112f..ecb9b54a8d 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/GenericClient.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/GenericClient.java
@@ -19,6 +19,8 @@
import android.os.Parcel;
import android.util.Log;
+import com.clover.sdk.v3.JsonHelper;
+
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -695,7 +697,7 @@ public D setArrayOther(java.util.List list, ExtractableEnum key) {
JSONArray array = new JSONArray();
for (T obj : list) {
if (obj == null) { continue; }
- array.put(obj);
+ array.put(JsonHelper.toJSON(obj));
}
JSONObject elementsContainer = new JSONObject();
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/util/Platform2.java b/clover-android-sdk/src/main/java/com/clover/sdk/util/Platform2.java
index bbf21bf37b..ccacb201ba 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/util/Platform2.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/util/Platform2.java
@@ -174,7 +174,7 @@ public boolean isSupported(Context context) {
}
},
/**
- * Device has a secure touch screen(eg: flex, mini) or a secure keypad(eg: pinetree)
+ * Device has a secure touch screen(eg: flex, mini) or a secure keypad(eg: Compact)
*/
SECURE_TOUCH {
@Override
@@ -387,4 +387,15 @@ public static boolean isSquareDisplay(Context context) {
return false;
}
+
+ /**
+ * Does this device has a secure keypad? A secure keypad is a numeric key entry hardware that is
+ * capable of secure PIN entry for use in financial transactions, as well as acting as a general
+ * purpose numeric keypad for application use.
+ *
+ * @return true if the used device has a secure keypad otherwise false
+ */
+ public static boolean hasSecureKeypad(Context context) {
+ return context.getPackageManager().hasSystemFeature("clover.hardware.secure_keypad");
+ }
}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/util/TaxRateLabels.kt b/clover-android-sdk/src/main/java/com/clover/sdk/util/TaxRateLabels.kt
new file mode 100644
index 0000000000..a031f0ec39
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/util/TaxRateLabels.kt
@@ -0,0 +1,14 @@
+package com.clover.sdk.util
+
+import com.clover.sdk.v3.inventory.TaxRate
+
+object TaxRateLabels {
+ const val STANDARD = "com.clover.tax.rate.standard"
+ const val REDUCED = "com.clover.tax.rate.reduced"
+
+ @JvmStatic
+ fun isStandard(taxRate: TaxRate): Boolean = taxRate.systemTaxRate?.labelKey == STANDARD
+
+ @JvmStatic
+ fun isReduced(taxRate: TaxRate): Boolean = taxRate.systemTaxRate?.labelKey == REDUCED
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v1/Intents.java b/clover-android-sdk/src/main/java/com/clover/sdk/v1/Intents.java
index aceba66353..61fe4e7cd5 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v1/Intents.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v1/Intents.java
@@ -61,6 +61,22 @@ public class Intents {
*/
public static final String ACTION_ITEM_SELECT = "com.clover.intent.action.ITEM_SELECT";
+ /**
+ * Launch an activity registered to handle order management, allowing a third-party app to view
+ * or edit an existing order.
+ *
+ * Extras passed:
+ *
+ * - {@link #EXTRA_ORDER_ID} - The UUID of the order to be managed (Required)
+ *
+ *
+ * Result data includes:
+ *
+ */
+ public static final String ACTION_MANAGE_ORDER = "com.clover.intent.action.MANAGE_ORDER";
+
/**
* Launch the Print Receipts activity, to show receipt printing and sending options for an order
*
@@ -1356,8 +1372,8 @@ public enum RemoteViewSize {
/** {@link String}, Is the customer phone number associated with Kiosk order */
public static final String EXTRA_KIOSK_FULFILLMENT_INFO_PHONE_NUMBER = "clover.intent.extra.KIOSK_FULFILLMENT_INFO_PHONE_NUMBER";
- /** {@link String}, Is the customer chosen kiosk app locale associated with Kiosk order */
- public static final String EXTRA_KIOSK_FULFILLMENT_INFO_LOCALE = "clover.intent.extra.KIOSK_FULFILLMENT_INFO_LOCALE";
+ /** {@link String}, Is the customer chosen clover order taking app's locale associated with order and further enhanced for other clover devices like KDS, Duo's */
+ public static final String EXTRA_LOCALE_FULFILMENT_REQUEST = "clover.intent.extra.LOCALE_FULFILMENT_REQUEST";
/** {@link String}, elv transaction type for Germany */
public static final String EXTRA_GERMAN_ELV = "clover.intent.extra.GERMAN_ELV";
@@ -1579,9 +1595,21 @@ public enum RemoteViewSize {
/** {@link int}, This flag enables/disables the visibility of the tender logos on the customer facing screen */
public static final String META_CUSTOMER_TENDER_LOGO_ENABLED = "clover.intent.meta.CUSTOMER_TENDER_LOGO_ENABLED";
+ /** A meta tag to display a title in bold on the prioritized Custom Tender button. */
+ public static final String META_CUSTOMER_TENDER_TITLE = "clover.intent.meta.CUSTOMER_TENDER_TITLE";
+
+ /** A meta tag to display a description of the button underneath the title of the prioritized Custom Tender button */
+ public static final String META_CUSTOMER_TENDER_DESCRIPTION = "clover.intent.meta.CUSTOMER_TENDER_DESCRIPTION";
+
/** {@link int}, A drawable resource ID, the image to be displayed on the merchant-facing tender button*/
public static final String META_MERCHANT_TENDER_IMAGE = "clover.intent.meta.MERCHANT_TENDER_IMAGE";
+ /** {@link int}, A meta tag to display text on the modify order button on merchant facing tender display. */
+ public static final String META_MODIFY_ORDER_LABEL = "clover.intent.meta.MODIFY_ORDER_LABEL";
+
+ /** {@link int}, A meta tag for a resource to display an image on the modify order button on merchant facing tender display. */
+ public static final String META_MODIFY_ORDER_IMAGE = "clover.intent.meta.MODIFY_ORDER_IMAGE";
+
/** {@link Boolean} flag */
public static final String EXTRA_USE_LAST_SWIPE = "clover.intent.extra_USE_LAST_SWIPE";
@@ -1899,4 +1927,10 @@ public static class PAYMENT_TOKEN_TYPE {
public static final String EXTRA_DYNAMIC_TIP_SELECTION = "clover.intent.extra.EXTRA_DYNAMIC_TIP_SELECTION";
+ /**
+ * Intent extra key indicating whether rounding logic should be applied to the current transaction.
+ * Expects a boolean value.
+ */
+ public static final String EXTRA_APPLY_ROUNDING = "clover.intent.extra.EXTRA_APPLY_ROUNDING";
+
}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v1/app/CloseoutAppEvent.kt b/clover-android-sdk/src/main/java/com/clover/sdk/v1/app/CloseoutAppEvent.kt
index ce71c1bc88..943dcf881d 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v1/app/CloseoutAppEvent.kt
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v1/app/CloseoutAppEvent.kt
@@ -11,5 +11,6 @@ package com.clover.sdk.v1.app
enum class CloseoutAppEvent(val appEvent: String) {
BATCH_CLOSED("batch_closed"),
BATCH_FAILED("batch_failed"),
- EXTRA_BATCH_ID("batchId")
+ EXTRA_BATCH_ID("batchId"),
+ EXTRA_OPERATION_REPORT_ID("operationReportId")
}
\ No newline at end of file
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v1/merchant/Module.java b/clover-android-sdk/src/main/java/com/clover/sdk/v1/merchant/Module.java
index 89a73467e4..5f80509e11 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v1/merchant/Module.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v1/merchant/Module.java
@@ -96,7 +96,41 @@ public enum Module implements Parcelable {
MULTI_LOCATION,
PAYBILLS,
HB_TIMESHEETS,
- ALLERGY_MANAGEMENT;
+ ALLERGY_MANAGEMENT,
+ /**
+ * Denotes that the merchant has access to Departments.
+ */
+ ITEM_DEPARTMENT,
+ BUNDLE,
+ /**
+ * Denotes that the merchant has access to Projects management feature.
+ */
+ PROJECTS,
+ /**
+ * Denotes that the merchant has access to Sub modifiers feature.
+ */
+ SUB_MODIFIERS,
+ /**
+ * Available on plans where LAN syncing is available.
+ */
+ LOCAL_CONNECT,
+ /**
+ * Denotes that the merchant has EMEA fiscalization enabled.
+ */
+ EMEA_FISCALIZATION,
+ /**
+ * Supports unlimited dining and drinking plans (e.g., all-you-can-eat, nomihodai).
+ */
+ UNLIMITED_DINING_PLANS,
+
+ /**
+ * Denotes that the merchant has access to Item Markers feature.
+ */
+ ITEM_MARKERS,
+
+ SHIPMENT,
+ TAX_ENGINE
+ ;
@Override
public int describeContents() {
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/CashEventPrintJob.java b/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/CashEventPrintJob.java
new file mode 100644
index 0000000000..9610b13b0b
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/CashEventPrintJob.java
@@ -0,0 +1,862 @@
+package com.clover.sdk.v1.printer.job;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import androidx.annotation.Nullable;
+
+import com.clover.sdk.GenericClient;
+import com.clover.sdk.GenericParcelable;
+import com.clover.sdk.JSONifiable;
+import com.clover.sdk.v1.printer.Category;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * Print job for cash-event receipt printing.
+ *
+ * IMPORTANT:
+ * - Keep class name and package exactly as-is for engine compatibility.
+ * - Engine reflects fields/getters: cashEvent/getCashEvent, receiptVariant/getReceiptVariant,
+ * transactionId/getTransactionId.
+ */
+public class CashEventPrintJob extends PrintJob implements Parcelable {
+
+ public static class Builder extends PrintJob.Builder {
+ protected CashEventPayload cashEvent;
+ protected String receiptVariant;
+ protected String transactionId;
+
+ public Builder cashEventPrintJob(CashEventPrintJob pj) {
+ printJob(pj);
+ this.cashEvent = pj.cashEvent;
+ this.receiptVariant = pj.receiptVariant;
+ this.transactionId = pj.transactionId;
+ return this;
+ }
+
+ public Builder cashEvent(CashEventPayload cashEvent) {
+ this.cashEvent = cashEvent;
+ return this;
+ }
+
+ public Builder receiptVariant(String receiptVariant) {
+ this.receiptVariant = receiptVariant;
+ return this;
+ }
+
+ public Builder receiptVariant(@Nullable ReceiptVariant receiptVariant) {
+ this.receiptVariant = receiptVariant == null ? null : receiptVariant.value();
+ return this;
+ }
+
+ public Builder transactionId(@Nullable String transactionId) {
+ this.transactionId = transactionId;
+ return this;
+ }
+
+ @Override
+ public Builder flag(int flag) {
+ super.flag(flag);
+ return this;
+ }
+
+ @Override
+ public Builder includePrintGroups(boolean includePrintGroups) {
+ super.includePrintGroups(includePrintGroups);
+ return this;
+ }
+
+ @Override
+ @Deprecated
+ public Builder printToAny(boolean printToAny) {
+ super.printToAny(printToAny);
+ return this;
+ }
+
+ @Override
+ public CashEventPrintJob build() {
+ return new CashEventPrintJob(this);
+ }
+ }
+
+ public enum ReceiptVariant {
+ STARTING_BALANCE("STARTING_BALANCE"),
+ DEPOSIT("DEPOSIT"),
+ WITHDRAWAL("WITHDRAWAL"),
+ CASH_INSPECTION("CASH_INSPECTION");
+
+ private final String value;
+
+ ReceiptVariant(String value) {
+ this.value = value;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ @Nullable
+ public static ReceiptVariant fromValue(@Nullable String value) {
+ if (value == null) {
+ return null;
+ }
+ for (ReceiptVariant variant : values()) {
+ if (variant.value.equals(value)) {
+ return variant;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public String toString() {
+ return value;
+ }
+ }
+
+
+ public final CashEventPayload cashEvent;
+ public final String receiptVariant;
+ public final String transactionId;
+
+ public CashEventPrintJob(
+ CashEventPayload cashEvent,
+ String receiptVariant,
+ @Nullable String transactionId
+ ) {
+ this(new Builder()
+ .cashEvent(cashEvent)
+ .receiptVariant(receiptVariant)
+ .transactionId(transactionId));
+ }
+
+ public CashEventPrintJob(
+ CashEventPayload cashEvent,
+ @Nullable ReceiptVariant receiptVariant,
+ @Nullable String transactionId
+ ) {
+ this(new Builder()
+ .cashEvent(cashEvent)
+ .receiptVariant(receiptVariant)
+ .transactionId(transactionId));
+ }
+
+ protected CashEventPrintJob(Builder builder) {
+ super(builder);
+ this.cashEvent = builder.cashEvent;
+ this.receiptVariant = builder.receiptVariant;
+ this.transactionId = builder.transactionId;
+ }
+
+ @Override
+ public Category getPrinterCategory() {
+ return Category.RECEIPT;
+ }
+
+ protected CashEventPrintJob(Parcel in) {
+ super(in);
+ this.cashEvent = in.readParcelable(CashEventPayload.class.getClassLoader());
+ this.receiptVariant = in.readString();
+ this.transactionId = in.readString();
+ }
+
+ public CashEventPayload getCashEvent() {
+ return cashEvent;
+ }
+
+ public String getReceiptVariant() {
+ return receiptVariant;
+ }
+
+ @Nullable
+ public ReceiptVariant getReceiptVariantEnum() {
+ return ReceiptVariant.fromValue(receiptVariant);
+ }
+
+ @Nullable
+ public String getTransactionId() {
+ return transactionId;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ super.writeToParcel(dest, flags);
+ dest.writeParcelable(cashEvent, flags);
+ dest.writeString(receiptVariant);
+ dest.writeString(transactionId);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public CashEventPrintJob createFromParcel(Parcel in) {
+ return new CashEventPrintJob(in);
+ }
+
+ @Override
+ public CashEventPrintJob[] newArray(int size) {
+ return new CashEventPrintJob[size];
+ }
+ };
+
+ /**
+ * Payload object intentionally shaped for engine parsing.
+ * Engine can parse from getJSONObject() and/or direct getters.
+ */
+ public static class CashReconciliation extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable {
+ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
+ startingCashBalance(com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ cashSales(com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ cashDeposits(com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ cashWithdrawals(com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ cashRefunds(com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ expectedCashBalance(com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ cashCount(com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ cashDifference(com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ expectedNonCashBalance(com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ nonCashCount(com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ nonCashDifference(com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ totalDifference(com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ comment(com.clover.sdk.extractors.BasicExtractionStrategy.instance(String.class));
+
+ private final com.clover.sdk.extractors.ExtractionStrategy extractionStrategy;
+
+ CacheKey(com.clover.sdk.extractors.ExtractionStrategy extractionStrategy) {
+ this.extractionStrategy = extractionStrategy;
+ }
+
+ @Override
+ public com.clover.sdk.extractors.ExtractionStrategy getExtractionStrategy() {
+ return extractionStrategy;
+ }
+ }
+
+ private final GenericClient genClient;
+
+ public CashReconciliation() {
+ genClient = new GenericClient(this);
+ }
+
+ protected CashReconciliation(boolean noInit) {
+ genClient = null;
+ }
+
+ public CashReconciliation(String json) throws IllegalArgumentException {
+ this();
+ genClient.initJsonObject(json);
+ }
+
+ public CashReconciliation(JSONObject jsonObject) {
+ this();
+ genClient.setJsonObject(jsonObject);
+ }
+
+ public CashReconciliation(CashReconciliation src) {
+ this();
+ if (src.genClient.getJsonObject() != null) {
+ genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject()));
+ }
+ }
+
+ @Override
+ public void validate() throws JSONException {
+ // Intentionally no field-level constraints for this payload object.
+ }
+
+ public static class Builder {
+ protected Long startingCashBalance;
+ protected Long cashSales;
+ protected Long cashDeposits;
+ protected Long cashWithdrawals;
+ protected Long cashRefunds;
+ protected Long expectedCashBalance;
+ protected Long cashCount;
+ protected Long cashDifference;
+ protected Long expectedNonCashBalance;
+ protected Long nonCashCount;
+ protected Long nonCashDifference;
+ protected Long totalDifference;
+ protected String comment;
+
+ public Builder cashReconciliation(CashReconciliation reconciliation) {
+ this.startingCashBalance = reconciliation.getStartingCashBalance();
+ this.cashSales = reconciliation.getCashSales();
+ this.cashDeposits = reconciliation.getCashDeposits();
+ this.cashWithdrawals = reconciliation.getCashWithdrawals();
+ this.cashRefunds = reconciliation.getCashRefunds();
+ this.expectedCashBalance = reconciliation.getExpectedCashBalance();
+ this.cashCount = reconciliation.getCashCount();
+ this.cashDifference = reconciliation.getCashDifference();
+ this.expectedNonCashBalance = reconciliation.getExpectedNonCashBalance();
+ this.nonCashCount = reconciliation.getNonCashCount();
+ this.nonCashDifference = reconciliation.getNonCashDifference();
+ this.totalDifference = reconciliation.getTotalDifference();
+ this.comment = reconciliation.getComment();
+ return this;
+ }
+
+ public Builder startingCashBalance(@Nullable Long startingCashBalance) {
+ this.startingCashBalance = startingCashBalance;
+ return this;
+ }
+
+ public Builder cashSales(@Nullable Long cashSales) {
+ this.cashSales = cashSales;
+ return this;
+ }
+
+ public Builder cashDeposits(@Nullable Long cashDeposits) {
+ this.cashDeposits = cashDeposits;
+ return this;
+ }
+
+ public Builder cashWithdrawals(@Nullable Long cashWithdrawals) {
+ this.cashWithdrawals = cashWithdrawals;
+ return this;
+ }
+
+ public Builder cashRefunds(@Nullable Long cashRefunds) {
+ this.cashRefunds = cashRefunds;
+ return this;
+ }
+
+ public Builder expectedCashBalance(@Nullable Long expectedCashBalance) {
+ this.expectedCashBalance = expectedCashBalance;
+ return this;
+ }
+
+ public Builder cashCount(@Nullable Long cashCount) {
+ this.cashCount = cashCount;
+ return this;
+ }
+
+ public Builder cashDifference(@Nullable Long cashDifference) {
+ this.cashDifference = cashDifference;
+ return this;
+ }
+
+ public Builder expectedNonCashBalance(@Nullable Long expectedNonCashBalance) {
+ this.expectedNonCashBalance = expectedNonCashBalance;
+ return this;
+ }
+
+ public Builder nonCashCount(@Nullable Long nonCashCount) {
+ this.nonCashCount = nonCashCount;
+ return this;
+ }
+
+ public Builder nonCashDifference(@Nullable Long nonCashDifference) {
+ this.nonCashDifference = nonCashDifference;
+ return this;
+ }
+
+ public Builder totalDifference(@Nullable Long totalDifference) {
+ this.totalDifference = totalDifference;
+ return this;
+ }
+
+ public Builder comment(@Nullable String comment) {
+ this.comment = comment;
+ return this;
+ }
+
+ public CashReconciliation build() {
+ return new CashReconciliation(
+ startingCashBalance,
+ cashSales,
+ cashDeposits,
+ cashWithdrawals,
+ cashRefunds,
+ expectedCashBalance,
+ cashCount,
+ cashDifference,
+ expectedNonCashBalance,
+ nonCashCount,
+ nonCashDifference,
+ totalDifference,
+ comment);
+ }
+ }
+
+
+ public CashReconciliation(
+ @Nullable Long startingCashBalance,
+ @Nullable Long cashSales,
+ @Nullable Long cashDeposits,
+ @Nullable Long cashWithdrawals,
+ @Nullable Long cashRefunds,
+ @Nullable Long expectedCashBalance,
+ @Nullable Long cashCount,
+ @Nullable Long cashDifference,
+ @Nullable Long expectedNonCashBalance,
+ @Nullable Long nonCashCount,
+ @Nullable Long nonCashDifference,
+ @Nullable Long totalDifference,
+ @Nullable String comment
+ ) {
+ this();
+ setStartingCashBalance(startingCashBalance);
+ setCashSales(cashSales);
+ setCashDeposits(cashDeposits);
+ setCashWithdrawals(cashWithdrawals);
+ setCashRefunds(cashRefunds);
+ setExpectedCashBalance(expectedCashBalance);
+ setCashCount(cashCount);
+ setCashDifference(cashDifference);
+ setExpectedNonCashBalance(expectedNonCashBalance);
+ setNonCashCount(nonCashCount);
+ setNonCashDifference(nonCashDifference);
+ setTotalDifference(totalDifference);
+ setComment(comment);
+ resetChangeLog();
+ }
+
+ @Nullable
+ public Long getStartingCashBalance() {
+ return genClient.cacheGet(CacheKey.startingCashBalance);
+ }
+
+ @Nullable
+ public Long getCashSales() {
+ return genClient.cacheGet(CacheKey.cashSales);
+ }
+
+ @Nullable
+ public Long getCashDeposits() {
+ return genClient.cacheGet(CacheKey.cashDeposits);
+ }
+
+ @Nullable
+ public Long getCashWithdrawals() {
+ return genClient.cacheGet(CacheKey.cashWithdrawals);
+ }
+
+ @Nullable
+ public Long getCashRefunds() {
+ return genClient.cacheGet(CacheKey.cashRefunds);
+ }
+
+ @Nullable
+ public Long getExpectedCashBalance() {
+ return genClient.cacheGet(CacheKey.expectedCashBalance);
+ }
+
+ @Nullable
+ public Long getCashCount() {
+ return genClient.cacheGet(CacheKey.cashCount);
+ }
+
+ @Nullable
+ public Long getCashDifference() {
+ return genClient.cacheGet(CacheKey.cashDifference);
+ }
+
+ @Nullable
+ public Long getExpectedNonCashBalance() {
+ return genClient.cacheGet(CacheKey.expectedNonCashBalance);
+ }
+
+ @Nullable
+ public Long getNonCashCount() {
+ return genClient.cacheGet(CacheKey.nonCashCount);
+ }
+
+ @Nullable
+ public Long getNonCashDifference() {
+ return genClient.cacheGet(CacheKey.nonCashDifference);
+ }
+
+ @Nullable
+ public Long getTotalDifference() {
+ return genClient.cacheGet(CacheKey.totalDifference);
+ }
+
+ @Nullable
+ public String getComment() {
+ return genClient.cacheGet(CacheKey.comment);
+ }
+
+ public JSONObject getJSONObject() {
+ return genClient.getJSONObject();
+ }
+
+ public CashReconciliation setStartingCashBalance(@Nullable Long value) {
+ return genClient.setOther(value, CacheKey.startingCashBalance);
+ }
+
+ public CashReconciliation setCashSales(@Nullable Long value) {
+ return genClient.setOther(value, CacheKey.cashSales);
+ }
+
+ public CashReconciliation setCashDeposits(@Nullable Long value) {
+ return genClient.setOther(value, CacheKey.cashDeposits);
+ }
+
+ public CashReconciliation setCashWithdrawals(@Nullable Long value) {
+ return genClient.setOther(value, CacheKey.cashWithdrawals);
+ }
+
+ public CashReconciliation setCashRefunds(@Nullable Long value) {
+ return genClient.setOther(value, CacheKey.cashRefunds);
+ }
+
+ public CashReconciliation setExpectedCashBalance(@Nullable Long value) {
+ return genClient.setOther(value, CacheKey.expectedCashBalance);
+ }
+
+ public CashReconciliation setCashCount(@Nullable Long value) {
+ return genClient.setOther(value, CacheKey.cashCount);
+ }
+
+ public CashReconciliation setCashDifference(@Nullable Long value) {
+ return genClient.setOther(value, CacheKey.cashDifference);
+ }
+
+ public CashReconciliation setExpectedNonCashBalance(@Nullable Long value) {
+ return genClient.setOther(value, CacheKey.expectedNonCashBalance);
+ }
+
+ public CashReconciliation setNonCashCount(@Nullable Long value) {
+ return genClient.setOther(value, CacheKey.nonCashCount);
+ }
+
+ public CashReconciliation setNonCashDifference(@Nullable Long value) {
+ return genClient.setOther(value, CacheKey.nonCashDifference);
+ }
+
+ public CashReconciliation setTotalDifference(@Nullable Long value) {
+ return genClient.setOther(value, CacheKey.totalDifference);
+ }
+
+ public CashReconciliation setComment(@Nullable String value) {
+ return genClient.setOther(value, CacheKey.comment);
+ }
+
+ public boolean containsChanges() {
+ return genClient.containsChanges();
+ }
+
+ public void resetChangeLog() {
+ genClient.resetChangeLog();
+ }
+
+ public CashReconciliation copyChanges() {
+ CashReconciliation copy = new CashReconciliation();
+ copy.mergeChanges(this);
+ copy.resetChangeLog();
+ return copy;
+ }
+
+ public void mergeChanges(CashReconciliation src) {
+ if (src.genClient.getChangeLog() != null) {
+ genClient.mergeChanges(new CashReconciliation(src).getJSONObject(), src.genClient);
+ }
+ }
+
+ @Override
+ protected GenericClient getGenericClient() {
+ return genClient;
+ }
+
+ public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
+ @Override
+ public CashReconciliation createFromParcel(Parcel in) {
+ CashReconciliation instance = new CashReconciliation(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap());
+ instance.genClient.setBundle(in.readBundle(getClass().getClassLoader()));
+ instance.genClient.setChangeLog(in.readBundle());
+ return instance;
+ }
+
+ @Override
+ public CashReconciliation[] newArray(int size) {
+ return new CashReconciliation[size];
+ }
+ };
+
+ public static final JSONifiable.Creator JSON_CREATOR = new JSONifiable.Creator() {
+ @Override
+ public Class getCreatedClass() {
+ return CashReconciliation.class;
+ }
+
+ @Override
+ public CashReconciliation create(JSONObject jsonObject) {
+ return new CashReconciliation(jsonObject);
+ }
+ };
+ }
+
+ public static class CashEventPayload implements Parcelable {
+ private static final String BUNDLE_TYPE = "type";
+ private static final String BUNDLE_AMOUNT_CHANGE = "amountChange";
+ private static final String BUNDLE_TIMESTAMP = "timestamp";
+ private static final String BUNDLE_NOTE = "note";
+ private static final String BUNDLE_EMPLOYEE = "employee";
+ private static final String BUNDLE_DEVICE_ID = "deviceId";
+ private static final String BUNDLE_RECONCILIATION = "reconciliation";
+ private static final String BUNDLE_ID = "id";
+ private static final String BUNDLE_EXPECTED_BALANCE = "expectedBalance";
+
+ public static class Builder {
+ protected String type;
+ protected Long amountChange;
+ protected Long timestamp;
+ protected String note;
+ protected String employee;
+ protected String deviceId;
+
+ protected CashReconciliation reconciliation;
+ protected String id;
+ protected Long expectedBalance;
+
+ public Builder cashEventPayload(CashEventPayload payload) {
+ this.type = payload.type;
+ this.amountChange = payload.amountChange;
+ this.timestamp = payload.timestamp;
+ this.note = payload.note;
+ this.employee = payload.employee;
+ this.deviceId = payload.deviceId;
+ this.reconciliation = payload.reconciliation;
+ this.id = payload.id;
+ this.expectedBalance = payload.expectedBalance;
+ return this;
+ }
+
+ public Builder type(@Nullable String type) {
+ this.type = type;
+ return this;
+ }
+
+ public Builder amountChange(@Nullable Long amountChange) {
+ this.amountChange = amountChange;
+ return this;
+ }
+
+ public Builder timestamp(@Nullable Long timestamp) {
+ this.timestamp = timestamp;
+ return this;
+ }
+
+ public Builder note(@Nullable String note) {
+ this.note = note;
+ return this;
+ }
+
+ public Builder employee(@Nullable String employee) {
+ this.employee = employee;
+ return this;
+ }
+
+ public Builder deviceId(@Nullable String deviceId) {
+ this.deviceId = deviceId;
+ return this;
+ }
+
+ public Builder reconciliation(@Nullable CashReconciliation reconciliation) {
+ this.reconciliation = reconciliation;
+ return this;
+ }
+
+ public Builder id(@Nullable String id) {
+ this.id = id;
+ return this;
+ }
+
+ public Builder expectedBalance(@Nullable Long expectedBalance) {
+ this.expectedBalance = expectedBalance;
+ return this;
+ }
+
+ public CashEventPayload build() {
+ return new CashEventPayload(
+ type,
+ amountChange,
+ timestamp,
+ note,
+ employee,
+ deviceId,
+ reconciliation,
+ id,
+ expectedBalance);
+ }
+ }
+
+ public final String type;
+ public final Long amountChange;
+ public final Long timestamp;
+ public final String note;
+ public final String employee;
+ public final String deviceId;
+ public final CashReconciliation reconciliation;
+ public final String id;
+ public final Long expectedBalance;
+
+ public CashEventPayload(
+ @Nullable String type,
+ @Nullable Long amountChange,
+ @Nullable Long timestamp,
+ @Nullable String note,
+ @Nullable String employee,
+ @Nullable String deviceId,
+ @Nullable CashReconciliation reconciliation,
+ @Nullable String id,
+ @Nullable Long expectedBalance
+ ) {
+ this.type = type;
+ this.amountChange = amountChange;
+ this.timestamp = timestamp;
+ this.note = note;
+ this.employee = employee;
+ this.deviceId = deviceId;
+ this.reconciliation = reconciliation;
+ this.id = id;
+ this.expectedBalance = expectedBalance;
+ }
+
+ protected CashEventPayload(Parcel in) {
+ Bundle bundle = in.readBundle(getClass().getClassLoader());
+ if (bundle == null) {
+ this.type = null;
+ this.amountChange = null;
+ this.timestamp = null;
+ this.note = null;
+ this.employee = null;
+ this.deviceId = null;
+ this.reconciliation = null;
+ this.id = null;
+ this.expectedBalance = null;
+ return;
+ }
+
+ this.type = bundle.getString(BUNDLE_TYPE);
+ this.amountChange = bundle.containsKey(BUNDLE_AMOUNT_CHANGE)
+ ? bundle.getLong(BUNDLE_AMOUNT_CHANGE)
+ : null;
+ this.timestamp = bundle.containsKey(BUNDLE_TIMESTAMP)
+ ? bundle.getLong(BUNDLE_TIMESTAMP)
+ : null;
+ this.note = bundle.getString(BUNDLE_NOTE);
+ this.employee = bundle.getString(BUNDLE_EMPLOYEE);
+ this.deviceId = bundle.getString(BUNDLE_DEVICE_ID);
+ this.reconciliation = bundle.getParcelable(BUNDLE_RECONCILIATION);
+ this.id = bundle.getString(BUNDLE_ID);
+ this.expectedBalance = bundle.containsKey(BUNDLE_EXPECTED_BALANCE)
+ ? bundle.getLong(BUNDLE_EXPECTED_BALANCE)
+ : null;
+ }
+
+ @Nullable
+ public String getType() {
+ return type;
+ }
+
+ @Nullable
+ public Long getAmountChange() {
+ return amountChange;
+ }
+
+ @Nullable
+ public Long getTimestamp() {
+ return timestamp;
+ }
+
+ @Nullable
+ public String getNote() {
+ return note;
+ }
+
+ @Nullable
+ public String getEmployee() {
+ return employee;
+ }
+
+ @Nullable
+ public String getDeviceId() {
+ return deviceId;
+ }
+
+ @Nullable
+ public CashReconciliation getReconciliation() {
+ return reconciliation;
+ }
+
+ @Nullable
+ public String getId() {
+ return id;
+ }
+
+ @Nullable
+ public Long getExpectedBalance() {
+ return expectedBalance;
+ }
+
+ /**
+ * Engine will read this via reflection when available.
+ */
+ public JSONObject getJSONObject() {
+ JSONObject obj = new JSONObject();
+ try {
+ if (type != null) obj.put("type", type);
+ if (amountChange != null) obj.put("amountChange", amountChange);
+ if (timestamp != null) obj.put("timestamp", timestamp);
+ if (note != null) obj.put("note", note);
+ if (id != null) obj.put("id", id);
+ if (expectedBalance != null) obj.put("expectedBalance", expectedBalance);
+
+ if (employee != null) obj.put("employee", employee);
+
+ if (deviceId != null) {
+ obj.put("deviceId", deviceId);
+ }
+
+ CashReconciliation rec = getReconciliation();
+ if (rec != null) {
+ obj.put("reconciliation", rec.getJSONObject());
+ }
+ } catch (JSONException ignored) {
+ return null;
+ }
+ return obj;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ Bundle bundle = new Bundle();
+ bundle.putString(BUNDLE_TYPE, type);
+ if (amountChange != null) {
+ bundle.putLong(BUNDLE_AMOUNT_CHANGE, amountChange);
+ }
+ if (timestamp != null) {
+ bundle.putLong(BUNDLE_TIMESTAMP, timestamp);
+ }
+ bundle.putString(BUNDLE_NOTE, note);
+ bundle.putString(BUNDLE_EMPLOYEE, employee);
+ bundle.putString(BUNDLE_DEVICE_ID, deviceId);
+ bundle.putParcelable(BUNDLE_RECONCILIATION, reconciliation);
+ bundle.putString(BUNDLE_ID, id);
+ if (expectedBalance != null) {
+ bundle.putLong(BUNDLE_EXPECTED_BALANCE, expectedBalance);
+ }
+ dest.writeBundle(bundle);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public CashEventPayload createFromParcel(Parcel in) {
+ return new CashEventPayload(in);
+ }
+
+ @Override
+ public CashEventPayload[] newArray(int size) {
+ return new CashEventPayload[size];
+ }
+ };
+ }
+}
\ No newline at end of file
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/PrintJob.java b/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/PrintJob.java
index c512a5cdb3..64471730ce 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/PrintJob.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/PrintJob.java
@@ -91,7 +91,12 @@ public abstract class PrintJob implements Parcelable {
*/
public static final int FLAG_PRINT_VOID_RECEIPT = 1 << 14;
- public abstract static class Builder {
+ /** Indicates if a print job is for RSS type. */
+ public static final int FLAG_PRINT_RSS_RECEIPT = 1 << 15;
+ /** Indicated if a print job is stamp duty eligible. Defines when a box is printed for merchant to paste the stamp */
+ public static final int FLAG_STAMP_DUTY_ELIGIBLE = 1 << 16;
+
+ public abstract static class Builder {
protected int flags = FLAG_NONE;
protected boolean printToAny = false;
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/ReportPrintJob.java b/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/ReportPrintJob.java
index 0edb56e01d..0bdb86eb00 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/ReportPrintJob.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/ReportPrintJob.java
@@ -23,7 +23,7 @@
public class ReportPrintJob extends ViewPrintJob implements Parcelable {
public enum ReportType {
// Do not remove or rename these, add only to avoid breaking 3rd party apps
- PAYMENTS, ITEMS, DISCOUNTS, TAXES, SHIFTS, EMPLOYEES, SALES_OVERVIEW, ITEMS_2019, SALES_OVERVIEW_ARS, SALES_OVERVIEW_USD;
+ PAYMENTS, ITEMS, DISCOUNTS, TAXES, SHIFTS, EMPLOYEES, SALES_OVERVIEW, ITEMS_2019, SALES_OVERVIEW_ARS, SALES_OVERVIEW_USD, DETAILED_VIEW;
}
public static class Builder extends ViewPrintJob.Builder {
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/StaticOrderPrintJob.java b/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/StaticOrderPrintJob.java
index c0ed7301d5..d6a78927af 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/StaticOrderPrintJob.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v1/printer/job/StaticOrderPrintJob.java
@@ -19,6 +19,7 @@
import android.os.Parcel;
import android.os.Parcelable;
import com.clover.sdk.v1.printer.Category;
+import com.clover.sdk.v3.order.LineItem;
import com.clover.sdk.v3.order.Order;
import java.util.ArrayList;
@@ -28,12 +29,14 @@ public class StaticOrderPrintJob extends StaticOrderBasedPrintJob implements Par
private static final String BUNDLE_REPRINT_ALLOWED = "b";
private static final String BUNDLE_KEY_MARK_PRINTED = "m";
private static final String BUNDLE_KEY_BANNER = "banner";
+ private static final String BUNDLE_KEY_VOIDED_LINE_ITEMS = "voidedLineItems";
public static class Builder extends StaticOrderBasedPrintJob.Builder {
protected ArrayList itemIds;
private boolean reprintAllowed = false;
private boolean markPrinted = false;
private String banner = null;
+ private ArrayList voidedLineItems = null;
public Builder staticOrderPrintJob(StaticOrderPrintJob pj) {
staticOrderBasedPrintJob(pj);
@@ -41,7 +44,43 @@ public Builder staticOrderPrintJob(StaticOrderPrintJob pj) {
this.reprintAllowed = pj.reprintAllowed;
this.markPrinted = pj.markPrinted;
this.banner = pj.banner;
+ this.voidedLineItems = pj.voidedLineItems;
+ return this;
+ }
+
+ @Override
+ public Builder order(Order order) {
+ super.order(order);
+ return this;
+ }
+
+ @Override
+ public Builder reason(String reason) {
+ super.reason(reason);
+ return this;
+ }
+
+ @Override
+ public Builder flag(int flag) {
+ super.flag(flag);
+ return this;
+ }
+
+ @Override
+ public Builder flags(int flags) {
+ super.flags(flags);
+ return this;
+ }
+ @Override
+ public Builder includePrintGroups(boolean includePrintGroups) {
+ super.includePrintGroups(includePrintGroups);
+ return this;
+ }
+
+ @Override
+ public Builder printToAny(boolean printToAny) {
+ super.printToAny(printToAny);
return this;
}
@@ -71,6 +110,17 @@ public Builder banner(String banner) {
return this;
}
+ /**
+ * Sets the voided line items associated with this print job.
+ *
+ * @param voidedLineItems voided line items, or null if not applicable
+ * @return this Builder instance for method chaining
+ */
+ public Builder voidedLineItems(ArrayList voidedLineItems) {
+ this.voidedLineItems = voidedLineItems;
+ return this;
+ }
+
public StaticOrderPrintJob build() {
return new StaticOrderPrintJob(this);
}
@@ -84,6 +134,12 @@ public StaticOrderPrintJob build() {
* This text will be displayed as a banner on the printed output.
*/
public final String banner;
+ /**
+ * Voided line items used for void-receipt printing.
+ * This is an optional field and may be null if not applicable.
+ */
+ public final ArrayList voidedLineItems;
+
/**
* Creates a new StaticOrderPrintJob instance.
@@ -103,6 +159,7 @@ public StaticOrderPrintJob(Order order, ArrayList itemIds, boolean repri
this.reprintAllowed = reprintAllowed;
this.markPrinted = markPrinted;
this.banner = banner;
+ this.voidedLineItems = null;
}
protected StaticOrderPrintJob(Builder builder) {
@@ -111,6 +168,7 @@ protected StaticOrderPrintJob(Builder builder) {
this.reprintAllowed = builder.reprintAllowed;
this.markPrinted = builder.markPrinted;
this.banner = builder.banner;
+ this.voidedLineItems = builder.voidedLineItems;
}
public static final Creator CREATOR = new Creator() {
@@ -130,6 +188,7 @@ protected StaticOrderPrintJob(Parcel in) {
reprintAllowed = bundle.getBoolean(BUNDLE_REPRINT_ALLOWED);
markPrinted = bundle.getBoolean(BUNDLE_KEY_MARK_PRINTED);
banner = bundle.getString(BUNDLE_KEY_BANNER);
+ voidedLineItems = bundle.getParcelableArrayList(BUNDLE_KEY_VOIDED_LINE_ITEMS);
}
@Override
@@ -145,6 +204,7 @@ public void writeToParcel(Parcel dest, int flags) {
bundle.putBoolean(BUNDLE_REPRINT_ALLOWED, reprintAllowed);
bundle.putBoolean(BUNDLE_KEY_MARK_PRINTED, markPrinted);
bundle.putString(BUNDLE_KEY_BANNER, banner);
+ bundle.putParcelableArrayList(BUNDLE_KEY_VOIDED_LINE_ITEMS, voidedLineItems);
dest.writeBundle(bundle);
}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v1/tender/Tender.java b/clover-android-sdk/src/main/java/com/clover/sdk/v1/tender/Tender.java
index 5144df0396..67ac44c425 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v1/tender/Tender.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v1/tender/Tender.java
@@ -15,6 +15,8 @@
*/
package com.clover.sdk.v1.tender;
+import com.clover.sdk.v3.base.TenderProperties;
+
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -26,15 +28,16 @@ public class Tender implements Parcelable {
private static final String KEY_ENABLED = "enabled";
private static final String KEY_OPENS_CASH_DRAWER = "opensCashDrawer";
private static final String KEY_SUPPORTS_TIPPING = "supportsTipping";
+ private static final String KEY_TENDER_PROPERTIES = "tenderProperties";
private final Bundle data;
- Tender() {
+ public Tender() {
this.data = new Bundle();
}
- Tender(Parcel in) {
- this.data = in.readBundle();
+ public Tender(Parcel in) {
+ this.data = in.readBundle(getClass().getClassLoader());
}
public Tender(Bundle in) {
@@ -65,6 +68,15 @@ public boolean getSupportsTipping() {
return data.getBoolean(KEY_SUPPORTS_TIPPING, false);
}
+ public TenderProperties getTenderProperties() {
+ data.setClassLoader(TenderProperties.class.getClassLoader());
+ return data.getParcelable(KEY_TENDER_PROPERTIES);
+ }
+
+ public void setTenderProperties(TenderProperties tenderProperties) {
+ data.putParcelable(KEY_TENDER_PROPERTIES, tenderProperties);
+ }
+
@Override
public int describeContents() {
return 0;
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v1/tender/TenderConnector.java b/clover-android-sdk/src/main/java/com/clover/sdk/v1/tender/TenderConnector.java
index 0a0c6c345c..9208ae6122 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v1/tender/TenderConnector.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v1/tender/TenderConnector.java
@@ -20,6 +20,7 @@
import com.clover.sdk.v1.ResultStatus;
import com.clover.sdk.v1.ServiceConnector;
import com.clover.sdk.v1.ServiceException;
+import com.clover.sdk.v3.base.TenderProperties;
import android.accounts.Account;
import android.content.Context;
@@ -186,4 +187,31 @@ public Tender call(ITenderService service, ResultStatus status) throws RemoteExc
}, callback);
}
+ public Tender checkAndCreateTenderV2(final String label, final String labelKey, final boolean enabled, final boolean opensCashDrawer, final TenderProperties tenderProperties) throws RemoteException, ClientException, ServiceException, BindingException {
+ return execute(new TenderCallable() {
+ @Override
+ public Tender call(ITenderService service, ResultStatus status) throws RemoteException {
+ return service.checkAndCreateTenderV2(label, labelKey, enabled, opensCashDrawer, tenderProperties, status);
+ }
+ });
+ }
+
+ public void checkAndCreateTenderV2(final String label, final String labelKey, final boolean enabled, final boolean opensCashDrawer, final TenderProperties tenderProperties, ServiceConnector.Callback callback) {
+ execute(new TenderCallable() {
+ @Override
+ public Tender call(ITenderService service, ResultStatus status) throws RemoteException {
+ return service.checkAndCreateTenderV2(label, labelKey, enabled, opensCashDrawer, tenderProperties, status);
+ }
+ }, callback);
+ }
+
+ public void updateTenderProperties(final String tenderId, final TenderProperties tenderProperties) throws RemoteException, ClientException, ServiceException, BindingException {
+ execute(new TenderCallable() {
+ @Override
+ public Void call(ITenderService service, ResultStatus status) throws RemoteException {
+ service.updateTenderProperties(tenderId, tenderProperties, status);
+ return null;
+ }
+ });
+ }
}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/apps/App.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/apps/App.java
index 7531a07a13..0a94cfd2d8 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v3/apps/App.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/apps/App.java
@@ -72,6 +72,7 @@
* {@link #getPermissionPaymentsWrite permissionPaymentsWrite}
* {@link #getPermissionEmployeesRead permissionEmployeesRead}
* {@link #getPermissionEmployeesWrite permissionEmployeesWrite}
+ * {@link #getPermissionVasRead permissionVasRead}
* {@link #getPermissionProcessCards permissionProcessCards}
* {@link #getPermissionMidRead permissionMidRead}
* {@link #getPermissionCustomersAddressRead permissionCustomersAddressRead}
@@ -368,6 +369,10 @@ public java.lang.Boolean getPermissionEmployeesWrite() {
return genClient.cacheGet(CacheKey.permissionEmployeesWrite);
}
+ public java.lang.Boolean getPermissionVasRead() {
+ return genClient.cacheGet(CacheKey.permissionVasRead);
+ }
+
public java.lang.Boolean getPermissionProcessCards() {
return genClient.cacheGet(CacheKey.permissionProcessCards);
}
@@ -911,6 +916,8 @@ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
(com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Boolean.class)),
permissionEmployeesWrite
(com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Boolean.class)),
+ permissionVasRead
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Boolean.class)),
permissionProcessCards
(com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Boolean.class)),
permissionMidRead
@@ -1405,6 +1412,11 @@ public boolean isNotNullPermissionEmployeesWrite() {
return genClient.cacheValueIsNotNull(CacheKey.permissionEmployeesWrite);
}
+ /** Checks whether the 'permissionVasRead' field is set and is not null */
+ public boolean isNotNullPermissionVasRead() {
+ return genClient.cacheValueIsNotNull(CacheKey.permissionVasRead);
+ }
+
/** Checks whether the 'permissionProcessCards' field is set and is not null */
public boolean isNotNullPermissionProcessCards() {
return genClient.cacheValueIsNotNull(CacheKey.permissionProcessCards);
@@ -2050,6 +2062,11 @@ public boolean hasPermissionEmployeesWrite() {
return genClient.cacheHasKey(CacheKey.permissionEmployeesWrite);
}
+ /** Checks whether the 'permissionVasRead' field has been set, however the value could be null */
+ public boolean hasPermissionVasRead() {
+ return genClient.cacheHasKey(CacheKey.permissionVasRead);
+ }
+
/** Checks whether the 'permissionProcessCards' field has been set, however the value could be null */
public boolean hasPermissionProcessCards() {
return genClient.cacheHasKey(CacheKey.permissionProcessCards);
@@ -2736,6 +2753,13 @@ public App setPermissionEmployeesWrite(java.lang.Boolean permissionEmployeesWrit
return genClient.setOther(permissionEmployeesWrite, CacheKey.permissionEmployeesWrite);
}
+ /**
+ * Sets the field 'permissionVasRead'.
+ */
+ public App setPermissionVasRead(java.lang.Boolean permissionVasRead) {
+ return genClient.setOther(permissionVasRead, CacheKey.permissionVasRead);
+ }
+
/**
* Sets the field 'permissionProcessCards'.
*/
@@ -3489,6 +3513,10 @@ public void clearPermissionEmployeesRead() {
public void clearPermissionEmployeesWrite() {
genClient.clear(CacheKey.permissionEmployeesWrite);
}
+ /** Clears the 'permissionVasRead' field, the 'has' method for this field will now return false */
+ public void clearPermissionVasRead() {
+ genClient.clear(CacheKey.permissionVasRead);
+ }
/** Clears the 'permissionProcessCards' field, the 'has' method for this field will now return false */
public void clearPermissionProcessCards() {
genClient.clear(CacheKey.permissionProcessCards);
@@ -3919,6 +3947,7 @@ public interface Constraints {
public static final boolean PERMISSIONPAYMENTSWRITE_IS_REQUIRED = false;
public static final boolean PERMISSIONEMPLOYEESREAD_IS_REQUIRED = false;
public static final boolean PERMISSIONEMPLOYEESWRITE_IS_REQUIRED = false;
+ public static final boolean PERMISSIONVASREAD_IS_REQUIRED = false;
public static final boolean PERMISSIONPROCESSCARDS_IS_REQUIRED = false;
public static final boolean PERMISSIONMIDREAD_IS_REQUIRED = false;
public static final boolean PERMISSIONCUSTOMERSADDRESSREAD_IS_REQUIRED = false;
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/BusinessLine.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/BusinessLine.java
new file mode 100644
index 0000000000..b16a74e74d
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/BusinessLine.java
@@ -0,0 +1,57 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+
+/*
+ * Copyright (C) 2019 Clover Network, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.clover.sdk.v3.base;
+
+import android.os.Parcelable;
+import android.os.Parcel;
+
+/**
+ * This is an auto-generated Clover data enum.
+ */
+@SuppressWarnings("all")
+public enum BusinessLine implements Parcelable {
+ VERIFICATION, WARRANTY;
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(final Parcel dest, final int flags) {
+ dest.writeString(name());
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public BusinessLine createFromParcel(final Parcel source) {
+ return BusinessLine.valueOf(source.readString());
+ }
+
+ @Override
+ public BusinessLine[] newArray(final int size) {
+ return new BusinessLine[size];
+ }
+ };
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/CutoffProportion.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/CutoffProportion.java
new file mode 100644
index 0000000000..ebf162e530
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/CutoffProportion.java
@@ -0,0 +1,57 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+
+/*
+ * Copyright (C) 2019 Clover Network, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.clover.sdk.v3.base;
+
+import android.os.Parcelable;
+import android.os.Parcel;
+
+/**
+ * This is an auto-generated Clover data enum.
+ */
+@SuppressWarnings("all")
+public enum CutoffProportion implements Parcelable {
+ RELATIVE, ABSOLUTE;
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(final Parcel dest, final int flags) {
+ dest.writeString(name());
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public CutoffProportion createFromParcel(final Parcel source) {
+ return CutoffProportion.valueOf(source.readString());
+ }
+
+ @Override
+ public CutoffProportion[] newArray(final int size) {
+ return new CutoffProportion[size];
+ }
+ };
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/Tender.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/Tender.java
index 7b1d2aa6bd..9ae346e3b3 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/Tender.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/Tender.java
@@ -1,6 +1,6 @@
/**
* Autogenerated by Avro
- *
+ *
* DO NOT EDIT DIRECTLY
*/
@@ -22,6 +22,7 @@
package com.clover.sdk.v3.base;
+
import com.clover.sdk.GenericClient;
import com.clover.sdk.GenericParcelable;
@@ -40,6 +41,7 @@
* {@link #getVisible visible}
* {@link #getInstructions instructions}
* {@link #getSupportsCashDiscount supportsCashDiscount}
+ * {@link #getProperties properties}
*
*/
@SuppressWarnings("all")
@@ -67,7 +69,7 @@ public java.lang.String getLabelKey() {
}
/**
- * Label Key
+ * Label
*/
public java.lang.String getLabel() {
return genClient.cacheGet(CacheKey.label);
@@ -102,7 +104,7 @@ public java.lang.Boolean getVisible() {
}
/**
- * Label Key
+ * Instructions
*/
public java.lang.String getInstructions() {
return genClient.cacheGet(CacheKey.instructions);
@@ -115,6 +117,13 @@ public Boolean getSupportsCashDiscount() {
return genClient.cacheGet(CacheKey.supportsCashDiscount);
}
+ /**
+ * list of properties the tender holds
+ */
+ public com.clover.sdk.v3.base.TenderProperties getProperties() {
+ return genClient.cacheGet(CacheKey.properties);
+ }
+
@@ -138,8 +147,10 @@ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
instructions
(com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.String.class)),
supportsCashDiscount
- (com.clover.sdk.extractors.BasicExtractionStrategy.instance(Boolean.class)),
- ;
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Boolean.class)),
+ properties
+ (com.clover.sdk.extractors.RecordExtractionStrategy.instance(com.clover.sdk.v3.base.TenderProperties.JSON_CREATOR)),
+ ;
private final com.clover.sdk.extractors.ExtractionStrategy extractionStrategy;
@@ -215,6 +226,7 @@ public void validate() {
genClient.validateLength(CacheKey.labelKey, getLabelKey(), 127);
+ genClient.validateNotNull(CacheKey.label, getLabel());
genClient.validateLength(CacheKey.label, getLabel(), 127);
}
@@ -268,6 +280,11 @@ public boolean isNotNullSupportsCashDiscount() {
return genClient.cacheValueIsNotNull(CacheKey.supportsCashDiscount);
}
+ /** Checks whether the 'properties' field is set and is not null */
+ public boolean isNotNullProperties() {
+ return genClient.cacheValueIsNotNull(CacheKey.properties);
+ }
+
/** Checks whether the 'id' field has been set, however the value could be null */
@@ -320,6 +337,11 @@ public boolean hasSupportsCashDiscount() {
return genClient.cacheHasKey(CacheKey.supportsCashDiscount);
}
+ /** Checks whether the 'properties' field has been set, however the value could be null */
+ public boolean hasProperties() {
+ return genClient.cacheHasKey(CacheKey.properties);
+ }
+
/**
* Sets the field 'id'.
@@ -391,6 +413,15 @@ public Tender setSupportsCashDiscount(Boolean supportsCashDiscount) {
return genClient.setOther(supportsCashDiscount, CacheKey.supportsCashDiscount);
}
+ /**
+ * Sets the field 'properties'.
+ *
+ * The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
+ */
+ public Tender setProperties(com.clover.sdk.v3.base.TenderProperties properties) {
+ return genClient.setRecord(properties, CacheKey.properties);
+ }
+
/** Clears the 'id' field, the 'has' method for this field will now return false */
public void clearId() {
@@ -432,6 +463,10 @@ public void clearInstructions() {
public void clearSupportsCashDiscount() {
genClient.clear(CacheKey.supportsCashDiscount);
}
+ /** Clears the 'properties' field, the 'has' method for this field will now return false */
+ public void clearProperties() {
+ genClient.clear(CacheKey.properties);
+ }
/**
@@ -499,7 +534,7 @@ public interface Constraints {
public static final boolean EDITABLE_IS_REQUIRED = false;
public static final boolean LABELKEY_IS_REQUIRED = false;
public static final long LABELKEY_MAX_LEN = 127;
- public static final boolean LABEL_IS_REQUIRED = false;
+ public static final boolean LABEL_IS_REQUIRED = true;
public static final long LABEL_MAX_LEN = 127;
public static final boolean OPENSCASHDRAWER_IS_REQUIRED = false;
public static final boolean SUPPORTSTIPPING_IS_REQUIRED = false;
@@ -507,6 +542,7 @@ public interface Constraints {
public static final boolean VISIBLE_IS_REQUIRED = false;
public static final boolean INSTRUCTIONS_IS_REQUIRED = false;
public static final boolean SUPPORTSCASHDISCOUNT_IS_REQUIRED = false;
+ public static final boolean PROPERTIES_IS_REQUIRED = false;
}
}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderCategory.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderCategory.java
new file mode 100644
index 0000000000..ced3deb0c9
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderCategory.java
@@ -0,0 +1,57 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+
+/*
+ * Copyright (C) 2019 Clover Network, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.clover.sdk.v3.base;
+
+import android.os.Parcelable;
+import android.os.Parcel;
+
+/**
+ * This is an auto-generated Clover data enum.
+ */
+@SuppressWarnings("all")
+public enum TenderCategory implements Parcelable {
+ CARD, CARDLESS, EMONEY, CASH;
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(final Parcel dest, final int flags) {
+ dest.writeString(name());
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public TenderCategory createFromParcel(final Parcel source) {
+ return TenderCategory.valueOf(source.readString());
+ }
+
+ @Override
+ public TenderCategory[] newArray(final int size) {
+ return new TenderCategory[size];
+ }
+ };
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderPbbConfig.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderPbbConfig.java
new file mode 100644
index 0000000000..153e54344b
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderPbbConfig.java
@@ -0,0 +1,214 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+/*
+ * Copyright (C) 2019 Clover Network, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.clover.sdk.v3.base;
+
+
+import com.clover.sdk.GenericClient;
+import com.clover.sdk.GenericParcelable;
+
+/**
+ * This is an auto-generated Clover data object.
+ *
+ *
Fields
+ *
+ * - {@link #getBusinessLine businessLine}
+ *
+ */
+@SuppressWarnings("all")
+public class TenderPbbConfig extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable {
+
+ public com.clover.sdk.v3.base.BusinessLine getBusinessLine() {
+ return genClient.cacheGet(CacheKey.businessLine);
+ }
+
+
+
+
+ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
+ businessLine
+ (com.clover.sdk.extractors.EnumExtractionStrategy.instance(com.clover.sdk.v3.base.BusinessLine.class)),
+ ;
+
+ private final com.clover.sdk.extractors.ExtractionStrategy extractionStrategy;
+
+ private CacheKey(com.clover.sdk.extractors.ExtractionStrategy s) {
+ extractionStrategy = s;
+ }
+
+ @Override
+ public com.clover.sdk.extractors.ExtractionStrategy getExtractionStrategy() {
+ return extractionStrategy;
+ }
+ }
+
+ private final GenericClient genClient;
+
+ /**
+ * Constructs a new empty instance.
+ */
+ public TenderPbbConfig() {
+ genClient = new GenericClient(this);
+ }
+
+ @Override
+ protected GenericClient getGenericClient() {
+ return genClient;
+ }
+
+ /**
+ * Constructs a new empty instance.
+ */
+ protected TenderPbbConfig(boolean noInit) {
+ genClient = null;
+ }
+
+ /**
+ * Constructs a new instance from the given JSON String.
+ */
+ public TenderPbbConfig(String json) throws IllegalArgumentException {
+ this();
+ genClient.initJsonObject(json);
+ }
+
+ /**
+ * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public TenderPbbConfig(org.json.JSONObject jsonObject) {
+ this();
+ genClient.setJsonObject(jsonObject);
+ }
+
+ /**
+ * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
+ */
+ public TenderPbbConfig(TenderPbbConfig src) {
+ this();
+ if (src.genClient.getJsonObject() != null) {
+ genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject()));
+ }
+ }
+
+ /**
+ * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public org.json.JSONObject getJSONObject() {
+ return genClient.getJSONObject();
+ }
+
+ @Override
+ public void validate() {
+ }
+
+ /** Checks whether the 'businessLine' field is set and is not null */
+ public boolean isNotNullBusinessLine() {
+ return genClient.cacheValueIsNotNull(CacheKey.businessLine);
+ }
+
+
+
+ /** Checks whether the 'businessLine' field has been set, however the value could be null */
+ public boolean hasBusinessLine() {
+ return genClient.cacheHasKey(CacheKey.businessLine);
+ }
+
+
+ /**
+ * Sets the field 'businessLine'.
+ */
+ public TenderPbbConfig setBusinessLine(com.clover.sdk.v3.base.BusinessLine businessLine) {
+ return genClient.setOther(businessLine, CacheKey.businessLine);
+ }
+
+
+ /** Clears the 'businessLine' field, the 'has' method for this field will now return false */
+ public void clearBusinessLine() {
+ genClient.clear(CacheKey.businessLine);
+ }
+
+
+ /**
+ * Returns true if this instance has any changes.
+ */
+ public boolean containsChanges() {
+ return genClient.containsChanges();
+ }
+
+ /**
+ * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
+ */
+ public void resetChangeLog() {
+ genClient.resetChangeLog();
+ }
+
+ /**
+ * Create a copy of this instance that contains only fields that were set after the constructor was called.
+ */
+ public TenderPbbConfig copyChanges() {
+ TenderPbbConfig copy = new TenderPbbConfig();
+ copy.mergeChanges(this);
+ copy.resetChangeLog();
+ return copy;
+ }
+
+ /**
+ * Copy all the changed fields from the given source to this instance.
+ */
+ public void mergeChanges(TenderPbbConfig src) {
+ if (src.genClient.getChangeLog() != null) {
+ genClient.mergeChanges(new TenderPbbConfig(src).getJSONObject(), src.genClient);
+ }
+ }
+
+ public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() {
+ @Override
+ public TenderPbbConfig createFromParcel(android.os.Parcel in) {
+ TenderPbbConfig instance = new TenderPbbConfig(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap());
+ instance.genClient.setBundle(in.readBundle(getClass().getClassLoader()));
+ instance.genClient.setChangeLog(in.readBundle());
+ return instance;
+ }
+
+ @Override
+ public TenderPbbConfig[] newArray(int size) {
+ return new TenderPbbConfig[size];
+ }
+ };
+
+ public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() {
+ public Class getCreatedClass() {
+ return TenderPbbConfig.class;
+ }
+
+ @Override
+ public TenderPbbConfig create(org.json.JSONObject jsonObject) {
+ return new TenderPbbConfig(jsonObject);
+ }
+ };
+
+ public interface Constraints {
+ public static final boolean BUSINESSLINE_IS_REQUIRED = false;
+ }
+
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderProperties.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderProperties.java
new file mode 100644
index 0000000000..29457fea9a
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderProperties.java
@@ -0,0 +1,372 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+/*
+ * Copyright (C) 2019 Clover Network, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.clover.sdk.v3.base;
+
+
+import com.clover.sdk.GenericClient;
+import com.clover.sdk.GenericParcelable;
+
+/**
+ * This is an auto-generated Clover data object.
+ *
+ *
Fields
+ *
+ * - {@link #getSupportedTransactionSources supportedTransactionSources}
+ * - {@link #getCategory category}
+ * - {@link #getTransactionLimit transactionLimit}
+ * - {@link #getPbbConfig pbbConfig}
+ * - {@link #getRefundConfig refundConfig}
+ * - {@link #getVoidConfig voidConfig}
+ *
+ */
+@SuppressWarnings("all")
+public class TenderProperties extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable {
+
+ public java.util.List getSupportedTransactionSources() {
+ return genClient.cacheGet(CacheKey.supportedTransactionSources);
+ }
+
+ public com.clover.sdk.v3.base.TenderCategory getCategory() {
+ return genClient.cacheGet(CacheKey.category);
+ }
+
+ public com.clover.sdk.v3.base.TenderTransactionLimit getTransactionLimit() {
+ return genClient.cacheGet(CacheKey.transactionLimit);
+ }
+
+ public com.clover.sdk.v3.base.TenderPbbConfig getPbbConfig() {
+ return genClient.cacheGet(CacheKey.pbbConfig);
+ }
+
+ public com.clover.sdk.v3.base.TenderRefundConfig getRefundConfig() {
+ return genClient.cacheGet(CacheKey.refundConfig);
+ }
+
+ public com.clover.sdk.v3.base.TenderVoidConfig getVoidConfig() {
+ return genClient.cacheGet(CacheKey.voidConfig);
+ }
+
+
+
+
+ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
+ supportedTransactionSources
+ (com.clover.sdk.extractors.EnumListExtractionStrategy.instance(com.clover.sdk.v3.base.TenderTransactionSource.class)),
+ category
+ (com.clover.sdk.extractors.EnumExtractionStrategy.instance(com.clover.sdk.v3.base.TenderCategory.class)),
+ transactionLimit
+ (com.clover.sdk.extractors.RecordExtractionStrategy.instance(com.clover.sdk.v3.base.TenderTransactionLimit.JSON_CREATOR)),
+ pbbConfig
+ (com.clover.sdk.extractors.RecordExtractionStrategy.instance(com.clover.sdk.v3.base.TenderPbbConfig.JSON_CREATOR)),
+ refundConfig
+ (com.clover.sdk.extractors.RecordExtractionStrategy.instance(com.clover.sdk.v3.base.TenderRefundConfig.JSON_CREATOR)),
+ voidConfig
+ (com.clover.sdk.extractors.RecordExtractionStrategy.instance(com.clover.sdk.v3.base.TenderVoidConfig.JSON_CREATOR)),
+ ;
+
+ private final com.clover.sdk.extractors.ExtractionStrategy extractionStrategy;
+
+ private CacheKey(com.clover.sdk.extractors.ExtractionStrategy s) {
+ extractionStrategy = s;
+ }
+
+ @Override
+ public com.clover.sdk.extractors.ExtractionStrategy getExtractionStrategy() {
+ return extractionStrategy;
+ }
+ }
+
+ private final GenericClient genClient;
+
+ /**
+ * Constructs a new empty instance.
+ */
+ public TenderProperties() {
+ genClient = new GenericClient(this);
+ }
+
+ @Override
+ protected GenericClient getGenericClient() {
+ return genClient;
+ }
+
+ /**
+ * Constructs a new empty instance.
+ */
+ protected TenderProperties(boolean noInit) {
+ genClient = null;
+ }
+
+ /**
+ * Constructs a new instance from the given JSON String.
+ */
+ public TenderProperties(String json) throws IllegalArgumentException {
+ this();
+ genClient.initJsonObject(json);
+ }
+
+ /**
+ * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public TenderProperties(org.json.JSONObject jsonObject) {
+ this();
+ genClient.setJsonObject(jsonObject);
+ }
+
+ /**
+ * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
+ */
+ public TenderProperties(TenderProperties src) {
+ this();
+ if (src.genClient.getJsonObject() != null) {
+ genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject()));
+ }
+ }
+
+ /**
+ * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public org.json.JSONObject getJSONObject() {
+ return genClient.getJSONObject();
+ }
+
+ @Override
+ public void validate() {
+ }
+
+ /** Checks whether the 'supportedTransactionSources' field is set and is not null */
+ public boolean isNotNullSupportedTransactionSources() {
+ return genClient.cacheValueIsNotNull(CacheKey.supportedTransactionSources);
+ }
+
+ /** Checks whether the 'supportedTransactionSources' field is set and is not null and is not empty */
+ public boolean isNotEmptySupportedTransactionSources() { return isNotNullSupportedTransactionSources() && !getSupportedTransactionSources().isEmpty(); }
+
+ /** Checks whether the 'category' field is set and is not null */
+ public boolean isNotNullCategory() {
+ return genClient.cacheValueIsNotNull(CacheKey.category);
+ }
+
+ /** Checks whether the 'transactionLimit' field is set and is not null */
+ public boolean isNotNullTransactionLimit() {
+ return genClient.cacheValueIsNotNull(CacheKey.transactionLimit);
+ }
+
+ /** Checks whether the 'pbbConfig' field is set and is not null */
+ public boolean isNotNullPbbConfig() {
+ return genClient.cacheValueIsNotNull(CacheKey.pbbConfig);
+ }
+
+ /** Checks whether the 'refundConfig' field is set and is not null */
+ public boolean isNotNullRefundConfig() {
+ return genClient.cacheValueIsNotNull(CacheKey.refundConfig);
+ }
+
+ /** Checks whether the 'voidConfig' field is set and is not null */
+ public boolean isNotNullVoidConfig() {
+ return genClient.cacheValueIsNotNull(CacheKey.voidConfig);
+ }
+
+
+
+ /** Checks whether the 'supportedTransactionSources' field has been set, however the value could be null */
+ public boolean hasSupportedTransactionSources() {
+ return genClient.cacheHasKey(CacheKey.supportedTransactionSources);
+ }
+
+ /** Checks whether the 'category' field has been set, however the value could be null */
+ public boolean hasCategory() {
+ return genClient.cacheHasKey(CacheKey.category);
+ }
+
+ /** Checks whether the 'transactionLimit' field has been set, however the value could be null */
+ public boolean hasTransactionLimit() {
+ return genClient.cacheHasKey(CacheKey.transactionLimit);
+ }
+
+ /** Checks whether the 'pbbConfig' field has been set, however the value could be null */
+ public boolean hasPbbConfig() {
+ return genClient.cacheHasKey(CacheKey.pbbConfig);
+ }
+
+ /** Checks whether the 'refundConfig' field has been set, however the value could be null */
+ public boolean hasRefundConfig() {
+ return genClient.cacheHasKey(CacheKey.refundConfig);
+ }
+
+ /** Checks whether the 'voidConfig' field has been set, however the value could be null */
+ public boolean hasVoidConfig() {
+ return genClient.cacheHasKey(CacheKey.voidConfig);
+ }
+
+
+ /**
+ * Sets the field 'supportedTransactionSources'.
+ *
+ * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
+ */
+ public TenderProperties setSupportedTransactionSources(java.util.List supportedTransactionSources) {
+ return genClient.setArrayOther(supportedTransactionSources, CacheKey.supportedTransactionSources);
+ }
+
+ /**
+ * Sets the field 'category'.
+ */
+ public TenderProperties setCategory(com.clover.sdk.v3.base.TenderCategory category) {
+ return genClient.setOther(category, CacheKey.category);
+ }
+
+ /**
+ * Sets the field 'transactionLimit'.
+ *
+ * The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
+ */
+ public TenderProperties setTransactionLimit(com.clover.sdk.v3.base.TenderTransactionLimit transactionLimit) {
+ return genClient.setRecord(transactionLimit, CacheKey.transactionLimit);
+ }
+
+ /**
+ * Sets the field 'pbbConfig'.
+ *
+ * The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
+ */
+ public TenderProperties setPbbConfig(com.clover.sdk.v3.base.TenderPbbConfig pbbConfig) {
+ return genClient.setRecord(pbbConfig, CacheKey.pbbConfig);
+ }
+
+ /**
+ * Sets the field 'refundConfig'.
+ *
+ * The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
+ */
+ public TenderProperties setRefundConfig(com.clover.sdk.v3.base.TenderRefundConfig refundConfig) {
+ return genClient.setRecord(refundConfig, CacheKey.refundConfig);
+ }
+
+ /**
+ * Sets the field 'voidConfig'.
+ *
+ * The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
+ */
+ public TenderProperties setVoidConfig(com.clover.sdk.v3.base.TenderVoidConfig voidConfig) {
+ return genClient.setRecord(voidConfig, CacheKey.voidConfig);
+ }
+
+
+ /** Clears the 'supportedTransactionSources' field, the 'has' method for this field will now return false */
+ public void clearSupportedTransactionSources() {
+ genClient.clear(CacheKey.supportedTransactionSources);
+ }
+ /** Clears the 'category' field, the 'has' method for this field will now return false */
+ public void clearCategory() {
+ genClient.clear(CacheKey.category);
+ }
+ /** Clears the 'transactionLimit' field, the 'has' method for this field will now return false */
+ public void clearTransactionLimit() {
+ genClient.clear(CacheKey.transactionLimit);
+ }
+ /** Clears the 'pbbConfig' field, the 'has' method for this field will now return false */
+ public void clearPbbConfig() {
+ genClient.clear(CacheKey.pbbConfig);
+ }
+ /** Clears the 'refundConfig' field, the 'has' method for this field will now return false */
+ public void clearRefundConfig() {
+ genClient.clear(CacheKey.refundConfig);
+ }
+ /** Clears the 'voidConfig' field, the 'has' method for this field will now return false */
+ public void clearVoidConfig() {
+ genClient.clear(CacheKey.voidConfig);
+ }
+
+
+ /**
+ * Returns true if this instance has any changes.
+ */
+ public boolean containsChanges() {
+ return genClient.containsChanges();
+ }
+
+ /**
+ * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
+ */
+ public void resetChangeLog() {
+ genClient.resetChangeLog();
+ }
+
+ /**
+ * Create a copy of this instance that contains only fields that were set after the constructor was called.
+ */
+ public TenderProperties copyChanges() {
+ TenderProperties copy = new TenderProperties();
+ copy.mergeChanges(this);
+ copy.resetChangeLog();
+ return copy;
+ }
+
+ /**
+ * Copy all the changed fields from the given source to this instance.
+ */
+ public void mergeChanges(TenderProperties src) {
+ if (src.genClient.getChangeLog() != null) {
+ genClient.mergeChanges(new TenderProperties(src).getJSONObject(), src.genClient);
+ }
+ }
+
+ public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() {
+ @Override
+ public TenderProperties createFromParcel(android.os.Parcel in) {
+ TenderProperties instance = new TenderProperties(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap());
+ instance.genClient.setBundle(in.readBundle(getClass().getClassLoader()));
+ instance.genClient.setChangeLog(in.readBundle());
+ return instance;
+ }
+
+ @Override
+ public TenderProperties[] newArray(int size) {
+ return new TenderProperties[size];
+ }
+ };
+
+ public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() {
+ public Class getCreatedClass() {
+ return TenderProperties.class;
+ }
+
+ @Override
+ public TenderProperties create(org.json.JSONObject jsonObject) {
+ return new TenderProperties(jsonObject);
+ }
+ };
+
+ public interface Constraints {
+ public static final boolean SUPPORTEDTRANSACTIONSOURCES_IS_REQUIRED = false;
+ public static final boolean CATEGORY_IS_REQUIRED = false;
+ public static final boolean TRANSACTIONLIMIT_IS_REQUIRED = false;
+ public static final boolean PBBCONFIG_IS_REQUIRED = false;
+ public static final boolean REFUNDCONFIG_IS_REQUIRED = false;
+ public static final boolean VOIDCONFIG_IS_REQUIRED = false;
+ }
+
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderRefundConfig.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderRefundConfig.java
new file mode 100644
index 0000000000..8a007b25e6
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderRefundConfig.java
@@ -0,0 +1,286 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+/*
+ * Copyright (C) 2019 Clover Network, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.clover.sdk.v3.base;
+
+
+import com.clover.sdk.GenericClient;
+import com.clover.sdk.GenericParcelable;
+
+/**
+ * This is an auto-generated Clover data object.
+ *
+ *
Fields
+ *
+ * - {@link #getSameTenderRefundAllowed sameTenderRefundAllowed}
+ * - {@link #getSupportsPartialRefund supportsPartialRefund}
+ * - {@link #getAllowedRefundTenders allowedRefundTenders}
+ *
+ */
+@SuppressWarnings("all")
+public class TenderRefundConfig extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable {
+
+ /**
+ * whether refund is allowed on the same tender
+ */
+ public java.lang.Boolean getSameTenderRefundAllowed() {
+ return genClient.cacheGet(CacheKey.sameTenderRefundAllowed);
+ }
+
+ /**
+ * whether partial refund is supported
+ */
+ public java.lang.Boolean getSupportsPartialRefund() {
+ return genClient.cacheGet(CacheKey.supportsPartialRefund);
+ }
+
+ /**
+ * supported tenders against which a refund can be processed when we cannot refund on the original tender
+ */
+ public java.util.List getAllowedRefundTenders() {
+ return genClient.cacheGet(CacheKey.allowedRefundTenders);
+ }
+
+
+
+
+ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
+ sameTenderRefundAllowed
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Boolean.class)),
+ supportsPartialRefund
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Boolean.class)),
+ allowedRefundTenders
+ (com.clover.sdk.extractors.BasicListExtractionStrategy.instance(java.lang.String.class)),
+ ;
+
+ private final com.clover.sdk.extractors.ExtractionStrategy extractionStrategy;
+
+ private CacheKey(com.clover.sdk.extractors.ExtractionStrategy s) {
+ extractionStrategy = s;
+ }
+
+ @Override
+ public com.clover.sdk.extractors.ExtractionStrategy getExtractionStrategy() {
+ return extractionStrategy;
+ }
+ }
+
+ private final GenericClient genClient;
+
+ /**
+ * Constructs a new empty instance.
+ */
+ public TenderRefundConfig() {
+ genClient = new GenericClient(this);
+ }
+
+ @Override
+ protected GenericClient getGenericClient() {
+ return genClient;
+ }
+
+ /**
+ * Constructs a new empty instance.
+ */
+ protected TenderRefundConfig(boolean noInit) {
+ genClient = null;
+ }
+
+ /**
+ * Constructs a new instance from the given JSON String.
+ */
+ public TenderRefundConfig(String json) throws IllegalArgumentException {
+ this();
+ genClient.initJsonObject(json);
+ }
+
+ /**
+ * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public TenderRefundConfig(org.json.JSONObject jsonObject) {
+ this();
+ genClient.setJsonObject(jsonObject);
+ }
+
+ /**
+ * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
+ */
+ public TenderRefundConfig(TenderRefundConfig src) {
+ this();
+ if (src.genClient.getJsonObject() != null) {
+ genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject()));
+ }
+ }
+
+ /**
+ * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public org.json.JSONObject getJSONObject() {
+ return genClient.getJSONObject();
+ }
+
+ @Override
+ public void validate() {
+ }
+
+ /** Checks whether the 'sameTenderRefundAllowed' field is set and is not null */
+ public boolean isNotNullSameTenderRefundAllowed() {
+ return genClient.cacheValueIsNotNull(CacheKey.sameTenderRefundAllowed);
+ }
+
+ /** Checks whether the 'supportsPartialRefund' field is set and is not null */
+ public boolean isNotNullSupportsPartialRefund() {
+ return genClient.cacheValueIsNotNull(CacheKey.supportsPartialRefund);
+ }
+
+ /** Checks whether the 'allowedRefundTenders' field is set and is not null */
+ public boolean isNotNullAllowedRefundTenders() {
+ return genClient.cacheValueIsNotNull(CacheKey.allowedRefundTenders);
+ }
+
+ /** Checks whether the 'allowedRefundTenders' field is set and is not null and is not empty */
+ public boolean isNotEmptyAllowedRefundTenders() { return isNotNullAllowedRefundTenders() && !getAllowedRefundTenders().isEmpty(); }
+
+
+
+ /** Checks whether the 'sameTenderRefundAllowed' field has been set, however the value could be null */
+ public boolean hasSameTenderRefundAllowed() {
+ return genClient.cacheHasKey(CacheKey.sameTenderRefundAllowed);
+ }
+
+ /** Checks whether the 'supportsPartialRefund' field has been set, however the value could be null */
+ public boolean hasSupportsPartialRefund() {
+ return genClient.cacheHasKey(CacheKey.supportsPartialRefund);
+ }
+
+ /** Checks whether the 'allowedRefundTenders' field has been set, however the value could be null */
+ public boolean hasAllowedRefundTenders() {
+ return genClient.cacheHasKey(CacheKey.allowedRefundTenders);
+ }
+
+
+ /**
+ * Sets the field 'sameTenderRefundAllowed'.
+ */
+ public TenderRefundConfig setSameTenderRefundAllowed(java.lang.Boolean sameTenderRefundAllowed) {
+ return genClient.setOther(sameTenderRefundAllowed, CacheKey.sameTenderRefundAllowed);
+ }
+
+ /**
+ * Sets the field 'supportsPartialRefund'.
+ */
+ public TenderRefundConfig setSupportsPartialRefund(java.lang.Boolean supportsPartialRefund) {
+ return genClient.setOther(supportsPartialRefund, CacheKey.supportsPartialRefund);
+ }
+
+ /**
+ * Sets the field 'allowedRefundTenders'.
+ *
+ * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
+ */
+ public TenderRefundConfig setAllowedRefundTenders(java.util.List allowedRefundTenders) {
+ return genClient.setArrayOther(allowedRefundTenders, CacheKey.allowedRefundTenders);
+ }
+
+
+ /** Clears the 'sameTenderRefundAllowed' field, the 'has' method for this field will now return false */
+ public void clearSameTenderRefundAllowed() {
+ genClient.clear(CacheKey.sameTenderRefundAllowed);
+ }
+ /** Clears the 'supportsPartialRefund' field, the 'has' method for this field will now return false */
+ public void clearSupportsPartialRefund() {
+ genClient.clear(CacheKey.supportsPartialRefund);
+ }
+ /** Clears the 'allowedRefundTenders' field, the 'has' method for this field will now return false */
+ public void clearAllowedRefundTenders() {
+ genClient.clear(CacheKey.allowedRefundTenders);
+ }
+
+
+ /**
+ * Returns true if this instance has any changes.
+ */
+ public boolean containsChanges() {
+ return genClient.containsChanges();
+ }
+
+ /**
+ * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
+ */
+ public void resetChangeLog() {
+ genClient.resetChangeLog();
+ }
+
+ /**
+ * Create a copy of this instance that contains only fields that were set after the constructor was called.
+ */
+ public TenderRefundConfig copyChanges() {
+ TenderRefundConfig copy = new TenderRefundConfig();
+ copy.mergeChanges(this);
+ copy.resetChangeLog();
+ return copy;
+ }
+
+ /**
+ * Copy all the changed fields from the given source to this instance.
+ */
+ public void mergeChanges(TenderRefundConfig src) {
+ if (src.genClient.getChangeLog() != null) {
+ genClient.mergeChanges(new TenderRefundConfig(src).getJSONObject(), src.genClient);
+ }
+ }
+
+ public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() {
+ @Override
+ public TenderRefundConfig createFromParcel(android.os.Parcel in) {
+ TenderRefundConfig instance = new TenderRefundConfig(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap());
+ instance.genClient.setBundle(in.readBundle(getClass().getClassLoader()));
+ instance.genClient.setChangeLog(in.readBundle());
+ return instance;
+ }
+
+ @Override
+ public TenderRefundConfig[] newArray(int size) {
+ return new TenderRefundConfig[size];
+ }
+ };
+
+ public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() {
+ public Class getCreatedClass() {
+ return TenderRefundConfig.class;
+ }
+
+ @Override
+ public TenderRefundConfig create(org.json.JSONObject jsonObject) {
+ return new TenderRefundConfig(jsonObject);
+ }
+ };
+
+ public interface Constraints {
+ public static final boolean SAMETENDERREFUNDALLOWED_IS_REQUIRED = false;
+ public static final boolean SUPPORTSPARTIALREFUND_IS_REQUIRED = false;
+ public static final boolean ALLOWEDREFUNDTENDERS_IS_REQUIRED = false;
+ }
+
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderTransactionLimit.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderTransactionLimit.java
new file mode 100644
index 0000000000..c17f85677a
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderTransactionLimit.java
@@ -0,0 +1,313 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+/*
+ * Copyright (C) 2019 Clover Network, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.clover.sdk.v3.base;
+
+
+import com.clover.sdk.GenericClient;
+import com.clover.sdk.GenericParcelable;
+
+/**
+ * This is an auto-generated Clover data object.
+ *
+ *
Fields
+ *
+ * - {@link #getMinimum minimum}
+ * - {@link #getMaximum maximum}
+ * - {@link #getWarranty warranty}
+ * - {@link #getVerification verification}
+ *
+ */
+@SuppressWarnings("all")
+public class TenderTransactionLimit extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable {
+
+ /**
+ * minimum transaction amount
+ */
+ public java.lang.Long getMinimum() {
+ return genClient.cacheGet(CacheKey.minimum);
+ }
+
+ /**
+ * maximum transaction amount
+ */
+ public java.lang.Long getMaximum() {
+ return genClient.cacheGet(CacheKey.maximum);
+ }
+
+ /**
+ * maximum transaction amount for warranty
+ */
+ public java.lang.Long getWarranty() {
+ return genClient.cacheGet(CacheKey.warranty);
+ }
+
+ /**
+ * maximum transaction amount for verification
+ */
+ public java.lang.Long getVerification() {
+ return genClient.cacheGet(CacheKey.verification);
+ }
+
+
+
+
+ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
+ minimum
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Long.class)),
+ maximum
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Long.class)),
+ warranty
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Long.class)),
+ verification
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Long.class)),
+ ;
+
+ private final com.clover.sdk.extractors.ExtractionStrategy extractionStrategy;
+
+ private CacheKey(com.clover.sdk.extractors.ExtractionStrategy s) {
+ extractionStrategy = s;
+ }
+
+ @Override
+ public com.clover.sdk.extractors.ExtractionStrategy getExtractionStrategy() {
+ return extractionStrategy;
+ }
+ }
+
+ private final GenericClient genClient;
+
+ /**
+ * Constructs a new empty instance.
+ */
+ public TenderTransactionLimit() {
+ genClient = new GenericClient(this);
+ }
+
+ @Override
+ protected GenericClient getGenericClient() {
+ return genClient;
+ }
+
+ /**
+ * Constructs a new empty instance.
+ */
+ protected TenderTransactionLimit(boolean noInit) {
+ genClient = null;
+ }
+
+ /**
+ * Constructs a new instance from the given JSON String.
+ */
+ public TenderTransactionLimit(String json) throws IllegalArgumentException {
+ this();
+ genClient.initJsonObject(json);
+ }
+
+ /**
+ * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public TenderTransactionLimit(org.json.JSONObject jsonObject) {
+ this();
+ genClient.setJsonObject(jsonObject);
+ }
+
+ /**
+ * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
+ */
+ public TenderTransactionLimit(TenderTransactionLimit src) {
+ this();
+ if (src.genClient.getJsonObject() != null) {
+ genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject()));
+ }
+ }
+
+ /**
+ * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public org.json.JSONObject getJSONObject() {
+ return genClient.getJSONObject();
+ }
+
+ @Override
+ public void validate() {
+ }
+
+ /** Checks whether the 'minimum' field is set and is not null */
+ public boolean isNotNullMinimum() {
+ return genClient.cacheValueIsNotNull(CacheKey.minimum);
+ }
+
+ /** Checks whether the 'maximum' field is set and is not null */
+ public boolean isNotNullMaximum() {
+ return genClient.cacheValueIsNotNull(CacheKey.maximum);
+ }
+
+ /** Checks whether the 'warranty' field is set and is not null */
+ public boolean isNotNullWarranty() {
+ return genClient.cacheValueIsNotNull(CacheKey.warranty);
+ }
+
+ /** Checks whether the 'verification' field is set and is not null */
+ public boolean isNotNullVerification() {
+ return genClient.cacheValueIsNotNull(CacheKey.verification);
+ }
+
+
+
+ /** Checks whether the 'minimum' field has been set, however the value could be null */
+ public boolean hasMinimum() {
+ return genClient.cacheHasKey(CacheKey.minimum);
+ }
+
+ /** Checks whether the 'maximum' field has been set, however the value could be null */
+ public boolean hasMaximum() {
+ return genClient.cacheHasKey(CacheKey.maximum);
+ }
+
+ /** Checks whether the 'warranty' field has been set, however the value could be null */
+ public boolean hasWarranty() {
+ return genClient.cacheHasKey(CacheKey.warranty);
+ }
+
+ /** Checks whether the 'verification' field has been set, however the value could be null */
+ public boolean hasVerification() {
+ return genClient.cacheHasKey(CacheKey.verification);
+ }
+
+
+ /**
+ * Sets the field 'minimum'.
+ */
+ public TenderTransactionLimit setMinimum(java.lang.Long minimum) {
+ return genClient.setOther(minimum, CacheKey.minimum);
+ }
+
+ /**
+ * Sets the field 'maximum'.
+ */
+ public TenderTransactionLimit setMaximum(java.lang.Long maximum) {
+ return genClient.setOther(maximum, CacheKey.maximum);
+ }
+
+ /**
+ * Sets the field 'warranty'.
+ */
+ public TenderTransactionLimit setWarranty(java.lang.Long warranty) {
+ return genClient.setOther(warranty, CacheKey.warranty);
+ }
+
+ /**
+ * Sets the field 'verification'.
+ */
+ public TenderTransactionLimit setVerification(java.lang.Long verification) {
+ return genClient.setOther(verification, CacheKey.verification);
+ }
+
+
+ /** Clears the 'minimum' field, the 'has' method for this field will now return false */
+ public void clearMinimum() {
+ genClient.clear(CacheKey.minimum);
+ }
+ /** Clears the 'maximum' field, the 'has' method for this field will now return false */
+ public void clearMaximum() {
+ genClient.clear(CacheKey.maximum);
+ }
+ /** Clears the 'warranty' field, the 'has' method for this field will now return false */
+ public void clearWarranty() {
+ genClient.clear(CacheKey.warranty);
+ }
+ /** Clears the 'verification' field, the 'has' method for this field will now return false */
+ public void clearVerification() {
+ genClient.clear(CacheKey.verification);
+ }
+
+
+ /**
+ * Returns true if this instance has any changes.
+ */
+ public boolean containsChanges() {
+ return genClient.containsChanges();
+ }
+
+ /**
+ * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
+ */
+ public void resetChangeLog() {
+ genClient.resetChangeLog();
+ }
+
+ /**
+ * Create a copy of this instance that contains only fields that were set after the constructor was called.
+ */
+ public TenderTransactionLimit copyChanges() {
+ TenderTransactionLimit copy = new TenderTransactionLimit();
+ copy.mergeChanges(this);
+ copy.resetChangeLog();
+ return copy;
+ }
+
+ /**
+ * Copy all the changed fields from the given source to this instance.
+ */
+ public void mergeChanges(TenderTransactionLimit src) {
+ if (src.genClient.getChangeLog() != null) {
+ genClient.mergeChanges(new TenderTransactionLimit(src).getJSONObject(), src.genClient);
+ }
+ }
+
+ public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() {
+ @Override
+ public TenderTransactionLimit createFromParcel(android.os.Parcel in) {
+ TenderTransactionLimit instance = new TenderTransactionLimit(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap());
+ instance.genClient.setBundle(in.readBundle(getClass().getClassLoader()));
+ instance.genClient.setChangeLog(in.readBundle());
+ return instance;
+ }
+
+ @Override
+ public TenderTransactionLimit[] newArray(int size) {
+ return new TenderTransactionLimit[size];
+ }
+ };
+
+ public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() {
+ public Class getCreatedClass() {
+ return TenderTransactionLimit.class;
+ }
+
+ @Override
+ public TenderTransactionLimit create(org.json.JSONObject jsonObject) {
+ return new TenderTransactionLimit(jsonObject);
+ }
+ };
+
+ public interface Constraints {
+ public static final boolean MINIMUM_IS_REQUIRED = false;
+ public static final boolean MAXIMUM_IS_REQUIRED = false;
+ public static final boolean WARRANTY_IS_REQUIRED = false;
+ public static final boolean VERIFICATION_IS_REQUIRED = false;
+ }
+
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderTransactionSource.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderTransactionSource.java
new file mode 100644
index 0000000000..bcbc56afab
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderTransactionSource.java
@@ -0,0 +1,58 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+
+/*
+ * Copyright (C) 2019 Clover Network, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.clover.sdk.v3.base;
+
+import android.os.Parcelable;
+import android.os.Parcel;
+
+/**
+ * This is an auto-generated Clover data enum.
+ * Supported transaction sources.
+ */
+@SuppressWarnings("all")
+public enum TenderTransactionSource implements Parcelable {
+ CP, CNP;
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(final Parcel dest, final int flags) {
+ dest.writeString(name());
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public TenderTransactionSource createFromParcel(final Parcel source) {
+ return TenderTransactionSource.valueOf(source.readString());
+ }
+
+ @Override
+ public TenderTransactionSource[] newArray(final int size) {
+ return new TenderTransactionSource[size];
+ }
+ };
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderVoidConfig.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderVoidConfig.java
new file mode 100644
index 0000000000..aec49b52a0
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/base/TenderVoidConfig.java
@@ -0,0 +1,281 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+/*
+ * Copyright (C) 2019 Clover Network, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.clover.sdk.v3.base;
+
+
+import com.clover.sdk.GenericClient;
+import com.clover.sdk.GenericParcelable;
+
+/**
+ * This is an auto-generated Clover data object.
+ *
+ *
Fields
+ *
+ * - {@link #getAllowed allowed}
+ * - {@link #getCutoffTimeInSeconds cutoffTimeInSeconds}
+ * - {@link #getCutoffProportion cutoffProportion}
+ *
+ */
+@SuppressWarnings("all")
+public class TenderVoidConfig extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable {
+
+ /**
+ * whether void is allowed
+ */
+ public java.lang.Boolean getAllowed() {
+ return genClient.cacheGet(CacheKey.allowed);
+ }
+
+ /**
+ * cut off time in seconds
+ */
+ public java.lang.Long getCutoffTimeInSeconds() {
+ return genClient.cacheGet(CacheKey.cutoffTimeInSeconds);
+ }
+
+ /**
+ * whether cutoff time is absolute or relative
+ */
+ public com.clover.sdk.v3.base.CutoffProportion getCutoffProportion() {
+ return genClient.cacheGet(CacheKey.cutoffProportion);
+ }
+
+
+
+
+ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
+ allowed
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Boolean.class)),
+ cutoffTimeInSeconds
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Long.class)),
+ cutoffProportion
+ (com.clover.sdk.extractors.EnumExtractionStrategy.instance(com.clover.sdk.v3.base.CutoffProportion.class)),
+ ;
+
+ private final com.clover.sdk.extractors.ExtractionStrategy extractionStrategy;
+
+ private CacheKey(com.clover.sdk.extractors.ExtractionStrategy s) {
+ extractionStrategy = s;
+ }
+
+ @Override
+ public com.clover.sdk.extractors.ExtractionStrategy getExtractionStrategy() {
+ return extractionStrategy;
+ }
+ }
+
+ private final GenericClient genClient;
+
+ /**
+ * Constructs a new empty instance.
+ */
+ public TenderVoidConfig() {
+ genClient = new GenericClient(this);
+ }
+
+ @Override
+ protected GenericClient getGenericClient() {
+ return genClient;
+ }
+
+ /**
+ * Constructs a new empty instance.
+ */
+ protected TenderVoidConfig(boolean noInit) {
+ genClient = null;
+ }
+
+ /**
+ * Constructs a new instance from the given JSON String.
+ */
+ public TenderVoidConfig(String json) throws IllegalArgumentException {
+ this();
+ genClient.initJsonObject(json);
+ }
+
+ /**
+ * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public TenderVoidConfig(org.json.JSONObject jsonObject) {
+ this();
+ genClient.setJsonObject(jsonObject);
+ }
+
+ /**
+ * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
+ */
+ public TenderVoidConfig(TenderVoidConfig src) {
+ this();
+ if (src.genClient.getJsonObject() != null) {
+ genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject()));
+ }
+ }
+
+ /**
+ * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public org.json.JSONObject getJSONObject() {
+ return genClient.getJSONObject();
+ }
+
+ @Override
+ public void validate() {
+ }
+
+ /** Checks whether the 'allowed' field is set and is not null */
+ public boolean isNotNullAllowed() {
+ return genClient.cacheValueIsNotNull(CacheKey.allowed);
+ }
+
+ /** Checks whether the 'cutoffTimeInSeconds' field is set and is not null */
+ public boolean isNotNullCutoffTimeInSeconds() {
+ return genClient.cacheValueIsNotNull(CacheKey.cutoffTimeInSeconds);
+ }
+
+ /** Checks whether the 'cutoffProportion' field is set and is not null */
+ public boolean isNotNullCutoffProportion() {
+ return genClient.cacheValueIsNotNull(CacheKey.cutoffProportion);
+ }
+
+
+
+ /** Checks whether the 'allowed' field has been set, however the value could be null */
+ public boolean hasAllowed() {
+ return genClient.cacheHasKey(CacheKey.allowed);
+ }
+
+ /** Checks whether the 'cutoffTimeInSeconds' field has been set, however the value could be null */
+ public boolean hasCutoffTimeInSeconds() {
+ return genClient.cacheHasKey(CacheKey.cutoffTimeInSeconds);
+ }
+
+ /** Checks whether the 'cutoffProportion' field has been set, however the value could be null */
+ public boolean hasCutoffProportion() {
+ return genClient.cacheHasKey(CacheKey.cutoffProportion);
+ }
+
+
+ /**
+ * Sets the field 'allowed'.
+ */
+ public TenderVoidConfig setAllowed(java.lang.Boolean allowed) {
+ return genClient.setOther(allowed, CacheKey.allowed);
+ }
+
+ /**
+ * Sets the field 'cutoffTimeInSeconds'.
+ */
+ public TenderVoidConfig setCutoffTimeInSeconds(java.lang.Long cutoffTimeInSeconds) {
+ return genClient.setOther(cutoffTimeInSeconds, CacheKey.cutoffTimeInSeconds);
+ }
+
+ /**
+ * Sets the field 'cutoffProportion'.
+ */
+ public TenderVoidConfig setCutoffProportion(com.clover.sdk.v3.base.CutoffProportion cutoffProportion) {
+ return genClient.setOther(cutoffProportion, CacheKey.cutoffProportion);
+ }
+
+
+ /** Clears the 'allowed' field, the 'has' method for this field will now return false */
+ public void clearAllowed() {
+ genClient.clear(CacheKey.allowed);
+ }
+ /** Clears the 'cutoffTimeInSeconds' field, the 'has' method for this field will now return false */
+ public void clearCutoffTimeInSeconds() {
+ genClient.clear(CacheKey.cutoffTimeInSeconds);
+ }
+ /** Clears the 'cutoffProportion' field, the 'has' method for this field will now return false */
+ public void clearCutoffProportion() {
+ genClient.clear(CacheKey.cutoffProportion);
+ }
+
+
+ /**
+ * Returns true if this instance has any changes.
+ */
+ public boolean containsChanges() {
+ return genClient.containsChanges();
+ }
+
+ /**
+ * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
+ */
+ public void resetChangeLog() {
+ genClient.resetChangeLog();
+ }
+
+ /**
+ * Create a copy of this instance that contains only fields that were set after the constructor was called.
+ */
+ public TenderVoidConfig copyChanges() {
+ TenderVoidConfig copy = new TenderVoidConfig();
+ copy.mergeChanges(this);
+ copy.resetChangeLog();
+ return copy;
+ }
+
+ /**
+ * Copy all the changed fields from the given source to this instance.
+ */
+ public void mergeChanges(TenderVoidConfig src) {
+ if (src.genClient.getChangeLog() != null) {
+ genClient.mergeChanges(new TenderVoidConfig(src).getJSONObject(), src.genClient);
+ }
+ }
+
+ public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() {
+ @Override
+ public TenderVoidConfig createFromParcel(android.os.Parcel in) {
+ TenderVoidConfig instance = new TenderVoidConfig(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap());
+ instance.genClient.setBundle(in.readBundle(getClass().getClassLoader()));
+ instance.genClient.setChangeLog(in.readBundle());
+ return instance;
+ }
+
+ @Override
+ public TenderVoidConfig[] newArray(int size) {
+ return new TenderVoidConfig[size];
+ }
+ };
+
+ public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() {
+ public Class getCreatedClass() {
+ return TenderVoidConfig.class;
+ }
+
+ @Override
+ public TenderVoidConfig create(org.json.JSONObject jsonObject) {
+ return new TenderVoidConfig(jsonObject);
+ }
+ };
+
+ public interface Constraints {
+ public static final boolean ALLOWED_IS_REQUIRED = false;
+ public static final boolean CUTOFFTIMEINSECONDS_IS_REQUIRED = false;
+ public static final boolean CUTOFFPROPORTION_IS_REQUIRED = false;
+ }
+
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/cash/CashContract.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/cash/CashContract.java
index 456089800f..3603ae5361 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v3/cash/CashContract.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/cash/CashContract.java
@@ -23,11 +23,8 @@
* The contract between the cash management provider and applications. Contains
* definitions for the supported URIs and columns.
*
- * Cash events are recorded locally on device only and not synced between devices or sent to the
- * cloud.
+ * Cash events are synchronized from the cloud to the device via the Nsync protocol.
*
- * This is a read-only contract. Cash events are created when cash payments or refunds occur. To
- * manually record cash events use {@link com.clover.sdk.v3.cash.CashEvents}.
*/
public final class CashContract {
@@ -42,6 +39,9 @@ public final class CashContract {
public static final String ACCOUNT_TYPE_PARAM = "account_type";
public interface CashEventColumns {
+
+ public static final String UUID = "id";
+
/**
* Transaction type, 'TRANSACTION', 'ADJUSTMENT', 'COUNT'.
*
@@ -83,6 +83,21 @@ public interface CashEventColumns {
* Type: VCHAR
*/
public static final String EMPLOYEEID = "employee_id";
+
+ /**
+ * Device id (the device that initiated the event)
+ *
+ * Type: VCHAR
+ */
+ public static final String DEVICEID = "device_id";
+
+ /**
+ * JSON payload for reconciliation details associated with this event.
+ * Mirrors {@code com.clover.common.message.CashEvent.reconciliation}.
+ *
+ * Type: TEXT
+ */
+ public static final String RECONCILIATION = "reconciliation_data";
}
public static final class CashEvent implements BaseColumns, CashEventColumns {
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/cash/CashEvent.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/cash/CashEvent.java
index e0b9d9b708..d76681c461 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v3/cash/CashEvent.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/cash/CashEvent.java
@@ -1,6 +1,6 @@
/**
* Autogenerated by Avro
- *
+ *
* DO NOT EDIT DIRECTLY
*/
@@ -22,6 +22,7 @@
package com.clover.sdk.v3.cash;
+
import com.clover.sdk.GenericClient;
import com.clover.sdk.GenericParcelable;
@@ -37,6 +38,8 @@
*
{@link #getEmployee employee}
* {@link #getDevice device}
* {@link #getMerchant merchant}
+ * {@link #getReconciliation reconciliation}
+ * {@link #getId id}
*
*/
@SuppressWarnings("all")
@@ -91,6 +94,20 @@ public com.clover.sdk.v3.base.Reference getMerchant() {
return genClient.cacheGet(CacheKey.merchant);
}
+ /**
+ * Reconciliation details for this cash event
+ */
+ public com.clover.sdk.v3.payments.Reconciliation getReconciliation() {
+ return genClient.cacheGet(CacheKey.reconciliation);
+ }
+
+ /**
+ * identifier
+ */
+ public java.lang.String getId() {
+ return genClient.cacheGet(CacheKey.id);
+ }
+
@@ -109,7 +126,11 @@ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
(com.clover.sdk.extractors.RecordExtractionStrategy.instance(com.clover.sdk.v3.device.Device.JSON_CREATOR)),
merchant
(com.clover.sdk.extractors.RecordExtractionStrategy.instance(com.clover.sdk.v3.base.Reference.JSON_CREATOR)),
- ;
+ reconciliation
+ (com.clover.sdk.extractors.RecordExtractionStrategy.instance(com.clover.sdk.v3.payments.Reconciliation.JSON_CREATOR)),
+ id
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.String.class)),
+ ;
private final com.clover.sdk.extractors.ExtractionStrategy extractionStrategy;
@@ -181,6 +202,8 @@ public org.json.JSONObject getJSONObject() {
@Override
public void validate() {
+
+ genClient.validateCloverId(CacheKey.id, getId());
genClient.validateReferences(CacheKey.merchant);
}
@@ -219,6 +242,16 @@ public boolean isNotNullMerchant() {
return genClient.cacheValueIsNotNull(CacheKey.merchant);
}
+ /** Checks whether the 'reconciliation' field is set and is not null */
+ public boolean isNotNullReconciliation() {
+ return genClient.cacheValueIsNotNull(CacheKey.reconciliation);
+ }
+
+ /** Checks whether the 'id' field is set and is not null */
+ public boolean isNotNullId() {
+ return genClient.cacheValueIsNotNull(CacheKey.id);
+ }
+
/** Checks whether the 'type' field has been set, however the value could be null */
@@ -256,6 +289,16 @@ public boolean hasMerchant() {
return genClient.cacheHasKey(CacheKey.merchant);
}
+ /** Checks whether the 'reconciliation' field has been set, however the value could be null */
+ public boolean hasReconciliation() {
+ return genClient.cacheHasKey(CacheKey.reconciliation);
+ }
+
+ /** Checks whether the 'id' field has been set, however the value could be null */
+ public boolean hasId() {
+ return genClient.cacheHasKey(CacheKey.id);
+ }
+
/**
* Sets the field 'type'.
@@ -312,6 +355,22 @@ public CashEvent setMerchant(com.clover.sdk.v3.base.Reference merchant) {
return genClient.setRecord(merchant, CacheKey.merchant);
}
+ /**
+ * Sets the field 'reconciliation'.
+ *
+ * The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
+ */
+ public CashEvent setReconciliation(com.clover.sdk.v3.payments.Reconciliation reconciliation) {
+ return genClient.setRecord(reconciliation, CacheKey.reconciliation);
+ }
+
+ /**
+ * Sets the field 'id'.
+ */
+ public CashEvent setId(java.lang.String id) {
+ return genClient.setOther(id, CacheKey.id);
+ }
+
/** Clears the 'type' field, the 'has' method for this field will now return false */
public void clearType() {
@@ -341,6 +400,14 @@ public void clearDevice() {
public void clearMerchant() {
genClient.clear(CacheKey.merchant);
}
+ /** Clears the 'reconciliation' field, the 'has' method for this field will now return false */
+ public void clearReconciliation() {
+ genClient.clear(CacheKey.reconciliation);
+ }
+ /** Clears the 'id' field, the 'has' method for this field will now return false */
+ public void clearId() {
+ genClient.clear(CacheKey.id);
+ }
/**
@@ -410,6 +477,9 @@ public interface Constraints {
public static final boolean EMPLOYEE_IS_REQUIRED = false;
public static final boolean DEVICE_IS_REQUIRED = false;
public static final boolean MERCHANT_IS_REQUIRED = false;
+ public static final boolean RECONCILIATION_IS_REQUIRED = false;
+ public static final boolean ID_IS_REQUIRED = false;
+ public static final long ID_MAX_LEN = 13;
}
}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/cash/Type.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/cash/Type.java
index 94599d5c2b..ecbbd69f3a 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v3/cash/Type.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/cash/Type.java
@@ -31,7 +31,7 @@
*/
@SuppressWarnings("all")
public enum Type implements Parcelable {
- LOAD, TRANSACTION, OPEN, ADJUSTMENT, COUNT, UNLOAD;
+ TRANSACTION, ADJUSTMENT, OPEN, COUNT, LOAD, UNLOAD, EOD, SOD, INSPECTION ;
@Override
public int describeContents() {
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/customers/TokenType.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/customers/TokenType.java
index 81c61cdcbb..5384a5c7a2 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v3/customers/TokenType.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/customers/TokenType.java
@@ -31,7 +31,7 @@
*/
@SuppressWarnings("all")
public enum TokenType implements Parcelable {
- MULTIPAY, FINANCIAL;
+ MULTIPAY, FINANCIAL, SITEF;
@Override
public int describeContents() {
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/device/DeviceAttestationClient.kt b/clover-android-sdk/src/main/java/com/clover/sdk/v3/device/DeviceAttestationClient.kt
new file mode 100644
index 0000000000..b442fd5c7c
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/device/DeviceAttestationClient.kt
@@ -0,0 +1,126 @@
+package com.clover.sdk.v3.device
+
+import android.content.Context
+import android.net.Uri
+import android.os.Bundle
+import com.clover.sdk.v3.device.DeviceAttestationClient.DeviceAttestationContract.Companion.CONTENT_URI
+import com.clover.sdk.v3.device.DeviceAttestationClient.DeviceAttestationContract.Companion.METHOD_SIGN
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.withContext
+
+/**
+ * All possible device truths that can be expected in the signed payload. For convenience,
+ * prefer access them using the [Map.serial], [Map.cloverId], [Map.mid], [Map.storeId],
+ * [Map.timestamp], and [Map.isProd]
+ * extensions.
+ */
+enum class DeviceTruth(val key: String) {
+ SERIAL("serial"),
+ CLOVER_ID("clover_id"),
+ MID("mid"),
+ STORE_ID("store_id"),
+ TIMESTAMP("timestamp"),
+ IS_PROD("is_prod")
+}
+
+val Map.serial: String?
+ get() = this[DeviceTruth.SERIAL.key]
+val Map.cloverId: String?
+ get() = this[DeviceTruth.CLOVER_ID.key]
+val Map.mid: String?
+ get() = this[DeviceTruth.MID.key]
+val Map.timestamp: String?
+ get() = this[DeviceTruth.TIMESTAMP.key]
+val Map.isProd: Boolean
+ get() = this[DeviceTruth.IS_PROD.key]?.toBoolean() ?: false
+val Map.storeId: String?
+ get() = this[DeviceTruth.STORE_ID.key]
+
+/**
+ * Create device attestation messages.
+ */
+class DeviceAttestationClient(private val context: Context) {
+
+ companion object {}
+
+ enum class CertificateReference {
+ /**
+ * Store the certificate chain in the JWS header. This results in a larger
+ * message, but it is self-contained. The message can be verified offline.
+ */
+ CERTIFICATE,
+
+ /**
+ * Store a thumbprint (SHA-256 hash) of the leaf certificate in the JWS header. This results
+ * in a smaller message, but requires the verifier to obtain the actual certificate chain
+ * values in another manner.
+ *
+ * Verifiers must ensure the stored hash matches that of the actual leaf certificate
+ * during the verification process.
+ */
+ THUMBPRINT
+ }
+
+ class DeviceAttestationContract {
+ companion object {
+ const val AUTHORITY = "com.clover.device.attestation"
+ val CONTENT_URI: Uri = Uri.Builder().scheme("content").authority(AUTHORITY).build()
+
+ const val METHOD_SIGN = "sign"
+
+ /**
+ * A [Bundle] containing key-value user truth pairs (String -> String), passed in the call [METHOD_SIGN].
+ */
+ const val EXTRA_USER_TRUTHS = "user_truths"
+
+ /**
+ * A [String] containing the JWS compact serialization representation, returned from the call [METHOD_SIGN].
+ */
+ const val EXTRA_SERIALIZED_COMPACT_JWS = "serialized_compact_jws"
+
+ /**
+ * A [String] specifying how the signing certificate/chain is referenced in the JWS header.
+ * Must be the name of a [CertificateReference] enum value (e.g., `VALUE` or `THUMBPRINT`).
+ *
+ * @see CertificateReference
+ */
+ const val EXTRA_CERTIFICATE_REFERENCE = "certificate_reference"
+ }
+ }
+
+ /**
+ * Signs the requested user truths with the specified certificate reference option and returns the JWS compact serialization.
+ * Invocations are rate limited.
+ *
+ * @throws [IllegalStateException] if the request cannot be signed.
+ * @throws [SecurityException] if the caller is rate-limited.
+ * @throws [IllegalArgumentException] if the request is invalid, or this service is not
+ * supported on this device.
+ */
+ @JvmOverloads
+ @Throws(IllegalStateException::class, SecurityException::class, IllegalArgumentException::class)
+ suspend fun sign(
+ userTruths: Map,
+ certificateReference: CertificateReference = CertificateReference.CERTIFICATE
+ ): String = withContext(Dispatchers.IO) {
+ val userTruthsBundle = Bundle().apply {
+ for ((key, value) in userTruths) {
+ putString(key, value)
+ }
+ }
+ val extras = Bundle().apply {
+ putBundle(DeviceAttestationContract.EXTRA_USER_TRUTHS, userTruthsBundle)
+ putString(DeviceAttestationContract.EXTRA_CERTIFICATE_REFERENCE, certificateReference.name)
+ }
+
+ val result = checkNotNull(
+ context.contentResolver.call(CONTENT_URI, METHOD_SIGN, null, extras)
+ ) { "Failed to create attestation" }
+
+ val serializedCompactJws = checkNotNull(
+ result.getString(DeviceAttestationContract.EXTRA_SERIALIZED_COMPACT_JWS)
+ ) { "Missing signed JWS compact serialization from the response" }
+
+ serializedCompactJws
+ }
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/device/internal/AttestationPayload.kt b/clover-android-sdk/src/main/java/com/clover/sdk/v3/device/internal/AttestationPayload.kt
new file mode 100644
index 0000000000..0c3cc00197
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/device/internal/AttestationPayload.kt
@@ -0,0 +1,7 @@
+package com.clover.sdk.v3.device.internal
+
+@InternalCloverApi
+data class AttestationPayload(
+ val deviceTruths: Map,
+ val userTruths: Map
+)
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/device/internal/CompactJws.kt b/clover-android-sdk/src/main/java/com/clover/sdk/v3/device/internal/CompactJws.kt
new file mode 100644
index 0000000000..2bca3e4201
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/device/internal/CompactJws.kt
@@ -0,0 +1,118 @@
+package com.clover.sdk.v3.device.internal
+
+import android.util.Base64
+import com.google.gson.Gson
+import com.google.gson.annotations.SerializedName
+import java.security.PrivateKey
+import java.security.PublicKey
+import java.security.Signature
+
+@InternalCloverApi
+data class JwsHeader(
+ val alg: String = "RS256",
+ val x5c: List? = null,
+ @SerializedName("x5t#S256")
+ val x5tS256: String? = null
+)
+
+@InternalCloverApi
+data class CompactJws(
+ val header: JwsHeader,
+ val payload: String,
+ val signatureBytes: ByteArray
+) {
+ private val gson = Gson()
+
+ val headerB64: String by lazy {
+ val headerJson = gson.toJson(header)
+ Base64.encodeToString(
+ headerJson.toByteArray(Charsets.UTF_8),
+ Base64.URL_SAFE or Base64.NO_WRAP or Base64.NO_PADDING
+ )
+ }
+
+ val payloadB64: String by lazy {
+ Base64.encodeToString(
+ payload.toByteArray(Charsets.UTF_8),
+ Base64.URL_SAFE or Base64.NO_WRAP or Base64.NO_PADDING
+ )
+ }
+
+ val signatureB64: String by lazy {
+ Base64.encodeToString(
+ signatureBytes,
+ Base64.URL_SAFE or Base64.NO_WRAP or Base64.NO_PADDING
+ )
+ }
+
+ fun serialize(): String = "$headerB64.$payloadB64.$signatureB64"
+
+ companion object {
+ private val gson = Gson()
+
+ fun decode(serializedCompactJws: String): CompactJws {
+ val parts = serializedCompactJws.split(".")
+ require(parts.size == 3) { "Invalid JWS compact serialization format" }
+
+ val headerJson = String(Base64.decode(parts[0], Base64.URL_SAFE or Base64.NO_WRAP), Charsets.UTF_8)
+ val header = gson.fromJson(headerJson, JwsHeader::class.java)
+
+ val payload = String(Base64.decode(parts[1], Base64.URL_SAFE or Base64.NO_WRAP), Charsets.UTF_8)
+ val signatureBytes = Base64.decode(parts[2], Base64.URL_SAFE or Base64.NO_WRAP)
+
+ return CompactJws(header, payload, signatureBytes)
+ }
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) return true
+ if (javaClass != other?.javaClass) return false
+ other as CompactJws
+ if (header != other.header) return false
+ if (payload != other.payload) return false
+ if (!signatureBytes.contentEquals(other.signatureBytes)) return false
+ return true
+ }
+
+ override fun hashCode(): Int {
+ var result = header.hashCode()
+ result = 31 * result + payload.hashCode()
+ result = 31 * result + signatureBytes.contentHashCode()
+ return result
+ }
+}
+
+@InternalCloverApi
+object CompactJwsSigner {
+
+ fun sign(
+ header: JwsHeader,
+ payload: String,
+ privateKey: PrivateKey,
+ signatureProvider: () -> Signature = { Signature.getInstance("SHA256withRSA") }
+ ): CompactJws {
+ val tempJws = CompactJws(header, payload, byteArrayOf())
+ val signingInput = "${tempJws.headerB64}.${tempJws.payloadB64}"
+
+ val signatureEngine = signatureProvider().apply {
+ initSign(privateKey)
+ update(signingInput.toByteArray(Charsets.UTF_8))
+ }
+ val signatureBytes = signatureEngine.sign()
+
+ return CompactJws(header, payload, signatureBytes)
+ }
+
+ fun verify(
+ compactJws: CompactJws,
+ publicKey: PublicKey,
+ signatureProvider: () -> Signature = { Signature.getInstance("SHA256withRSA") }
+ ): Boolean {
+ val signingInput = "${compactJws.headerB64}.${compactJws.payloadB64}"
+ val signatureEngine = signatureProvider().apply {
+ initVerify(publicKey)
+ update(signingInput.toByteArray(Charsets.UTF_8))
+ }
+ return signatureEngine.verify(compactJws.signatureBytes)
+ }
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/device/internal/InternalCloverApi.kt b/clover-android-sdk/src/main/java/com/clover/sdk/v3/device/internal/InternalCloverApi.kt
new file mode 100644
index 0000000000..4dbcb4ea8a
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/device/internal/InternalCloverApi.kt
@@ -0,0 +1,8 @@
+package com.clover.sdk.v3.device.internal
+
+@RequiresOptIn(
+ level = RequiresOptIn.Level.ERROR,
+ message = "This is an internal Clover API and must not be used by third-party applications."
+)
+@Retention(AnnotationRetention.BINARY)
+annotation class InternalCloverApi
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/employees/Permission.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/employees/Permission.java
index 93089bad8e..127bdb80b3 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v3/employees/Permission.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/employees/Permission.java
@@ -31,7 +31,7 @@
*/
@SuppressWarnings("all")
public enum Permission implements Parcelable {
- ORDERS_R, ORDERS_W, INVENTORY_R, INVENTORY_W, PAYMENTS_R, PAYMENTS_W, CUSTOMERS_R, CUSTOMERS_W, EMPLOYEES_R, EMPLOYEES_W, MERCHANT_R, MERCHANT_W;
+ ORDERS_R, ORDERS_W, INVENTORY_R, INVENTORY_W, PAYMENTS_R, PAYMENTS_W, CUSTOMERS_R, CUSTOMERS_W, EMPLOYEES_R, EMPLOYEES_W, MERCHANT_R, MERCHANT_W, APPLE_VAS_R;
@Override
public int describeContents() {
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/happyhour/HappyHourDiscount.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/happyhour/HappyHourDiscount.java
index 28646de1c5..f7eccad108 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v3/happyhour/HappyHourDiscount.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/happyhour/HappyHourDiscount.java
@@ -44,6 +44,8 @@
* {@link #getCategoryIds categoryIds}
* {@link #getItemIds itemIds}
* {@link #getDaysOfWeek daysOfWeek}
+ * {@link #getStartDate startDate}
+ * {@link #getEndDate endDate}
*
*
*
@@ -147,6 +149,22 @@ public java.util.List getDaysOfWeek() {
return genClient.cacheGet(CacheKey.daysOfWeek);
}
+ /**
+ * Discount start date in milliseconds since epoch
+ */
+ @Nullable
+ public java.lang.Long getStartDate() {
+ return genClient.cacheGet(CacheKey.startDate);
+ }
+
+ /**
+ * Discount end date in milliseconds since epoch
+ */
+ @Nullable
+ public java.lang.Long getEndDate() {
+ return genClient.cacheGet(CacheKey.endDate);
+ }
+
@@ -175,6 +193,10 @@ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
(com.clover.sdk.extractors.BasicListExtractionStrategy.instance(java.lang.String.class)),
daysOfWeek
(com.clover.sdk.extractors.BasicListExtractionStrategy.instance(java.lang.String.class)),
+ startDate
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Long.class)),
+ endDate
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Long.class)),
;
private final com.clover.sdk.extractors.ExtractionStrategy extractionStrategy;
@@ -336,6 +358,16 @@ public boolean isNotNullDaysOfWeek() {
/** Checks whether the 'daysOfWeek' field is set and is not null and is not empty */
public boolean isNotEmptyDaysOfWeek() { return isNotNullDaysOfWeek() && !getDaysOfWeek().isEmpty(); }
+ /** Checks whether the 'startDate' field is set and is not null */
+ public boolean isNotNullStartDate() {
+ return genClient.cacheValueIsNotNull(CacheKey.startDate);
+ }
+
+ /** Checks whether the 'endDate' field is set and is not null */
+ public boolean isNotNullEndDate() {
+ return genClient.cacheValueIsNotNull(CacheKey.endDate);
+ }
+
/** Checks whether the 'id' field has been set, however the value could be null */
@@ -398,6 +430,16 @@ public boolean hasDaysOfWeek() {
return genClient.cacheHasKey(CacheKey.daysOfWeek);
}
+ /** Checks whether the 'startDate' field has been set, however the value could be null */
+ public boolean hasStartDate() {
+ return genClient.cacheHasKey(CacheKey.startDate);
+ }
+
+ /** Checks whether the 'endDate' field has been set, however the value could be null */
+ public boolean hasEndDate() {
+ return genClient.cacheHasKey(CacheKey.endDate);
+ }
+
/**
* Sets the field 'id'.
@@ -489,6 +531,20 @@ public HappyHourDiscount setDaysOfWeek(@Nullable java.util.List
+ * Fields
+ *
+ * - {@link #getType type}
+ * - {@link #getPricingMode pricingMode}
+ * - {@link #getDiscountAmount discountAmount}
+ * - {@link #getDiscountPercent discountPercent}
+ * - {@link #getDiscountMax discountMax}
+ * - {@link #getGroups groups}
+ *
+ */
+@SuppressWarnings("all")
+public class BundleDefinition extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable {
+
+ public BundleType getType() {
+ return genClient.cacheGet(CacheKey.type);
+ }
+
+ public BundlePricingMode getPricingMode() {
+ return genClient.cacheGet(CacheKey.pricingMode);
+ }
+
+ /**
+ * Fixed discount amount for the bundle
+ */
+ public Long getDiscountAmount() {
+ return genClient.cacheGet(CacheKey.discountAmount);
+ }
+
+ /**
+ * Discount percentage for the bundle
+ */
+ public Long getDiscountPercent() {
+ return genClient.cacheGet(CacheKey.discountPercent);
+ }
+
+ /**
+ * Ceiling for the total discount allowed.
+ */
+ public Long getDiscountMax() {
+ return genClient.cacheGet(CacheKey.discountMax);
+ }
+
+ /**
+ * List of bundle item groups
+ */
+ public java.util.List getGroups() {
+ return genClient.cacheGet(CacheKey.groups);
+ }
+
+
+
+
+ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
+ type
+ (com.clover.sdk.extractors.EnumExtractionStrategy.instance(BundleType.class)),
+ pricingMode
+ (com.clover.sdk.extractors.EnumExtractionStrategy.instance(BundlePricingMode.class)),
+ discountAmount
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ discountPercent
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ discountMax
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(Long.class)),
+ groups
+ (com.clover.sdk.extractors.RecordListExtractionStrategy.instance(BundleItemGroup.JSON_CREATOR)),
+ ;
+
+ private final com.clover.sdk.extractors.ExtractionStrategy extractionStrategy;
+
+ private CacheKey(com.clover.sdk.extractors.ExtractionStrategy s) {
+ extractionStrategy = s;
+ }
+
+ @Override
+ public com.clover.sdk.extractors.ExtractionStrategy getExtractionStrategy() {
+ return extractionStrategy;
+ }
+ }
+
+ private final GenericClient genClient;
+
+ /**
+ * Constructs a new empty instance.
+ */
+ public BundleDefinition() {
+ genClient = new GenericClient(this);
+ }
+
+ @Override
+ protected GenericClient getGenericClient() {
+ return genClient;
+ }
+
+ /**
+ * Constructs a new empty instance.
+ */
+ protected BundleDefinition(boolean noInit) {
+ genClient = null;
+ }
+
+ /**
+ * Constructs a new instance from the given JSON String.
+ */
+ public BundleDefinition(String json) throws IllegalArgumentException {
+ this();
+ genClient.initJsonObject(json);
+ }
+
+ /**
+ * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public BundleDefinition(org.json.JSONObject jsonObject) {
+ this();
+ genClient.setJsonObject(jsonObject);
+ }
+
+ /**
+ * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
+ */
+ public BundleDefinition(BundleDefinition src) {
+ this();
+ if (src.genClient.getJsonObject() != null) {
+ genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject()));
+ }
+ }
+
+ /**
+ * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public org.json.JSONObject getJSONObject() {
+ return genClient.getJSONObject();
+ }
+
+ @Override
+ public void validate() {
+ }
+
+ /** Checks whether the 'type' field is set and is not null */
+ public boolean isNotNullType() {
+ return genClient.cacheValueIsNotNull(CacheKey.type);
+ }
+
+ /** Checks whether the 'pricingMode' field is set and is not null */
+ public boolean isNotNullPricingMode() {
+ return genClient.cacheValueIsNotNull(CacheKey.pricingMode);
+ }
+
+ /** Checks whether the 'discountAmount' field is set and is not null */
+ public boolean isNotNullDiscountAmount() {
+ return genClient.cacheValueIsNotNull(CacheKey.discountAmount);
+ }
+
+ /** Checks whether the 'discountPercent' field is set and is not null */
+ public boolean isNotNullDiscountPercent() {
+ return genClient.cacheValueIsNotNull(CacheKey.discountPercent);
+ }
+
+ /** Checks whether the 'discountMax' field is set and is not null */
+ public boolean isNotNullDiscountMax() {
+ return genClient.cacheValueIsNotNull(CacheKey.discountMax);
+ }
+
+ /** Checks whether the 'groups' field is set and is not null */
+ public boolean isNotNullGroups() {
+ return genClient.cacheValueIsNotNull(CacheKey.groups);
+ }
+
+ /** Checks whether the 'groups' field is set and is not null and is not empty */
+ public boolean isNotEmptyGroups() { return isNotNullGroups() && !getGroups().isEmpty(); }
+
+
+
+ /** Checks whether the 'type' field has been set, however the value could be null */
+ public boolean hasType() {
+ return genClient.cacheHasKey(CacheKey.type);
+ }
+
+ /** Checks whether the 'pricingMode' field has been set, however the value could be null */
+ public boolean hasPricingMode() {
+ return genClient.cacheHasKey(CacheKey.pricingMode);
+ }
+
+ /** Checks whether the 'discountAmount' field has been set, however the value could be null */
+ public boolean hasDiscountAmount() {
+ return genClient.cacheHasKey(CacheKey.discountAmount);
+ }
+
+ /** Checks whether the 'discountPercent' field has been set, however the value could be null */
+ public boolean hasDiscountPercent() {
+ return genClient.cacheHasKey(CacheKey.discountPercent);
+ }
+
+ /** Checks whether the 'discountMax' field has been set, however the value could be null */
+ public boolean hasDiscountMax() {
+ return genClient.cacheHasKey(CacheKey.discountMax);
+ }
+
+ /** Checks whether the 'groups' field has been set, however the value could be null */
+ public boolean hasGroups() {
+ return genClient.cacheHasKey(CacheKey.groups);
+ }
+
+
+ /**
+ * Sets the field 'type'.
+ */
+ public BundleDefinition setType(BundleType type) {
+ return genClient.setOther(type, CacheKey.type);
+ }
+
+ /**
+ * Sets the field 'pricingMode'.
+ */
+ public BundleDefinition setPricingMode(BundlePricingMode pricingMode) {
+ return genClient.setOther(pricingMode, CacheKey.pricingMode);
+ }
+
+ /**
+ * Sets the field 'discountAmount'.
+ */
+ public BundleDefinition setDiscountAmount(Long discountAmount) {
+ return genClient.setOther(discountAmount, CacheKey.discountAmount);
+ }
+
+ /**
+ * Sets the field 'discountPercent'.
+ */
+ public BundleDefinition setDiscountPercent(Long discountPercent) {
+ return genClient.setOther(discountPercent, CacheKey.discountPercent);
+ }
+
+ /**
+ * Sets the field 'discountMax'.
+ */
+ public BundleDefinition setDiscountMax(Long discountMax) {
+ return genClient.setOther(discountMax, CacheKey.discountMax);
+ }
+
+ /**
+ * Sets the field 'groups'.
+ *
+ * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
+ */
+ public BundleDefinition setGroups(java.util.List groups) {
+ return genClient.setArrayRecord(groups, CacheKey.groups);
+ }
+
+
+ /** Clears the 'type' field, the 'has' method for this field will now return false */
+ public void clearType() {
+ genClient.clear(CacheKey.type);
+ }
+ /** Clears the 'pricingMode' field, the 'has' method for this field will now return false */
+ public void clearPricingMode() {
+ genClient.clear(CacheKey.pricingMode);
+ }
+ /** Clears the 'discountAmount' field, the 'has' method for this field will now return false */
+ public void clearDiscountAmount() {
+ genClient.clear(CacheKey.discountAmount);
+ }
+ /** Clears the 'discountPercent' field, the 'has' method for this field will now return false */
+ public void clearDiscountPercent() {
+ genClient.clear(CacheKey.discountPercent);
+ }
+ /** Clears the 'discountMax' field, the 'has' method for this field will now return false */
+ public void clearDiscountMax() {
+ genClient.clear(CacheKey.discountMax);
+ }
+ /** Clears the 'groups' field, the 'has' method for this field will now return false */
+ public void clearGroups() {
+ genClient.clear(CacheKey.groups);
+ }
+
+
+ /**
+ * Returns true if this instance has any changes.
+ */
+ public boolean containsChanges() {
+ return genClient.containsChanges();
+ }
+
+ /**
+ * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
+ */
+ public void resetChangeLog() {
+ genClient.resetChangeLog();
+ }
+
+ /**
+ * Create a copy of this instance that contains only fields that were set after the constructor was called.
+ */
+ public BundleDefinition copyChanges() {
+ BundleDefinition copy = new BundleDefinition();
+ copy.mergeChanges(this);
+ copy.resetChangeLog();
+ return copy;
+ }
+
+ /**
+ * Copy all the changed fields from the given source to this instance.
+ */
+ public void mergeChanges(BundleDefinition src) {
+ if (src.genClient.getChangeLog() != null) {
+ genClient.mergeChanges(new BundleDefinition(src).getJSONObject(), src.genClient);
+ }
+ }
+
+ public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() {
+ @Override
+ public BundleDefinition createFromParcel(android.os.Parcel in) {
+ BundleDefinition instance = new BundleDefinition(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap());
+ instance.genClient.setBundle(in.readBundle(getClass().getClassLoader()));
+ instance.genClient.setChangeLog(in.readBundle());
+ return instance;
+ }
+
+ @Override
+ public BundleDefinition[] newArray(int size) {
+ return new BundleDefinition[size];
+ }
+ };
+
+ public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() {
+ public Class getCreatedClass() {
+ return BundleDefinition.class;
+ }
+
+ @Override
+ public BundleDefinition create(org.json.JSONObject jsonObject) {
+ return new BundleDefinition(jsonObject);
+ }
+ };
+
+ public interface Constraints {
+ public static final boolean TYPE_IS_REQUIRED = false;
+ public static final boolean PRICINGMODE_IS_REQUIRED = false;
+ public static final boolean DISCOUNTAMOUNT_IS_REQUIRED = false;
+ public static final boolean DISCOUNTPERCENT_IS_REQUIRED = false;
+ public static final boolean DISCOUNTMAX_IS_REQUIRED = false;
+ public static final boolean GROUPS_IS_REQUIRED = false;
+ }
+
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/BundleItem.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/BundleItem.java
new file mode 100644
index 0000000000..590be84e11
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/BundleItem.java
@@ -0,0 +1,344 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+/*
+ * Copyright (C) 2019 Clover Network, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.clover.sdk.v3.inventory;
+
+
+import com.clover.sdk.GenericClient;
+import com.clover.sdk.GenericParcelable;
+
+/**
+ * This is an auto-generated Clover data object.
+ *
+ *
Fields
+ *
+ * - {@link #getId id}
+ * - {@link #getMinRequired minRequired}
+ * - {@link #getMaxAllowed maxAllowed}
+ * - {@link #getPriceDifferential priceDifferential}
+ * - {@link #getPosition position}
+ *
+ */
+@SuppressWarnings("all")
+public class BundleItem extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable {
+
+ public java.lang.String getId() {
+ return genClient.cacheGet(CacheKey.id);
+ }
+
+ /**
+ * Minimum number of items required
+ */
+ public java.lang.Integer getMinRequired() {
+ return genClient.cacheGet(CacheKey.minRequired);
+ }
+
+ /**
+ * Maximum number of items allowed
+ */
+ public java.lang.Integer getMaxAllowed() {
+ return genClient.cacheGet(CacheKey.maxAllowed);
+ }
+
+ /**
+ * Price differential for the item
+ */
+ public java.lang.Long getPriceDifferential() {
+ return genClient.cacheGet(CacheKey.priceDifferential);
+ }
+
+ /**
+ * Sort order for the item within its group
+ */
+ public java.lang.Integer getPosition() {
+ return genClient.cacheGet(CacheKey.position);
+ }
+
+
+
+
+ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
+ id
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.String.class)),
+ minRequired
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Integer.class)),
+ maxAllowed
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Integer.class)),
+ priceDifferential
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Long.class)),
+ position
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Integer.class)),
+ ;
+
+ private final com.clover.sdk.extractors.ExtractionStrategy extractionStrategy;
+
+ private CacheKey(com.clover.sdk.extractors.ExtractionStrategy s) {
+ extractionStrategy = s;
+ }
+
+ @Override
+ public com.clover.sdk.extractors.ExtractionStrategy getExtractionStrategy() {
+ return extractionStrategy;
+ }
+ }
+
+ private final GenericClient genClient;
+
+ /**
+ * Constructs a new empty instance.
+ */
+ public BundleItem() {
+ genClient = new GenericClient(this);
+ }
+
+ @Override
+ protected GenericClient getGenericClient() {
+ return genClient;
+ }
+
+ /**
+ * Constructs a new empty instance.
+ */
+ protected BundleItem(boolean noInit) {
+ genClient = null;
+ }
+
+ /**
+ * Constructs a new instance from the given JSON String.
+ */
+ public BundleItem(String json) throws IllegalArgumentException {
+ this();
+ genClient.initJsonObject(json);
+ }
+
+ /**
+ * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public BundleItem(org.json.JSONObject jsonObject) {
+ this();
+ genClient.setJsonObject(jsonObject);
+ }
+
+ /**
+ * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
+ */
+ public BundleItem(BundleItem src) {
+ this();
+ if (src.genClient.getJsonObject() != null) {
+ genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject()));
+ }
+ }
+
+ /**
+ * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public org.json.JSONObject getJSONObject() {
+ return genClient.getJSONObject();
+ }
+
+ @Override
+ public void validate() {
+ genClient.validateCloverId(CacheKey.id, getId());
+ }
+
+ /** Checks whether the 'id' field is set and is not null */
+ public boolean isNotNullId() {
+ return genClient.cacheValueIsNotNull(CacheKey.id);
+ }
+
+ /** Checks whether the 'minRequired' field is set and is not null */
+ public boolean isNotNullMinRequired() {
+ return genClient.cacheValueIsNotNull(CacheKey.minRequired);
+ }
+
+ /** Checks whether the 'maxAllowed' field is set and is not null */
+ public boolean isNotNullMaxAllowed() {
+ return genClient.cacheValueIsNotNull(CacheKey.maxAllowed);
+ }
+
+ /** Checks whether the 'priceDifferential' field is set and is not null */
+ public boolean isNotNullPriceDifferential() {
+ return genClient.cacheValueIsNotNull(CacheKey.priceDifferential);
+ }
+
+ /** Checks whether the 'position' field is set and is not null */
+ public boolean isNotNullPosition() {
+ return genClient.cacheValueIsNotNull(CacheKey.position);
+ }
+
+
+
+ /** Checks whether the 'id' field has been set, however the value could be null */
+ public boolean hasId() {
+ return genClient.cacheHasKey(CacheKey.id);
+ }
+
+ /** Checks whether the 'minRequired' field has been set, however the value could be null */
+ public boolean hasMinRequired() {
+ return genClient.cacheHasKey(CacheKey.minRequired);
+ }
+
+ /** Checks whether the 'maxAllowed' field has been set, however the value could be null */
+ public boolean hasMaxAllowed() {
+ return genClient.cacheHasKey(CacheKey.maxAllowed);
+ }
+
+ /** Checks whether the 'priceDifferential' field has been set, however the value could be null */
+ public boolean hasPriceDifferential() {
+ return genClient.cacheHasKey(CacheKey.priceDifferential);
+ }
+
+ /** Checks whether the 'position' field has been set, however the value could be null */
+ public boolean hasPosition() {
+ return genClient.cacheHasKey(CacheKey.position);
+ }
+
+
+ /**
+ * Sets the field 'id'.
+ */
+ public BundleItem setId(java.lang.String id) {
+ return genClient.setOther(id, CacheKey.id);
+ }
+
+ /**
+ * Sets the field 'minRequired'.
+ */
+ public BundleItem setMinRequired(java.lang.Integer minRequired) {
+ return genClient.setOther(minRequired, CacheKey.minRequired);
+ }
+
+ /**
+ * Sets the field 'maxAllowed'.
+ */
+ public BundleItem setMaxAllowed(java.lang.Integer maxAllowed) {
+ return genClient.setOther(maxAllowed, CacheKey.maxAllowed);
+ }
+
+ /**
+ * Sets the field 'priceDifferential'.
+ */
+ public BundleItem setPriceDifferential(java.lang.Long priceDifferential) {
+ return genClient.setOther(priceDifferential, CacheKey.priceDifferential);
+ }
+
+ /**
+ * Sets the field 'position'.
+ */
+ public BundleItem setPosition(java.lang.Integer position) {
+ return genClient.setOther(position, CacheKey.position);
+ }
+
+
+ /** Clears the 'id' field, the 'has' method for this field will now return false */
+ public void clearId() {
+ genClient.clear(CacheKey.id);
+ }
+ /** Clears the 'minRequired' field, the 'has' method for this field will now return false */
+ public void clearMinRequired() {
+ genClient.clear(CacheKey.minRequired);
+ }
+ /** Clears the 'maxAllowed' field, the 'has' method for this field will now return false */
+ public void clearMaxAllowed() {
+ genClient.clear(CacheKey.maxAllowed);
+ }
+ /** Clears the 'priceDifferential' field, the 'has' method for this field will now return false */
+ public void clearPriceDifferential() {
+ genClient.clear(CacheKey.priceDifferential);
+ }
+ /** Clears the 'position' field, the 'has' method for this field will now return false */
+ public void clearPosition() {
+ genClient.clear(CacheKey.position);
+ }
+
+
+ /**
+ * Returns true if this instance has any changes.
+ */
+ public boolean containsChanges() {
+ return genClient.containsChanges();
+ }
+
+ /**
+ * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
+ */
+ public void resetChangeLog() {
+ genClient.resetChangeLog();
+ }
+
+ /**
+ * Create a copy of this instance that contains only fields that were set after the constructor was called.
+ */
+ public BundleItem copyChanges() {
+ BundleItem copy = new BundleItem();
+ copy.mergeChanges(this);
+ copy.resetChangeLog();
+ return copy;
+ }
+
+ /**
+ * Copy all the changed fields from the given source to this instance.
+ */
+ public void mergeChanges(BundleItem src) {
+ if (src.genClient.getChangeLog() != null) {
+ genClient.mergeChanges(new BundleItem(src).getJSONObject(), src.genClient);
+ }
+ }
+
+ public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() {
+ @Override
+ public BundleItem createFromParcel(android.os.Parcel in) {
+ BundleItem instance = new BundleItem(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap());
+ instance.genClient.setBundle(in.readBundle(getClass().getClassLoader()));
+ instance.genClient.setChangeLog(in.readBundle());
+ return instance;
+ }
+
+ @Override
+ public BundleItem[] newArray(int size) {
+ return new BundleItem[size];
+ }
+ };
+
+ public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() {
+ public Class getCreatedClass() {
+ return BundleItem.class;
+ }
+
+ @Override
+ public BundleItem create(org.json.JSONObject jsonObject) {
+ return new BundleItem(jsonObject);
+ }
+ };
+
+ public interface Constraints {
+ public static final boolean ID_IS_REQUIRED = false;
+ public static final long ID_MAX_LEN = 13;
+ public static final boolean MINREQUIRED_IS_REQUIRED = false;
+ public static final boolean MAXALLOWED_IS_REQUIRED = false;
+ public static final boolean PRICEDIFFERENTIAL_IS_REQUIRED = false;
+ public static final boolean POSITION_IS_REQUIRED = false;
+ }
+
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/BundleItemGroup.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/BundleItemGroup.java
new file mode 100644
index 0000000000..f93fa2ff65
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/BundleItemGroup.java
@@ -0,0 +1,387 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+/*
+ * Copyright (C) 2019 Clover Network, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.clover.sdk.v3.inventory;
+
+
+import com.clover.sdk.GenericClient;
+import com.clover.sdk.GenericParcelable;
+
+/**
+ * This is an auto-generated Clover data object.
+ *
+ *
Fields
+ *
+ * - {@link #getId id}
+ * - {@link #getName name}
+ * - {@link #getMinItemsRequired minItemsRequired}
+ * - {@link #getMaxItemsAllowed maxItemsAllowed}
+ * - {@link #getItems items}
+ * - {@link #getPosition position}
+ *
+ */
+@SuppressWarnings("all")
+public class BundleItemGroup extends GenericParcelable implements com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable {
+
+ /**
+ * Unique identifier
+ */
+ public String getId() {
+ return genClient.cacheGet(CacheKey.id);
+ }
+
+ /**
+ * Name of the bundle item group
+ */
+ public String getName() {
+ return genClient.cacheGet(CacheKey.name);
+ }
+
+ /**
+ * Minimum number of items required in the group
+ */
+ public Integer getMinItemsRequired() {
+ return genClient.cacheGet(CacheKey.minItemsRequired);
+ }
+
+ /**
+ * Maximum number of items allowed in the group
+ */
+ public Integer getMaxItemsAllowed() {
+ return genClient.cacheGet(CacheKey.maxItemsAllowed);
+ }
+
+ /**
+ * List of items in the group
+ */
+ public java.util.List getItems() {
+ return genClient.cacheGet(CacheKey.items);
+ }
+
+ /**
+ * Sort order for the group
+ */
+ public Integer getPosition() {
+ return genClient.cacheGet(CacheKey.position);
+ }
+
+
+
+
+ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
+ id
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(String.class)),
+ name
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(String.class)),
+ minItemsRequired
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(Integer.class)),
+ maxItemsAllowed
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(Integer.class)),
+ items
+ (com.clover.sdk.extractors.RecordListExtractionStrategy.instance(BundleItem.JSON_CREATOR)),
+ position
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(Integer.class)),
+ ;
+
+ private final com.clover.sdk.extractors.ExtractionStrategy extractionStrategy;
+
+ private CacheKey(com.clover.sdk.extractors.ExtractionStrategy s) {
+ extractionStrategy = s;
+ }
+
+ @Override
+ public com.clover.sdk.extractors.ExtractionStrategy getExtractionStrategy() {
+ return extractionStrategy;
+ }
+ }
+
+ private final GenericClient genClient;
+
+ /**
+ * Constructs a new empty instance.
+ */
+ public BundleItemGroup() {
+ genClient = new GenericClient(this);
+ }
+
+ @Override
+ protected GenericClient getGenericClient() {
+ return genClient;
+ }
+
+ /**
+ * Constructs a new empty instance.
+ */
+ protected BundleItemGroup(boolean noInit) {
+ genClient = null;
+ }
+
+ /**
+ * Constructs a new instance from the given JSON String.
+ */
+ public BundleItemGroup(String json) throws IllegalArgumentException {
+ this();
+ genClient.initJsonObject(json);
+ }
+
+ /**
+ * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public BundleItemGroup(org.json.JSONObject jsonObject) {
+ this();
+ genClient.setJsonObject(jsonObject);
+ }
+
+ /**
+ * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
+ */
+ public BundleItemGroup(BundleItemGroup src) {
+ this();
+ if (src.genClient.getJsonObject() != null) {
+ genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject()));
+ }
+ }
+
+ /**
+ * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
+ * reflected in this instance and vice-versa.
+ */
+ public org.json.JSONObject getJSONObject() {
+ return genClient.getJSONObject();
+ }
+
+ @Override
+ public void validate() {
+ genClient.validateCloverId(CacheKey.id, getId());
+
+ genClient.validateLength(CacheKey.name, getName(), 127);
+ }
+
+ /** Checks whether the 'id' field is set and is not null */
+ public boolean isNotNullId() {
+ return genClient.cacheValueIsNotNull(CacheKey.id);
+ }
+
+ /** Checks whether the 'name' field is set and is not null */
+ public boolean isNotNullName() {
+ return genClient.cacheValueIsNotNull(CacheKey.name);
+ }
+
+ /** Checks whether the 'minItemsRequired' field is set and is not null */
+ public boolean isNotNullMinItemsRequired() {
+ return genClient.cacheValueIsNotNull(CacheKey.minItemsRequired);
+ }
+
+ /** Checks whether the 'maxItemsAllowed' field is set and is not null */
+ public boolean isNotNullMaxItemsAllowed() {
+ return genClient.cacheValueIsNotNull(CacheKey.maxItemsAllowed);
+ }
+
+ /** Checks whether the 'items' field is set and is not null */
+ public boolean isNotNullItems() {
+ return genClient.cacheValueIsNotNull(CacheKey.items);
+ }
+
+ /** Checks whether the 'items' field is set and is not null and is not empty */
+ public boolean isNotEmptyItems() { return isNotNullItems() && !getItems().isEmpty(); }
+
+ /** Checks whether the 'position' field is set and is not null */
+ public boolean isNotNullPosition() {
+ return genClient.cacheValueIsNotNull(CacheKey.position);
+ }
+
+
+
+ /** Checks whether the 'id' field has been set, however the value could be null */
+ public boolean hasId() {
+ return genClient.cacheHasKey(CacheKey.id);
+ }
+
+ /** Checks whether the 'name' field has been set, however the value could be null */
+ public boolean hasName() {
+ return genClient.cacheHasKey(CacheKey.name);
+ }
+
+ /** Checks whether the 'minItemsRequired' field has been set, however the value could be null */
+ public boolean hasMinItemsRequired() {
+ return genClient.cacheHasKey(CacheKey.minItemsRequired);
+ }
+
+ /** Checks whether the 'maxItemsAllowed' field has been set, however the value could be null */
+ public boolean hasMaxItemsAllowed() {
+ return genClient.cacheHasKey(CacheKey.maxItemsAllowed);
+ }
+
+ /** Checks whether the 'items' field has been set, however the value could be null */
+ public boolean hasItems() {
+ return genClient.cacheHasKey(CacheKey.items);
+ }
+
+ /** Checks whether the 'position' field has been set, however the value could be null */
+ public boolean hasPosition() {
+ return genClient.cacheHasKey(CacheKey.position);
+ }
+
+
+ /**
+ * Sets the field 'id'.
+ */
+ public BundleItemGroup setId(String id) {
+ return genClient.setOther(id, CacheKey.id);
+ }
+
+ /**
+ * Sets the field 'name'.
+ */
+ public BundleItemGroup setName(String name) {
+ return genClient.setOther(name, CacheKey.name);
+ }
+
+ /**
+ * Sets the field 'minItemsRequired'.
+ */
+ public BundleItemGroup setMinItemsRequired(Integer minItemsRequired) {
+ return genClient.setOther(minItemsRequired, CacheKey.minItemsRequired);
+ }
+
+ /**
+ * Sets the field 'maxItemsAllowed'.
+ */
+ public BundleItemGroup setMaxItemsAllowed(Integer maxItemsAllowed) {
+ return genClient.setOther(maxItemsAllowed, CacheKey.maxItemsAllowed);
+ }
+
+ /**
+ * Sets the field 'items'.
+ *
+ * Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
+ */
+ public BundleItemGroup setItems(java.util.List items) {
+ return genClient.setArrayRecord(items, CacheKey.items);
+ }
+
+ /**
+ * Sets the field 'position'.
+ */
+ public BundleItemGroup setPosition(Integer position) {
+ return genClient.setOther(position, CacheKey.position);
+ }
+
+
+ /** Clears the 'id' field, the 'has' method for this field will now return false */
+ public void clearId() {
+ genClient.clear(CacheKey.id);
+ }
+ /** Clears the 'name' field, the 'has' method for this field will now return false */
+ public void clearName() {
+ genClient.clear(CacheKey.name);
+ }
+ /** Clears the 'minItemsRequired' field, the 'has' method for this field will now return false */
+ public void clearMinItemsRequired() {
+ genClient.clear(CacheKey.minItemsRequired);
+ }
+ /** Clears the 'maxItemsAllowed' field, the 'has' method for this field will now return false */
+ public void clearMaxItemsAllowed() {
+ genClient.clear(CacheKey.maxItemsAllowed);
+ }
+ /** Clears the 'items' field, the 'has' method for this field will now return false */
+ public void clearItems() {
+ genClient.clear(CacheKey.items);
+ }
+ /** Clears the 'position' field, the 'has' method for this field will now return false */
+ public void clearPosition() {
+ genClient.clear(CacheKey.position);
+ }
+
+
+ /**
+ * Returns true if this instance has any changes.
+ */
+ public boolean containsChanges() {
+ return genClient.containsChanges();
+ }
+
+ /**
+ * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
+ */
+ public void resetChangeLog() {
+ genClient.resetChangeLog();
+ }
+
+ /**
+ * Create a copy of this instance that contains only fields that were set after the constructor was called.
+ */
+ public BundleItemGroup copyChanges() {
+ BundleItemGroup copy = new BundleItemGroup();
+ copy.mergeChanges(this);
+ copy.resetChangeLog();
+ return copy;
+ }
+
+ /**
+ * Copy all the changed fields from the given source to this instance.
+ */
+ public void mergeChanges(BundleItemGroup src) {
+ if (src.genClient.getChangeLog() != null) {
+ genClient.mergeChanges(new BundleItemGroup(src).getJSONObject(), src.genClient);
+ }
+ }
+
+ public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() {
+ @Override
+ public BundleItemGroup createFromParcel(android.os.Parcel in) {
+ BundleItemGroup instance = new BundleItemGroup(com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap());
+ instance.genClient.setBundle(in.readBundle(getClass().getClassLoader()));
+ instance.genClient.setChangeLog(in.readBundle());
+ return instance;
+ }
+
+ @Override
+ public BundleItemGroup[] newArray(int size) {
+ return new BundleItemGroup[size];
+ }
+ };
+
+ public static final com.clover.sdk.JSONifiable.Creator JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator() {
+ public Class getCreatedClass() {
+ return BundleItemGroup.class;
+ }
+
+ @Override
+ public BundleItemGroup create(org.json.JSONObject jsonObject) {
+ return new BundleItemGroup(jsonObject);
+ }
+ };
+
+ public interface Constraints {
+ public static final boolean ID_IS_REQUIRED = false;
+ public static final long ID_MAX_LEN = 13;
+ public static final boolean NAME_IS_REQUIRED = false;
+ public static final long NAME_MAX_LEN = 127;
+ public static final boolean MINITEMSREQUIRED_IS_REQUIRED = false;
+ public static final boolean MAXITEMSALLOWED_IS_REQUIRED = false;
+ public static final boolean ITEMS_IS_REQUIRED = false;
+ public static final boolean POSITION_IS_REQUIRED = false;
+ }
+
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/BundlePricingMode.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/BundlePricingMode.java
new file mode 100644
index 0000000000..13431ebdb0
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/BundlePricingMode.java
@@ -0,0 +1,57 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+
+/*
+ * Copyright (C) 2019 Clover Network, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.clover.sdk.v3.inventory;
+
+import android.os.Parcelable;
+import android.os.Parcel;
+
+/**
+ * This is an auto-generated Clover data enum.
+ */
+@SuppressWarnings("all")
+public enum BundlePricingMode implements Parcelable {
+ FIXED;
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(final Parcel dest, final int flags) {
+ dest.writeString(name());
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public BundlePricingMode createFromParcel(final Parcel source) {
+ return BundlePricingMode.valueOf(source.readString());
+ }
+
+ @Override
+ public BundlePricingMode[] newArray(final int size) {
+ return new BundlePricingMode[size];
+ }
+ };
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/BundleType.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/BundleType.java
new file mode 100644
index 0000000000..c28370dcc3
--- /dev/null
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/BundleType.java
@@ -0,0 +1,57 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+
+/*
+ * Copyright (C) 2019 Clover Network, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.clover.sdk.v3.inventory;
+
+import android.os.Parcelable;
+import android.os.Parcel;
+
+/**
+ * This is an auto-generated Clover data enum.
+ */
+@SuppressWarnings("all")
+public enum BundleType implements Parcelable {
+ FIXED, CUSTOMER_CHOICE;
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(final Parcel dest, final int flags) {
+ dest.writeString(name());
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public BundleType createFromParcel(final Parcel source) {
+ return BundleType.valueOf(source.readString());
+ }
+
+ @Override
+ public BundleType[] newArray(final int size) {
+ return new BundleType[size];
+ }
+ };
+}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/Discount.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/Discount.java
index 0b92afe558..1be7218f41 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/Discount.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/Discount.java
@@ -38,6 +38,7 @@
* {@link #getPercentageDecimal percentageDecimal}
* {@link #getType type}
* {@link #getDeleted deleted}
+ * {@link #getColor color}
*
*
* @see com.clover.sdk.v3.inventory.IInventoryService
@@ -94,6 +95,13 @@ public java.lang.Boolean getDeleted() {
return genClient.cacheGet(CacheKey.deleted);
}
+ /**
+ * Optional color code for discount, only present if ORDER_DISCOUNT_COLOR_ENABLE is enabled. Allowed values: Gray, Gold, Orange, Red, Violet, Blue, Purple, Pink, Green, Brown.
+ */
+ public java.lang.String getColor() {
+ return genClient.cacheGet(CacheKey.color);
+ }
+
@@ -112,7 +120,9 @@ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
(com.clover.sdk.extractors.EnumExtractionStrategy.instance(com.clover.sdk.v3.inventory.DiscountType.class)),
deleted
(com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Boolean.class)),
- ;
+ color
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.String.class)),
+ ;
private final com.clover.sdk.extractors.ExtractionStrategy extractionStrategy;
@@ -231,6 +241,11 @@ public boolean isNotNullDeleted() {
return genClient.cacheValueIsNotNull(CacheKey.deleted);
}
+ /** Checks whether the 'color' field is set and is not null */
+ public boolean isNotNullColor() {
+ return genClient.cacheValueIsNotNull(CacheKey.color);
+ }
+
/** Checks whether the 'id' field has been set, however the value could be null */
@@ -268,6 +283,11 @@ public boolean hasDeleted() {
return genClient.cacheHasKey(CacheKey.deleted);
}
+ /** Checks whether the 'color' field has been set, however the value could be null */
+ public boolean hasColor() {
+ return genClient.cacheHasKey(CacheKey.color);
+ }
+
/**
* Sets the field 'id'.
@@ -318,6 +338,13 @@ public Discount setDeleted(java.lang.Boolean deleted) {
return genClient.setOther(deleted, CacheKey.deleted);
}
+ /**
+ * Sets the field 'color'.
+ */
+ public Discount setColor(java.lang.String color) {
+ return genClient.setOther(color, CacheKey.color);
+ }
+
/** Clears the 'id' field, the 'has' method for this field will now return false */
public void clearId() {
@@ -347,6 +374,10 @@ public void clearType() {
public void clearDeleted() {
genClient.clear(CacheKey.deleted);
}
+ /** Clears the 'color' field, the 'has' method for this field will now return false */
+ public void clearColor() {
+ genClient.clear(CacheKey.color);
+ }
/**
@@ -423,6 +454,7 @@ public interface Constraints {
public static final long PERCENTAGEDECIMAL_MAX = 1000000;
public static final boolean TYPE_IS_REQUIRED = false;
public static final boolean DELETED_IS_REQUIRED = false;
+ public static final boolean COLOR_IS_REQUIRED = false;
}
}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/InventoryConnector.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/InventoryConnector.java
index 1b88f10eb9..9b9bec5e61 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/InventoryConnector.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/InventoryConnector.java
@@ -559,6 +559,14 @@ public List call(IInventoryService service, ResultStatus status) throws
}, callback);
}
+ public List getAllMarkers() throws ClientException, ServiceException, BindingException, RemoteException {
+ return execute(new ServiceCallable>() {
+ public List call(IInventoryService service, ResultStatus status) throws RemoteException {
+ return service.getAllMarkers(status);
+ }
+ });
+ }
+
public void assignTaxRatesToItem(final String itemId, final List taxRates) throws ClientException, ServiceException, BindingException, RemoteException {
execute(new ServiceRunnable() {
public void run(IInventoryService service, ResultStatus status) throws RemoteException {
@@ -1525,4 +1533,23 @@ public boolean checkModifiersAvailability(final List modifierIdList) thr
return execute((ServiceCallable)
(service, status) -> service.checkModifiersAvailability(modifierIdList, status));
}
+
+ public void getMarkersForItem(final String itemId, Callback> callback) {
+ execute(new ServiceCallable>() {
+ public List call(IInventoryService service, ResultStatus status) throws RemoteException {
+ return service.getMarkersForItem(itemId, status);
+ }
+ }, callback);
+ }
+
+ public void associateMarkerToItem(final String itemId,
+ final List markerIdsToAssociate,
+ final List markerIdsToDissociate) throws ClientException, ServiceException, BindingException, RemoteException {
+ execute(new ServiceRunnable() {
+ public void run(IInventoryService service, ResultStatus status) throws RemoteException {
+ service.associateMarkerToItem(itemId, markerIdsToAssociate, markerIdsToDissociate, status);
+ }
+ });
+ }
+
}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/InventoryContract.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/InventoryContract.java
index 334521d69d..9ab44bd678 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/InventoryContract.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/InventoryContract.java
@@ -19,6 +19,7 @@
import com.clover.sdk.v3.order.OrderType;
import android.accounts.Account;
+import android.content.ContentUris;
import android.net.Uri;
import android.os.Bundle;
import android.os.CancellationSignal;
@@ -333,6 +334,13 @@ public interface ItemColumns {
* Type: INTEGER (boolean)
*/
public static final String EXCLUDE_CASH_DISCOUNT = "exclude_cash_discount";
+
+ /**
+ * Item price type; use the {@link com.clover.sdk.v3.inventory.ItemType} enum to determine the correct type
+ *
+ * Type: TEXT
+ */
+ public static final String ITEM_TYPE = "type";
}
/**
@@ -624,6 +632,13 @@ public interface ModifierColumns {
* Type: TEXT
*/
public static final String MENU_REASON_CODE = "menu_reason_code";
+
+ /**
+ * The ID of the master modifier in the Global Catalog.
+ * Essential for 'Coalition Availability' logic.
+ * Type: TEXT (Reference to MODIFIER._ID)
+ */
+ public static final String SOURCE_MODIFIER_ID = "source_modifier_id";
}
/**
@@ -788,6 +803,28 @@ public interface GroupColumns {
* Type: INTEGER
*/
public static final String MENU_MAX_ALLOWED = "menu_max_allowed";
+
+ /**
+ * Distinguishes between standard groups and master library groups.
+ * Values: 'REGULAR', 'CATALOG', 'PROXY', 'TEMPLATE'.
+ *
+ * Type: TEXT
+ */
+ public static final String TYPE = "type";
+
+ /**
+ * Links a sub-group to its parent's UUID.
+ *
+ * Type: TEXT
+ */
+ public static final String PARENT_MODIFIER_GROUP_ID = "parent_modifier_group_id";
+
+ /**
+ * The UUID of the blueprint group in the Catalog.
+ *
+ * Type: TEXT
+ */
+ public static final String SOURCE_MODIFIER_GROUP_ID = "source_modifier_group_id";
}
/**
@@ -988,6 +1025,28 @@ public interface TaxRateColumns {
* Type: INTEGER
*/
public static final String DEFAULT = "is_default";
+
+ /**
+ * System Tax Id - The system tax uuid.
+ *
+ * Type: TEXT
+ */
+ public static final String SYSTEM_TAX_ID = "system_tax_id";
+
+ /**
+ * System Tax Rate Label Key - The key to the system tax rate label.
+ *
+ * Type: TEXT
+ */
+ public static final String SYSTEM_TAX_LABEL_KEY = "system_tax_label_key";
+
+ /**
+ * System Tax Rate Label - The system tax rate label value.
+ *
+ * Type: TEXT
+ */
+ public static final String SYSTEM_TAX_LABEL = "system_tax_label";
+
}
/**
@@ -1165,6 +1224,13 @@ public interface DiscountColumns {
* Type: Type: ENUN: DEFAULT, CASH_DISCOUNT
*/
public static final String TYPE = "type";
+
+ /**
+ * Discount color.
+ *
+ * Type: TEXT
+ */
+ public static final String COLOR = "color";
}
/**
@@ -1856,6 +1922,281 @@ public static Uri contentUriWithAccount(Account account) {
}
}
+ /**
+ * These columns correspond to fields of an {@link com.clover.sdk.v3.inventory.BundleDefinition}.
+ */
+ public interface BundleDefinitionColumns {
+ /**
+ * The UUID of the Item this BundleDefinition is associated with.
+ * Foreign key to {@link Item#UUID}.
+ *
+ * Type: TEXT
+ */
+ public static final String ITEM_ID = "item_id";
+
+ /**
+ * Bundle Type.
+ *
+ * Type: TEXT (e.g., "fixed", "variable")
+ */
+ public static final String TYPE = "type";
+
+ /**
+ * Bundle Pricing Mode.
+ *
+ * Type: TEXT
+ */
+ public static final String PRICING_MODE = "pricing_mode";
+
+ /**
+ * Fixed discount amount for the bundle.
+ *
+ * Type: LONG
+ */
+ public static final String DISCOUNT_AMOUNT = "discount_amount";
+
+ /**
+ * Discount percentage for the bundle.
+ *
+ * Type: LONG
+ */
+ public static final String DISCOUNT_PERCENT = "discount_percent";
+
+ /**
+ * Ceiling for the total discount allowed.
+ *
+ * Type: LONG
+ */
+ public static final String DISCOUNT_MAX = "discount_max";
+ }
+
+ /**
+ * Contract for accessing {@link com.clover.sdk.v3.inventory.BundleDefinition} instances via content provider.
+ */
+ public static final class BundleDefinition implements BaseColumns, BundleDefinitionColumns {
+ /**
+ * This utility class cannot be instantiated
+ */
+ private BundleDefinition() {
+ }
+
+ /**
+ * base content directory for bundle_definition
+ */
+ public static final String CONTENT_DIRECTORY = "bundle_definition";
+
+ /**
+ * The content:// style URI for this table
+ */
+ public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, CONTENT_DIRECTORY);
+
+ /**
+ * The MIME type of {@link #CONTENT_URI} providing a directory of bundle_definitions.
+ */
+ public static final String CONTENT_TYPE = "vnd.android.cursor.dir/bundle_definition";
+
+ /**
+ * The MIME type of a {@link #CONTENT_URI} subdirectory of a single bundle_definition.
+ */
+ public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/bundle_definition";
+
+ public static Uri contentUriWithToken(String token) {
+ return CONTENT_URI.buildUpon().appendQueryParameter(AUTH_TOKEN_PARAM, token).build();
+ }
+
+ public static Uri contentUriWithAccount(Account account) {
+ Uri.Builder builder = CONTENT_URI.buildUpon();
+ builder.appendQueryParameter(ACCOUNT_NAME_PARAM, account.name);
+ builder.appendQueryParameter(ACCOUNT_TYPE_PARAM, account.type);
+ return builder.build();
+ }
+ }
+
+ /**
+ * These columns correspond to fields of an {@link com.clover.sdk.v3.inventory.BundleItemGroup}.
+ */
+ public interface BundleItemGroupColumns {
+ /**
+ * Item Bundle Group uuid.
+ *
+ * Type: TEXT
+ */
+ public static final String UUID = "uuid";
+
+ /**
+ * Foreign key to {@link Item#UUID}.
+ *
+ * Type: TEXT
+ */
+ public static final String ITEM_ID = "item_id";
+
+ /**
+ * Item Bundle Group Name.
+ *
+ * Type: TEXT
+ */
+ public static final String NAME = "name";
+
+ /**
+ * Item Bundle Group Position.
+ *
+ * Type: INTEGER
+ */
+ public static final String POSITION = "position";
+
+ /**
+ * Item Bundle Group Required Count.
+ *
+ * Type: INTEGER
+ */
+ public static final String REQUIRED_COUNT = "required_count";
+
+ /**
+ * Item Bundle Group Allowed Count.
+ *
+ * Type: INTEGER
+ */
+ public static final String ALLOWED_COUNT = "allowed_count";
+ }
+
+ /**
+ * Contract for accessing {@link com.clover.sdk.v3.inventory.BundleItemGroup} instances via content provider.
+ */
+ public static final class BundleItemGroup implements BaseColumns, BundleItemGroupColumns {
+ /**
+ * This utility class cannot be instantiated
+ */
+ private BundleItemGroup() {
+ }
+
+ /**
+ * base content directory for bundle_item_group
+ */
+ public static final String CONTENT_DIRECTORY = "bundle_item_group";
+
+ /**
+ * The content:// style URI for this table
+ */
+ public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, CONTENT_DIRECTORY);
+
+ /**
+ * The MIME type of {@link #CONTENT_URI} providing a directory of bundle_item_groups.
+ */
+ public static final String CONTENT_TYPE = "vnd.android.cursor.dir/bundle_item_group";
+
+ /**
+ * The MIME type of a {@link #CONTENT_URI} subdirectory of a single bundle_item_group.
+ */
+ public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/bundle_item_group";
+
+ public static Uri contentUriWithToken(String token) {
+ return CONTENT_URI.buildUpon().appendQueryParameter(AUTH_TOKEN_PARAM, token).build();
+ }
+
+ public static Uri contentUriWithAccount(Account account) {
+ Uri.Builder builder = CONTENT_URI.buildUpon();
+ builder.appendQueryParameter(ACCOUNT_NAME_PARAM, account.name);
+ builder.appendQueryParameter(ACCOUNT_TYPE_PARAM, account.type);
+ return builder.build();
+ }
+ }
+
+ /**
+ * These columns correspond to fields of an {@link com.clover.sdk.v3.inventory.BundleItem}.
+ */
+ public interface BundleItemColumns {
+ /**
+ * Item Bundle Group Item uuid.
+ *
+ * Type: TEXT
+ */
+ public static final String UUID = "uuid";
+
+ /**
+ * Foreign key to {@link BundleItemGroup#UUID}.
+ *
+ * Type: TEXT
+ */
+ public static final String BUNDLE_ITEM_GROUP_ID = "bundle_item_group_id";
+
+ /**
+ * Foreign key to {@link Item#UUID}.
+ *
+ * Type: TEXT
+ */
+ public static final String ITEM_ID = "item_id";
+
+ /**
+ * Item Bundle Group Item Price Differential.
+ *
+ * Type: INTEGER
+ */
+ public static final String PRICE_DIFFERENTIAL = "price_differential";
+
+ /**
+ * Minimum number of items required.
+ *
+ * Type: INTEGER
+ */
+ public static final String MIN_REQUIRED = "min_required";
+
+ /**
+ * Maximum number of items allowed.
+ *
+ * Type: INTEGER
+ */
+ public static final String MAX_ALLOWED = "max_allowed";
+
+ /**
+ * Sort order for the item within its group.
+ *
+ * Type: INTEGER
+ */
+ public static final String POSITION = "position";
+ }
+
+ /**
+ * Contract for accessing {@link com.clover.sdk.v3.inventory.BundleItem} instances via content provider.
+ */
+ public static final class BundleItem implements BaseColumns, BundleItemColumns {
+ /**
+ * This utility class cannot be instantiated
+ */
+ private BundleItem() {
+ }
+
+ /**
+ * base content directory for bundle_item
+ */
+ public static final String CONTENT_DIRECTORY = "bundle_item";
+
+ /**
+ * The content:// style URI for this table
+ */
+ public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, CONTENT_DIRECTORY);
+
+ /**
+ * The MIME type of {@link #CONTENT_URI} providing a directory of bundle_items.
+ */
+ public static final String CONTENT_TYPE = "vnd.android.cursor.dir/bundle_item";
+
+ /**
+ * The MIME type of a {@link #CONTENT_URI} subdirectory of a single bundle_item.
+ */
+ public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/bundle_item";
+
+ public static Uri contentUriWithToken(String token) {
+ return CONTENT_URI.buildUpon().appendQueryParameter(AUTH_TOKEN_PARAM, token).build();
+ }
+
+ public static Uri contentUriWithAccount(Account account) {
+ Uri.Builder builder = CONTENT_URI.buildUpon();
+ builder.appendQueryParameter(ACCOUNT_NAME_PARAM, account.name);
+ builder.appendQueryParameter(ACCOUNT_TYPE_PARAM, account.type);
+ return builder.build();
+ }
+ }
+
/**
* Columns containing data for tax rules. Tax rules currently can only be created and modified by Clover.
*/
@@ -2500,4 +2841,357 @@ public static Uri contentUriWithAccount(Account account) {
return builder.build();
}
}
+
+ public interface MarkerColumns {
+ String UUID = "uuid";
+
+ String NAME = "name";
+
+ String DISPLAY_NAME = "display_name";
+
+ String IS_SYSTEM_MARKER = "is_system_marker";
+
+ String ICON_URL = "icon_url";
+
+ String IS_ACTIVE = "is_active";
+
+ String DELETED_TIME = "deleted_time";
+
+ String CREATED_TIME = "created_time";
+
+ String MODIFIED_TIME = "modified_time";
+
+ String MARKER_CATEGORY_NAME = "marker_category_name";
+ }
+
+ public interface ItemMarkerAssociationColumns {
+ String UUID = "uuid";
+ String ITEM_UUID = "item_uuid";
+ String MARKER_UUID = "marker_uuid";
+
+ String DELETED_TIME = "deleted_time";
+
+ String MODIFIED_TIME = "modified_time";
+ }
+ public static final class Marker implements BaseColumns, MarkerColumns {
+ private Marker() {
+ }
+
+ public static Uri contentUriWithAccount(Account account) {
+ Uri.Builder builder = CONTENT_URI.buildUpon();
+ builder.appendQueryParameter(ACCOUNT_NAME_PARAM, account.name);
+ builder.appendQueryParameter(ACCOUNT_TYPE_PARAM, account.type);
+ return builder.build();
+ }
+
+ public static final String CONTENT_DIRECTORY = "markers";
+
+ public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, CONTENT_DIRECTORY);
+
+ public static final String CONTENT_TYPE = "vnd.android.cursor.dir/markers";
+
+ public static final String CONTENT_MARKERS_TYPE = "vnd.android.cursor.item/markers";
+ }
+
+ public static final class ItemMarkerAssociation implements BaseColumns, ItemMarkerAssociationColumns {
+ private ItemMarkerAssociation() {
+ }
+
+ public static Uri contentUriWithAccount(Account account) {
+ Uri.Builder builder = CONTENT_URI.buildUpon();
+ builder.appendQueryParameter(ACCOUNT_NAME_PARAM, account.name);
+ builder.appendQueryParameter(ACCOUNT_TYPE_PARAM, account.type);
+ return builder.build();
+ }
+
+ public static final String CONTENT_DIRECTORY = "item_marker";
+
+ public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, CONTENT_DIRECTORY);
+
+
+ public static final String CONTENT_TYPE = "vnd.android.cursor.dir/itemMarkerAssociation";
+
+ public static final String CONTENT_ItemMarkerAssociation_TYPE = "vnd.android.cursor.item/itemMarkerAssociation";
+ }
+
+
+
+
+ public interface MarkerCategoryColumns {
+ String MARKER_CATEGORY_UUID = "marker_category_uuid";
+
+ String MARKER_CATEGORY_NAME = "marker_category_name";
+
+ String MODIFIED_TIME = "modified_time";
+ }
+
+ public static final class MarkerCategory implements BaseColumns, MarkerCategoryColumns {
+ private MarkerCategory() {
+ }
+
+ public static final String CONTENT_DIRECTORY = "markers_category";
+
+ public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, CONTENT_DIRECTORY);
+
+ public static final String CONTENT_TYPE = "vnd.android.cursor.dir/markers_category";
+
+ public static final String CONTENT_MARKERS_CATEGORY_TYPE = "vnd.android.cursor.item/markers_category";
+ }
+
+
+ /**
+ * These columns correspond to fields of order fee-tax rate associations used by
+ * {@link com.clover.sdk.v3.inventory.OrderFee#getTaxRates()}.
+ */
+ public interface OrderFeeTaxRateColumns {
+
+ /**
+ * Associated order fee id.
+ *
+ * Type: TEXT
+ */
+ String ORDER_FEE_ID = "order_fee_id";
+
+ /**
+ * Associated tax rate id.
+ *
+ * Type: TEXT
+ */
+ String TAX_RATE_ID = "tax_rate_id";
+
+ /**
+ * Time when this association row was created.
+ *
+ * Type: INTEGER
+ */
+ String CREATED_TIME = "created_time";
+
+ /**
+ * Time when this association row was last modified.
+ *
+ * Type: INTEGER
+ */
+ String MODIFIED_TIME = "modified_time";
+
+ /**
+ * Time when this association row was soft deleted.
+ *
+ * Type: INTEGER
+ */
+ String DELETED_TIME = "deleted_time";
+ }
+
+ /**
+ * Contract for accessing order fee-tax rate associations via content provider.
+ */
+ public static final class OrderFeeTaxRate implements BaseColumns, OrderFeeTaxRateColumns {
+ /**
+ * This utility class cannot be instantiated
+ */
+ private OrderFeeTaxRate() {
+ }
+
+ /**
+ * Base content directory (table) for order fee-tax rate associations.
+ */
+ public static final String CONTENT_DIRECTORY = "order_fee_tax_rate";
+
+ /**
+ * The content:// style URI for this table.
+ */
+ public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, CONTENT_DIRECTORY);
+
+ /**
+ * The MIME type of {@link #CONTENT_URI} providing a directory of order fee-tax rate associations.
+ */
+ public static final String CONTENT_TYPE = "vnd.android.cursor.dir/orderfeetaxrate";
+
+ /**
+ * The MIME type of a {@link #CONTENT_URI} subdirectory of a single association row.
+ */
+ public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/orderfeetaxrate";
+
+ public static Uri contentUriWithAccount(Account account) {
+ Uri.Builder builder = CONTENT_URI.buildUpon();
+ builder.appendQueryParameter(ACCOUNT_NAME_PARAM, account.name);
+ builder.appendQueryParameter(ACCOUNT_TYPE_PARAM, account.type);
+ return builder.build();
+ }
+ }
+
+ /**
+ * These columns correspond to fields of order type-tax rate associations used by
+ * {@link com.clover.sdk.v3.order.OrderTypeTaxRate}.
+ */
+ public interface OrderTypeTaxRateColumns {
+
+ /**
+ * Unique identifier for an OrderTypeTaxRate association. Generated by Clover. Required.
+ *
+ * Type: TEXT
+ */
+ String UUID = "uuid";
+
+ /**
+ * Associated order type id.
+ *
+ * Type: TEXT
+ */
+ String ORDER_TYPE_ID = "order_type_id";
+
+ /**
+ * Associated tax rate id.
+ *
+ * Type: TEXT
+ */
+ String TAX_RATE_ID = "tax_rate_id";
+
+ /**
+ * Time when this association row was created.
+ *
+ * Type: INTEGER
+ */
+ String CREATED_TIME = "created_time";
+
+ /**
+ * Time when this association row was last modified.
+ *
+ * Type: INTEGER
+ */
+ String MODIFIED_TIME = "modified_time";
+
+ /**
+ * Time when this association row was soft deleted.
+ *
+ * Type: INTEGER
+ */
+ String DELETED_TIME = "deleted_time";
+ }
+
+ /**
+ * Contract for accessing order type-tax rate associations via content provider.
+ */
+ public static final class OrderTypeTaxRate implements BaseColumns, OrderTypeTaxRateColumns {
+ /**
+ * This utility class cannot be instantiated
+ */
+ private OrderTypeTaxRate() {
+ }
+
+ /**
+ * Base content directory (table) for order type-tax rate associations.
+ */
+ public static final String CONTENT_DIRECTORY = "order_type_tax_rate";
+
+ /**
+ * The content:// style URI for this table.
+ */
+ public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, CONTENT_DIRECTORY);
+
+ /**
+ * The MIME type of {@link #CONTENT_URI} providing a directory of order type-tax rate associations.
+ */
+ public static final String CONTENT_TYPE = "vnd.android.cursor.dir/ordertypetaxrate";
+
+ /**
+ * The MIME type of a {@link #CONTENT_URI} subdirectory of a single association row.
+ */
+ public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/ordertypetaxrate";
+
+ /**
+ * Builds a row URI for CRUD on a single association row by primary key.
+ */
+ public static Uri contentItemUri(long id) {
+ return ContentUris.withAppendedId(CONTENT_URI, id);
+ }
+ }
+
+ /**
+ * These columns correspond to fields of item tax rate price associations used by
+ * {@link com.clover.sdk.v3.inventory.ItemTaxRatePrice}.
+ */
+ public interface ItemTaxRatePriceColumns {
+
+ /**
+ * Associated item id.
+ *
+ * Type: TEXT
+ */
+ String ITEM_ID = "item_id";
+
+ /**
+ * Associated tax rate id.
+ *
+ * Type: TEXT
+ */
+ String TAX_RATE_ID = "tax_rate_id";
+
+ /**
+ * Item price in cents. Required.
+ *
+ * Type: INTEGER
+ */
+ String PRICE = "price";
+
+ /**
+ * Time when this association row was created.
+ *
+ * Type: INTEGER
+ */
+ String CREATED_TIME = "created_time";
+
+ /**
+ * Time when this association row was last modified.
+ *
+ * Type: INTEGER
+ */
+ String MODIFIED_TIME = "modified_time";
+
+ /**
+ * Time when this association row was soft deleted.
+ *
+ * Type: INTEGER
+ */
+ String DELETED_TIME = "deleted_time";
+ }
+
+ /**
+ * Contract for accessing item tax rate price associations via content provider.
+ */
+ public static final class ItemTaxRatePrice implements BaseColumns, ItemTaxRatePriceColumns {
+ /**
+ * This utility class cannot be instantiated
+ */
+ private ItemTaxRatePrice() {
+ }
+
+ /**
+ * Base content directory (table) for item tax rate price associations.
+ */
+ public static final String CONTENT_DIRECTORY = "item_tax_rate_price";
+
+ /**
+ * The content:// style URI for this table.
+ */
+ public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, CONTENT_DIRECTORY);
+
+ /**
+ * The MIME type of {@link #CONTENT_URI} providing a directory of item rate rate price associations.
+ */
+ public static final String CONTENT_TYPE = "vnd.android.cursor.dir/itemtaxrateprice";
+
+ /**
+ * The MIME type of a {@link #CONTENT_URI} subdirectory of a single association row.
+ */
+ public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/itemtaxrateprice";
+
+ /**
+ * Builds a row URI for CRUD on a single association row by primary key.
+ */
+ public static Uri contentItemUri(long id) {
+ return ContentUris.withAppendedId(CONTENT_URI, id);
+ }
+ }
+
+
}
diff --git a/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/Item.java b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/Item.java
index 9cb7073181..3fae5190a1 100644
--- a/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/Item.java
+++ b/clover-android-sdk/src/main/java/com/clover/sdk/v3/inventory/Item.java
@@ -63,6 +63,7 @@
*
{@link #getAgeRestrictedObj ageRestrictedObj}
* {@link #getExcludeCashDiscount excludeCashDiscount}
* {@link #getMarkupPrice markupPrice}
+ * {@link #getBundleDefinition bundleDefinition}
*
*
* @see com.clover.sdk.v3.inventory.IInventoryService
@@ -287,6 +288,13 @@ public java.lang.Boolean getMarkupPrice() {
return genClient.cacheGet(CacheKey.markupPrice);
}
+ /**
+ * Bundle definition for this bundle-item
+ */
+ public BundleDefinition getBundleDefinition() {
+ return genClient.cacheGet(CacheKey.bundleDefinition);
+ }
+
public static final String AUTHORITY = "com.clover.inventory";
private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
@@ -355,8 +363,10 @@ private enum CacheKey implements com.clover.sdk.ExtractionStrategyEnum {
excludeCashDiscount
(com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Boolean.class)),
markupPrice
- (com.clover.sdk.extractors.BasicExtractionStrategy.instance(java.lang.Boolean.class)),
- ;
+ (com.clover.sdk.extractors.BasicExtractionStrategy.instance(Boolean.class)),
+ bundleDefinition
+ (com.clover.sdk.extractors.RecordExtractionStrategy.instance(BundleDefinition.JSON_CREATOR)),
+ ;
private final com.clover.sdk.extractors.ExtractionStrategy extractionStrategy;
@@ -796,31 +806,37 @@ public boolean hasMarkupPrice() {
return genClient.cacheHasKey(CacheKey.markupPrice);
}
+ /** Checks whether the 'bundleDefinition' field has been set, however the value could be null */
+ public boolean hasBundleDefinition() {
+ return genClient.cacheHasKey(CacheKey.bundleDefinition);
+ }
+
+
/**
* Sets the field 'id'.
*/
- public Item setId(java.lang.String id) {
+ public Item setId(String id) {
return genClient.setOther(id, CacheKey.id);
}
/**
* Sets the field 'hidden'.
*/
- public Item setHidden(java.lang.Boolean hidden) {
+ public Item setHidden(Boolean hidden) {
return genClient.setOther(hidden, CacheKey.hidden);
}
/**
* Sets the field 'available'.
*/
- public Item setAvailable(java.lang.Boolean available) {
+ public Item setAvailable(Boolean available) {
return genClient.setOther(available, CacheKey.available);
}
/**
* Sets the field 'autoManage'.
*/
- public Item setAutoManage(java.lang.Boolean autoManage) {
+ public Item setAutoManage(Boolean autoManage) {
return genClient.setOther(autoManage, CacheKey.autoManage);
}
@@ -838,84 +854,84 @@ public Item setItemGroup(com.clover.sdk.v3.base.Reference itemGroup) {
*
* Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
*/
- public Item setOptions(java.util.List options) {
+ public Item setOptions(java.util.List