Fluent builder for accepting a referral. Obtained from ReferralManager.newAcceptReferralBuilder, set the properties identifying the accepting profile and the referral, then call build to process the acceptance. The accepting profile can be identified by an existing Profile, a userId or profileId to look up, or left unset to have a new profile created from the referral's recipient details.

Group: Builders


Methods

rewardEntry(RewardEntry rp) · userId(String v) · profileId(long profileId) · adminDomain(String v) · disablePassword() · password(String v) · profile(Profile v) · referral(Referral v) · build()

rewardEntry(RewardEntry rp)

Returns: AcceptReferralBuilder

The reward entry to credit for this acceptance.

ParameterDescription
rpthe reward entry to credit

userId(String v)

Returns: AcceptReferralBuilder

The username or email of the accepting profile, used to look it up in the account identified by adminDomain (or the current tenant organisation if adminDomain is not set).

ParameterDescription
vthe accepting profile's username or email

profileId(long profileId)

Returns: AcceptReferralBuilder

The database id of the accepting profile, used instead of userId to look it up in the account identified by adminDomain (or the current tenant organisation if adminDomain is not set).

ParameterDescription
profileIdthe accepting profile's id

adminDomain(String v)

Returns: AcceptReferralBuilder

The admin domain of the organisation to look up userId or profileId in. If not set, the current tenant organisation is used.

ParameterDescription
vthe admin domain of the organisation to search

disablePassword()

Returns: AcceptReferralBuilder

Skips the password checks that would otherwise be required to accept the referral, and allows the accepting profile to be resolved without matching the referral's recipient email. Intended only for the central-login path, where identity has already been verified by other means.

password(String v)

Returns: AcceptReferralBuilder

The password used to authenticate the accepting profile if it already has credentials, or to set as its password if a new profile is being created.

ParameterDescription
vthe accepting profile's password

profile(Profile v)

Returns: AcceptReferralBuilder

The accepting profile, already resolved. When set this is used directly instead of looking one up via userId or profileId.

ParameterDescription
vthe accepting profile

referral(Referral v)

Returns: AcceptReferralBuilder

The referral being accepted.

ParameterDescription
vthe referral to accept

build()

Returns: ReferralAcceptance

Processes the referral acceptance described by this builder. Equivalent to calling ReferralManager.accept with this builder.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.