/// <summary> /// Fetch specific Assigned Item Instance. /// </summary> /// <param name="pathTrustProductSid"> 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 TrustProductsChannelEndpointAssignment </returns> public static async System.Threading.Tasks.Task <TrustProductsChannelEndpointAssignmentResource> FetchAsync(string pathTrustProductSid, string pathSid, ITwilioRestClient client = null) { var options = new FetchTrustProductsChannelEndpointAssignmentOptions(pathTrustProductSid, pathSid); return(await FetchAsync(options, client)); }
/// <summary> /// Fetch specific Assigned Item Instance. /// </summary> /// <param name="pathTrustProductSid"> 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 TrustProductsChannelEndpointAssignment </returns> public static TrustProductsChannelEndpointAssignmentResource Fetch(string pathTrustProductSid, string pathSid, ITwilioRestClient client = null) { var options = new FetchTrustProductsChannelEndpointAssignmentOptions(pathTrustProductSid, pathSid); return(Fetch(options, client)); }
/// <summary> /// Fetch specific Assigned Item Instance. /// </summary> /// <param name="options"> Fetch TrustProductsChannelEndpointAssignment parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of TrustProductsChannelEndpointAssignment </returns> public static TrustProductsChannelEndpointAssignmentResource Fetch(FetchTrustProductsChannelEndpointAssignmentOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildFetchRequest(FetchTrustProductsChannelEndpointAssignmentOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Trusthub, "/v1/TrustProducts/" + options.PathTrustProductSid + "/ChannelEndpointAssignments/" + options.PathSid + "", queryParams: options.GetParams(), headerParams: null )); }
/// <summary> /// Fetch specific Assigned Item Instance. /// </summary> /// <param name="options"> Fetch TrustProductsChannelEndpointAssignment parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of TrustProductsChannelEndpointAssignment </returns> public static async System.Threading.Tasks.Task <TrustProductsChannelEndpointAssignmentResource> FetchAsync(FetchTrustProductsChannelEndpointAssignmentOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }