/// <summary> /// Fetch a specific Supporting Document Type Instance. /// </summary> /// <param name="pathSid"> The unique string that identifies the Supporting Document Type resource </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 <SupportingDocumentTypeResource> FetchAsync(string pathSid, ITwilioRestClient client = null) { var options = new FetchSupportingDocumentTypeOptions(pathSid); return(await FetchAsync(options, client)); }
/// <summary> /// Fetch a specific Supporting Document Type Instance. /// </summary> /// <param name="options"> Fetch SupportingDocumentType parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SupportingDocumentType </returns> public static SupportingDocumentTypeResource Fetch(FetchSupportingDocumentTypeOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildFetchRequest(FetchSupportingDocumentTypeOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Trusthub, "/v1/SupportingDocumentTypes/" + options.PathSid + "", queryParams: options.GetParams(), headerParams: null )); }
/// <summary> /// Fetch a specific Supporting Document Type Instance. /// </summary> /// <param name="pathSid"> The unique string that identifies the Supporting Document Type resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SupportingDocumentType </returns> public static SupportingDocumentTypeResource Fetch(string pathSid, ITwilioRestClient client = null) { var options = new FetchSupportingDocumentTypeOptions(pathSid); return(Fetch(options, client)); }
/// <summary> /// Fetch a specific Supporting Document Type Instance. /// </summary> /// <param name="options"> Fetch 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 <SupportingDocumentTypeResource> FetchAsync(FetchSupportingDocumentTypeOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }