ReceiptDeliveryMethodEvent.java
Last updated: 25-Jun-2024
namespace payment_sdk
class ReceiptDeliveryMethodEvent
- Contains the selected delivery method and, if relevant, the input value when asking the customer to select from a list of receipt delivery options.
Public Functions
String getMessage()
- A user-readable message. This message may not be localized, in which case the type field should be used for determining a localized message.
String getSessionId()
- Get the session ID for the session which triggered this event.
String getType()
- The type of status. This will generally be SUCCESS for a status of 0, and contain a different type for other errors. For example, in a refund or void, it is possible to receive type TRANSACTION_NOT_FOUND. This may be used for localizing the specific messages as needed
int getStatus()
- Get the status for this particular event. A status of 0 means success, any other status is a failure.
StatusInformation getStatusInformation()
- Get the detailed Status Information StatusInformation.
String getEventId()
- Returns the event ID associated with this event. Useful for matching the event received by the listener to the original status returned when issuing the call, for example, calling TransactionManager#reprintReceipt(Payment) returns a CommerceEvent containing an event ID, which will match the event ID received by the CommerceListener when the receipt reprint is complete.
String getInvoiceId()
- The invoice ID for the transaction as a reference.
Transaction getTransaction()
- The transaction associated with this event.
TransactionEventResponse generateTransactionEventResponse()
- Generate transaction event response for the current event.
- Returns: empty response when a standard transaction event. Child classes may implement appropriate responses as needed.
DeliveryMethod getDeliveryMethod()
- Get the delivery method as selected by the customer. Refer to Receipt for more information.
String getCustomerPhoneNumber()
- Get the phone number in the case of the SMS delivery method, or null otherwise.
String getCustomerEmail()
- Get the email address in the case of the EMAIL delivery method, or null otherwise
boolean hasValueForType()
- Check for delivery method has value of type EMAIL/SMS.
Public Static Attributes
static final String TYPE
- Receipt delivery method event type.
Rate this article: