Package com.clover.sdk.v3.payments
Class VasPayloadElement
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.payments.VasPayloadElement
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class VasPayloadElement extends GenericParcelable implements Validator, JSONifiable
This is an auto-generated Clover data object.Fields
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
VasPayloadElement.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<VasPayloadElement>
CREATOR
static JSONifiable.Creator<VasPayloadElement>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description VasPayloadElement()
Constructs a new empty instance.protected
VasPayloadElement(boolean noInit)
Constructs a new empty instance.VasPayloadElement(VasPayloadElement src)
Constructs a new instance that is a deep copy of the source instance.VasPayloadElement(String json)
Constructs a new instance from the given JSON String.VasPayloadElement(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
clearDataType()
Clears the 'dataType' field, the 'has' method for this field will now return falsevoid
clearMerchantId()
Clears the 'merchantId' field, the 'has' method for this field will now return falsevoid
clearProtocolId()
Clears the 'protocolId' field, the 'has' method for this field will now return falsevoid
clearResponseFormat()
Clears the 'responseFormat' field, the 'has' method for this field will now return falsevoid
clearVasData()
Clears the 'vasData' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.VasPayloadElement
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.VasDataType
getDataType()
Indicates the type of data in this response.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.String
getMerchantId()
Merchant id associated with this payload element (hex encoded)VasProtocol
getProtocolId()
Protocol this payload element was derived fromVasResponseFormat
getResponseFormat()
Format of vasData payload.String
getVasData()
Vas data.boolean
hasDataType()
Checks whether the 'dataType' field has been set, however the value could be nullboolean
hasMerchantId()
Checks whether the 'merchantId' field has been set, however the value could be nullboolean
hasProtocolId()
Checks whether the 'protocolId' field has been set, however the value could be nullboolean
hasResponseFormat()
Checks whether the 'responseFormat' field has been set, however the value could be nullboolean
hasVasData()
Checks whether the 'vasData' field has been set, however the value could be nullboolean
isNotNullDataType()
Checks whether the 'dataType' field is set and is not nullboolean
isNotNullMerchantId()
Checks whether the 'merchantId' field is set and is not nullboolean
isNotNullProtocolId()
Checks whether the 'protocolId' field is set and is not nullboolean
isNotNullResponseFormat()
Checks whether the 'responseFormat' field is set and is not nullboolean
isNotNullVasData()
Checks whether the 'vasData' field is set and is not nullvoid
mergeChanges(VasPayloadElement 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.VasPayloadElement
setDataType(VasDataType dataType)
Sets the field 'dataType'.VasPayloadElement
setMerchantId(String merchantId)
Sets the field 'merchantId'.VasPayloadElement
setProtocolId(VasProtocol protocolId)
Sets the field 'protocolId'.VasPayloadElement
setResponseFormat(VasResponseFormat responseFormat)
Sets the field 'responseFormat'.VasPayloadElement
setVasData(String vasData)
Sets the field 'vasData'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<VasPayloadElement> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<VasPayloadElement> JSON_CREATOR
-
-
Constructor Detail
-
VasPayloadElement
public VasPayloadElement()
Constructs a new empty instance.
-
VasPayloadElement
protected VasPayloadElement(boolean noInit)
Constructs a new empty instance.
-
VasPayloadElement
public VasPayloadElement(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
VasPayloadElement
public VasPayloadElement(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.
-
VasPayloadElement
public VasPayloadElement(VasPayloadElement src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getDataType
public VasDataType getDataType()
Indicates the type of data in this response.
-
getResponseFormat
public VasResponseFormat getResponseFormat()
Format of vasData payload.
-
getVasData
public String getVasData()
Vas data. For NDEF it will be base64 encoded binary.
-
getProtocolId
public VasProtocol getProtocolId()
Protocol this payload element was derived from
-
getMerchantId
public String getMerchantId()
Merchant id associated with this payload element (hex encoded)
-
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
-
isNotNullDataType
public boolean isNotNullDataType()
Checks whether the 'dataType' field is set and is not null
-
isNotNullResponseFormat
public boolean isNotNullResponseFormat()
Checks whether the 'responseFormat' field is set and is not null
-
isNotNullVasData
public boolean isNotNullVasData()
Checks whether the 'vasData' field is set and is not null
-
isNotNullProtocolId
public boolean isNotNullProtocolId()
Checks whether the 'protocolId' field is set and is not null
-
isNotNullMerchantId
public boolean isNotNullMerchantId()
Checks whether the 'merchantId' field is set and is not null
-
hasDataType
public boolean hasDataType()
Checks whether the 'dataType' field has been set, however the value could be null
-
hasResponseFormat
public boolean hasResponseFormat()
Checks whether the 'responseFormat' field has been set, however the value could be null
-
hasVasData
public boolean hasVasData()
Checks whether the 'vasData' field has been set, however the value could be null
-
hasProtocolId
public boolean hasProtocolId()
Checks whether the 'protocolId' field has been set, however the value could be null
-
hasMerchantId
public boolean hasMerchantId()
Checks whether the 'merchantId' field has been set, however the value could be null
-
setDataType
public VasPayloadElement setDataType(VasDataType dataType)
Sets the field 'dataType'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setResponseFormat
public VasPayloadElement setResponseFormat(VasResponseFormat responseFormat)
Sets the field 'responseFormat'.
-
setVasData
public VasPayloadElement setVasData(String vasData)
Sets the field 'vasData'.
-
setProtocolId
public VasPayloadElement setProtocolId(VasProtocol protocolId)
Sets the field 'protocolId'.
-
setMerchantId
public VasPayloadElement setMerchantId(String merchantId)
Sets the field 'merchantId'.
-
clearDataType
public void clearDataType()
Clears the 'dataType' field, the 'has' method for this field will now return false
-
clearResponseFormat
public void clearResponseFormat()
Clears the 'responseFormat' field, the 'has' method for this field will now return false
-
clearVasData
public void clearVasData()
Clears the 'vasData' field, the 'has' method for this field will now return false
-
clearProtocolId
public void clearProtocolId()
Clears the 'protocolId' field, the 'has' method for this field will now return false
-
clearMerchantId
public void clearMerchantId()
Clears the 'merchantId' 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 VasPayloadElement copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(VasPayloadElement src)
Copy all the changed fields from the given source to this instance.
-
-