Package com.clover.sdk.v3.tokens
Class CreateTokenResponse
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.tokens.CreateTokenResponse
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class CreateTokenResponse extends GenericParcelable implements Validator, JSONifiable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CreateTokenResponse.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<CreateTokenResponse>
CREATOR
static JSONifiable.Creator<CreateTokenResponse>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description CreateTokenResponse()
Constructs a new empty instance.protected
CreateTokenResponse(boolean noInit)
Constructs a new empty instance.CreateTokenResponse(CreateTokenResponse src)
Constructs a new instance that is a deep copy of the source instance.CreateTokenResponse(String json)
Constructs a new instance from the given JSON String.CreateTokenResponse(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
clearAch()
Clears the 'ach' field, the 'has' method for this field will now return falsevoid
clearCard()
Clears the 'card' field, the 'has' method for this field will now return falsevoid
clearClientIp()
Clears the 'client_ip' field, the 'has' method for this field will now return falsevoid
clearCreated()
Clears the 'created' field, the 'has' method for this field will now return falsevoid
clearId()
Clears the 'id' field, the 'has' method for this field will now return falsevoid
clearLivemode()
Clears the 'livemode' field, the 'has' method for this field will now return falsevoid
clearObject()
Clears the 'object' field, the 'has' method for this field will now return falsevoid
clearType()
Clears the 'type' field, the 'has' method for this field will now return falsevoid
clearUsed()
Clears the 'used' field, the 'has' method for this field will now return falsevoid
clearWallet()
Clears the 'wallet' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.CreateTokenResponse
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.Ach
getAch()
ACH (Connect Pay) details, meta data of the ACH tokenizedCard
getCard()
card details, meta data of the card tokenizedString
getClientIp()
IP address of the client that generated the token.Long
getCreated()
Time at which the object was created.protected GenericClient
getGenericClient()
String
getId()
identifier for requestJSONObject
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.Boolean
getLivemode()
Has the value true if the object exists in live mode or the value false if the object exists in test mode.String
getObject()
token value, expired after configured time null if error occurredString
getType()
Type of the token: account, bank_account, card, or pii.Boolean
getUsed()
Whether this token has already been used (tokens can be used only once).Wallet
getWallet()
wallet details (apple or google pay), meta data of the wallet tokenizedboolean
hasAch()
Checks whether the 'ach' field has been set, however the value could be nullboolean
hasCard()
Checks whether the 'card' field has been set, however the value could be nullboolean
hasClientIp()
Checks whether the 'client_ip' field has been set, however the value could be nullboolean
hasCreated()
Checks whether the 'created' field has been set, however the value could be nullboolean
hasId()
Checks whether the 'id' field has been set, however the value could be nullboolean
hasLivemode()
Checks whether the 'livemode' field has been set, however the value could be nullboolean
hasObject()
Checks whether the 'object' field has been set, however the value could be nullboolean
hasType()
Checks whether the 'type' field has been set, however the value could be nullboolean
hasUsed()
Checks whether the 'used' field has been set, however the value could be nullboolean
hasWallet()
Checks whether the 'wallet' field has been set, however the value could be nullboolean
isNotNullAch()
Checks whether the 'ach' field is set and is not nullboolean
isNotNullCard()
Checks whether the 'card' field is set and is not nullboolean
isNotNullClientIp()
Checks whether the 'client_ip' field is set and is not nullboolean
isNotNullCreated()
Checks whether the 'created' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullLivemode()
Checks whether the 'livemode' field is set and is not nullboolean
isNotNullObject()
Checks whether the 'object' field is set and is not nullboolean
isNotNullType()
Checks whether the 'type' field is set and is not nullboolean
isNotNullUsed()
Checks whether the 'used' field is set and is not nullboolean
isNotNullWallet()
Checks whether the 'wallet' field is set and is not nullvoid
mergeChanges(CreateTokenResponse 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.CreateTokenResponse
setAch(Ach ach)
Sets the field 'ach'.CreateTokenResponse
setCard(Card card)
Sets the field 'card'.CreateTokenResponse
setClientIp(String client_ip)
Sets the field 'client_ip'.CreateTokenResponse
setCreated(Long created)
Sets the field 'created'.CreateTokenResponse
setId(String id)
Sets the field 'id'.CreateTokenResponse
setLivemode(Boolean livemode)
Sets the field 'livemode'.CreateTokenResponse
setObject(String object)
Sets the field 'object'.CreateTokenResponse
setType(String type)
Sets the field 'type'.CreateTokenResponse
setUsed(Boolean used)
Sets the field 'used'.CreateTokenResponse
setWallet(Wallet wallet)
Sets the field 'wallet'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<CreateTokenResponse> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<CreateTokenResponse> JSON_CREATOR
-
-
Constructor Detail
-
CreateTokenResponse
public CreateTokenResponse()
Constructs a new empty instance.
-
CreateTokenResponse
protected CreateTokenResponse(boolean noInit)
Constructs a new empty instance.
-
CreateTokenResponse
public CreateTokenResponse(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
CreateTokenResponse
public CreateTokenResponse(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.
-
CreateTokenResponse
public CreateTokenResponse(CreateTokenResponse src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getId
public String getId()
identifier for request
-
getObject
public String getObject()
token value, expired after configured time null if error occurred
-
getCard
public Card getCard()
card details, meta data of the card tokenized
-
getWallet
public Wallet getWallet()
wallet details (apple or google pay), meta data of the wallet tokenized
-
getAch
public Ach getAch()
ACH (Connect Pay) details, meta data of the ACH tokenized
-
getClientIp
public String getClientIp()
IP address of the client that generated the token.
-
getCreated
public Long getCreated()
Time at which the object was created. Measured in seconds since the Unix epoch.
-
getLivemode
public Boolean getLivemode()
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
-
getType
public String getType()
Type of the token: account, bank_account, card, or pii.
-
getUsed
public Boolean getUsed()
Whether this token has already been used (tokens can be used only once).
-
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
-
isNotNullId
public boolean isNotNullId()
Checks whether the 'id' field is set and is not null
-
isNotNullObject
public boolean isNotNullObject()
Checks whether the 'object' field is set and is not null
-
isNotNullCard
public boolean isNotNullCard()
Checks whether the 'card' field is set and is not null
-
isNotNullWallet
public boolean isNotNullWallet()
Checks whether the 'wallet' field is set and is not null
-
isNotNullAch
public boolean isNotNullAch()
Checks whether the 'ach' field is set and is not null
-
isNotNullClientIp
public boolean isNotNullClientIp()
Checks whether the 'client_ip' field is set and is not null
-
isNotNullCreated
public boolean isNotNullCreated()
Checks whether the 'created' field is set and is not null
-
isNotNullLivemode
public boolean isNotNullLivemode()
Checks whether the 'livemode' field is set and is not null
-
isNotNullType
public boolean isNotNullType()
Checks whether the 'type' field is set and is not null
-
isNotNullUsed
public boolean isNotNullUsed()
Checks whether the 'used' field is set and is not null
-
hasId
public boolean hasId()
Checks whether the 'id' field has been set, however the value could be null
-
hasObject
public boolean hasObject()
Checks whether the 'object' field has been set, however the value could be null
-
hasCard
public boolean hasCard()
Checks whether the 'card' field has been set, however the value could be null
-
hasWallet
public boolean hasWallet()
Checks whether the 'wallet' field has been set, however the value could be null
-
hasAch
public boolean hasAch()
Checks whether the 'ach' field has been set, however the value could be null
-
hasClientIp
public boolean hasClientIp()
Checks whether the 'client_ip' field has been set, however the value could be null
-
hasCreated
public boolean hasCreated()
Checks whether the 'created' field has been set, however the value could be null
-
hasLivemode
public boolean hasLivemode()
Checks whether the 'livemode' field has been set, however the value could be null
-
hasType
public boolean hasType()
Checks whether the 'type' field has been set, however the value could be null
-
hasUsed
public boolean hasUsed()
Checks whether the 'used' field has been set, however the value could be null
-
setId
public CreateTokenResponse setId(String id)
Sets the field 'id'.
-
setObject
public CreateTokenResponse setObject(String object)
Sets the field 'object'.
-
setCard
public CreateTokenResponse setCard(Card card)
Sets the field 'card'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setWallet
public CreateTokenResponse setWallet(Wallet wallet)
Sets the field 'wallet'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setAch
public CreateTokenResponse setAch(Ach ach)
Sets the field 'ach'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setClientIp
public CreateTokenResponse setClientIp(String client_ip)
Sets the field 'client_ip'.
-
setCreated
public CreateTokenResponse setCreated(Long created)
Sets the field 'created'.
-
setLivemode
public CreateTokenResponse setLivemode(Boolean livemode)
Sets the field 'livemode'.
-
setType
public CreateTokenResponse setType(String type)
Sets the field 'type'.
-
setUsed
public CreateTokenResponse setUsed(Boolean used)
Sets the field 'used'.
-
clearId
public void clearId()
Clears the 'id' field, the 'has' method for this field will now return false
-
clearObject
public void clearObject()
Clears the 'object' field, the 'has' method for this field will now return false
-
clearCard
public void clearCard()
Clears the 'card' field, the 'has' method for this field will now return false
-
clearWallet
public void clearWallet()
Clears the 'wallet' field, the 'has' method for this field will now return false
-
clearAch
public void clearAch()
Clears the 'ach' field, the 'has' method for this field will now return false
-
clearClientIp
public void clearClientIp()
Clears the 'client_ip' field, the 'has' method for this field will now return false
-
clearCreated
public void clearCreated()
Clears the 'created' field, the 'has' method for this field will now return false
-
clearLivemode
public void clearLivemode()
Clears the 'livemode' field, the 'has' method for this field will now return false
-
clearType
public void clearType()
Clears the 'type' field, the 'has' method for this field will now return false
-
clearUsed
public void clearUsed()
Clears the 'used' 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 CreateTokenResponse copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(CreateTokenResponse src)
Copy all the changed fields from the given source to this instance.
-
-