Enum Error
- java.lang.Object
-
- java.lang.Enum<Error>
-
- aero.panasonic.inflight.services.paymentclient.v1.error.Error
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ERROR_AUTHORIZATION_ERRORService Authorization ErrorERROR_BAD_REQUESTBad request error.ERROR_BAD_RESPONSEBad responseERROR_CONNECTION_ERRORConnection Error.ERROR_INTERNAL_ERRORInternal ErrorERROR_INVALID_CARDCard could not be validatedERROR_PURCHASE_DECLINEDPurchase declined.ERROR_PURCHASE_NOT_REQUIREDPurchase not requiredERROR_SERVICE_NOT_FOUNDService not found error.ERROR_UNKNOWNGeneral Server Side error
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetErrorId(Error error)static java.lang.StringgetErrorMessage(Error error)Get details of the error.static ErrorvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Error[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ERROR_BAD_REQUEST
public static final Error ERROR_BAD_REQUEST
Bad request error.
-
ERROR_BAD_RESPONSE
public static final Error ERROR_BAD_RESPONSE
Bad response
-
ERROR_CONNECTION_ERROR
public static final Error ERROR_CONNECTION_ERROR
Connection Error.
-
ERROR_INTERNAL_ERROR
public static final Error ERROR_INTERNAL_ERROR
Internal Error
-
ERROR_SERVICE_NOT_FOUND
public static final Error ERROR_SERVICE_NOT_FOUND
Service not found error.
-
ERROR_UNKNOWN
public static final Error ERROR_UNKNOWN
General Server Side error
-
ERROR_AUTHORIZATION_ERROR
public static final Error ERROR_AUTHORIZATION_ERROR
Service Authorization Error
-
ERROR_PURCHASE_DECLINED
public static final Error ERROR_PURCHASE_DECLINED
Purchase declined. Insufficient funds.
This could also be thrown if purchase has been invoked before initiating the payment.
-
ERROR_PURCHASE_NOT_REQUIRED
public static final Error ERROR_PURCHASE_NOT_REQUIRED
Purchase not required
-
ERROR_INVALID_CARD
public static final Error ERROR_INVALID_CARD
Card could not be validated
-
-
Method Detail
-
values
public static Error[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Error c : Error.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Error valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getErrorMessage
public static java.lang.String getErrorMessage(Error error)
Get details of the error.- Parameters:
error-Error-PaymentError object.- Returns:
- A String message with error details.
-
getErrorId
public static int getErrorId(Error error)
-
-