/// <summary> /// Returns the specified Contact if it exist. /// </summary> /// <param name="agentId"> /// Must include either: /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an Contact entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your Contact request to be accepted. /// /// MoxiWorksAgentId /// This is the Moxi Works Platform ID of the agent which an Contact entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or moxi_works_agent_id is required /// and must reference a valid Moxi Works Agent ID for your Contact request to be accepted. /// Agent ID for your Contact request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="partnerContactId"> /// This is the unique identifer you use in your system that has been associated /// with the Contact that you are finding. /// </param> /// <returns> Conact Response empty if contact not found</returns> public async Task <Response <Contact> > GetContactAsync(string agentId, AgentIdType agentIdType, string partnerContactId) { var builder = new UriBuilder($"contacts/{partnerContactId}") .AddQueryPerameterAgentId(agentId, agentIdType); return(await Client.GetRequestAsync <Contact>(builder.GetUrl())); }
/// <summary> /// Get Single Group /// </summary> /// <param name="agentId"> /// Must include either: /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an Group entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your Group request to be accepted. /// /// MoxiWorksAgentId /// This is the Moxi Works Platform ID of the agent which an Group entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or moxi_works_agent_id is required /// and must reference a valid Moxi Works Agent ID for your Group request to be accepted. /// Agent ID for your Group request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="moxiWorksGroupId">This is the name of a Group to be shown</param> /// <returns></returns> public async Task <Response <Group> > GetGroupAsync(string agentId, AgentIdType agentIdType, string moxiWorksGroupId) { var builder = new UriBuilder($"groups/{moxiWorksGroupId}") .AddQueryPerameterAgentId(agentId, agentIdType); return(await Client.GetRequestAsync <Group>(builder.GetUrl())); }
/// <summary> /// Returns the specified Task if it exist. /// </summary> /// <param name="agentId"> /// Must include either: /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an Group entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your Group request to be accepted. /// /// MoxiWorksAgentId /// This is the Moxi Works Platform ID of the agent which an Group entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or moxi_works_agent_id is required /// and must reference a valid Moxi Works Agent ID for your Group request to be accepted. /// Agent ID for your Group request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="partnerContactId"> /// This is the unique identifer you use in your system that has been associated with the Contact that this Task regards. /// </param> /// <param name="partnerTaskId"></param> /// <returns>Task Response empty if task does not exist</returns> public async Task <Response <Task> > GetTaskAsync(string agentId, AgentIdType agentIdType, string partnerContactId, string partnerTaskId) { var builder = new UriBuilder($"task/{partnerTaskId}") .AddQueryPerameterAgentId(agentId, agentIdType) .AddQueryParameter("partner_contact_id", partnerContactId); return(await Client.GetRequestAsync <Task>(builder.GetUrl())); }
public UriBuilder AddQueryPerameterAgentId(string agentId, AgentIdType agentIdType) { if (agentIdType == AgentIdType.NotAvaliable) { return(this); } AddQueryParameter(agentIdType == AgentIdType.AgentUuid ? "agent_uuid" : "moxi_works_agent_id", agentId); return(this); }
/// <summary> /// Return a list of agents tasks based on multople parameters. /// </summary> /// <param name="agentId"> /// Must include either: /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an Group entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your Group request to be accepted. /// This is the Moxi Works Platform ID of the agent which an Group entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or moxi_works_agent_id is required /// and must reference a valid Moxi Works Agent ID for your Group request to be accepted. /// Agent ID for your Group request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="startDate">Date to start Searching</param> /// <param name="endDate">Date to end Search</param> /// <param name="partnerContactId"> /// This is the unique identifer you use in your system that has been associated with the Contact that this Task regards. /// </param> /// <param name="pageNumber">The page you want to view.</param> /// <returns>Response with a list of Task in a Task Response object </returns> public async Task <Response <TaskResponse> > GetTasksAsync(string agentId, AgentIdType agentIdType, DateTime?startDate, DateTime?endDate, string partnerContactId, int pageNumber = 1) { var builder = new UriBuilder($"tasks") .AddQueryPerameterAgentId(agentId, agentIdType) .AddQueryParameter("date_due_start", startDate) .AddQueryParameter("date_due_end", endDate) .AddQueryParameter("partner_contact_id", partnerContactId) .AddQueryParameter("page_number", pageNumber); return(await Client.GetRequestAsync <TaskResponse>(builder.GetUrl())); }
/// <summary> /// Synchronous wrapper for GetContactsUpdatedSinceAsync /// </summary> public Response <ContactResults> GetContactsUpdatedSince(string agentId, AgentIdType agentIdType, string emailAddress = null, string contactName = null, string phoneNumber = null, DateTime?updatedSince = null, int pageNumber = 1) { return(System.Threading.Tasks.Task.Run(() => GetContactsUpdatedSinceAsync( agentId, agentIdType, emailAddress, contactName, phoneNumber, updatedSince, pageNumber)).Result); }
/// <summary> /// When searching for Group objects using the Moxi Works platform API, format your data using the following parameters. /// </summary> /// <param name="agentId"> /// Must include either: /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an Group entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your Group request to be accepted. /// /// MoxiWorksAgentId /// This is the Moxi Works Platform ID of the agent which an Group entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or moxi_works_agent_id is required /// and must reference a valid Moxi Works Agent ID for your Group request to be accepted. /// Agent ID for your Group request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="name">This is the name of a Group to be searched for.</param> /// <returns></returns> public async Task <Response <ICollection <GroupItem> > > GetGroupsAsync(string agentId, AgentIdType agentIdType, string name = null) { var builder = new UriBuilder("groups") .AddQueryPerameterAgentId(agentId, agentIdType) .AddQueryParameter("name", name); var results = await Client.GetRequestAsync <List <GroupItem> >(builder.GetUrl()); return(new Response <ICollection <GroupItem> > { Errors = results.Errors, Item = results.Item }); }
/// <summary> /// Return all agents tasks due between start and end data. /// </summary> /// <param name="agentId"> /// Must include either: /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an Group entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your Group request to be accepted. /// /// MoxiWorksAgentId /// This is the Moxi Works Platform ID of the agent which an Group entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or moxi_works_agent_id is required /// and must reference a valid Moxi Works Agent ID for your Group request to be accepted. /// Agent ID for your Group request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="startDate">Date to start Searching</param> /// <param name="endDate">Date to end Search</param> /// This is the unique identifer you use in your system that has been associated with the Contact that this Task regards. /// </param> /// <param name="pageNumber">The page you want to view.</param> /// <returns>Response with a list of Task in a Task Response object </returns> public async Task <Response <TaskResponse> > GetTaskDueBetweenAsync(string agentId, AgentIdType agentIdType, DateTime startDate, DateTime endDate, int pageNumber = 1) { return(await GetTasksAsync(agentId, agentIdType, startDate, endDate, null, pageNumber)); }
/// <summary> /// Delete an existing event /// </summary> /// <param name="agentId"> /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an Event entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your Event entry request to be accepted. /// /// MoxiWorksAgentId /// This is the Moxi Works Platform ID of the agent which an Event entry entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or MoxiWorksAgentID is required /// and must reference a valid Moxi Works Agent ID for your Event entry request to be accepted. /// Agent ID for your Buyer Transaction entry request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="eventId">This is the unique identifer you use in your system that has been associated with the Event. This data is required and must reference a previously created Event you have created on The Moxi Works Platform.</param> /// <returns> if the delete was successful.</returns> public async Task <Response <EventDeleteResult> > DeleteEventAsync(string agentId, AgentIdType agentIdType, string eventId) { var builder = new UriBuilder($"events/{eventId}") .AddQueryPerameterAgentId(agentId, agentIdType); return(await Client.DeleteRequestAsync <EventDeleteResult>(builder.GetUrl())); }
/// <summary> /// Returns a ActionLogResult that contains the contacts ActionLogs /// </summary> /// <param name="agentId"> /// Must include either: /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an ActionLog entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your ActionLog request to be accepted. /// /// MoxiWorksAgentId /// This is the Moxi Works Platform ID of the agent which an ActionLog entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or moxi_works_agent_id is required /// and must reference a valid Moxi Works Agent ID for your ActionLog request to be accepted. /// Agent ID for your ActionLog request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="moxiWorksContactId">This is the Moxi Works Platform ID of the Contact /// which the ActionLog objects are associated with. This will be an RFC 4122 compliant UUID. /// This data is required and must reference a valid Moxi Works Contact ID for your /// ActionLog Index request to be accepted. This is the same as the moxi_works_contact_id /// attribute of the Contact response. /// </param> /// <param name="partnerContactId"> /// This is the unique identifer you use in your system that has been associated /// with the Contact that you are creating an ActionLog entry about. /// You should have already created the Contact record on the Moxi Works Platform /// using Contact Create before attempting to use your system’s contact ID to show /// ActionLog entries for the Contact. Your request will be rejected if the Contact /// record does not exist. /// </param> /// <returns>List of contact's logged actions</returns> public async Task <Response <ActionLogResults> > GetActionLogsAsync(string agentId, AgentIdType agentIdType, string moxiWorksContactId, string partnerContactId) { var builder = new UriBuilder("action_logs") .AddQueryPerameterAgentId(agentId, agentIdType) .AddQueryParameter("moxi_works_contact_id", moxiWorksContactId) .AddQueryParameter("partner_contact_id", partnerContactId); return(await Client.GetRequestAsync <ActionLogResults>(builder.GetUrl())); }
/// <summary> /// Gets Contact either through the AgentUuid or MoxiWorksAgentId. /// </summary> /// <param name="agentId"> /// Must include either: /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an ActionLog entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your ActionLog request to be accepted. /// /// MoxiWorksAgentId /// This is the Moxi Works Platform ID of the agent which an ActionLog entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or moxi_works_agent_id is required /// and must reference a valid Moxi Works Agent ID for your ActionLog request to be accepted. /// Agent ID for your ActionLog request to be accepted. /// </param> /// <param name="emailAddress">An email address associated with the Contact record. May be primary or secondary.</param> /// <param name="contactName">The full name of the contact which you are trying to find the Contact record for.</param> /// <param name="phoneNumber">A phone number associated with the Contact record. May be primary or secondary.</param> /// <param name="updatedSince">Paged responses of all Contact objects updated after this Unix timestamp will be returned in the response.</param> /// <param name="pageNumber">Page of Contact records to return. Use if total_pages indicates that there is more than one page of data available.</param> /// <returns>response of contacts</returns> public async Task <Response <ContactResults> > GetContactsUpdatedSinceAsync(string agentId, AgentIdType agentIdType, string emailAddress = null, string contactName = null, string phoneNumber = null, DateTime?updatedSince = null, int pageNumber = 1) { var builder = new UriBuilder("contacts"); builder.AddQueryPerameterAgentId(agentId, agentIdType) .AddQueryParameter("email_address", emailAddress) .AddQueryParameter("contact_name", contactName) .AddQueryParameter("phone_number", phoneNumber) .AddQueryParameter("page_number", pageNumber); if (updatedSince != null) { builder.AddQueryParameter("updated_since", updatedSince.Value); } return(await Client.GetRequestAsync <ContactResults>(builder.GetUrl())); }
/// <summary> /// Gets Contact through the specified ID type. /// </summary> /// <param name="agentId"> /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an ActionLog entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your ActionLog request to be accepted. /// </param> /// <param name="emailAddress">An email address associated with the Contact record. May be primary or secondary.</param> /// <param name="contactName">The full name of the contact which you are trying to find the Contact record for.</param> /// <param name="phoneNumber">A phone number associated with the Contact record. May be primary or secondary.</param> /// <param name="updatedSince">Paged responses of all Contact objects updated after this Unix timestamp will be returned in the response.</param> /// <param name="pageNumber">Page of Contact records to return. Use if total_pages indicates that there is more than one page of data available.</param> /// <returns>response of contacts</returns> public async Task <Response <ContactResults> > GetContactsAsync(string agentId, AgentIdType agentIdType, string emailAddress = null, string contactName = null, string phoneNumber = null, DateTime?updatedSince = null, int pageNumber = 1) { return(await GetContactsUpdatedSinceAsync(agentId, agentIdType, emailAddress, contactName, phoneNumber, updatedSince, pageNumber)); }
/// <summary> /// Requests a SellerTransaction /// </summary> /// <param name="agentId"> /// Must include either: /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an SellerTransaction entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your SellerTransaction request to be accepted. /// /// MoxiWorksAgentId /// This is the Moxi Works Platform ID of the agent which an SellerTransaction entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or moxi_works_agent_id is required /// and must reference a valid Moxi Works Agent ID for your SellerTransaction request to be accepted. /// Agent ID for your Group request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="moxiworksTransactionId"> /// This is the Moxi Works Platform ID of the SellerTransaction which you have created. This will be an /// RFC 4122 compliant UUID.This ID should be recorded on response as it is the key ID for updating the /// SellerTransaction. /// </param> /// <returns>SellerTransaction or an empty SellerTransaction of no match is found</returns> public async Task <Response <SellerTransaction> > GetSellerTransactionAsync(string agentId, AgentIdType agentIdType, string moxiworksTransactionId) { var builder = new UriBuilder($"seller_transactions/{moxiworksTransactionId}") .AddQueryPerameterAgentId(agentId, agentIdType); return(await Client.GetRequestAsync <SellerTransaction>(builder.GetUrl())); }
/// <summary> /// Request a list of seller transactions /// </summary> /// <param name="agentId"> /// Must include either: /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an SellerTransaction entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your SellerTransaction request to be accepted. /// /// MoxiWorksAgentId /// This is the Moxi Works Platform ID of the agent which an SellerTransaction entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or moxi_works_agent_id is required /// and must reference a valid Moxi Works Agent ID for your SellerTransaction request to be accepted. /// Agent ID for your Group request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="moxiworksContactId">This is the Moxi Works Platform ID of the Contact which this /// SellerTransaction has been associated with. This will be an RFC 4122 compliant UUID. /// </param> /// <param name="partnerContactId"> /// If this Contact was created by your sytem in the Moxi Works Platform, then this is the unique identifer /// you use in your system that has been associated with the Contact that you are creating this /// SellerTransaction for. If the Contact was not created by you, then partner_contact_id will be empty. /// </param> /// <param name="pageNumber">Page of SellerTransaction records to return. Use if total_pages indicates /// that there is more than one page of data available.</param> /// <returns>List of SellerTransactions</returns> public async Task <Response <SellerTransactionResults> > GetSellerTransactionsAsync(string agentId, AgentIdType agentIdType, string moxiworksContactId = null, string partnerContactId = null, int pageNumber = 1) { var builder = new UriBuilder("seller_transactions") .AddQueryPerameterAgentId(agentId, agentIdType) .AddQueryParameter("partner_contact_id", partnerContactId) .AddQueryParameter("moxi_works_contact_id", moxiworksContactId) .AddQueryParameter("page_number", pageNumber); return(await Client.GetRequestAsync <SellerTransactionResults>(builder.GetUrl())); }
/// <summary> /// Searches Moxi Works platform API for EmailCampaign entities. /// </summary> /// <param name="agentId"> /// Must include either: /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an EmailCampaignentry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your EmailCampaignentry request to be accepted. /// /// MoxiWorksAgentId /// This is the Moxi Works Platform ID of the agent which an EmailCampaign entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or moxi_works_agent_id is required /// and must reference a valid Moxi Works Agent ID for your EmailCampaign request to be accepted. /// Agent ID for your EmailCampaign request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="partnerContactId"> /// This is the unique identifer you use in your system that has been associated /// with the w that you are creating an EmailCampaign entry about. /// You should have already created the Contact record on the Moxi Works /// Platform using Contact Create before attempting to use your system’s contact ID /// to show EmailCampaign entries for the Contact. Your request will be rejected if /// the Contact record does not exist. /// </param> /// <returns></returns> public async Task <Response <EmailCampaignResults> > GetEmailCampaignsAsync(string agentId, AgentIdType agentIdType, string partnerContactId) { var builder = new UriBuilder("email_campaigns") .AddQueryPerameterAgentId(agentId, agentIdType) .AddQueryParameter("partner_contact_id", partnerContactId); var res = await Client.GetRequestAsync <List <EmailCampaign> >(builder.GetUrl()); var campaigns = new EmailCampaignResults { EmailCampaigns = res.Item }; var response = new Response <EmailCampaignResults> { Errors = res.Errors, Item = campaigns }; return(response); }
/// <summary> /// Index will return a paged response of listings that have been updated since a given timestamp for a specified company. /// For a list of company IDs that you can request listings for, use the Company Endpoint. /// </summary> /// <param name="moxiWorksCompanyId"> /// A valid Moxi Works Company ID. Use Company Endpoint to determine what moxi_works_company_id you can use. /// </param> /// <param name="agentId"> /// Must include either: /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an Listing entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your Listing request to be accepted. /// /// MoxiWorksAgentId /// This is the Moxi Works Platform ID of the agent which an Listing entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or moxi_works_agent_id is required /// and must reference a valid Moxi Works Agent ID for your Listing request to be accepted. /// Agent ID for your Listing request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="updatedSince"> /// Paged responses of all Listing objects updated after this Unix timestamp will be returned in the response. If no updated_since parameter is included in the request, /// only Listing objects updated in the last seven days will be returned. /// </param> /// <param name="lastMoxiWorksListingId"> /// If fetching a multi-page response, this should be the MoxiWorksListingId found in the last Listing object of the previously fetched page.</param> /// <returns></returns> public async Task <Response <ListingResults> > GetListingsUpdatedSinceAsync(string moxiWorksCompanyId , AgentIdType agentIdType, string agentId = null, DateTime?updatedSince = null , string lastMoxiWorksListingId = null) { var builder = new UriBuilder("listings/") .AddQueryPerameterAgentId(agentId, agentIdType) .AddQueryParameter("moxi_works_company_id", moxiWorksCompanyId) .AddQueryParameter("updated_since", updatedSince) .AddQueryParameter("last_moxi_works_listing_id", lastMoxiWorksListingId); return(await Client.GetRequestAsync <ListingResults>(builder.GetUrl())); }
/// <summary> /// Synchronous wrapper for GetContactAsync /// </summary> public Response <Contact> GetContact(string agentId, AgentIdType agentIdType, string partnerContactId) { return(System.Threading.Tasks.Task.Run(() => GetContactAsync(agentId, agentIdType, partnerContactId)).Result); }
/// <summary> /// Return a list of tasks for a particular contact. /// </summary> /// <param name="agentId"> /// Must include either: /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an Group entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your Group request to be accepted. /// This is the Moxi Works Platform ID of the agent which an Group entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or moxi_works_agent_id is required /// and must reference a valid Moxi Works Agent ID for your Group request to be accepted. /// Agent ID for your Group request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="partnerContactId"> /// This is the unique identifer you use in your system that has been associated with the Contact that this Task regards. /// </param> /// <param name="pageNumber">The page you want to view.</param> /// <returns>Response with a list of Task in a Task Response object </returns> public async Task <Response <TaskResponse> > GetTasksDueForContactForAsync(string agentId, AgentIdType agentIdType, string partnerContactId, int pageNumber = 1) { return(await GetTasksAsync(agentId, agentIdType, null, null, partnerContactId, pageNumber)); }
/// <summary> /// Moxi Works Platform Gallery entities are groups of photos an agent has associated with a listing. /// </summary> /// <param name="agentId"> /// Must include either: /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an Gallery is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your Gallery request to be accepted. /// /// MoxiWorksAgentId /// This is the Moxi Works Platform ID of the agent which an Gallery is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or moxi_works_agent_id is required /// and must reference a valid Moxi Works Agent ID for your Gallery request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="agentId"></param> /// <param name="agentIdType"></param> /// <param name="moxiWorksCompanyId">A valid Moxi Works Company ID. Use Company Endpoint to determine what moxi_works_company_id you can use.</param> /// <returns></returns> public async Task <Response <GalleryResults> > GetAgentGalleries(string agentId, AgentIdType agentIdType, string moxiWorksCompanyId) { var builder = new UriBuilder("gallery") .AddQueryPerameterAgentId(agentId, agentIdType) .AddQueryParameter("moxi_works_company_id", moxiWorksCompanyId); return(await Client.GetRequestAsync <GalleryResults>(builder.GetUrl())); }
/// <summary> /// /// </summary> /// <param name="agentId"> /// AgentUuid /// This is the Moxi Works Platform ID of the agent which an Event entry is associated /// with. This will be an RFC 4122 compliant UUID. /// agent_uuid or moxi_works_agent_id is required and must reference a /// valid Moxi Works Agent ID for your Event entry request to be accepted. /// /// MoxiWorksAgentId /// This is the Moxi Works Platform ID of the agent which an Event entry entry is associated /// with. This will be a string that may take the form of an email address, /// or a unique identification string. agent_uuid or MoxiWorksAgentID is required /// and must reference a valid Moxi Works Agent ID for your Event entry request to be accepted. /// Agent ID for your Buyer Transaction entry request to be accepted. /// </param> /// <param name="agentIdType">What agentId type you are using.</param> /// <param name="eventStart">This is the earliest time that you are searching /// for an Event to be in. This data is required and must be a /// Unix timestamp before eventEnd.</param> /// <param name="eventEnd"> /// This is the latest time that you are searching for an Event to be in. /// This data is required and must be a Unix timestamp after evntStart.</param> /// <returns>List of event within the date params</returns> public async Task <Response <EventResults> > GetEventsByDateAsync(string agentId, AgentIdType agentIdType, int eventStart, int eventEnd) { var builder = new UriBuilder("events") .AddQueryPerameterAgentId(agentId, agentIdType) .AddQueryParameter("date_start", eventStart) .AddQueryParameter("date_end", eventEnd); var resultsList = await Client.GetRequestAsync <List <EventDateList> >(builder.GetUrl()); var results = new EventResults { EventListDates = resultsList.Item }; return(new Response <EventResults> { Errors = resultsList.Errors, Item = results }); }