MembershipsAPI

new MembershipsAPI(rest)

This class is used to interact with Memberships in TidyHQ.
Parameters:
NameTypeDescription
restRestThe rest instance to use for requests.

Methods

(async) getMembership(membership_id, optionsopt) → {Promise.<TidyAPI_V1_Membership>}

Get a single membership.
Parameters:
NameTypeAttributesDefaultDescription
membership_idstringThe ID of the membership.
optionsobject<optional>
{}
Properties
NameTypeAttributesDescription
access_tokenstring<optional>
The access token to use.
Returns:
- The membership.
Type: 
Promise.<TidyAPI_V1_Membership>

(async) getMemberships(optionsopt) → {Promise.<TidyAPI_V1_Memberships>}

Get a list of all memberships.
Parameters:
NameTypeAttributesDefaultDescription
optionsobject<optional>
{}
Properties
NameTypeAttributesDescription
access_tokenstring<optional>
The access token to use.
limitstring<optional>
The number of results to return.
offsetstring<optional>
The number of results to skip.
activeboolean<optional>
Whether to return active memberships.
updated_sincestring<optional>
The date to return memberships updated since in ISO 8601 format.
Returns:
- The list of memberships.
Type: 
Promise.<TidyAPI_V1_Memberships>

(async) getMembershipsForContact(contact_id, optionsopt) → {Promise.<TidyAPI_V1_Memberships>}

Get a list of all memberships for a contact.
Parameters:
NameTypeAttributesDefaultDescription
contact_idstringThe ID of the contact.
optionsobject<optional>
{}
Properties
NameTypeAttributesDescription
access_tokenstring<optional>
The access token to use.
limitstring<optional>
The number of results to return.
offsetstring<optional>
The number of results to skip.
activeboolean<optional>
Whether to return active memberships.
updated_sincestring<optional>
The date to return memberships updated since in ISO 8601 format.
Returns:
- The list of memberships.
Type: 
Promise.<TidyAPI_V1_Memberships>

(async) getMembershipsForMembershipLevel(membership_level_id, optionsopt) → {Promise.<TidyAPI_V1_Memberships>}

Get a list of all memberships for a membership level.
Parameters:
NameTypeAttributesDefaultDescription
membership_level_idstringThe ID of the membership level.
optionsobject<optional>
{}
Properties
NameTypeAttributesDescription
access_tokenstring<optional>
The access token to use.
limitstring<optional>
The number of results to return.
offsetstring<optional>
The number of results to skip.
activeboolean<optional>
Whether to return active memberships.
updated_sincestring<optional>
The date to return memberships updated since in ISO 8601 format.
Returns:
- The list of memberships.
Type: 
Promise.<TidyAPI_V1_Memberships>