PMMembershipOptions Class |
Namespace: PM90SettingsAPI.MembershipOptions
public class PMMembershipOptions
The PMMembershipOptions type exposes the following members.
Name | Description | |
---|---|---|
PMMembershipOptions | Initializes a new instance of the PMMembershipOptions class |
Exception | Condition |
---|---|
PMDatabaseConnectionNotFoundException | No database connection available on this system |
PMDatabaseException | Represents an database connection or syntax error that has occurred when processing an API request |
PMException | Unexcpected exception has occurred, check inner exception |
//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();