getCustomerInfoWith

fun Purchases.getCustomerInfoWith(onError: (error: PurchasesError) -> Unit = ON_ERROR_STUB, onSuccess: (customerInfo: CustomerInfo) -> Unit)

Get latest available customer info.

Parameters

onSuccess

Called when customer info is available and not stale. Called immediately if customer info is cached.

onError

Will be called if there was an error with the purchase.


fun Purchases.getCustomerInfoWith(fetchPolicy: CacheFetchPolicy, onError: (error: PurchasesError) -> Unit = ON_ERROR_STUB, onSuccess: (customerInfo: CustomerInfo) -> Unit)

Get customer info from cache or network depending on fetch policy.

Parameters

fetchPolicy

Specifies cache behavior for customer info retrieval

onSuccess

Called when customer info is available depending on the fetchPolicy parameter, this can be called immediately or after a fetch has happened.

onError

Will be called if there was an error with the purchase.