public Person GetMe() { DefaultHandler <Person> handler = new DefaultHandler <Person>($"{this.URL}/me", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); List <Person> result = handler.Get("*"); return(result.Count.Equals(1) ? result[0] : null); }
public List <ProjectTaskTemplateReference> GetProjectTaskTemplates(ProjectTemplate projectTemplate, params string[] attributeNames) { DefaultHandler <ProjectTaskTemplateReference> handler = new DefaultHandler <ProjectTaskTemplateReference>($"{this.URL}/{projectTemplate.ID}/task_templates", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests) { SortOrder = SortOrder.None }; return(handler.Get(attributeNames)); }
public List <Contact> GetContacts(Person person) { DefaultHandler <Contact> handler = new DefaultHandler <Contact>($"{this.URL}/{person.ID}/contacts", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests) { SortOrder = SortOrder.None }; return(handler.Get()); }
public List <ProjectTaskAssignment> GetAssignments(ProjectTask projectTask, params string[] attributeNames) { DefaultHandler <ProjectTaskAssignment> handler = new DefaultHandler <ProjectTaskAssignment>($"{this.URL}/{projectTask.ID}/assignments", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests) { SortOrder = SortOrder.None }; return(handler.Get(attributeNames)); }
public ProjectTaskAssignment UpdateAssignment(ProjectTask projectTask, ProjectTaskAssignment assignment) { DefaultHandler <ProjectTaskAssignment> handler = new DefaultHandler <ProjectTaskAssignment>($"{this.URL}/{projectTask.ID}/assignments", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests) { SortOrder = SortOrder.None }; return(handler.Update(assignment)); }
public List <Note> GetNotes(ProjectTask projectTask, params string[] attributeNames) { DefaultHandler <Note> handler = new DefaultHandler <Note>($"{this.URL}/{projectTask.ID}/notes", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests) { SortOrder = SortOrder.CreatedAt }; return(handler.Get(attributeNames)); }
public List <Address> GetAddresses(Organization organization, params string[] attributeNames) { DefaultHandler <Address> handler = new DefaultHandler <Address>($"{this.URL}/{organization.ID}/addresses", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests) { SortOrder = SortOrder.None }; return(handler.Get(attributeNames)); }
public List <TaskTemplateApproval> GetApprovals(TaskTemplate taskTemplate, params string[] attributeNames) { DefaultHandler <TaskTemplateApproval> handler = new DefaultHandler <TaskTemplateApproval>($"{this.URL}/{taskTemplate.ID}/approvals", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests) { SortOrder = SortOrder.None }; return(handler.Get(attributeNames)); }
public List <Permission> GetAccountPermissions(Person person) { DefaultHandler <Permission> handler = new DefaultHandler <Permission>($"{this.URL}/{person.ID}/permissions", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests) { SortOrder = SortOrder.None, AlwaysAsList = true }; return(handler.Get()); }
public Permission GetAccountPermission(Person person, Account account) { DefaultHandler <Permission> handler = new DefaultHandler <Permission>($"{this.URL}/{person.ID}/permissions/{account.ID}", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests) { SortOrder = SortOrder.None }; List <Permission> result = handler.Get(); return(result.Count.Equals(1) ? result[0] : null); }
public bool DeleteAllContacts(Organization organization) { DefaultHandler <Contact> handler = new DefaultHandler <Contact>($"{this.URL}/{organization.ID}/contact", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.DeleteAll()); }
public List <Person> GetMembers(Team team, params string[] attributeNames) { DefaultHandler <Person> handler = new DefaultHandler <Person>($"{this.URL}/{team.ID}/members", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Get(attributeNames)); }
public List <ConfigurationItem> GetConfigurationItems(Person person, params string[] attributeNames) { DefaultHandler <ConfigurationItem> handler = new DefaultHandler <ConfigurationItem>($"{this.URL}/{person.ID}/cis", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Get(attributeNames)); }
public bool DeleteAllAddresses(Person person) { DefaultHandler <Address> handler = new DefaultHandler <Address>($"{this.URL}/{person.ID}/addresses", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.DeleteAll()); }
public bool DeleteAllTranslations(KnowledgeArticle knowledgeArticle) { DefaultHandler <KnowledgeArticleTranslation> handler = new DefaultHandler <KnowledgeArticleTranslation>($"{this.URL}/{knowledgeArticle.ID}/translations", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.DeleteAll()); }
public List <RequestTemplate> GetRequestTemplates(Service service, params string[] attributeNames) { DefaultHandler <RequestTemplate> handler = new DefaultHandler <RequestTemplate>($"{this.URL}/{service.ID}/request_templates", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Get(attributeNames)); }
public List <Contact> GetContacts(Organization organization, params string[] attributeNames) { DefaultHandler <Contact> handler = new DefaultHandler <Contact>($"{this.URL}/{organization.ID}/contacts", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Get(attributeNames)); }
public List <KnowledgeArticleTranslation> GetTranslations(KnowledgeArticle knowledgeArticle, params string[] attributeNames) { DefaultHandler <KnowledgeArticleTranslation> handler = new DefaultHandler <KnowledgeArticleTranslation>($"{this.URL}/{knowledgeArticle.ID}/translations", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Get(attributeNames)); }
public List <ServiceInstance> GetServiceInstances(KnowledgeArticle knowledgeArticle, params string[] attributeNames) { DefaultHandler <ServiceInstance> handler = new DefaultHandler <ServiceInstance>($"{this.URL}/{knowledgeArticle.ID}/service_instances", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Get(attributeNames)); }
public bool DeleteContact(Person person, Contact contact) { DefaultHandler <Contact> handler = new DefaultHandler <Contact>($"{this.URL}/{person.ID}/contacts", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Delete(contact)); }
public List <Task> GetTasks(Change change, params string[] attributeNames) { DefaultHandler <Task> handler = new DefaultHandler <Task>($"{this.URL}/{change.ID}/tasks", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Get(attributeNames)); }
public List <Organization> GetOrganizations(TimeAllocation timeAllocation, params string[] attributeNames) { DefaultHandler <Organization> handler = new DefaultHandler <Organization>($"{this.URL}/{timeAllocation.ID}/organizations", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Get(attributeNames)); }
public Contact UpdateContact(Organization organization, Contact contact) { DefaultHandler <Contact> handler = new DefaultHandler <Contact>($"{this.URL}/{organization.ID}/contacts", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Update(contact)); }
public bool RemoveAccountPermission(Person person, Permission permission) { DefaultHandler <Permission> handler = new DefaultHandler <Permission>($"{this.URL}/{person.ID}/permissions", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.CustomWebRequest($"/{permission.Account.ID}?roles={permission.GetRolesInSingleString()}", "DELETE") == null); }
public bool RemoveAllAssignments(ProjectTask projectTask) { DefaultHandler <ProjectTaskAssignment> handler = new DefaultHandler <ProjectTaskAssignment>($"{this.URL}/{projectTask.ID}/assignments", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.DeleteAll()); }
public List <ServiceLevelAgreement> GetServiceLevelAgreementCoverages(Person person, params string[] attributeNames) { DefaultHandler <ServiceLevelAgreement> handler = new DefaultHandler <ServiceLevelAgreement>($"{this.URL}/{person.ID}/sla_coverages", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Get(attributeNames)); }
public List <ProjectTask> GetPredecessors(ProjectTask projectTask, params string[] attributeNames) { DefaultHandler <ProjectTask> handler = new DefaultHandler <ProjectTask>($"{this.URL}/{projectTask.ID}/predecessors", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Get(attributeNames)); }
public Address UpdateAddress(Person person, Address address) { DefaultHandler <Address> handler = new DefaultHandler <Address>($"{this.URL}/{person.ID}/addresses", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Update(address)); }
public List <ServiceOffering> GetServiceOfferings(Service service, params string[] attributeNames) { DefaultHandler <ServiceOffering> handler = new DefaultHandler <ServiceOffering>($"{this.URL}/{service.ID}/service_offerings", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Get(attributeNames)); }
public KnowledgeArticleTranslation UpdateTranslation(KnowledgeArticle knowledgeArticle, KnowledgeArticleTranslation knowledgeArticleTranslation) { DefaultHandler <KnowledgeArticleTranslation> handler = new DefaultHandler <KnowledgeArticleTranslation>($"{this.URL}/{knowledgeArticle.ID}/translations", this.AuthenticationTokens, this.AccountID, this.ItemsPerRequest, this.MaximumRecursiveRequests); return(handler.Update(knowledgeArticleTranslation)); }