/// <summary> /// Retrieve a specific Flow revision. /// </summary> /// <param name="options"> Fetch FlowRevision parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of FlowRevision </returns> public static FlowRevisionResource Fetch(FetchFlowRevisionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Retrieve a specific Flow revision. /// </summary> /// <param name="pathSid"> The SID that identifies the resource to fetch </param> /// <param name="pathRevision"> Specific Revision number or can be `LatestPublished` and `LatestRevision` </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of FlowRevision </returns> public static async System.Threading.Tasks.Task <FlowRevisionResource> FetchAsync(string pathSid, string pathRevision, ITwilioRestClient client = null) { var options = new FetchFlowRevisionOptions(pathSid, pathRevision); return(await FetchAsync(options, client)); }
private static Request BuildFetchRequest(FetchFlowRevisionOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Studio, "/v2/Flows/" + options.PathSid + "/Revisions/" + options.PathRevision + "", queryParams: options.GetParams() )); }
/// <summary> /// Retrieve a specific Flow revision. /// </summary> /// <param name="pathSid"> The SID that identifies the resource to fetch </param> /// <param name="pathRevision"> Specific Revision number or can be `LatestPublished` and `LatestRevision` </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of FlowRevision </returns> public static FlowRevisionResource Fetch(string pathSid, string pathRevision, ITwilioRestClient client = null) { var options = new FetchFlowRevisionOptions(pathSid, pathRevision); return(Fetch(options, client)); }
/// <summary> /// Retrieve a specific Flow revision. /// </summary> /// <param name="options"> Fetch FlowRevision parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of FlowRevision </returns> public static async System.Threading.Tasks.Task <FlowRevisionResource> FetchAsync(FetchFlowRevisionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }