/// <summary> /// Creates an app store profile for the organization if it doesn't already exist. /// <para>Podio API Reference: https://developers.podio.com/doc/organizations/create-organization-app-store-profile-87819 </para> /// </summary> /// <param name="organizationId">The organization identifier.</param> /// <param name="profileData">The profile data.</param> /// <returns>Task<System.Nullable<System.Int32>>.</returns> public async Task<int?> CreateOrganizationAppStoreProfile(int organizationId, Contact profileData) { string url = string.Format("/org/{0}/appstore", organizationId); dynamic response = await _podio.PostAsync<dynamic>(url, profileData); if (response != null) return (int)response["profile_id"]; else return null; }
/// <summary> /// Updates the contact with the given profile id. /// <para>Podio API Reference: https://developers.podio.com/doc/contacts/update-contact-60556 </para> /// </summary> /// <param name="profileId">The profile identifier.</param> /// <param name="contact">The contact.</param> /// <returns>Task.</returns> public async Task UpdateContact(int profileId, Contact contact) { string url = string.Format("/contact/{0}", profileId); await _podio.PutAsync<dynamic>(url, contact); }
/// <summary> /// Creates a new space contact for use by everyone on the space. /// <para>Podio API Reference: https://developers.podio.com/doc/contacts/create-space-contact-65590 </para> /// </summary> /// <param name="spaceId"></param> /// <param name="contact"></param> /// <returns>profile_id of the created contact</returns> public async Task<int> CreateContact(int spaceId, Contact contact) { string url = string.Format("/contact/space/{0}/", spaceId); dynamic response = await _podio.PostAsync<dynamic>(url, contact); return (int)response["profile_id"]; }
/// <summary> /// Updates the billing profile of the organization. The profile is used for billing and contact information. /// </summary> /// <param name="organizationId">The organization identifier.</param> /// <param name="profileData">The value or list of values for the given field. For a list of fields see the contact area</param> /// <returns>Task.</returns> public async Task UpdateOrganizationBillingProfile(int organizationId, Contact profileData) { string url = string.Format("/org/{0}/billing", organizationId); await _podio.PutAsync<dynamic>(url, profileData); }