public class ServiceFeeRequest extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
ServiceFeeRequest.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<ServiceFeeRequest> |
CREATOR |
static JSONifiable.Creator<ServiceFeeRequest> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
ServiceFeeRequest()
Constructs a new empty instance.
|
protected |
ServiceFeeRequest(boolean noInit)
Constructs a new empty instance.
|
|
ServiceFeeRequest(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.
|
|
ServiceFeeRequest(ServiceFeeRequest src)
Constructs a new instance that is a deep copy of the source instance.
|
|
ServiceFeeRequest(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return false
|
void |
clearOrderId()
Clears the 'orderId' field, the 'has' method for this field will now return false
|
void |
clearSourcePaymentId()
Clears the 'sourcePaymentId' field, the 'has' method for this field will now return false
|
void |
clearVaultedCard()
Clears the 'vaultedCard' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
ServiceFeeRequest |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Long |
getAmount()
amount (cents) of the service fee
|
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 |
getOrderId()
Unique identifier of the order with which this payment is associated (will be auto-populated by client connector)
|
String |
getSourcePaymentId()
Unique identifier of the primary payment the serivce fee is associated with
|
VaultedCard |
getVaultedCard()
Vaulted card to use to bill the service fee
|
boolean |
hasAmount()
Checks whether the 'amount' field has been set, however the value could be null
|
boolean |
hasOrderId()
Checks whether the 'orderId' field has been set, however the value could be null
|
boolean |
hasSourcePaymentId()
Checks whether the 'sourcePaymentId' field has been set, however the value could be null
|
boolean |
hasVaultedCard()
Checks whether the 'vaultedCard' field has been set, however the value could be null
|
boolean |
isNotNullAmount()
Checks whether the 'amount' field is set and is not null
|
boolean |
isNotNullOrderId()
Checks whether the 'orderId' field is set and is not null
|
boolean |
isNotNullSourcePaymentId()
Checks whether the 'sourcePaymentId' field is set and is not null
|
boolean |
isNotNullVaultedCard()
Checks whether the 'vaultedCard' field is set and is not null
|
void |
mergeChanges(ServiceFeeRequest 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.
|
ServiceFeeRequest |
setAmount(Long amount)
Sets the field 'amount'.
|
ServiceFeeRequest |
setOrderId(String orderId)
Sets the field 'orderId'.
|
ServiceFeeRequest |
setSourcePaymentId(String sourcePaymentId)
Sets the field 'sourcePaymentId'.
|
ServiceFeeRequest |
setVaultedCard(VaultedCard vaultedCard)
Sets the field 'vaultedCard'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<ServiceFeeRequest> CREATOR
public static final JSONifiable.Creator<ServiceFeeRequest> JSON_CREATOR
public ServiceFeeRequest()
protected ServiceFeeRequest(boolean noInit)
public ServiceFeeRequest(String json) throws IllegalArgumentException
IllegalArgumentException
public ServiceFeeRequest(JSONObject jsonObject)
public ServiceFeeRequest(ServiceFeeRequest src)
public Long getAmount()
public String getOrderId()
public String getSourcePaymentId()
public VaultedCard getVaultedCard()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullAmount()
public boolean isNotNullOrderId()
public boolean isNotNullSourcePaymentId()
public boolean isNotNullVaultedCard()
public boolean hasAmount()
public boolean hasOrderId()
public boolean hasSourcePaymentId()
public boolean hasVaultedCard()
public ServiceFeeRequest setAmount(Long amount)
public ServiceFeeRequest setOrderId(String orderId)
public ServiceFeeRequest setSourcePaymentId(String sourcePaymentId)
public ServiceFeeRequest setVaultedCard(VaultedCard vaultedCard)
public void clearAmount()
public void clearOrderId()
public void clearSourcePaymentId()
public void clearVaultedCard()
public boolean containsChanges()
public void resetChangeLog()
public ServiceFeeRequest copyChanges()
public void mergeChanges(ServiceFeeRequest src)