CreditCardManager

Manages credit card operations.

Properties

Link copied to clipboard

Determines the appropriate oauth token for any given query. This can be either the access token or the user token. Default behavior is to return the user token if available and fall back to the access token if not. Order of precedence:

Link copied to clipboard
Link copied to clipboard

A list of the user's saved credit cards.

Link copied to clipboard

Used to control manager's synchronous state. Default is asynchronous

Link copied to clipboard

Token that is used a single time. Once used, it should be set to null

Functions

Link copied to clipboard
fun addCreditCard(creditCard: CreditCard, customerId: String? = null, response: Response<CreditCard>? = null)

Adds a new credit card.

Link copied to clipboard
fun deleteCreditCard(creditCard: CreditCard, response: Response<Any?>? = null)

Deletes a credit card.

Link copied to clipboard
fun getAvailableHMACToken(key: String, timeStamp: String?, body: String): String

Calcualtes the HMAC token and appends it to the appropriate token for more security

Link copied to clipboard
fun makeCreditCardDefault(creditCard: CreditCard, customerId: String? = AuthManager.customerId, response: Response<Any?>? = null)

Makes a credit card the default payment method

Link copied to clipboard
fun retrieveCreditCards(customerId: String, response: Response<List<CreditCard>>? = null)

Retrieves the user's saved credit cards.