/// <summary> /// Retrieve a list of all Assigned Items for an account. /// </summary> /// <param name="options"> Read CustomerProfilesEntityAssignments parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of CustomerProfilesEntityAssignments </returns> public static ResourceSet <CustomerProfilesEntityAssignmentsResource> Read(ReadCustomerProfilesEntityAssignmentsOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildReadRequest(options, client)); var page = Page <CustomerProfilesEntityAssignmentsResource> .FromJson("results", response.Content); return(new ResourceSet <CustomerProfilesEntityAssignmentsResource>(page, options, client)); }
private static Request BuildReadRequest(ReadCustomerProfilesEntityAssignmentsOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Trusthub, "/v1/CustomerProfiles/" + options.PathCustomerProfileSid + "/EntityAssignments", queryParams: options.GetParams(), headerParams: null )); }
/// <summary> /// Retrieve a list of all Assigned Items for an account. /// </summary> /// <param name="pathCustomerProfileSid"> The unique string that identifies the resource. </param> /// <param name="pageSize"> Page size </param> /// <param name="limit"> Record limit </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of CustomerProfilesEntityAssignments </returns> public static async System.Threading.Tasks.Task <ResourceSet <CustomerProfilesEntityAssignmentsResource> > ReadAsync(string pathCustomerProfileSid, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadCustomerProfilesEntityAssignmentsOptions(pathCustomerProfileSid) { PageSize = pageSize, Limit = limit }; return(await ReadAsync(options, client)); }
/// <summary> /// Retrieve a list of all Assigned Items for an account. /// </summary> /// <param name="pathCustomerProfileSid"> The unique string that identifies the resource. </param> /// <param name="pageSize"> Page size </param> /// <param name="limit"> Record limit </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of CustomerProfilesEntityAssignments </returns> public static ResourceSet <CustomerProfilesEntityAssignmentsResource> Read(string pathCustomerProfileSid, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadCustomerProfilesEntityAssignmentsOptions(pathCustomerProfileSid) { PageSize = pageSize, Limit = limit }; return(Read(options, client)); }
/// <summary> /// Retrieve a list of all Assigned Items for an account. /// </summary> /// <param name="options"> Read CustomerProfilesEntityAssignments parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of CustomerProfilesEntityAssignments </returns> public static async System.Threading.Tasks.Task <ResourceSet <CustomerProfilesEntityAssignmentsResource> > ReadAsync(ReadCustomerProfilesEntityAssignmentsOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildReadRequest(options, client)); var page = Page <CustomerProfilesEntityAssignmentsResource> .FromJson("results", response.Content); return(new ResourceSet <CustomerProfilesEntityAssignmentsResource>(page, options, client)); }