Package com.clover.sdk.v3.payments
Class PurchaseCardL2DataWrapper
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.payments.PurchaseCardL2DataWrapper
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class PurchaseCardL2DataWrapper extends GenericParcelable implements Validator, JSONifiable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PurchaseCardL2DataWrapper.Constraints
-
Nested classes/interfaces inherited from interface com.clover.sdk.JSONifiable
JSONifiable.Creator<T>
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<PurchaseCardL2DataWrapper>
CREATOR
static JSONifiable.Creator<PurchaseCardL2DataWrapper>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description PurchaseCardL2DataWrapper()
Constructs a new empty instance.protected
PurchaseCardL2DataWrapper(boolean noInit)
Constructs a new empty instance.PurchaseCardL2DataWrapper(PurchaseCardL2DataWrapper src)
Constructs a new instance that is a deep copy of the source instance.PurchaseCardL2DataWrapper(String json)
Constructs a new instance from the given JSON String.PurchaseCardL2DataWrapper(JSONObject jsonObject)
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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearPurchaseCardBillingInfo()
Clears the 'purchaseCardBillingInfo' field, the 'has' method for this field will now return falsevoid
clearPurchaseCardL2()
Clears the 'purchaseCardL2' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.PurchaseCardL2DataWrapper
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.protected GenericClient
getGenericClient()
JSONObject
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.PurchaseCardBillingInfo
getPurchaseCardBillingInfo()
Holds billing address and billing zipPurchaseCardL2
getPurchaseCardL2()
Purchase card object that holds l2 data corresponding to l2 fields in gt requestboolean
hasPurchaseCardBillingInfo()
Checks whether the 'purchaseCardBillingInfo' field has been set, however the value could be nullboolean
hasPurchaseCardL2()
Checks whether the 'purchaseCardL2' field has been set, however the value could be nullboolean
isNotNullPurchaseCardBillingInfo()
Checks whether the 'purchaseCardBillingInfo' field is set and is not nullboolean
isNotNullPurchaseCardL2()
Checks whether the 'purchaseCardL2' field is set and is not nullvoid
mergeChanges(PurchaseCardL2DataWrapper src)
Copy all the changed fields from the given source to this instance.void
resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.PurchaseCardL2DataWrapper
setPurchaseCardBillingInfo(PurchaseCardBillingInfo purchaseCardBillingInfo)
Sets the field 'purchaseCardBillingInfo'.PurchaseCardL2DataWrapper
setPurchaseCardL2(PurchaseCardL2 purchaseCardL2)
Sets the field 'purchaseCardL2'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<PurchaseCardL2DataWrapper> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<PurchaseCardL2DataWrapper> JSON_CREATOR
-
-
Constructor Detail
-
PurchaseCardL2DataWrapper
public PurchaseCardL2DataWrapper()
Constructs a new empty instance.
-
PurchaseCardL2DataWrapper
protected PurchaseCardL2DataWrapper(boolean noInit)
Constructs a new empty instance.
-
PurchaseCardL2DataWrapper
public PurchaseCardL2DataWrapper(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
PurchaseCardL2DataWrapper
public PurchaseCardL2DataWrapper(JSONObject jsonObject)
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.
-
PurchaseCardL2DataWrapper
public PurchaseCardL2DataWrapper(PurchaseCardL2DataWrapper src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getPurchaseCardL2
public PurchaseCardL2 getPurchaseCardL2()
Purchase card object that holds l2 data corresponding to l2 fields in gt request
-
getPurchaseCardBillingInfo
public PurchaseCardBillingInfo getPurchaseCardBillingInfo()
Holds billing address and billing zip
-
getGenericClient
protected GenericClient getGenericClient()
- Specified by:
getGenericClient
in classGenericParcelable
-
getJSONObject
public JSONObject 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.- Specified by:
getJSONObject
in interfaceJSONifiable
-
isNotNullPurchaseCardL2
public boolean isNotNullPurchaseCardL2()
Checks whether the 'purchaseCardL2' field is set and is not null
-
isNotNullPurchaseCardBillingInfo
public boolean isNotNullPurchaseCardBillingInfo()
Checks whether the 'purchaseCardBillingInfo' field is set and is not null
-
hasPurchaseCardL2
public boolean hasPurchaseCardL2()
Checks whether the 'purchaseCardL2' field has been set, however the value could be null
-
hasPurchaseCardBillingInfo
public boolean hasPurchaseCardBillingInfo()
Checks whether the 'purchaseCardBillingInfo' field has been set, however the value could be null
-
setPurchaseCardL2
public PurchaseCardL2DataWrapper setPurchaseCardL2(PurchaseCardL2 purchaseCardL2)
Sets the field 'purchaseCardL2'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setPurchaseCardBillingInfo
public PurchaseCardL2DataWrapper setPurchaseCardBillingInfo(PurchaseCardBillingInfo purchaseCardBillingInfo)
Sets the field 'purchaseCardBillingInfo'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
clearPurchaseCardL2
public void clearPurchaseCardL2()
Clears the 'purchaseCardL2' field, the 'has' method for this field will now return false
-
clearPurchaseCardBillingInfo
public void clearPurchaseCardBillingInfo()
Clears the 'purchaseCardBillingInfo' field, the 'has' method for this field will now return false
-
containsChanges
public boolean containsChanges()
Returns true if this instance has any changes.
-
resetChangeLog
public void resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
-
copyChanges
public PurchaseCardL2DataWrapper copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(PurchaseCardL2DataWrapper src)
Copy all the changed fields from the given source to this instance.
-
-