Beispiel #1
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="pathSid"> The SID that identifies the resource to fetch </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of FlexFlow </returns>
        public static async System.Threading.Tasks.Task <FlexFlowResource> FetchAsync(string pathSid,
                                                                                      ITwilioRestClient client = null)
        {
            var options = new FetchFlexFlowOptions(pathSid);

            return(await FetchAsync(options, client));
        }
Beispiel #2
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="options"> Fetch FlexFlow parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of FlexFlow </returns>
        public static FlexFlowResource Fetch(FetchFlexFlowOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
 private static Request BuildFetchRequest(FetchFlexFlowOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.FlexApi,
                "/v1/FlexFlows/" + options.PathSid + "",
                queryParams: options.GetParams()
                ));
 }
Beispiel #4
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="pathSid"> The SID that identifies the resource to fetch </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of FlexFlow </returns>
        public static FlexFlowResource Fetch(string pathSid, ITwilioRestClient client = null)
        {
            var options = new FetchFlexFlowOptions(pathSid);

            return(Fetch(options, client));
        }
Beispiel #5
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="options"> Fetch FlexFlow parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of FlexFlow </returns>
        public static async System.Threading.Tasks.Task <FlexFlowResource> FetchAsync(FetchFlexFlowOptions options,
                                                                                      ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }