Esempio n. 1
0
        /// <summary>
        /// fetch
        /// </summary>
        ///
        /// <param name="options"> Fetch SegmentMembership parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SegmentMembership </returns>
        public static SegmentMembershipResource Fetch(FetchSegmentMembershipOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
Esempio n. 2
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathIdentity"> The identity </param>
        /// <param name="pathSegment"> The segment </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SegmentMembership </returns>
        public static async System.Threading.Tasks.Task <SegmentMembershipResource> FetchAsync(string pathServiceSid,
                                                                                               string pathIdentity,
                                                                                               string pathSegment,
                                                                                               ITwilioRestClient client = null)
        {
            var options = new FetchSegmentMembershipOptions(pathServiceSid, pathIdentity, pathSegment);

            return(await FetchAsync(options, client));
        }
Esempio n. 3
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathIdentity"> The identity </param>
        /// <param name="pathSegment"> The segment </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SegmentMembership </returns>
        public static SegmentMembershipResource Fetch(string pathServiceSid,
                                                      string pathIdentity,
                                                      string pathSegment,
                                                      ITwilioRestClient client = null)
        {
            var options = new FetchSegmentMembershipOptions(pathServiceSid, pathIdentity, pathSegment);

            return(Fetch(options, client));
        }
Esempio n. 4
0
 private static Request BuildFetchRequest(FetchSegmentMembershipOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Notify,
                "/v1/Services/" + options.PathServiceSid + "/Users/" + options.PathIdentity + "/SegmentMemberships/" + options.PathSegment + "",
                client.Region,
                queryParams: options.GetParams()
                ));
 }
Esempio n. 5
0
        /// <summary>
        /// fetch
        /// </summary>
        ///
        /// <param name="options"> Fetch SegmentMembership parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SegmentMembership </returns>
        public static async System.Threading.Tasks.Task <SegmentMembershipResource> FetchAsync(FetchSegmentMembershipOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }