public final class PaymentCardEntity extends Entity
A payment card entity extracted from a piece of text. It provides the network the card belongs to and a canonical format for the card number.
Nested Class Summary
@interface | PaymentCardEntity.PaymentCardNetwork | The list of supported payment card networks that could be detected (e.g. |
Constant Summary
int | CARD_AMEX | |
int | CARD_DINERS_CLUB | |
int | CARD_DISCOVER | |
int | CARD_INTER_PAYMENT | |
int | CARD_JCB | |
int | CARD_MAESTRO | |
int | CARD_MASTERCARD | |
int | CARD_MIR | |
int | CARD_TROY | |
int | CARD_UNIONPAY | |
int | CARD_UNKNOWN | |
int | CARD_VISA |
Inherited Constant Summary
int | TYPE_ADDRESS | Identifies a physical address. |
int | TYPE_DATE_TIME | Identifies a time reference that includes a specific time. |
int | TYPE_EMAIL | Identifies an e-mail address. |
int | TYPE_FLIGHT_NUMBER | Identifies a flight number in IATA format. |
int | TYPE_IBAN | Identifies an International Bank Account Number (IBAN). |
int | TYPE_ISBN | Identifies an International Standard Book Number (ISBN). |
int | TYPE_MONEY | Identifies an amount of money. |
int | TYPE_PAYMENT_CARD | Identifies a payment card. |
int | TYPE_PHONE | Identifies a phone number. |
int | TYPE_TRACKING_NUMBER | Identifies a shipment tracking number. |
int | TYPE_URL | Identifies a URL. |
Public Method Summary
int |
getPaymentCardNetwork()
Returns the payment card network (e.g.
|
String |
getPaymentCardNumber()
Returns the payment card number detected for this entity but canonically
formatted.
|
Inherited Method Summary
DateTimeEntity |
asDateTimeEntity()
Convenience method that returns the current entity cast to a
DateTimeEntity.
|
FlightNumberEntity |
asFlightNumberEntity()
Convenience method that returns the current entity cast to a
FlightNumberEntity.
|
IbanEntity |
asIbanEntity()
Convenience method that returns the current entity cast to a IbanEntity.
|
IsbnEntity |
asIsbnEntity()
Convenience method that returns the current entity cast to a IsbnEntity.
|
MoneyEntity |
asMoneyEntity()
Convenience method that returns the current entity cast to a MoneyEntity.
|
PaymentCardEntity |
asPaymentCardEntity()
Convenience method that returns the current entity cast to a
PaymentCardEntity.
|
TrackingNumberEntity |
asTrackingNumberEntity()
Convenience method that returns the current entity cast to a
TrackingNumberEntity.
|
int |
getType()
Returns the type(e.g.
|
String |
toString()
|
Constants
public static final int CARD_AMEX
Constant Value: 1
public static final int CARD_DINERS_CLUB
Constant Value: 2
public static final int CARD_DISCOVER
Constant Value: 3
public static final int CARD_INTER_PAYMENT
Constant Value: 4
public static final int CARD_JCB
Constant Value: 5
public static final int CARD_MAESTRO
Constant Value: 6
public static final int CARD_MASTERCARD
Constant Value: 7
public static final int CARD_MIR
Constant Value: 8
public static final int CARD_TROY
Constant Value: 9
public static final int CARD_UNIONPAY
Constant Value: 10
public static final int CARD_UNKNOWN
Constant Value: 0
public static final int CARD_VISA
Constant Value: 11
Public Methods
public int getPaymentCardNetwork ()
Returns the payment card network (e.g.
CARD_AMEX
) detected for this entity.
public String getPaymentCardNumber ()
Returns the payment card number detected for this entity but canonically formatted.