Package com.adyen.model.management
Class CustomNotification
- java.lang.Object
-
- com.adyen.model.management.CustomNotification
-
public class CustomNotification extends Object
CustomNotification
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCustomNotification.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_AMOUNTstatic StringSERIALIZED_NAME_EVENT_CODEstatic StringSERIALIZED_NAME_EVENT_DATEstatic StringSERIALIZED_NAME_MERCHANT_REFERENCEstatic StringSERIALIZED_NAME_PAYMENT_METHODstatic StringSERIALIZED_NAME_REASONstatic StringSERIALIZED_NAME_SUCCESS
-
Constructor Summary
Constructors Constructor Description CustomNotification()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomNotificationamount(Amount amount)booleanequals(Object o)CustomNotificationeventCode(String eventCode)CustomNotificationeventDate(OffsetDateTime eventDate)static CustomNotificationfromJson(String jsonString)Create an instance of CustomNotification given an JSON stringAmountgetAmount()Get amountStringgetEventCode()The event that caused the notification to be sent.Currently supported values: * **AUTHORISATION** * **CANCELLATION** * **REFUND** * **CAPTURE** * **DEACTIVATE_RECURRING** * **REPORT_AVAILABLE** * **CHARGEBACK** * **REQUEST_FOR_INFORMATION** * **NOTIFICATION_OF_CHARGEBACK** * **NOTIFICATIONTEST** * **ORDER_OPENED** * **ORDER_CLOSED** * **CHARGEBACK_REVERSED** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA**OffsetDateTimegetEventDate()The time of the event.StringgetMerchantReference()Your reference for the custom test notification.StringgetPaymentMethod()The payment method for the payment that the notification is about.StringgetReason()A descripton of what caused the notification.BooleangetSuccess()The outcome of the event which the notification is about.inthashCode()CustomNotificationmerchantReference(String merchantReference)CustomNotificationpaymentMethod(String paymentMethod)CustomNotificationreason(String reason)voidsetAmount(Amount amount)voidsetEventCode(String eventCode)voidsetEventDate(OffsetDateTime eventDate)voidsetMerchantReference(String merchantReference)voidsetPaymentMethod(String paymentMethod)voidsetReason(String reason)voidsetSuccess(Boolean success)CustomNotificationsuccess(Boolean success)StringtoJson()Convert an instance of CustomNotification 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_AMOUNT
public static final String SERIALIZED_NAME_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_EVENT_CODE
public static final String SERIALIZED_NAME_EVENT_CODE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_EVENT_DATE
public static final String SERIALIZED_NAME_EVENT_DATE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MERCHANT_REFERENCE
public static final String SERIALIZED_NAME_MERCHANT_REFERENCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PAYMENT_METHOD
public static final String SERIALIZED_NAME_PAYMENT_METHOD
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REASON
public static final String SERIALIZED_NAME_REASON
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SUCCESS
public static final String SERIALIZED_NAME_SUCCESS
- See Also:
- Constant Field Values
-
-
Method Detail
-
amount
public CustomNotification amount(Amount amount)
-
getAmount
public Amount getAmount()
Get amount- Returns:
- amount
-
setAmount
public void setAmount(Amount amount)
-
eventCode
public CustomNotification eventCode(String eventCode)
-
getEventCode
public String getEventCode()
The event that caused the notification to be sent.Currently supported values: * **AUTHORISATION** * **CANCELLATION** * **REFUND** * **CAPTURE** * **DEACTIVATE_RECURRING** * **REPORT_AVAILABLE** * **CHARGEBACK** * **REQUEST_FOR_INFORMATION** * **NOTIFICATION_OF_CHARGEBACK** * **NOTIFICATIONTEST** * **ORDER_OPENED** * **ORDER_CLOSED** * **CHARGEBACK_REVERSED** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA**- Returns:
- eventCode
-
setEventCode
public void setEventCode(String eventCode)
-
eventDate
public CustomNotification eventDate(OffsetDateTime eventDate)
-
getEventDate
public OffsetDateTime getEventDate()
The time of the event. Format: [ISO 8601](http://www.w3.org/TR/NOTE-datetime), YYYY-MM-DDThh:mm:ssTZD.- Returns:
- eventDate
-
setEventDate
public void setEventDate(OffsetDateTime eventDate)
-
merchantReference
public CustomNotification merchantReference(String merchantReference)
-
getMerchantReference
public String getMerchantReference()
Your reference for the custom test notification.- Returns:
- merchantReference
-
setMerchantReference
public void setMerchantReference(String merchantReference)
-
paymentMethod
public CustomNotification paymentMethod(String paymentMethod)
-
getPaymentMethod
public String getPaymentMethod()
The payment method for the payment that the notification is about. Possible values: * **amex** * **visa** * **mc** * **maestro** * **bcmc** * **paypal** * **sms** * **bankTransfer_NL** * **bankTransfer_DE** * **bankTransfer_BE** * **ideal** * **elv** * **sepadirectdebit**- Returns:
- paymentMethod
-
setPaymentMethod
public void setPaymentMethod(String paymentMethod)
-
reason
public CustomNotification reason(String reason)
-
getReason
public String getReason()
A descripton of what caused the notification.- Returns:
- reason
-
setReason
public void setReason(String reason)
-
success
public CustomNotification success(Boolean success)
-
getSuccess
public Boolean getSuccess()
The outcome of the event which the notification is about. Set to either **true** or **false**.- Returns:
- success
-
setSuccess
public void setSuccess(Boolean success)
-
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 CustomNotification
-
fromJson
public static CustomNotification fromJson(String jsonString) throws IOException
Create an instance of CustomNotification given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CustomNotification
- Throws:
IOException- if the JSON string is invalid with respect to CustomNotification
-
toJson
public String toJson()
Convert an instance of CustomNotification to an JSON string- Returns:
- JSON string
-
-