/// <summary> /// Retrieve a list of all Supporting Document Types. /// </summary> /// <param name="options"> Read SupportingDocumentType parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SupportingDocumentType </returns> public static ResourceSet <SupportingDocumentTypeResource> Read(ReadSupportingDocumentTypeOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildReadRequest(options, client)); var page = Page <SupportingDocumentTypeResource> .FromJson("supporting_document_types", response.Content); return(new ResourceSet <SupportingDocumentTypeResource>(page, options, client)); }
private static Request BuildReadRequest(ReadSupportingDocumentTypeOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Trusthub, "/v1/SupportingDocumentTypes", queryParams: options.GetParams(), headerParams: null )); }
/// <summary> /// Retrieve a list of all Supporting Document Types. /// </summary> /// <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 SupportingDocumentType </returns> public static async System.Threading.Tasks.Task <ResourceSet <SupportingDocumentTypeResource> > ReadAsync(int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadSupportingDocumentTypeOptions() { PageSize = pageSize, Limit = limit }; return(await ReadAsync(options, client)); }
/// <summary> /// Retrieve a list of all Supporting Document Types. /// </summary> /// <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 SupportingDocumentType </returns> public static ResourceSet <SupportingDocumentTypeResource> Read(int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadSupportingDocumentTypeOptions() { PageSize = pageSize, Limit = limit }; return(Read(options, client)); }
/// <summary> /// Retrieve a list of all Supporting Document Types. /// </summary> /// <param name="options"> Read SupportingDocumentType parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SupportingDocumentType </returns> public static async System.Threading.Tasks.Task <ResourceSet <SupportingDocumentTypeResource> > ReadAsync(ReadSupportingDocumentTypeOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildReadRequest(options, client)); var page = Page <SupportingDocumentTypeResource> .FromJson("supporting_document_types", response.Content); return(new ResourceSet <SupportingDocumentTypeResource>(page, options, client)); }