signUp

abstract suspend fun signUp(details: ActivePerksSignUpDetails): ActivePerksEnrollment

Enrolls the member in ActivePerks with a payment card.

On success the returned ActivePerksEnrollment.isEnrolled is true; its enrollmentState is null right after signup (the server sends no status on that branch).

Return

The post-signup ActivePerksEnrollment.

Parameters

details

Card and billing details; see ActivePerksSignUpDetails for the exact formats the server enforces.

Throws

if enrollment fails (declined card, existing account, validation) - the server's error detail rides on the thrown AFException.