rattail.membership

Membership Handler

class rattail.membership.MembershipHandler(*args, **kwargs)[source]

Base class and default implementation for membership handlers.

begin_membership(member, **kwargs)[source]

Begin an active membership.

ensure_member(person, **kwargs)[source]

Returns the Member record associated with the given person, creating it first if necessary.

get_customer(obj)[source]

Returns the customer associated with the given member, if there is one.

get_equity_full_investment_amount(**kwargs)[source]

Should return the amount required for an account to become fully invested.

get_equity_total(member, cached=True, **kwargs)[source]

Get the official equity total for the given member account.

get_member(obj)[source]

Returns the member associated with the given person, if there is one.

get_members_for_account_holder(person, **kwargs)[source]

Return all Member records for which the given Person is the account holder.

get_person(obj)[source]

Returns the person associated with the given member, if there is one.

make_member(person, **kwargs)[source]

Make and return a new Member instance.

max_one_per_person()[source]

Check whether a person is allowed to have just one member account, or if multiple are allowed.

Returns:

Boolean; if true then only one member account is allowed per person; if false then multiple are allowed.