new MembershipsAPI(rest)
This class is used to interact with Memberships in TidyHQ.
Parameters:
Name | Type | Description |
---|---|---|
rest | Rest | The rest instance to use for requests. |
- Source
Methods
(async) getMembership(membership_id, optionsopt) → {Promise.<TidyAPI_V1_Membership>}
Get a single membership.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
membership_id | string | The ID of the membership. | ||||||||||
options | object | <optional> | {} | Properties
|
- Source
Returns:
- The membership.
- Type:
- Promise.<TidyAPI_V1_Membership>
(async) getMemberships(optionsopt) → {Promise.<TidyAPI_V1_Memberships>}
Get a list of all memberships.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | {} | Properties
|
- Source
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:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
contact_id | string | The ID of the contact. | ||||||||||||||||||||||||||
options | object | <optional> | {} | Properties
|
- Source
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:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
membership_level_id | string | The ID of the membership level. | ||||||||||||||||||||||||||
options | object | <optional> | {} | Properties
|
- Source
Returns:
- The list of memberships.
- Type:
- Promise.<TidyAPI_V1_Memberships>