/// <summary> /// Fetch specific Supporting Document Instance. /// </summary> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SupportingDocument </returns> public static async System.Threading.Tasks.Task <SupportingDocumentResource> FetchAsync(string pathSid, ITwilioRestClient client = null) { var options = new FetchSupportingDocumentOptions(pathSid); return(await FetchAsync(options, client)); }
/// <summary> /// Fetch specific Supporting Document Instance. /// </summary> /// <param name="options"> Fetch SupportingDocument parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SupportingDocument </returns> public static SupportingDocumentResource Fetch(FetchSupportingDocumentOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildFetchRequest(FetchSupportingDocumentOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Numbers, "/v2/RegulatoryCompliance/SupportingDocuments/" + options.PathSid + "", queryParams: options.GetParams() )); }
/// <summary> /// Fetch specific Supporting Document Instance. /// </summary> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SupportingDocument </returns> public static SupportingDocumentResource Fetch(string pathSid, ITwilioRestClient client = null) { var options = new FetchSupportingDocumentOptions(pathSid); return(Fetch(options, client)); }
/// <summary> /// Fetch specific Supporting Document Instance. /// </summary> /// <param name="options"> Fetch SupportingDocument parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SupportingDocument </returns> public static async System.Threading.Tasks.Task <SupportingDocumentResource> FetchAsync(FetchSupportingDocumentOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }