/// <summary> /// Retrieves a specific <see cref="!:MemberPeriodModel" /> instance. /// </summary> /// <param name="id"> /// The unique value which distinctly identifies the <see cref="!:MemberPeriodModel" /> instance to be returned. /// </param> /// <returns> /// The <see cref="!:MemberPeriodModel" /> instance that matches the specified <paramref name="id" />; or null, if no matching instance can be found. /// </returns> public static Consensus.Membership.MemberPeriod FetchById(ConsensusSite site, System.String id) { IBusinessProvider provider = site.GetService <IBusinessProvider>(); Consensus.Membership.IMemberPeriodModel model = provider.Membership.MemberPeriod.FetchById(id); return(model == null ? null : new Consensus.Membership.MemberPeriod(model)); }
/// <summary> /// Cancels existing DDs on <see cref="!:MemberPeriodModel" /> instance. /// </summary> /// <param name="memberPeriodId"> /// The value which identifies the <see cref="!:MemberPeriodModel" /> instance to be modified. /// </param> /// <param name="directDebitId"> /// The new Direct Debit Id which identifies the instance which should not be modified. /// </param> /// <returns> /// The <see cref="!:MemberPeriodModel" /> instance that match the specified <paramref name="memberPeriodId" />. /// </returns> public static Consensus.Membership.MemberPeriod CancelExistingDirectDebits(ConsensusSite site, System.String memberPeriodId, System.String directDebitId) { IBusinessProvider provider = site.GetService <IBusinessProvider>(); Consensus.Membership.IMemberPeriodModel model = provider.Membership.MemberPeriod.CancelExistingDirectDebits(memberPeriodId, directDebitId); return(model == null ? null : new Consensus.Membership.MemberPeriod(model)); }
/// <summary> /// Creates a new <see cref="!:MemberPeriodModel" /> instance. /// </summary> /// <returns> /// A newly instantiated <see cref="!:MemberPeriodModel" /> instance. /// </returns> public static Consensus.Membership.MemberPeriod Create(ConsensusSite site) { IBusinessProvider provider = site.GetService <IBusinessProvider>(); Consensus.Membership.IMemberPeriodModel model = provider.Membership.MemberPeriod.Create(); return(model == null ? null : new Consensus.Membership.MemberPeriod(model)); }
/// <summary> /// Performs rollback membership on a single <see cref="!:MemberPeriodModel" /> instance. /// Functionality replicated from the SQL performed in V6.5. /// </summary> /// <param name="memberPeriodId"> /// The value which identifies the <see cref="!:MemberPeriodModel" /> instance to be modified. /// </param> /// <param name="status"> /// The status value which should be set. /// </param> /// <returns> /// The <see cref="!:MemberPeriodModel" /> instance that match the specified <paramref name="memberPeriodId" />. /// </returns> public static Consensus.Membership.MemberPeriod RollbackMembership(ConsensusSite site, System.String memberPeriodId, System.String status) { IBusinessProvider provider = site.GetService <IBusinessProvider>(); Consensus.Membership.IMemberPeriodModel model = provider.Membership.MemberPeriod.RollbackMembership(memberPeriodId, status); return(model == null ? null : new Consensus.Membership.MemberPeriod(model)); }