Package com.clover.sdk.v3.payments
Class ServiceFeeRequest
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.payments.ServiceFeeRequest
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class ServiceFeeRequest 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
ServiceFeeRequest.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<ServiceFeeRequest>
CREATOR
static JSONifiable.Creator<ServiceFeeRequest>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description ServiceFeeRequest()
Constructs a new empty instance.protected
ServiceFeeRequest(boolean noInit)
Constructs a new empty instance.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.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return falsevoid
clearOrderId()
Clears the 'orderId' field, the 'has' method for this field will now return falsevoid
clearSourcePayment()
Clears the 'sourcePayment' field, the 'has' method for this field will now return falsevoid
clearSourcePaymentId()
Clears the 'sourcePaymentId' field, the 'has' method for this field will now return falsevoid
clearVaultedCard()
Clears the 'vaultedCard' field, the 'has' method for this field will now return falseboolean
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 feeprotected 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)Payment
getSourcePayment()
Only required when using auth server Payment object /auth/service_fees/paymentsString
getSourcePaymentId()
Unique identifier of the primary payment the serivce fee is associated withVaultedCard
getVaultedCard()
Vaulted card to use to bill the service feeboolean
hasAmount()
Checks whether the 'amount' field has been set, however the value could be nullboolean
hasOrderId()
Checks whether the 'orderId' field has been set, however the value could be nullboolean
hasSourcePayment()
Checks whether the 'sourcePayment' field has been set, however the value could be nullboolean
hasSourcePaymentId()
Checks whether the 'sourcePaymentId' field has been set, however the value could be nullboolean
hasVaultedCard()
Checks whether the 'vaultedCard' field has been set, however the value could be nullboolean
isNotNullAmount()
Checks whether the 'amount' field is set and is not nullboolean
isNotNullOrderId()
Checks whether the 'orderId' field is set and is not nullboolean
isNotNullSourcePayment()
boolean
isNotNullSourcePaymentId()
Checks whether the 'sourcePaymentId' field is set and is not nullboolean
isNotNullVaultedCard()
Checks whether the 'vaultedCard' field is set and is not nullvoid
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
setSourcePayment(Payment sourcePayment)
Sets the field 'sourcePayment'.ServiceFeeRequest
setSourcePaymentId(String sourcePaymentId)
Sets the field 'sourcePaymentId'.ServiceFeeRequest
setVaultedCard(VaultedCard vaultedCard)
Sets the field 'vaultedCard'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<ServiceFeeRequest> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<ServiceFeeRequest> JSON_CREATOR
-
-
Constructor Detail
-
ServiceFeeRequest
public ServiceFeeRequest()
Constructs a new empty instance.
-
ServiceFeeRequest
protected ServiceFeeRequest(boolean noInit)
Constructs a new empty instance.
-
ServiceFeeRequest
public ServiceFeeRequest(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
ServiceFeeRequest
public 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
public ServiceFeeRequest(ServiceFeeRequest src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getAmount
public Long getAmount()
amount (cents) of the service fee
-
getOrderId
public String getOrderId()
Unique identifier of the order with which this payment is associated (will be auto-populated by client connector)
-
getSourcePaymentId
public String getSourcePaymentId()
Unique identifier of the primary payment the serivce fee is associated with
-
getVaultedCard
public VaultedCard getVaultedCard()
Vaulted card to use to bill the service fee
-
getSourcePayment
public Payment getSourcePayment()
Only required when using auth server Payment object /auth/service_fees/payments
-
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
-
isNotNullAmount
public boolean isNotNullAmount()
Checks whether the 'amount' field is set and is not null
-
isNotNullOrderId
public boolean isNotNullOrderId()
Checks whether the 'orderId' field is set and is not null
-
isNotNullSourcePaymentId
public boolean isNotNullSourcePaymentId()
Checks whether the 'sourcePaymentId' field is set and is not null
-
isNotNullVaultedCard
public boolean isNotNullVaultedCard()
Checks whether the 'vaultedCard' field is set and is not null
-
isNotNullSourcePayment
public boolean isNotNullSourcePayment()
-
hasAmount
public boolean hasAmount()
Checks whether the 'amount' field has been set, however the value could be null
-
hasOrderId
public boolean hasOrderId()
Checks whether the 'orderId' field has been set, however the value could be null
-
hasSourcePaymentId
public boolean hasSourcePaymentId()
Checks whether the 'sourcePaymentId' field has been set, however the value could be null
-
hasVaultedCard
public boolean hasVaultedCard()
Checks whether the 'vaultedCard' field has been set, however the value could be null
-
hasSourcePayment
public boolean hasSourcePayment()
Checks whether the 'sourcePayment' field has been set, however the value could be null
-
setAmount
public ServiceFeeRequest setAmount(Long amount)
Sets the field 'amount'.
-
setOrderId
public ServiceFeeRequest setOrderId(String orderId)
Sets the field 'orderId'.
-
setSourcePaymentId
public ServiceFeeRequest setSourcePaymentId(String sourcePaymentId)
Sets the field 'sourcePaymentId'.
-
setVaultedCard
public ServiceFeeRequest setVaultedCard(VaultedCard vaultedCard)
Sets the field 'vaultedCard'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setSourcePayment
public ServiceFeeRequest setSourcePayment(Payment sourcePayment)
Sets the field 'sourcePayment'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
clearAmount
public void clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return false
-
clearOrderId
public void clearOrderId()
Clears the 'orderId' field, the 'has' method for this field will now return false
-
clearSourcePaymentId
public void clearSourcePaymentId()
Clears the 'sourcePaymentId' field, the 'has' method for this field will now return false
-
clearVaultedCard
public void clearVaultedCard()
Clears the 'vaultedCard' field, the 'has' method for this field will now return false
-
clearSourcePayment
public void clearSourcePayment()
Clears the 'sourcePayment' 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 ServiceFeeRequest copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(ServiceFeeRequest src)
Copy all the changed fields from the given source to this instance.
-
-