Package com.clover.sdk.v3.order
Class OrderRefundRequest
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.order.OrderRefundRequest
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class OrderRefundRequest extends GenericParcelable implements Validator, JSONifiable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
OrderRefundRequest.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<OrderRefundRequest>
CREATOR
static JSONifiable.Creator<OrderRefundRequest>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description OrderRefundRequest()
Constructs a new empty instance.protected
OrderRefundRequest(boolean noInit)
Constructs a new empty instance.OrderRefundRequest(OrderRefundRequest src)
Constructs a new instance that is a deep copy of the source instance.OrderRefundRequest(String json)
Constructs a new instance from the given JSON String.OrderRefundRequest(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
clearIncludeTip()
Clears the 'includeTip' field, the 'has' method for this field will now return falsevoid
clearLineItems()
Clears the 'lineItems' field, the 'has' method for this field will now return falsevoid
clearReason()
Clears the 'reason' field, the 'has' method for this field will now return falsevoid
clearRefunds()
Clears the 'refunds' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.OrderRefundRequest
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.protected GenericClient
getGenericClient()
Boolean
getIncludeTip()
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.List<Reference>
getLineItems()
String
getReason()
Describes the reason for the refundList<Refund>
getRefunds()
boolean
hasIncludeTip()
Checks whether the 'includeTip' field has been set, however the value could be nullboolean
hasLineItems()
Checks whether the 'lineItems' field has been set, however the value could be nullboolean
hasReason()
Checks whether the 'reason' field has been set, however the value could be nullboolean
hasRefunds()
Checks whether the 'refunds' field has been set, however the value could be nullboolean
isNotEmptyLineItems()
Checks whether the 'lineItems' field is set and is not null and is not emptyboolean
isNotEmptyRefunds()
Checks whether the 'refunds' field is set and is not null and is not emptyboolean
isNotNullIncludeTip()
Checks whether the 'includeTip' field is set and is not nullboolean
isNotNullLineItems()
Checks whether the 'lineItems' field is set and is not nullboolean
isNotNullReason()
Checks whether the 'reason' field is set and is not nullboolean
isNotNullRefunds()
Checks whether the 'refunds' field is set and is not nullvoid
mergeChanges(OrderRefundRequest 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.OrderRefundRequest
setIncludeTip(Boolean includeTip)
Sets the field 'includeTip'.OrderRefundRequest
setLineItems(List<Reference> lineItems)
Sets the field 'lineItems'.OrderRefundRequest
setReason(String reason)
Sets the field 'reason'.OrderRefundRequest
setRefunds(List<Refund> refunds)
Sets the field 'refunds'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<OrderRefundRequest> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<OrderRefundRequest> JSON_CREATOR
-
-
Constructor Detail
-
OrderRefundRequest
public OrderRefundRequest()
Constructs a new empty instance.
-
OrderRefundRequest
protected OrderRefundRequest(boolean noInit)
Constructs a new empty instance.
-
OrderRefundRequest
public OrderRefundRequest(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
OrderRefundRequest
public OrderRefundRequest(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.
-
OrderRefundRequest
public OrderRefundRequest(OrderRefundRequest src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getIncludeTip
public Boolean getIncludeTip()
-
getReason
public String getReason()
Describes the reason for the refund
-
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
-
isNotNullRefunds
public boolean isNotNullRefunds()
Checks whether the 'refunds' field is set and is not null
-
isNotEmptyRefunds
public boolean isNotEmptyRefunds()
Checks whether the 'refunds' field is set and is not null and is not empty
-
isNotNullLineItems
public boolean isNotNullLineItems()
Checks whether the 'lineItems' field is set and is not null
-
isNotEmptyLineItems
public boolean isNotEmptyLineItems()
Checks whether the 'lineItems' field is set and is not null and is not empty
-
isNotNullIncludeTip
public boolean isNotNullIncludeTip()
Checks whether the 'includeTip' field is set and is not null
-
isNotNullReason
public boolean isNotNullReason()
Checks whether the 'reason' field is set and is not null
-
hasRefunds
public boolean hasRefunds()
Checks whether the 'refunds' field has been set, however the value could be null
-
hasLineItems
public boolean hasLineItems()
Checks whether the 'lineItems' field has been set, however the value could be null
-
hasIncludeTip
public boolean hasIncludeTip()
Checks whether the 'includeTip' field has been set, however the value could be null
-
hasReason
public boolean hasReason()
Checks whether the 'reason' field has been set, however the value could be null
-
setRefunds
public OrderRefundRequest setRefunds(List<Refund> refunds)
Sets the field 'refunds'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setLineItems
public OrderRefundRequest setLineItems(List<Reference> lineItems)
Sets the field 'lineItems'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setIncludeTip
public OrderRefundRequest setIncludeTip(Boolean includeTip)
Sets the field 'includeTip'.
-
setReason
public OrderRefundRequest setReason(String reason)
Sets the field 'reason'.
-
clearRefunds
public void clearRefunds()
Clears the 'refunds' field, the 'has' method for this field will now return false
-
clearLineItems
public void clearLineItems()
Clears the 'lineItems' field, the 'has' method for this field will now return false
-
clearIncludeTip
public void clearIncludeTip()
Clears the 'includeTip' field, the 'has' method for this field will now return false
-
clearReason
public void clearReason()
Clears the 'reason' 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 OrderRefundRequest copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(OrderRefundRequest src)
Copy all the changed fields from the given source to this instance.
-
-