예제 #1
0
        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);
        }
예제 #2
0
        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));
        }
예제 #3
0
        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());
        }
예제 #4
0
        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));
        }
예제 #5
0
        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));
        }
예제 #6
0
        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));
        }
예제 #7
0
        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));
        }
예제 #8
0
        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));
        }
예제 #9
0
        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());
        }
예제 #10
0
        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);
        }
예제 #11
0
        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());
        }
예제 #12
0
        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));
        }
예제 #13
0
        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));
        }
예제 #14
0
        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());
        }
예제 #16
0
        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));
        }
예제 #17
0
        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));
        }
예제 #20
0
        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));
        }
예제 #21
0
        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));
        }
예제 #22
0
        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));
        }
예제 #23
0
        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));
        }
예제 #24
0
        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);
        }
예제 #25
0
        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());
        }
예제 #26
0
        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));
        }
예제 #27
0
        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));
        }
예제 #28
0
        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));
        }
예제 #29
0
        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));
        }