new V2_MembershipLevelsAPI(rest)
This class is used to interact with Memberships in TidyHQ.
Parameters:
Name | Type | Description |
---|---|---|
rest | Rest | The rest instance to use for requests. |
Methods
(async) createMembership(membership_level_id, subscription, optionsopt) → {Promise.<TidyAPI_V2_SubscriptionPost>}
Create a membership in TidyHQ.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
membership_level_id | string | The id of the membership level to subscribe to. | ||||||||||
subscription | Tidy_V2_PostSubscriptionParams | The subscription parameters. | ||||||||||
options | object | <optional> | {} | Properties
|
Returns:
- The subscription, membership, payment url and invoice id.
- Type:
- Promise.<TidyAPI_V2_SubscriptionPost>
(async) getMembershipLevels(optionsopt) → {Promise.<TidyAPI_V2_MembershipLevels>}
Get a list of membership levels from TidyHQ.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | {} | Properties
|
Returns:
- An array of membership levels.
- Type:
- Promise.<TidyAPI_V2_MembershipLevels>