public static Task <Member> UpdateMemberRole(this IOrgClient client, string org, Guid memberId, MemberRole role) { return(client.UpdateMember(org, memberId, new MemberUpdate { Role = role })); }
public static Task <Organization> UpdateOrgTimeZone(this IOrgClient client, string org, string timeZone) { return(client.UpdateOrganization(org, new OrgUpdate { TimeZone = timeZone })); }
public static Task <Organization> UpdateOrgName(this IOrgClient client, string org, string name) { return(client.UpdateOrganization(org, new OrgUpdate { Name = name })); }
public static Task <Organization> UpdateOrgId(this IOrgClient client, string oldId, string newId) { return(client.UpdateOrganization(oldId, new OrgUpdate { Id = newId })); }
public static async Task <BillingChange> PreviewBillingPlanChange(this IOrgClient client, string org, string planName) { var plans = await client.GetPlans(); var plan = plans.Single(p => p.Name == planName); return(await client.PreviewBillingPlanChange(org, plan.Id)); }
public static Task <Member> InviteMember(this IOrgClient client, string org, string email, MemberRole role) { return(client.InviteMember(org, new NewMember { Email = email, Role = role })); }
public static Task <Organization> CreateOrganization(this IOrgClient client, string name = null, string timeZone = null, Guid?planId = null, string paymentMethodId = null) { return(client.CreateOrganization(new NewOrg { Name = name, TimeZone = timeZone, PlanId = planId, PaymentMethodId = paymentMethodId })); }
/// <summary> /// Initializes a new instance of the <see cref="OrgDemo"/> class. /// </summary> /// <param name="credentialsProvider">The credentials provider.</param> public OrgDemo(ICredentialsProvider credentialsProvider) { Debug.Assert(credentialsProvider != null, "The credentials provider must previously be created and provided."); // Create the Organizer service client based on the Organizer service URL specified in the Config // and based on the credentials provider that was previously created. this.orgClient = new OrgClient( new OrgClientConfig { ServiceURI = new Uri(Config.OrgServiceUrl) }, credentialsProvider); // Create the change set client used to handle large amounts of data. this.changeSetClient = new System.Net.Http.HttpClient(); }
/// <summary> /// Initializes a new instance of the <see cref="UsageExamplesDemo"/> class. /// </summary> /// <param name="credentialsProvider">The credentials provider.</param> public UsageExamplesDemo(ICredentialsProvider credentialsProvider) { if (credentialsProvider is null) { throw new ArgumentNullException(nameof(credentialsProvider)); } // Create the Organizer service client based on the Organizer service URL specified in the Config // and based on the credentials provider that was previously created. this.orgClient = new OrgClient( new OrgClientConfig { ServiceURI = new Uri(Config.OrgServiceUrl) }, credentialsProvider); // Create the Property Set service client based on the Property Set service URL specified in the Config // and based on the credentials provider that was previously created. this.psetClient = new PSetClient( new PSetClientConfig { ServiceURI = new Uri(Config.PSetServiceUrl) }, credentialsProvider); }