/// <summary>
        /// Fetch specific Assigned Item Instance.
        /// </summary>
        /// <param name="pathCustomerProfileSid"> The unique string that identifies the resource. </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 CustomerProfilesChannelEndpointAssignment </returns>
        public static async System.Threading.Tasks.Task <CustomerProfilesChannelEndpointAssignmentResource> FetchAsync(string pathCustomerProfileSid,
                                                                                                                       string pathSid,
                                                                                                                       ITwilioRestClient client = null)
        {
            var options = new FetchCustomerProfilesChannelEndpointAssignmentOptions(pathCustomerProfileSid, pathSid);

            return(await FetchAsync(options, client));
        }
        /// <summary>
        /// Fetch specific Assigned Item Instance.
        /// </summary>
        /// <param name="pathCustomerProfileSid"> The unique string that identifies the resource. </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 CustomerProfilesChannelEndpointAssignment </returns>
        public static CustomerProfilesChannelEndpointAssignmentResource Fetch(string pathCustomerProfileSid,
                                                                              string pathSid,
                                                                              ITwilioRestClient client = null)
        {
            var options = new FetchCustomerProfilesChannelEndpointAssignmentOptions(pathCustomerProfileSid, pathSid);

            return(Fetch(options, client));
        }
        /// <summary>
        /// Fetch specific Assigned Item Instance.
        /// </summary>
        /// <param name="options"> Fetch CustomerProfilesChannelEndpointAssignment parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of CustomerProfilesChannelEndpointAssignment </returns>
        public static CustomerProfilesChannelEndpointAssignmentResource Fetch(FetchCustomerProfilesChannelEndpointAssignmentOptions options,
                                                                              ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
 private static Request BuildFetchRequest(FetchCustomerProfilesChannelEndpointAssignmentOptions options,
                                          ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Trusthub,
                "/v1/CustomerProfiles/" + options.PathCustomerProfileSid + "/ChannelEndpointAssignments/" + options.PathSid + "",
                queryParams: options.GetParams(),
                headerParams: null
                ));
 }
        /// <summary>
        /// Fetch specific Assigned Item Instance.
        /// </summary>
        /// <param name="options"> Fetch CustomerProfilesChannelEndpointAssignment parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of CustomerProfilesChannelEndpointAssignment </returns>
        public static async System.Threading.Tasks.Task <CustomerProfilesChannelEndpointAssignmentResource> FetchAsync(FetchCustomerProfilesChannelEndpointAssignmentOptions options,
                                                                                                                       ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }