Skip to content

Reference

tilttek/referrals

Every public type of the package, with its role.

TypeRole
ReferralsGives a member's code, records a referral, pays its reward once, reads referrals, erases a member
ReferralCodeThe random code a member shares, in Crockford's base 32
ReferralIdThe random identifier of a referral, which the keys of its points carry
ReferralA newcomer referred by a member: status, moments and the points each side received
ReferralStatusPending, rewarded or refused
RefusalWhy a referral or its reward is refused
RewardWhat rewarding did: the referral, the points of each side, and whether this call wrote them
TermsThe points, the cap, the currency, the source and the guards on dates
FirstActionThe newcomer's first real action: its kind and its moment
ErasureWhat erasing a member did; the erased:member reference
Contract\ReferralStoreWhere the codes and the referrals are kept
Contract\FirstActionsTells a member's first real action
Contract\SamePersonTells whether two accounts belong to one person
Contract\NoSamePersonSignalTwo references are two people
Store\InMemoryReferralStoreThe store in memory, for tests
Exception\ReferralsException and its four exceptionsExceptions