Class CreditCard
java.lang.Object
com.aoindustries.aoserv.client.AoservObject<Integer,CreditCard>
com.aoindustries.aoserv.client.CachedObject<Integer,CreditCard>
com.aoindustries.aoserv.client.CachedObjectIntegerKey<CreditCard>
com.aoindustries.aoserv.client.payment.CreditCard
- All Implemented Interfaces:
Streamable
,StreamReadable
,StreamWritable
,Row
,AoservReadable
,AoservStreamable
,AoservWritable
,Removable
,SingleTableObject<Integer,
CreditCard>
A
CreditCard
stores credit card information.- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkey
Fields inherited from class com.aoindustries.aoserv.client.CachedObject
table
Fields inherited from class com.aoindustries.aoserv.client.AoservObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE
-
Constructor Summary
ConstructorDescriptionDeprecated.Only required for implementation, do not use directly. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Flags a card as declined.Lists the reasons an object may not be removed.static String
getCardInfo
(String cardNumber) Deprecated.Please usecom.aoapps.payments.CreditCard#maskCardNumber(String)
instead.getCardNumber
(String passphrase) Gets the card number ornull
if not stored.getCity()
protected Object
getColumnImpl
(int i) Gets the processor that is storing the credit card numbers.getEmail()
getFax()
Gets the application-specific grouping for this credit card.int
getId()
boolean
getPhone()
Gets the application-provided principal name that stored this credit card.Gets the unique identifier that represents the CISP - compliant storage mechanism for the card number and expiration date.getState()
boolean
void
Initializes this object from the raw database contents.void
Reactivates a credit card.void
read
(StreamableInput in, AoservProtocol.Version protocolVersion) void
remove()
Removes this object, and all dependant objects, from the system.AoservObject.toString()
implementation that is allowed to throw exceptions.void
update
(String cardInfo, String firstName, String lastName, String companyName, Email email, String phone, String fax, String customerId, String customerTaxId, String streetAddress1, String streetAddress2, String city, String state, String postalCode, CountryCode countryCode, String description) Updates the credit card information (not including the card number or expiration).void
updateCardExpiration
(byte expirationMonth, short expirationYear) Updates the credit card expiration.void
updateCardNumberAndExpiration
(String maskedCardNumber, String cardNumber, byte expirationMonth, short expirationYear) Updates the credit card number and expiration, including the masked card number.void
write
(StreamableOutput out, AoservProtocol.Version protocolVersion) Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode
Methods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTable
Methods inherited from class com.aoindustries.aoserv.client.AoservObject
compare, compare, compare, compare, compareIgnoreCaseConsistentWithEquals, compareTo, compareTo, compareTo, getAccountingCode, getColumn, getColumns, getColumns, getDomainLabel, getDomainLabels, getDomainName, getDto, getEmail, getGecos, getGroupId, getHashedKey, getHashedPassword, getHostname, getInetAddress, getLinuxId, getLinuxUserName, getMacAddress, getMysqlDatabaseName, getMysqlServerName, getMysqlUserName, getPort, getPostgresDatabaseName, getPostgresServerName, getPostgresUserId, getTableSchema, getTimeMillis, getTimeMillis, getUnixPath, getUserId, read, toString, write
-
Constructor Details
-
CreditCard
Deprecated.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
getCannotRemoveReasons
Description copied from interface:Removable
Lists the reasons an object may not be removed.- Specified by:
getCannotRemoveReasons
in interfaceRemovable
- Returns:
- an empty
List<CannotRemoveReason>
if this object may be removed, or a list of descriptions
-
declined
Flags a card as declined.- Throws:
IOException
SQLException
-
getId
public int getId() -
getCreditCardProcessor
Gets the processor that is storing the credit card numbers.- Throws:
SQLException
IOException
-
getAccount_name
-
getAccount
- Throws:
SQLException
IOException
-
getGroupName
Gets the application-specific grouping for this credit card. -
getCardInfo
-
getExpirationMonth
-
getExpirationYear
-
getProviderUniqueId
Gets the unique identifier that represents the CISP - compliant storage mechanism for the card number and expiration date. -
getCardInfo
Deprecated.Please usecom.aoapps.payments.CreditCard#maskCardNumber(String)
instead.Gets the default card info for a credit card number. -
getColumnImpl
- Specified by:
getColumnImpl
in classAoservObject<Integer,
CreditCard>
-
getFirstName
-
getLastName
-
getCompanyName
-
getEmail
-
getPhone
-
getFax
-
getCustomerId
-
getCustomerTaxId
-
getStreetAddress1
-
getStreetAddress2
-
getCity
-
getState
-
getPostalCode
-
getCountryCode
- Throws:
SQLException
IOException
-
getCreated
-
getCreatedBy
- Throws:
SQLException
IOException
-
getPrincipalName
Gets the application-provided principal name that stored this credit card. -
getDeactivatedOn
-
getDeactivatedOnString
-
getDeactivateReason
-
getDescription
-
getEncryptionCardNumberFrom
- Throws:
SQLException
IOException
-
getEncryptionCardNumberRecipient
- Throws:
SQLException
IOException
-
getTableId
- Specified by:
getTableId
in classAoservObject<Integer,
CreditCard>
-
init
Description copied from class:AoservObject
Initializes this object from the raw database contents.- Specified by:
init
in classAoservObject<Integer,
CreditCard> - Parameters:
result
- theResultSet
containing the row to copy into this object- Throws:
SQLException
-
getIsActive
public boolean getIsActive() -
read
- Specified by:
read
in interfaceAoservReadable
- Specified by:
read
in interfaceAoservStreamable
- Specified by:
read
in classAoservObject<Integer,
CreditCard> - Throws:
IOException
-
remove
Description copied from interface:Removable
Removes this object, and all dependant objects, from the system.- Specified by:
remove
in interfaceRemovable
- Throws:
IOException
SQLException
-
toStringImpl
Description copied from class:AoservObject
AoservObject.toString()
implementation that is allowed to throw exceptions.Implementation Note:
This default implementation callsAoservObject.toString()
on the key (fromAoservObject.getKey()
). When the key isnull
, uses the default implementation fromObject.toString()
.- Overrides:
toStringImpl
in classCachedObjectIntegerKey<CreditCard>
-
getUseMonthly
public boolean getUseMonthly() -
write
- Specified by:
write
in interfaceAoservStreamable
- Specified by:
write
in interfaceAoservWritable
- Specified by:
write
in classAoservObject<Integer,
CreditCard> - Throws:
IOException
-
update
public void update(String cardInfo, String firstName, String lastName, String companyName, Email email, String phone, String fax, String customerId, String customerTaxId, String streetAddress1, String streetAddress2, String city, String state, String postalCode, CountryCode countryCode, String description) throws IOException, SQLException Updates the credit card information (not including the card number or expiration).- Throws:
IOException
SQLException
-
updateCardNumberAndExpiration
public void updateCardNumberAndExpiration(String maskedCardNumber, String cardNumber, byte expirationMonth, short expirationYear) throws IOException, SQLException Updates the credit card number and expiration, including the masked card number. Encrypts the data if the processors has been configured to store card encrypted in the master database.- Throws:
IOException
SQLException
-
updateCardExpiration
public void updateCardExpiration(byte expirationMonth, short expirationYear) throws IOException, SQLException Updates the credit card expiration. Encrypts the data if the processors has been configured to store card encrypted in the master database.- Throws:
IOException
SQLException
-
reactivate
Reactivates a credit card.- Throws:
IOException
SQLException
-
getCardNumber
Gets the card number ornull
if not stored.- Throws:
IOException
SQLException
-