private static Request BuildReadRequest(ReadHighriskSpecialPrefixOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Voice, "/v1/DialingPermissions/Countries/" + options.PathIsoCode + "/HighRiskSpecialPrefixes", queryParams: options.GetParams() )); }
/// <summary> /// Fetch the high-risk special services prefixes from the country resource corresponding to the [ISO country /// code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) /// </summary> /// <param name="options"> Read HighriskSpecialPrefix parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of HighriskSpecialPrefix </returns> public static ResourceSet <HighriskSpecialPrefixResource> Read(ReadHighriskSpecialPrefixOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildReadRequest(options, client)); var page = Page <HighriskSpecialPrefixResource> .FromJson("content", response.Content); return(new ResourceSet <HighriskSpecialPrefixResource>(page, options, client)); }
/// <summary> /// Fetch the high-risk special services prefixes from the country resource corresponding to the [ISO country /// code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) /// </summary> /// <param name="pathIsoCode"> The ISO 3166-1 country code </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 HighriskSpecialPrefix </returns> public static ResourceSet <HighriskSpecialPrefixResource> Read(string pathIsoCode, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadHighriskSpecialPrefixOptions(pathIsoCode) { PageSize = pageSize, Limit = limit }; return(Read(options, client)); }
/// <summary> /// Fetch the high-risk special services prefixes from the country resource corresponding to the [ISO country /// code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) /// </summary> /// <param name="pathIsoCode"> The ISO 3166-1 country code </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 HighriskSpecialPrefix </returns> public static async System.Threading.Tasks.Task <ResourceSet <HighriskSpecialPrefixResource> > ReadAsync(string pathIsoCode, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadHighriskSpecialPrefixOptions(pathIsoCode) { PageSize = pageSize, Limit = limit }; return(await ReadAsync(options, client)); }
/// <summary> /// Fetch the high-risk special services prefixes from the country resource corresponding to the [ISO country /// code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) /// </summary> /// <param name="options"> Read HighriskSpecialPrefix parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of HighriskSpecialPrefix </returns> public static async System.Threading.Tasks.Task <ResourceSet <HighriskSpecialPrefixResource> > ReadAsync(ReadHighriskSpecialPrefixOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildReadRequest(options, client)); var page = Page <HighriskSpecialPrefixResource> .FromJson("content", response.Content); return(new ResourceSet <HighriskSpecialPrefixResource>(page, options, client)); }