CustomersAPI

Provides coroutine-based and callback-based methods for managing customers via the Frame API.

Each operation is available in two overloads: a suspend function for use with Kotlin coroutines, and a callback variant for use without coroutines.

Functions

Link copied to clipboard

Blocks a customer, preventing them from completing transactions.

fun blockCustomerWith(customerId: String, completionHandler: (FrameObjects.Customer?, NetworkingError?) -> Unit)

Blocks a customer and delivers the result to a callback.

Link copied to clipboard

Creates a new customer record.

Creates a new customer record and delivers the result to a callback.

Link copied to clipboard

Deletes a customer record by their unique identifier.

fun deleteCustomer(customerId: String, completionHandler: (FrameObjects.Customer?, NetworkingError?) -> Unit)

Deletes a customer record by their unique identifier and delivers the result to a callback.

Link copied to clipboard
suspend fun getCustomers(page: Int? = null, perPage: Int? = null): Pair<CustomersResponses.ListCustomersResponse?, NetworkingError?>

Retrieves a paginated list of customers.

fun getCustomers(page: Int? = null, perPage: Int? = null, completionHandler: (CustomersResponses.ListCustomersResponse?, NetworkingError?) -> Unit)

Retrieves a paginated list of customers and delivers the result to a callback.

Link copied to clipboard

Retrieves a single customer by their unique identifier.

fun getCustomerWith(customerId: String, completionHandler: (FrameObjects.Customer?, NetworkingError?) -> Unit)

Retrieves a single customer by their unique identifier and delivers the result to a callback.

Link copied to clipboard

Searches customers using the criteria specified in the request.

Searches customers using the criteria specified in the request and delivers results to a callback.

Link copied to clipboard

Unblocks a previously blocked customer, restoring their ability to transact.

fun unblockCustomerWith(customerId: String, completionHandler: (FrameObjects.Customer?, NetworkingError?) -> Unit)

Unblocks a previously blocked customer and delivers the result to a callback.

Link copied to clipboard

Updates an existing customer record.

Updates an existing customer record and delivers the result to a callback.