コード例 #1
0
        /// <summary>
        /// Retrieve a Step.
        /// </summary>
        /// <param name="options"> Fetch ExecutionStep parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of ExecutionStep </returns>
        public static ExecutionStepResource Fetch(FetchExecutionStepOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
コード例 #2
0
        /// <summary>
        /// Retrieve a Step.
        /// </summary>
        /// <param name="pathFlowSid"> The SID of the Flow </param>
        /// <param name="pathExecutionSid"> The SID of the Execution </param>
        /// <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 ExecutionStep </returns>
        public static async System.Threading.Tasks.Task <ExecutionStepResource> FetchAsync(string pathFlowSid,
                                                                                           string pathExecutionSid,
                                                                                           string pathSid,
                                                                                           ITwilioRestClient client = null)
        {
            var options = new FetchExecutionStepOptions(pathFlowSid, pathExecutionSid, pathSid);

            return(await FetchAsync(options, client));
        }
コード例 #3
0
        /// <summary>
        /// Retrieve a Step.
        /// </summary>
        /// <param name="pathFlowSid"> The SID of the Flow </param>
        /// <param name="pathExecutionSid"> The SID of the Execution </param>
        /// <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 ExecutionStep </returns>
        public static ExecutionStepResource Fetch(string pathFlowSid,
                                                  string pathExecutionSid,
                                                  string pathSid,
                                                  ITwilioRestClient client = null)
        {
            var options = new FetchExecutionStepOptions(pathFlowSid, pathExecutionSid, pathSid);

            return(Fetch(options, client));
        }
コード例 #4
0
 private static Request BuildFetchRequest(FetchExecutionStepOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Studio,
                "/v2/Flows/" + options.PathFlowSid + "/Executions/" + options.PathExecutionSid + "/Steps/" + options.PathSid + "",
                queryParams: options.GetParams()
                ));
 }
コード例 #5
0
        /// <summary>
        /// Retrieve a Step.
        /// </summary>
        /// <param name="options"> Fetch ExecutionStep parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of ExecutionStep </returns>
        public static async System.Threading.Tasks.Task <ExecutionStepResource> FetchAsync(FetchExecutionStepOptions options,
                                                                                           ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }