CustomerSession
class CustomerSession
Represents a logged-in session of a single Customer.
Types
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface RetrievalListener
Link copied to clipboard
Functions
Link copied to clipboard
fun addCustomerSource(sourceId: String, sourceType: String, listener: CustomerSession.SourceRetrievalListener)
Add the Source to the current customer.
Link copied to clipboard
fun attachPaymentMethod(paymentMethodId: String, listener: CustomerSession.PaymentMethodRetrievalListener)
Attaches a PaymentMethod to a customer.
Link copied to clipboard
Delete the Source from the current customer.
Link copied to clipboard
fun detachPaymentMethod(paymentMethodId: String, listener: CustomerSession.PaymentMethodRetrievalListener)
Detaches a PaymentMethod from a customer.
Link copied to clipboard
fun getPaymentMethods(paymentMethodType: PaymentMethod.Type, listener: CustomerSession.PaymentMethodsRetrievalListener)
fun getPaymentMethods(paymentMethodType: PaymentMethod.Type, @IntRange(from = 1, to = 100) limit: Int?, endingBefore: String? = null, startingAfter: String? = null, listener: CustomerSession.PaymentMethodsRetrievalListener)
Retrieves all of the customer's PaymentMethod objects, filtered by a PaymentMethod.Type.
Link copied to clipboard
Link copied to clipboard
fun setCustomerDefaultSource(sourceId: String, sourceType: String, listener: CustomerSession.CustomerRetrievalListener)
Set the default Source of the current customer.
Link copied to clipboard
fun setCustomerShippingInformation(shippingInformation: ShippingInformation, listener: CustomerSession.CustomerRetrievalListener)
Set the shipping information on the current customer.
Link copied to clipboard
Force an update of the current customer, regardless of how much time has passed.