From 3828f6b1788d74e2eeb2f066c72f5db444e85548 Mon Sep 17 00:00:00 2001 From: Andreas Sion Date: Thu, 31 Jul 2014 12:05:36 +0200 Subject: [PATCH 1/2] Added vs 2013 sln file --- ZendeskApi_v2_vs2013.sln | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 ZendeskApi_v2_vs2013.sln diff --git a/ZendeskApi_v2_vs2013.sln b/ZendeskApi_v2_vs2013.sln new file mode 100644 index 00000000..a9b6fc53 --- /dev/null +++ b/ZendeskApi_v2_vs2013.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZenDeskApi_v2", "ZenDeskApi_v2\ZenDeskApi_v2.csproj", "{D17BCC22-9561-4FC4-9C52-975808641ECE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{A80DB5E8-5D98-4256-9513-34E13A82D5EE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D17BCC22-9561-4FC4-9C52-975808641ECE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D17BCC22-9561-4FC4-9C52-975808641ECE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D17BCC22-9561-4FC4-9C52-975808641ECE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D17BCC22-9561-4FC4-9C52-975808641ECE}.Release|Any CPU.Build.0 = Release|Any CPU + {A80DB5E8-5D98-4256-9513-34E13A82D5EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A80DB5E8-5D98-4256-9513-34E13A82D5EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A80DB5E8-5D98-4256-9513-34E13A82D5EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A80DB5E8-5D98-4256-9513-34E13A82D5EE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal From 5f5cac0192f948c341e050b9ce6d3863818fa6f9 Mon Sep 17 00:00:00 2001 From: Andreas Sion Date: Thu, 31 Jul 2014 14:29:13 +0200 Subject: [PATCH 2/2] Implement interfaces for ZendeskApi and all Request types. These can be used for mocking out ZendeskApi code in tests. --- ZendeskApi_v2/Core.cs | 19 ++- ZendeskApi_v2/Requests/AccountsAndActivity.cs | 19 ++- ZendeskApi_v2/Requests/Attachments.cs | 26 +++- ZendeskApi_v2/Requests/Categories.cs | 23 +++- ZendeskApi_v2/Requests/CustomAgentRoles.cs | 15 +- ZendeskApi_v2/Requests/Forums.cs | 35 ++++- ZendeskApi_v2/Requests/Groups.cs | 61 +++++++- ZendeskApi_v2/Requests/JobStatuses.cs | 15 +- ZendeskApi_v2/Requests/Locales.cs | 59 +++++++- ZendeskApi_v2/Requests/Macros.cs | 77 ++++++++++- ZendeskApi_v2/Requests/Organizations.cs | 41 +++++- ZendeskApi_v2/Requests/Requests.cs | 32 ++++- ZendeskApi_v2/Requests/SatisfactionRatings.cs | 39 +++++- ZendeskApi_v2/Requests/Search.cs | 53 ++++++- ZendeskApi_v2/Requests/SharingAgreements.cs | 15 +- ZendeskApi_v2/Requests/Tags.cs | 29 +++- ZendeskApi_v2/Requests/Tickets.cs | 130 +++++++++++++++++- ZendeskApi_v2/Requests/Topics.cs | 77 ++++++++++- ZendeskApi_v2/Requests/Triggers.cs | 19 ++- ZendeskApi_v2/Requests/Users.cs | 71 +++++++++- ZendeskApi_v2/Requests/Views.cs | 29 +++- ZendeskApi_v2/ZendeskApi.cs | 108 +++++++++------ 22 files changed, 908 insertions(+), 84 deletions(-) diff --git a/ZendeskApi_v2/Core.cs b/ZendeskApi_v2/Core.cs index 5d0c37ab..b6325fe4 100644 --- a/ZendeskApi_v2/Core.cs +++ b/ZendeskApi_v2/Core.cs @@ -11,8 +11,23 @@ namespace ZendeskApi_v2 { - public class Core - { + public interface ICore + { +#if SYNC + T GetByPageUrl(string pageUrl, int perPage=100); + T RunRequest(string resource, string requestMethod, object body = null); + RequestResult RunRequest(string resource, string requestMethod, object body = null); +#endif + +#if ASYNC + Task GetByPageUrlAsync(string pageUrl, int perPage = 100); + Task RunRequestAsync(string resource, string requestMethod, object body = null); + Task RunRequestAsync(string resource, string requestMethod, object body = null); +#endif + } + + public class Core : ICore + { private const string XOnBehalfOfEmail = "X-On-Behalf-Of"; protected string User; protected string Password; diff --git a/ZendeskApi_v2/Requests/AccountsAndActivity.cs b/ZendeskApi_v2/Requests/AccountsAndActivity.cs index cdf641c4..69d95131 100644 --- a/ZendeskApi_v2/Requests/AccountsAndActivity.cs +++ b/ZendeskApi_v2/Requests/AccountsAndActivity.cs @@ -6,8 +6,23 @@ namespace ZendeskApi_v2.Requests { - public class AccountsAndActivity : Core - { + public interface IAccountsAndActivity : ICore + { +#if SYNC + SettingsResponse GetSettings(); + GroupActivityResponse GetActivities(); + IndividualActivityResponse GetActivityById(long activityId); +#endif + +#if ASYNC + Task GetSettingsAsync(); + Task GetActivitiesAync(); + Task GetActivityByIdAync(long activityId); +#endif + } + + public class AccountsAndActivity : Core, IAccountsAndActivity + { public AccountsAndActivity(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) diff --git a/ZendeskApi_v2/Requests/Attachments.cs b/ZendeskApi_v2/Requests/Attachments.cs index 5bd76d3e..0da109c5 100644 --- a/ZendeskApi_v2/Requests/Attachments.cs +++ b/ZendeskApi_v2/Requests/Attachments.cs @@ -12,8 +12,30 @@ namespace ZendeskApi_v2.Requests { - public class Attachments : Core - { + public interface IAttachments : ICore + { +#if SYNC + Upload UploadAttachment(ZenFile file); + Upload UploadAttachments(IEnumerable files); +#endif + +#if ASYNC + Task UploadAttachmentAsync(ZenFile file); + Task UploadAttachmentsAsync(IEnumerable files); + + /// + /// Uploads a file to zendesk and returns the corresponding token id. + /// To upload another file to an existing token just pass in the existing token. + /// + /// + /// + /// + Task UploadAttachmentAsync(ZenFile file, string token = ""); +#endif + } + + public class Attachments : Core, IAttachments + { public Attachments(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) { } diff --git a/ZendeskApi_v2/Requests/Categories.cs b/ZendeskApi_v2/Requests/Categories.cs index 4c3fd43a..6b0fe425 100644 --- a/ZendeskApi_v2/Requests/Categories.cs +++ b/ZendeskApi_v2/Requests/Categories.cs @@ -6,8 +6,27 @@ namespace ZendeskApi_v2.Requests { - public class Categories : Core - { + public interface ICategories : ICore + { +#if SYNC + GroupCategoryResponse GetCategories(); + IndividualCategoryResponse GetCategoryById(long id); + IndividualCategoryResponse CreateCategory(Category category); + IndividualCategoryResponse UpdateCategory(Category category); + bool DeleteCategory(long id); +#endif + +#if ASYNC + Task GetCategoriesAsync(); + Task GetCategoryByIdAsync(long id); + Task CreateCategoryAsync(Category category); + Task UpdateCategoryAsync(Category category); + Task DeleteCategoryAsync(long id); +#endif + } + + public class Categories : Core, ICategories + { public Categories(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) { diff --git a/ZendeskApi_v2/Requests/CustomAgentRoles.cs b/ZendeskApi_v2/Requests/CustomAgentRoles.cs index 9ac6d08c..d8117236 100644 --- a/ZendeskApi_v2/Requests/CustomAgentRoles.cs +++ b/ZendeskApi_v2/Requests/CustomAgentRoles.cs @@ -5,8 +5,19 @@ namespace ZendeskApi_v2.Requests { - public class CustomAgentRoles : Core - { + public interface ICustomAgentRoles : ICore + { +#if SYNC + CustomRoles GetCustomRoles(); +#endif + +#if ASYNC + Task GetCustomRolesAsync(); +#endif + } + + public class CustomAgentRoles : Core, ICustomAgentRoles + { public CustomAgentRoles(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) { diff --git a/ZendeskApi_v2/Requests/Forums.cs b/ZendeskApi_v2/Requests/Forums.cs index 94c72f57..4be80bdd 100644 --- a/ZendeskApi_v2/Requests/Forums.cs +++ b/ZendeskApi_v2/Requests/Forums.cs @@ -6,8 +6,39 @@ namespace ZendeskApi_v2.Requests { - public class Forums : Core - { + public interface IForums : ICore + { +#if SYNC + GroupForumResponse GetForums(); + IndividualForumResponse GetForumById(long forumId); + GroupForumResponse GetForumsByCategory(long categoryId); + IndividualForumResponse CreateForum(Forum forum); + IndividualForumResponse UpdateForum(Forum forum); + bool DeleteForum(long id); + GroupForumSubcriptionResponse GetForumSubscriptions(); + GroupForumSubcriptionResponse GetForumSubscriptionsByForumId(long forumId); + IndividualForumSubcriptionResponse GetForumSubscriptionsById(long subscriptionId); + IndividualForumSubcriptionResponse CreateForumSubscription(ForumSubscription forumSubscription); + bool DeleteForumSubscription(long subscriptionId); +#endif + +#if ASYNC + Task GetForumsAsync(); + Task GetForumByIdAsync(long forumId); + Task GetForumsByCategoryAsync(long categoryId); + Task CreateForumAsync(Forum forum); + Task UpdateForumAsync(Forum forum); + Task DeleteForumAsync(long id); + Task GetForumSubscriptionsAsync(); + Task GetForumSubscriptionsByForumIdAsync(long forumId); + Task GetForumSubscriptionsByIdAsync(long subscriptionId); + Task CreateForumSubscriptionAsync(ForumSubscription forumSubscription); + Task DeleteForumSubscriptionAsync(long subscriptionId); +#endif + } + + public class Forums : Core, IForums + { public Forums(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) { diff --git a/ZendeskApi_v2/Requests/Groups.cs b/ZendeskApi_v2/Requests/Groups.cs index 53365a75..9c937008 100644 --- a/ZendeskApi_v2/Requests/Groups.cs +++ b/ZendeskApi_v2/Requests/Groups.cs @@ -5,8 +5,65 @@ namespace ZendeskApi_v2.Requests { - public class Groups : Core - { + public interface IGroups : ICore + { +#if SYNC + MultipleGroupResponse GetGroups(); + MultipleGroupResponse GetAssignableGroups(); + IndividualGroupResponse GetGroupById(long id); + IndividualGroupResponse CreateGroup(string groupName); + IndividualGroupResponse UpdateGroup(Group group); + bool DeleteGroup(long id); + MultipleGroupMembershipResponse GetGroupMemberships(); + MultipleGroupMembershipResponse GetGroupMembershipsByUser(long userId); + MultipleGroupMembershipResponse GetGroupMembershipsByGroup(long groupId); + MultipleGroupMembershipResponse GetAssignableGroupMemberships(); + MultipleGroupMembershipResponse GetAssignableGroupMembershipsByGroup(long groupId); + IndividualGroupMembershipResponse GetGroupMembershipsByMembershipId(long groupMembershipId); + IndividualGroupMembershipResponse GetGroupMembershipsByUserAndMembershipId(long userId, long groupMembershipId); + + /// + /// Creating a membership means assigning an agent to a given group + /// + /// + /// + IndividualGroupMembershipResponse CreateGroupMembership(GroupMembership groupMembership); + + MultipleGroupMembershipResponse SetGroupMembershipAsDefault(long userId, long groupMembershipId); + bool DeleteGroupMembership(long groupMembershipId); + bool DeleteUserGroupMembership(long userId, long groupMembershipId); +#endif + +#if ASYNC + Task GetGroupsAsync(); + Task GetAssignableGroupsAsync(); + Task GetGroupByIdAsync(long id); + Task CreateGroupAsync(string groupName); + Task UpdateGroupAsync(Group group); + Task DeleteGroupAsync(long id); + Task GetGroupMembershipsAsync(); + Task GetGroupMembershipsByUserAsync(long userId); + Task GetGroupMembershipsByGroupAsync(long groupId); + Task GetAssignableGroupMembershipsAsync(); + Task GetAssignableGroupMembershipsByGroupAsync(long groupId); + Task GetGroupMembershipsByMembershipIdAsync(long groupMembershipId); + Task GetGroupMembershipsByUserAndMembershipIdAsync(long userId, long groupMembershipId); + + /// + /// Creating a membership means assigning an agent to a given group + /// + /// + /// + Task CreateGroupMembershipAsync(GroupMembership groupMembership); + + Task SetGroupMembershipAsDefaultAsync(long userId, long groupMembershipId); + Task DeleteGroupMembershipAsync(long groupMembershipId); + Task DeleteUserGroupMembershipAsync(long userId, long groupMembershipId); +#endif + } + + public class Groups : Core, IGroups + { public Groups(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) { diff --git a/ZendeskApi_v2/Requests/JobStatuses.cs b/ZendeskApi_v2/Requests/JobStatuses.cs index e179dbc5..cec4d610 100644 --- a/ZendeskApi_v2/Requests/JobStatuses.cs +++ b/ZendeskApi_v2/Requests/JobStatuses.cs @@ -5,8 +5,19 @@ namespace ZendeskApi_v2.Requests { - public class JobStatuses : Core - { + public interface IJobStatuses : ICore + { +#if SYNC + JobStatusResponse GetJobStatus(string id); +#endif + +#if ASYNC + Task GetJobStatusAsync(string id); +#endif + } + + public class JobStatuses : Core, IJobStatuses + { public JobStatuses(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) diff --git a/ZendeskApi_v2/Requests/Locales.cs b/ZendeskApi_v2/Requests/Locales.cs index f4fc1eaa..0672a528 100644 --- a/ZendeskApi_v2/Requests/Locales.cs +++ b/ZendeskApi_v2/Requests/Locales.cs @@ -5,8 +5,63 @@ namespace ZendeskApi_v2.Requests { - public class Locales : Core - { + public interface ILocales : ICore + { +#if SYNC + /// + /// This lists the translation locales that are available for the account. + /// + /// + GroupLocaleResponse GetAllLocales(); + + /// + /// This lists the translation locales that have been localized for agents. + /// + /// + GroupLocaleResponse GetLocalesForAgents(); + + /// + /// This lists the translation locales that have been localized for agents. + /// + /// + IndividualLocaleResponse GetLocaleById(long id); + + /// + /// This works exactly like show, but instead of taking an id as argument, it renders the locale of the user performing the request. + /// + /// + IndividualLocaleResponse GetCurrentLocale(); +#endif + +#if ASYNC + /// + /// This lists the translation locales that are available for the account. + /// + /// + Task GetAllLocalesAsync(); + + /// + /// This lists the translation locales that have been localized for agents. + /// + /// + Task GetLocalesForAgentsAsync(); + + /// + /// This lists the translation locales that have been localized for agents. + /// + /// + Task GetLocaleByIdAsync(long id); + + /// + /// This works exactly like show, but instead of taking an id as argument, it renders the locale of the user performing the request. + /// + /// + Task GetCurrentLocaleAsync(); +#endif + } + + public class Locales : Core, ILocales + { public Locales(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) diff --git a/ZendeskApi_v2/Requests/Macros.cs b/ZendeskApi_v2/Requests/Macros.cs index 0780c578..db61f8ce 100644 --- a/ZendeskApi_v2/Requests/Macros.cs +++ b/ZendeskApi_v2/Requests/Macros.cs @@ -5,8 +5,81 @@ namespace ZendeskApi_v2.Requests { - public class Macros : Core - { + public interface IMacros : ICore + { +#if SYNC + /// + /// Lists all shared and personal macros available to the current user + /// + /// + GroupMacroResponse GetAllMacros(); + + IndividualMacroResponse GetMacroById(long id); + + /// + /// Lists all active shared and personal macros available to the current user + /// + /// + GroupMacroResponse GetActiveMacros(); + + IndividualMacroResponse CreateMacro(Macro macro); + IndividualMacroResponse UpdateMacro(Macro macro); + bool DeleteMacro(long id); + + /// + /// Applies a macro to all applicable tickets. + /// + /// + /// + ApplyMacroResponse ApplyMacro(long macroId); + + /// + /// Applies a macro to a specific ticket + /// + /// + /// + /// + ApplyMacroResponse ApplyMacroToTicket(long ticketId, long macroId); +#endif + +#if ASYNC + /// + /// Lists all shared and personal macros available to the current user + /// + /// + Task GetAllMacrosAsync(); + + Task GetMacroByIdAsync(long id); + + /// + /// Lists all active shared and personal macros available to the current user + /// + /// + Task GetActiveMacrosAsync(); + + Task CreateMacroAsync(Macro macro); + Task UpdateMacroAsync(Macro macro); + Task DeleteMacroAsync(long id); + + /// + /// Applies a macro to all applicable tickets. + /// + /// + /// + Task ApplyMacroAsync(long macroId); + + /// + /// Applies a macro to a specific ticket + /// + /// + /// + /// + Task ApplyMacroToTicketAsync(long ticketId, long macroId); +#endif + } + + public class Macros : Core, IMacros + { public Macros(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) { diff --git a/ZendeskApi_v2/Requests/Organizations.cs b/ZendeskApi_v2/Requests/Organizations.cs index 30157395..2aa0a0e1 100644 --- a/ZendeskApi_v2/Requests/Organizations.cs +++ b/ZendeskApi_v2/Requests/Organizations.cs @@ -5,8 +5,45 @@ namespace ZendeskApi_v2.Requests { - public class Organizations : Core - { + public interface IOrganizations : ICore + { +#if SYNC + GroupOrganizationResponse GetOrganizations(); + + /// + /// Returns an array of organizations whose name starts with the value specified in the name parameter. The name must be at least 2 characters in length. + /// + /// + /// + GroupOrganizationResponse GetOrganizationsStartingWith(string name); + + GroupOrganizationResponse SearchForOrganizations(string searchTerm); + IndividualOrganizationResponse GetOrganization(long id); + IndividualOrganizationResponse CreateOrganization(Organization organization); + IndividualOrganizationResponse UpdateOrganization(Organization organization); + bool DeleteOrganization(long id); +#endif + +#if ASYNC + Task GetOrganizationsAsync(); + + /// + /// Returns an array of organizations whose name starts with the value specified in the name parameter. The name must be at least 2 characters in length. + /// + /// + /// + Task GetOrganizationsStartingWithAsync(string name); + + Task SearchForOrganizationsAsync(string searchTerm); + Task GetOrganizationAsync(long id); + Task CreateOrganizationAsync(Organization organization); + Task UpdateOrganizationAsync(Organization organization); + Task DeleteOrganizationAsync(long id); +#endif + } + + public class Organizations : Core, IOrganizations + { public Organizations(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) { diff --git a/ZendeskApi_v2/Requests/Requests.cs b/ZendeskApi_v2/Requests/Requests.cs index c1f14737..f839726f 100644 --- a/ZendeskApi_v2/Requests/Requests.cs +++ b/ZendeskApi_v2/Requests/Requests.cs @@ -6,8 +6,36 @@ namespace ZendeskApi_v2.Requests { - public class Requests : Core - { + public interface IRequests : ICore + { +#if SYNC + GroupRequestResponse GetAllRequests(); + GroupRequestResponse GetAllSolvedRequests(); + GroupRequestResponse GetAllCcdRequests(); + GroupRequestResponse GetAllRequestsForUser(long id); + IndividualRequestResponse GetRequestById(long id); + GroupCommentResponse GetRequestCommentsById(long id); + IndividualCommentResponse GetSpecificRequestComment(long requestId, long commentId); + IndividualRequestResponse CreateRequest(Request request); + IndividualRequestResponse UpdateRequest(long id, Comment comment); + IndividualRequestResponse UpdateRequest(Request request, Comment comment = null); +#endif + +#if ASYNC + Task GetAllRequestsAsync(); + Task GetAllSolvedRequestsAsync(); + Task GetAllCcdRequestsAsync(); + Task GetAllRequestsForUserAsync(long id); + Task GetRequestByIdAsync(long id); + Task GetRequestCommentsByIdAsync(long id); + Task GetSpecificRequestCommentAsync(long requestId, long commentId); + Task CreateRequestAsync(Request request); + Task UpdateRequestAsync(long id, Comment comment); +#endif + } + + public class Requests : Core, IRequests + { public Requests(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) { diff --git a/ZendeskApi_v2/Requests/SatisfactionRatings.cs b/ZendeskApi_v2/Requests/SatisfactionRatings.cs index ff604783..fddd6026 100644 --- a/ZendeskApi_v2/Requests/SatisfactionRatings.cs +++ b/ZendeskApi_v2/Requests/SatisfactionRatings.cs @@ -5,8 +5,43 @@ namespace ZendeskApi_v2.Requests { - public class SatisfactionRatings : Core - { + public interface ISatisfactionRatings : ICore + { +#if SYNC + /// + /// Lists all received satisfaction rating requests ever issued for your account. To only list the satisfaction ratings submitted by your customers, use the "received" end point below instead. + /// + /// + GroupSatisfactionResponse GetSatisfactionRatings(); + + /// + /// Lists ratings provided by customers. + /// + /// + GroupSatisfactionResponse GetReceivedSatisfactionRatings(); + + IndividualSatisfactionResponse GetSatisfactionRatingById(long id); +#endif + +#if ASYNC + /// + /// Lists all received satisfaction rating requests ever issued for your account. To only list the satisfaction ratings submitted by your customers, use the "received" end point below instead. + /// + /// + Task GetSatisfactionRatingsAsync(); + + /// + /// Lists ratings provided by customers. + /// + /// + Task GetReceivedSatisfactionRatingsAsync(); + + Task GetSatisfactionRatingByIdAsync(long id); +#endif + } + + public class SatisfactionRatings : Core, ISatisfactionRatings + { public SatisfactionRatings(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) { diff --git a/ZendeskApi_v2/Requests/Search.cs b/ZendeskApi_v2/Requests/Search.cs index 3f39937d..f9c5c401 100644 --- a/ZendeskApi_v2/Requests/Search.cs +++ b/ZendeskApi_v2/Requests/Search.cs @@ -5,12 +5,59 @@ namespace ZendeskApi_v2.Requests { - /// + public interface ISearch : ICore + { +#if SYNC + /// + /// + /// + /// + /// Returns specified {page} - pagination + /// Possible values are 'updated_at', 'created_at', 'priority', 'status', and 'ticket_type + /// Possible values are 'relevance', 'asc', 'desc'. Defaults to 'relevance' when no 'order' criteria is requested. + /// + SearchResults SearchFor(string searchTerm, string sortBy = "", string sortOrder = "",int page=1); + + /// + /// This resource behaves the same as SearchFor, but allows anonymous users to search public forums + /// + /// + /// Returns specified {page} - pagination + /// Possible values are 'updated_at', 'created_at', 'priority', 'status', and 'ticket_type + /// Possible values are 'relevance', 'asc', 'desc'. Defaults to 'relevance' when no 'order' criteria is requested. + /// + SearchResults AnonymousSearchFor(string searchTerm, string sortBy = "", string sortOrder = "", int page = 1); +#endif + +#if ASYNC + /// + /// + /// + /// + /// Returns specified {page} - pagination + /// Possible values are 'updated_at', 'created_at', 'priority', 'status', and 'ticket_type + /// Possible values are 'relevance', 'asc', 'desc'. Defaults to 'relevance' when no 'order' criteria is requested. + /// + Task SearchForAsync(string searchTerm, string sortBy = "", string sortOrder = "", int page = 1); + + /// + /// This resource behaves the same as SearchFor, but allows anonymous users to search public forums + /// + /// + /// Returns specified {page} - pagination + /// Possible values are 'updated_at', 'created_at', 'priority', 'status', and 'ticket_type + /// Possible values are 'relevance', 'asc', 'desc'. Defaults to 'relevance' when no 'order' criteria is requested. + /// + Task AnonymousSearchForAsync(string searchTerm, string sortBy = "", string sortOrder = "", int page = 1); +#endif + } + + /// /// The search API is a unified search API that returns tickets, users, organizations, and forum topics. /// Define filters to narrow your search results according to result type, date attributes, and object attributes such as ticket requester or tag. /// - public class Search : Core - { + public class Search : Core, ISearch + { public Search(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) { diff --git a/ZendeskApi_v2/Requests/SharingAgreements.cs b/ZendeskApi_v2/Requests/SharingAgreements.cs index 1bcfe34f..dec3403f 100644 --- a/ZendeskApi_v2/Requests/SharingAgreements.cs +++ b/ZendeskApi_v2/Requests/SharingAgreements.cs @@ -5,8 +5,19 @@ namespace ZendeskApi_v2.Requests { - public class SharingAgreements : Core - { + public interface ISharingAgreements : ICore + { +#if SYNC + GroupSharingAgreementResponse GetSharingAgreements(); +#endif + +#if ASYNC + Task GetSharingAgreementsAsync(); +#endif + } + + public class SharingAgreements : Core, ISharingAgreements + { public SharingAgreements(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) diff --git a/ZendeskApi_v2/Requests/Tags.cs b/ZendeskApi_v2/Requests/Tags.cs index 9abca41f..3aa22049 100644 --- a/ZendeskApi_v2/Requests/Tags.cs +++ b/ZendeskApi_v2/Requests/Tags.cs @@ -6,8 +6,33 @@ namespace ZendeskApi_v2.Requests { - public class Tags : Core - { + public interface ITags : ICore + { +#if SYNC + GroupTagResult GetTags(); + + /// + /// Returns an array of registered and recent tag names that start with the specified name. The name must be at least 2 characters in length. + /// + /// + /// + TagAutocompleteResponse AutocompleteTags(string name); +#endif + +#if ASYNC + Task GetTagsAsync(); + + /// + /// Returns an array of registered and recent tag names that start with the specified name. The name must be at least 2 characters in length. + /// + /// + /// + Task AutocompleteTagsAsync(string name); +#endif + } + + public class Tags : Core, ITags + { public Tags(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) { diff --git a/ZendeskApi_v2/Requests/Tickets.cs b/ZendeskApi_v2/Requests/Tickets.cs index 3a637ebc..4da652c5 100644 --- a/ZendeskApi_v2/Requests/Tickets.cs +++ b/ZendeskApi_v2/Requests/Tickets.cs @@ -13,8 +13,134 @@ namespace ZendeskApi_v2.Requests { - public class Tickets : Core - { + public interface ITickets : ICore + { +#if SYNC + GroupTicketFormResponse GetTicketForms(); + IndividualTicketFormResponse CreateTicketForm(TicketForm ticketForm); + IndividualTicketFormResponse GetTicketFormById(long id); + IndividualTicketFormResponse UpdateTicketForm(TicketForm ticketForm); + bool ReorderTicketForms(long[] orderedTicketFormIds); + IndividualTicketFormResponse CloneTicketForm(long ticketFormId); + bool DeleteTicketForm(long id); + GroupTicketResponse GetAllTickets(); + GroupTicketResponse GetTicketsByViewID(int id); + GroupTicketResponse GetTicketsByOrganizationID(long id); + GroupTicketResponse GetTicketsByOrganizationID(long id, int pageNumber, int itemsPerPage); + GroupTicketResponse GetRecentTickets(); + GroupTicketResponse GetTicketsByUserID(long userId); + GroupTicketResponse GetTicketsWhereUserIsCopied(long userId); + IndividualTicketResponse GetTicket(long id); + GroupCommentResponse GetTicketComments(long ticketId); + GroupTicketResponse GetMultipleTickets(IEnumerable ids); + IndividualTicketResponse CreateTicket(Ticket ticket); + + /// + /// UpdateTicket a ticket or add comments to it. Keep in mind that somethings like the description can't be updated. + /// + /// + /// + /// + IndividualTicketResponse UpdateTicket(Ticket ticket, Comment comment=null); + + JobStatusResponse BulkUpdate(IEnumerable ids, BulkUpdate info); + bool Delete(long id); + bool DeleteMultiple(IEnumerable ids); + GroupUserResponse GetCollaborators(long id); + GroupTicketResponse GetIncidents(long id); + GroupTicketResponse GetProblems(); + GroupTicketResponse AutoCompleteProblems(string text); + GroupAuditResponse GetAudits(long ticketId); + IndividualAuditResponse GetAuditById(long ticketId, long auditId); + bool MarkAuditAsTrusted(long ticketId, long auditId); + TicketExportResponse GetInrementalTicketExport(DateTime startTime); + + /// + /// Since the other method can only be called once every 5 minutes it is not sutable for Automated tests. + /// + /// + /// + TicketExportResponse __TestOnly__GetInrementalTicketExport(DateTime startTime); + + GroupTicketFieldResponse GetTicketFields(); + IndividualTicketFieldResponse GetTicketFieldById(long id); + IndividualTicketFieldResponse CreateTicketField(TicketField ticketField); + IndividualTicketFieldResponse UpdateTicketField(TicketField ticketField); + bool DeleteTicketField(long id); + GroupSuspendedTicketResponse GetSuspendedTickets(); + IndividualSuspendedTicketResponse GetSuspendedTicketById(long id); + bool RecoverSuspendedTicket(long id); + bool RecoverManySuspendedTickets(IEnumerable ids); + bool DeleteSuspendedTickets(long id); + bool DeleteManySuspendedTickets(IEnumerable ids); + GroupTicketMetricResponse GetAllTicketMetrics(); + IndividualTicketMetricResponse GetTicketMetricsForTicket(long ticket_id); +#endif + +#if ASYNC + Task GetAllTicketsAsync(); + Task GetTicketsByViewIDAsync(int id); + Task GetTicketsByOrganizationIDAsync(long id); + Task GetRecentTicketsAsync(); + Task GetTicketsByUserIDAsync(long userId); + Task GetTicketsWhereUserIsCopiedAsync(long userId); + Task GetTicketAsync(long id); + Task GetTicketCommentsAsync(long ticketId); + Task GetMultipleTicketsAsync(IEnumerable ids); + Task CreateTicketAsync(Ticket ticket); + + /// + /// UpdateTicket a ticket or add comments to it. Keep in mind that somethings like the description can't be updated. + /// + /// + /// + /// + Task UpdateTicketAsync(Ticket ticket, Comment comment=null); + + Task BulkUpdateAsync(IEnumerable ids, BulkUpdate info); + Task DeleteAsync(long id); + Task DeleteMultipleAsync(IEnumerable ids); + Task GetCollaboratorsAsync(long id); + Task GetIncidentsAsync(long id); + Task GetProblemsAsync(); + Task AutoCompleteProblemsAsync(string text); + Task GetAuditsAsync(long ticketId); + Task GetAuditByIdAsync(long ticketId, long auditId); + Task MarkAuditAsTrustedAsync(long ticketId, long auditId); + Task GetInrementalTicketExportAsync(DateTime startTime); + + /// + /// Since the other method can only be called once every 5 minutes it is not sutable for Automated tests. + /// + /// + /// + Task __TestOnly__GetInrementalTicketExportAsync(DateTime startTime); + + Task GetTicketFieldsAsync(); + Task GetTicketFieldByIdAsync(long id); + Task CreateTicketFieldAsync(TicketField ticketField); + Task UpdateTicketFieldAsync(TicketField ticketField); + Task DeleteTicketFieldAsync(long id); + Task GetSuspendedTicketsAsync(); + Task GetSuspendedTicketByIdAsync(long id); + Task RecoverSuspendedTicketAsync(long id); + Task RecoverManySuspendedTicketsAsync(IEnumerable ids); + Task DeleteSuspendedTicketsAsync(long id); + Task DeleteManySuspendedTicketsAsync(IEnumerable ids); + Task GetTicketFormsAsync(); + Task CreateTicketFormAsync(TicketForm ticketForm); + Task GetTicketFormByIdAsync(long id); + Task UpdateTicketFormAsync(TicketForm ticketForm); + Task ReorderTicketFormsAsync(long[] orderedTicketFormIds); + Task CloneTicketFormAsync(long ticketFormId); + Task DeleteTicketFormAsync(long id); + Task GetAllTicketMetricsAsync(); + Task GetTicketMetricsForTicketAsync(long ticket_id); +#endif + } + + public class Tickets : Core, ITickets + { private const string _tickets = "tickets"; private const string _ticket_forms = "ticket_forms"; private const string _views = "views"; diff --git a/ZendeskApi_v2/Requests/Topics.cs b/ZendeskApi_v2/Requests/Topics.cs index e41b7e63..fa50879a 100644 --- a/ZendeskApi_v2/Requests/Topics.cs +++ b/ZendeskApi_v2/Requests/Topics.cs @@ -7,8 +7,81 @@ namespace ZendeskApi_v2.Requests { - public class Topics : Core - { + public interface ITopics : ICore + { +#if SYNC + GroupTopicResponse GetTopics(); + IndividualTopicResponse GetTopicById(long topicId); + GroupTopicResponse GetMultipleTopicsById(IEnumerable topicIds); + GroupTopicResponse GetTopicsByForum(long forumId); + GroupTopicResponse GetTopicsByUser(long userId); + IndividualTopicResponse CreateTopic(Topic topic); + IndividualTopicResponse UpdateTopic(Topic topic); + bool DeleteTopic(long topicId); + GroupTopicCommentResponse GetTopicCommentsByTopicId(long topicId); + GroupTopicCommentResponse GetTopicCommentsByUserId(long userId); + IndividualTopicCommentResponse GetSpecificTopicCommentByTopic(long topicId, long commentId); + IndividualTopicCommentResponse GetSpecificTopicCommentByUser(long userId, long commentId); + IndividualTopicCommentResponse CreateTopicComment(long topicId, TopicComment topicComment); + IndividualTopicCommentResponse UpdateTopicComment(TopicComment topicComment); + bool DeleteTopicComment(long topicId, long commentId); + GroupTopicSubscriptionResponse GetTopicSubscriptionsByTopic(long topicId); + GroupTopicSubscriptionResponse GetAllTopicSubscriptions(); + IndividualTopicSubscriptionResponse GetTopicSubscriptionById(long topicSubscriptionId); + IndividualTopicSubscriptionResponse CreateTopicSubscription(long userId, long topicId); + bool DeleteTopicSubscription(long topicSubscriptionId); + GroupTopicVoteResponse GetTopicVotes(long topicId); + GroupTopicVoteResponse GetTopicVotesByUser(long userId); + + /// + /// Checks to see if the current user has cast a vote in this topic. Returns null if not + /// + /// + /// + IndividualTopicVoteResponse CheckForVote(long topicId); + + IndividualTopicVoteResponse CreateVote(long topicId); + bool DeleteVote(long topicId); +#endif + +#if ASYNC + Task GetTopicsAsync(); + Task GetTopicByIdAsync(long topicId); + Task GetMultipleTopicsByIdAsync(IEnumerable topicIds); + Task GetTopicsByForumAsync(long forumId); + Task GetTopicsByUserAsync(long userId); + Task CreateTopicAsync(Topic topic); + Task UpdateTopicAsync(Topic topic); + Task DeleteTopicAsync(long topicId); + Task GetTopicCommentsByTopicIdAsync(long topicId); + Task GetTopicCommentsByUserIdAsync(long userId); + Task GetSpecificTopicCommentByTopicAsync(long topicId, long commentId); + Task GetSpecificTopicCommentByUserAsync(long userId, long commentId); + Task CreateTopicCommentAsync(long topicId, TopicComment topicComment); + Task UpdateTopicCommentAsync(TopicComment topicComment); + Task DeleteTopicCommentAsync(long topicId, long commentId); + Task GetTopicSubscriptionsByTopicAsync(long topicId); + Task GetAllTopicSubscriptionsAsync(); + Task GetTopicSubscriptionByIdAsync(long topicSubscriptionId); + Task CreateTopicSubscriptionAsync(long userId, long topicId); + Task DeleteTopicSubscriptionAsync(long topicSubscriptionId); + Task GetTopicVotesAsync(long topicId); + Task GetTopicVotesByUserAsync(long userId); + + /// + /// Checks to see if the current user has cast a vote in this topic. Returns null if not + /// + /// + /// + Task CheckForVoteAsync(long topicId); + + Task CreateVoteAsync(long topicId); + Task DeleteVoteAsync(long topicId); +#endif + } + + public class Topics : Core, ITopics + { public Topics(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) { diff --git a/ZendeskApi_v2/Requests/Triggers.cs b/ZendeskApi_v2/Requests/Triggers.cs index f51596b8..e17a79bf 100644 --- a/ZendeskApi_v2/Requests/Triggers.cs +++ b/ZendeskApi_v2/Requests/Triggers.cs @@ -5,8 +5,23 @@ namespace ZendeskApi_v2.Requests { - public class Triggers : Core - { + public interface ITriggers : ICore + { +#if SYNC + GroupTriggerResponse GetTriggers(); + IndividualTriggerResponse GetTriggerById(long id); + GroupTriggerResponse GetActiveTriggers(); +#endif + +#if ASYNC + Task GetTriggersAsync(); + Task GetTriggerByIdAsync(long id); + Task GetActiveTriggersAsync(); +#endif + } + + public class Triggers : Core, ITriggers + { public Triggers(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) { diff --git a/ZendeskApi_v2/Requests/Users.cs b/ZendeskApi_v2/Requests/Users.cs index 716850e7..cffb7749 100644 --- a/ZendeskApi_v2/Requests/Users.cs +++ b/ZendeskApi_v2/Requests/Users.cs @@ -9,8 +9,75 @@ namespace ZendeskApi_v2.Requests { - public class Users : Core - { + public interface IUsers : ICore + { +#if SYNC + IndividualUserResponse GetCurrentUser(); + GroupUserResponse GetAllUsers(); + IndividualUserResponse GetUser(long id); + GroupUserResponse SearchByEmail(string email); + GroupUserResponse SearchByExternalId(string externalId); + GroupUserResponse GetUsersInGroup(long id); + GroupUserResponse GetUsersInOrganization(long id); + IndividualUserResponse CreateUser(User user); + JobStatusResponse BulkCreateUsers(IEnumerable users); + IndividualUserResponse SuspendUser(long id); + IndividualUserResponse UpdateUser(User user); + bool DeleteUser(long id); + bool SetUsersPassword(long userId, string newPassword); + bool ChangeUsersPassword(long userId, string oldPassword, string newPassword); + GroupUserIdentityResponse GetUserIdentities(long userId); + IndividualUserIdentityResponse GetSpecificUserIdentity(long userId, long identityId); + IndividualUserIdentityResponse AddUserIdentity(long userId, UserIdentity identity); + IndividualUserIdentityResponse SetUserIdentityAsVerified(long userId, long identityId); + GroupUserIdentityResponse SetUserIdentityAsPrimary(long userId, long identityId); + + /// + /// This sends a verification email to the user, asking him to click a link in order to verify ownership of the email address + /// + /// + /// + /// + IndividualUserIdentityResponse SendUserVerificationRequest(long userId, long identityId); + + bool DeleteUserIdentity(long userId, long identityId); +#endif + +#if ASYNC + Task GetCurrentUserAsync(); + Task GetAllUsersAsync(); + Task GetUserAsync(long id); + Task SearchByEmailAsync(string email); + Task SearchByExternalIdAsync(string externalId); + Task GetUsersInGroupAsync(long id); + Task GetUsersInOrganizationAsync(long id); + Task CreateUserAsync(User user); + Task BulkCreateUsersAsync(IEnumerable users); + Task SuspendUserAsync(long id); + Task UpdateUserAsync(User user); + Task DeleteUserAsync(long id); + Task SetUsersPasswordAsync(long userId, string newPassword); + Task ChangeUsersPasswordAsync(long userId, string oldPassword, string newPassword); + Task GetUserIdentitiesAsync(long userId); + Task GetSpecificUserIdentityAsync(long userId, long identityId); + Task AddUserIdentityAsync(long userId, UserIdentity identity); + Task SetUserIdentityAsVerifiedAsync(long userId, long identityId); + Task SetUserIdentityAsPrimaryAsync(long userId, long identityId); + + /// + /// This sends a verification email to the user, asking him to click a link in order to verify ownership of the email address + /// + /// + /// + /// + Task SendUserVerificationRequestAsync(long userId, long identityId); + + Task DeleteUserIdentityAsync(long userId, long identityId); +#endif + } + + public class Users : Core, IUsers + { public Users(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) { diff --git a/ZendeskApi_v2/Requests/Views.cs b/ZendeskApi_v2/Requests/Views.cs index d9b4b4a6..6039b540 100644 --- a/ZendeskApi_v2/Requests/Views.cs +++ b/ZendeskApi_v2/Requests/Views.cs @@ -8,8 +8,33 @@ namespace ZendeskApi_v2.Requests { - public class Views : Core - { + public interface IViews : ICore + { +#if SYNC + GroupViewResponse GetAllViews(); + GroupViewResponse GetActiveViews(); + GroupViewResponse GetCompactViews(); + IndividualViewResponse GetView(long id); + ExecutedViewResponse ExecuteView(long id, string sortCol = "", bool ascending = true); + ExecutedViewResponse PreviewView(PreviewViewRequest preview); + GroupViewCountResponse GetViewCounts(IEnumerable viewIds); + IndividualViewCountResponse GetViewCount(long viewId); +#endif + +#if ASYNC + Task GetAllViewsAsync(); + Task GetActiveViewsAsync(); + Task GetCompactViewsAsync(); + Task GetViewAsync(long id); + Task ExecuteViewAsync(long id, string sortCol = "", bool ascending = true); + Task PreviewViewAsync(PreviewViewRequest preview); + Task GetViewCountsAsync(IEnumerable viewIds); + Task GetViewCountAsync(long viewId); +#endif + } + + public class Views : Core, IViews + { public Views(string yourZendeskUrl, string user, string password, string apiToken) : base(yourZendeskUrl, user, password, apiToken) diff --git a/ZendeskApi_v2/ZendeskApi.cs b/ZendeskApi_v2/ZendeskApi.cs index 4cbe6f0f..8ba1a13a 100644 --- a/ZendeskApi_v2/ZendeskApi.cs +++ b/ZendeskApi_v2/ZendeskApi.cs @@ -10,28 +10,54 @@ namespace ZendeskApi_v2 { - public class ZendeskApi + public interface IZendeskApi + { + ITickets Tickets { get; } + IAttachments Attachments { get; } + IViews Views { get; } + IUsers Users { get; } + IRequests Requests { get; } + IGroups Groups { get; } + ICustomAgentRoles CustomAgentRoles { get; } + IOrganizations Organizations { get; } + ISearch Search { get; } + ITags Tags { get; } + IForums Forums { get; } + ICategories Categories { get; } + ITopics Topics { get; } + IAccountsAndActivity AccountsAndActivity { get; } + IJobStatuses JobStatuses { get; } + ILocales Locales { get; } + IMacros Macros { get; } + ISatisfactionRatings SatisfactionRatings { get; } + ISharingAgreements SharingAgreements { get; } + ITriggers Triggers { get; } + + string ZendeskUrl { get; } + } + + public class ZendeskApi : IZendeskApi { - public Tickets Tickets { get; set; } - public Attachments Attachments { get; set; } - public Views Views { get; set; } - public Users Users { get; set; } - public Requests.Requests Requests { get; set; } - public Groups Groups { get; set; } - public CustomAgentRoles CustomAgentRoles { get; set; } - public Organizations Organizations { get; set; } - public Search Search { get; set; } - public Tags Tags { get; set; } - public Forums Forums { get; set; } - public Categories Categories { get; set; } - public Topics Topics { get; set; } - public AccountsAndActivity AccountsAndActivity { get; set; } - public JobStatuses JobStatuses { get; set; } - public Locales Locales { get; set; } - public Macros Macros { get; set; } - public SatisfactionRatings SatisfactionRatings { get; set; } - public SharingAgreements SharingAgreements { get; set; } - public Triggers Triggers { get; set; } + public ITickets Tickets { get; set; } + public IAttachments Attachments { get; set; } + public IViews Views { get; set; } + public IUsers Users { get; set; } + public IRequests Requests { get; set; } + public IGroups Groups { get; set; } + public ICustomAgentRoles CustomAgentRoles { get; set; } + public IOrganizations Organizations { get; set; } + public ISearch Search { get; set; } + public ITags Tags { get; set; } + public IForums Forums { get; set; } + public ICategories Categories { get; set; } + public ITopics Topics { get; set; } + public IAccountsAndActivity AccountsAndActivity { get; set; } + public IJobStatuses JobStatuses { get; set; } + public ILocales Locales { get; set; } + public IMacros Macros { get; set; } + public ISatisfactionRatings SatisfactionRatings { get; set; } + public ISharingAgreements SharingAgreements { get; set; } + public ITriggers Triggers { get; set; } public string ZendeskUrl { get; set; } @@ -83,26 +109,26 @@ public ZendeskApi(IWebProxy proxy, string yourZendeskUrl, string user, string pa { if (proxy == null) return; - Tickets.Proxy = proxy; - Attachments.Proxy = proxy; - Views.Proxy = proxy; - Users.Proxy = proxy; - Requests.Proxy = proxy; - Groups.Proxy = proxy; - CustomAgentRoles.Proxy = proxy; - Organizations.Proxy = proxy; - Search.Proxy = proxy; - Tags.Proxy = proxy; - Forums.Proxy = proxy; - Categories.Proxy = proxy; - Topics.Proxy = proxy; - AccountsAndActivity.Proxy = proxy; - JobStatuses.Proxy = proxy; - Locales.Proxy = proxy; - Macros.Proxy = proxy; - SatisfactionRatings.Proxy = proxy; - SharingAgreements.Proxy = proxy; - Triggers.Proxy = proxy; + ((Tickets)Tickets).Proxy = proxy; + ((Attachments)Attachments).Proxy = proxy; + ((Views)Views).Proxy = proxy; + ((Users)Users).Proxy = proxy; + ((Requests.Requests)Requests).Proxy = proxy; + ((Groups)Groups).Proxy = proxy; + ((CustomAgentRoles)CustomAgentRoles).Proxy = proxy; + ((Organizations)Organizations).Proxy = proxy; + ((Search)Search).Proxy = proxy; + ((Tags)Tags).Proxy = proxy; + ((Forums)Forums).Proxy = proxy; + ((Categories)Categories).Proxy = proxy; + ((Topics)Topics).Proxy = proxy; + ((AccountsAndActivity)AccountsAndActivity).Proxy = proxy; + ((JobStatuses)JobStatuses).Proxy = proxy; + ((Locales)Locales).Proxy = proxy; + ((Macros)Macros).Proxy = proxy; + ((SatisfactionRatings)SatisfactionRatings).Proxy = proxy; + ((SharingAgreements)SharingAgreements).Proxy = proxy; + ((Triggers)Triggers).Proxy = proxy; } #endif