/// <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"></param> /// <param name="profileData"></param> /// <returns></returns> public int? CreateOrganizationAppStoreProfile(int organizationId, Contact profileData) { string url = string.Format("/org/{0}/appstore", organizationId); dynamic response = _podio.Post<dynamic>(url, profileData); if (response != null) return (int)response["profile_id"]; else return null; }
/// <summary> /// Updates the appstore profile of the organization. /// </summary> /// <param name="organizationId"></param> /// <param name="profileData">The value or list of values for the given field. For a list of fields see the contact area</param> public void UpdateOrganizationAppStoreProfile(int organizationId, Contact profileData) { string url = string.Format("/org/{0}/appstore", organizationId); _podio.Put<dynamic>(url, profileData); }
/// <summary> /// Updates the billing profile of the organization. The profile is used for billing and contact information. /// </summary> /// <param name="organizationId"></param> /// <param name="profileData">The value or list of values for the given field. For a list of fields see the contact area</param> public void UpdateOrganizationBillingProfile(int organizationId, Contact profileData) { string url = string.Format("/org/{0}/billing", organizationId); _podio.Put<dynamic>(url, profileData); }
/// <summary> /// Updates the billing profile of the organization. The profile is used for billing and contact information. /// </summary> /// <param name="organizationId"></param> /// <param name="profileData">The value or list of values for the given field. For a list of fields see the contact area</param> public async Task<dynamic> UpdateOrganizationBillingProfile(int organizationId, Contact profileData) { string url = string.Format("/org/{0}/billing", organizationId); return await _podio.Put<dynamic>(url, profileData); }
/// <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"></param> /// <param name="contact"></param> public async Task<dynamic> UpdateContact(int profileId, Contact contact) { string url = string.Format("/contact/{0}", profileId); return await _podio.Put<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.Post<dynamic>(url, contact); return (int) response["profile_id"]; }
/// <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"></param> /// <param name="contact"></param> public void UpdateContact(int profileId, Contact contact) { string url = string.Format("/contact/{0}", profileId); _podio.Put<dynamic>(url, contact); }
/// <summary> /// Updates the fields of an existing profile. Fields not specified will not be updated. To delete a field set the /// value of the field to null. /// <para>Podio API Reference: https://developers.podio.com/doc/users/update-profile-22402 </para> /// </summary> /// <param name="updatedProfile">The value or list of values for the given field. For a list of fields see the contact area</param> public async Task<dynamic> UpdateProfile(Contact updatedProfile) { string url = "/user/profile/"; return await _podio.Put<dynamic>(url, updatedProfile); }