Click or drag to resize
PMMembershipOptions Class
Specifies options for User Membership
Inheritance Hierarchy
SystemObject
  PM90SettingsAPI.MembershipOptionsPMMembershipOptions

Namespace: PM90SettingsAPI.MembershipOptions
Assembly: PM90SettingsAPI (in PM90SettingsAPI.dll) Version: 9.0.23.534 (9.0.23.534)
Syntax
C#
public class PMMembershipOptions

The PMMembershipOptions type exposes the following members.

Constructors
  NameDescription
Public methodPMMembershipOptions
Initializes a new instance of the PMMembershipOptions class
Top
Exceptions
ExceptionCondition
PMDatabaseConnectionNotFoundExceptionNo database connection available on this system
PMDatabaseExceptionRepresents an database connection or syntax error that has occurred when processing an API request
PMExceptionUnexcpected exception has occurred, check inner exception
Remarks
Changes to these settings may not take affect right away. A restart of all services is recommended.
Examples
Example of getting and setting user membership options
//Get current options
PMMembershipOptions.PrimaryGroupResolution groupResolutionOptions = PMMembershipOptions.PrimaryGroupResolution.CurrentPrimaryGroupResolution;


//Change resolution to use Lowest Balance,based on Default Balance
var balances = PMBalance.GetAvailableBalances();
PMMembershipOptions.PrimaryGroupResolution.SetPrimaryGroupResolution(
    PMMembershipOptions.PrimaryGroupResolution.ResolutionOption.LowestBalance,
    PMMembershipOptions.PrimaryGroupResolution.StartingQuotaOption.UsePrimaryGroup,
    false,
    balances.FirstOrDefault(x => x.IsDefault));



//See if user refresh is enabled and what happens when user's membership changs
PMMembershipOptions.UserRefreshOptions refreshOptions = PMMembershipOptions.UserRefreshOptions.CurrentUserRefreshOptions;

//Enable refresh, but users will keep any balances through changes
PMMembershipOptions.UserRefreshOptions.EnableUserRefresh(PMMembershipOptions.UserRefreshOptions.RefreshBalanceOption.KeepBalance);

//Disable automatic user refresh
PMMembershipOptions.UserRefreshOptions.DisableUserRefresh();
See Also