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
pkeyFields inherited from class com.aoindustries.aoserv.client.CachedObject
tableFields inherited from class com.aoindustries.aoserv.client.AoservObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Only required for implementation, do not use directly. -
Method Summary
Modifier and TypeMethodDescriptionvoidFlags a card as declined.Lists the reasons an object may not be removed.static StringgetCardInfo(String cardNumber) Deprecated.Please usecom.aoapps.payments.CreditCard#maskCardNumber(String)instead.getCardNumber(String passphrase) Gets the card number ornullif not stored.getCity()protected ObjectgetColumnImpl(int i) Gets the processor that is storing the credit card numbers.getEmail()getFax()Gets the application-specific grouping for this credit card.intgetId()booleangetPhone()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()booleanvoidInitializes this object from the raw database contents.voidReactivates a credit card.voidread(StreamableInput in, AoservProtocol.Version protocolVersion) voidremove()Removes this object, and all dependant objects, from the system.AoservObject.toString()implementation that is allowed to throw exceptions.voidupdate(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).voidupdateCardExpiration(byte expirationMonth, short expirationYear) Updates the credit card expiration.voidupdateCardNumberAndExpiration(String maskedCardNumber, String cardNumber, byte expirationMonth, short expirationYear) Updates the credit card number and expiration, including the masked card number.voidwrite(StreamableOutput out, AoservProtocol.Version protocolVersion) Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCodeMethods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTableMethods 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, for removal: This API element is subject to removal in a future version.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
getCannotRemoveReasons
Description copied from interface:RemovableLists the reasons an object may not be removed.- Specified by:
getCannotRemoveReasonsin interfaceRemovable- Returns:
- an empty
List<CannotRemoveReason>if this object may be removed, or a list of descriptions
-
declined
Flags a card as declined.- Throws:
IOExceptionSQLException
-
getId
public int getId() -
getCreditCardProcessor
Gets the processor that is storing the credit card numbers.- Throws:
SQLExceptionIOException
-
getAccount_name
-
getAccount
- Throws:
SQLExceptionIOException
-
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:
getColumnImplin classAoservObject<Integer,CreditCard>
-
getFirstName
-
getLastName
-
getCompanyName
-
getEmail
-
getPhone
-
getFax
-
getCustomerId
-
getCustomerTaxId
-
getStreetAddress1
-
getStreetAddress2
-
getCity
-
getState
-
getPostalCode
-
getCountryCode
- Throws:
SQLExceptionIOException
-
getCreated
-
getCreatedBy
- Throws:
SQLExceptionIOException
-
getPrincipalName
Gets the application-provided principal name that stored this credit card. -
getDeactivatedOn
-
getDeactivatedOnString
-
getDeactivateReason
-
getDescription
-
getEncryptionCardNumberFrom
- Throws:
SQLExceptionIOException
-
getEncryptionCardNumberRecipient
- Throws:
SQLExceptionIOException
-
getTableId
- Specified by:
getTableIdin classAoservObject<Integer,CreditCard>
-
init
Description copied from class:AoservObjectInitializes this object from the raw database contents.- Specified by:
initin classAoservObject<Integer,CreditCard> - Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
getIsActive
public boolean getIsActive() -
read
- Specified by:
readin interfaceAoservReadable- Specified by:
readin interfaceAoservStreamable- Specified by:
readin classAoservObject<Integer,CreditCard> - Throws:
IOException
-
remove
Description copied from interface:RemovableRemoves this object, and all dependant objects, from the system.- Specified by:
removein interfaceRemovable- Throws:
IOExceptionSQLException
-
toStringImpl
Description copied from class:AoservObjectAoservObject.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:
toStringImplin classCachedObjectIntegerKey<CreditCard>
-
getUseMonthly
public boolean getUseMonthly() -
write
- Specified by:
writein interfaceAoservStreamable- Specified by:
writein interfaceAoservWritable- Specified by:
writein 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:
IOExceptionSQLException
-
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:
IOExceptionSQLException
-
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:
IOExceptionSQLException
-
reactivate
Reactivates a credit card.- Throws:
IOExceptionSQLException
-
getCardNumber
Gets the card number ornullif not stored.- Throws:
IOExceptionSQLException
-
