コード例 #1
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="options"> Read FlexFlow parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of FlexFlow </returns>
        public static ResourceSet <FlexFlowResource> Read(ReadFlexFlowOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildReadRequest(options, client));

            var page = Page <FlexFlowResource> .FromJson("flex_flows", response.Content);

            return(new ResourceSet <FlexFlowResource>(page, options, client));
        }
コード例 #2
0
 private static Request BuildReadRequest(ReadFlexFlowOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.FlexApi,
                "/v1/FlexFlows",
                queryParams: options.GetParams()
                ));
 }
コード例 #3
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="friendlyName"> The `friendly_name` of the FlexFlow resources to read </param>
        /// <param name="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </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 <ResourceSet <FlexFlowResource> > ReadAsync(string friendlyName      = null,
                                                                                                    int?pageSize             = null,
                                                                                                    long?limit               = null,
                                                                                                    ITwilioRestClient client = null)
        {
            var options = new ReadFlexFlowOptions()
            {
                FriendlyName = friendlyName, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
コード例 #4
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="friendlyName"> The `friendly_name` of the FlexFlow resources to read </param>
        /// <param name="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of FlexFlow </returns>
        public static ResourceSet <FlexFlowResource> Read(string friendlyName      = null,
                                                          int?pageSize             = null,
                                                          long?limit               = null,
                                                          ITwilioRestClient client = null)
        {
            var options = new ReadFlexFlowOptions()
            {
                FriendlyName = friendlyName, PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
コード例 #5
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="options"> Read 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 <ResourceSet <FlexFlowResource> > ReadAsync(ReadFlexFlowOptions options,
                                                                                                    ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

            var page = Page <FlexFlowResource> .FromJson("flex_flows", response.Content);

            return(new ResourceSet <FlexFlowResource>(page, options, client));
        }