Package model
Class CreateReversalRequest
- java.lang.Object
-
- model.CreateReversalRequest
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class CreateReversalRequest extends Object
CreateReversalRequest
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCreateReversalRequest.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_AMOUNTstatic StringSERIALIZED_NAME_CURRENCYstatic StringSERIALIZED_NAME_DEVICEstatic StringSERIALIZED_NAME_OPERATION_KEYstatic StringSERIALIZED_NAME_REFUND_AMOUNTstatic StringSERIALIZED_NAME_TAGS
-
Constructor Summary
Constructors Constructor Description CreateReversalRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateReversalRequestamount(Long amount)CreateReversalRequestcurrency(Currency currency)CreateReversalRequestdevice(String device)booleanequals(Object o)static CreateReversalRequestfromJson(String jsonString)Create an instance of CreateReversalRequest given an JSON stringLonggetAmount()The amount of the sale.CurrencygetCurrency()Get currencyStringgetDevice()The ID of the `Device` used to process the transaction.StringgetOperationKey()Describes the operation to be performed in the transaction.LonggetRefundAmount()The amount of the refund in cents.Map<String,String>getTags()Key value pair for annotating custom meta data (e.g.inthashCode()CreateReversalRequestoperationKey(String operationKey)CreateReversalRequestputTagsItem(String key, String tagsItem)CreateReversalRequestrefundAmount(Long refundAmount)voidsetAmount(Long amount)voidsetCurrency(Currency currency)voidsetDevice(String device)voidsetOperationKey(String operationKey)voidsetRefundAmount(Long refundAmount)voidsetTags(Map<String,String> tags)CreateReversalRequesttags(Map<String,String> tags)StringtoJson()Convert an instance of CreateReversalRequest to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_REFUND_AMOUNT
public static final String SERIALIZED_NAME_REFUND_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TAGS
public static final String SERIALIZED_NAME_TAGS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DEVICE
public static final String SERIALIZED_NAME_DEVICE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_AMOUNT
public static final String SERIALIZED_NAME_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CURRENCY
public static final String SERIALIZED_NAME_CURRENCY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_OPERATION_KEY
public static final String SERIALIZED_NAME_OPERATION_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
refundAmount
public CreateReversalRequest refundAmount(Long refundAmount)
-
getRefundAmount
@Nullable public Long getRefundAmount()
The amount of the refund in cents. It must be equal to or less than the amount of the original `Transfer`.- Returns:
- refundAmount
-
setRefundAmount
public void setRefundAmount(Long refundAmount)
-
tags
public CreateReversalRequest tags(Map<String,String> tags)
-
putTagsItem
public CreateReversalRequest putTagsItem(String key, String tagsItem)
-
getTags
@Nullable public Map<String,String> getTags()
Key value pair for annotating custom meta data (e.g. order numbers).- Returns:
- tags
-
device
public CreateReversalRequest device(String device)
-
getDevice
@Nullable public String getDevice()
The ID of the `Device` used to process the transaction.- Returns:
- device
-
setDevice
public void setDevice(String device)
-
amount
public CreateReversalRequest amount(Long amount)
-
setAmount
public void setAmount(Long amount)
-
currency
public CreateReversalRequest currency(Currency currency)
-
setCurrency
public void setCurrency(Currency currency)
-
operationKey
public CreateReversalRequest operationKey(String operationKey)
-
getOperationKey
@Nullable public String getOperationKey()
Describes the operation to be performed in the transaction. Use **CARD_PRESENT_UNREFERENCED_REFUND** for refunds where the card isn't avalible.- Returns:
- operationKey
-
setOperationKey
public void setOperationKey(String operationKey)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to CreateReversalRequest
-
fromJson
public static CreateReversalRequest fromJson(String jsonString) throws IOException
Create an instance of CreateReversalRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CreateReversalRequest
- Throws:
IOException- if the JSON string is invalid with respect to CreateReversalRequest
-
toJson
public String toJson()
Convert an instance of CreateReversalRequest to an JSON string- Returns:
- JSON string
-
-