/// <summary> /// read /// </summary> /// <param name="options"> Read MessageInteraction parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of MessageInteraction </returns> public static ResourceSet <MessageInteractionResource> Read(ReadMessageInteractionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildReadRequest(options, client)); var page = Page <MessageInteractionResource> .FromJson("interactions", response.Content); return(new ResourceSet <MessageInteractionResource>(page, options, client)); }
private static Request BuildReadRequest(ReadMessageInteractionOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Proxy, "/v1/Services/" + options.PathServiceSid + "/Sessions/" + options.PathSessionSid + "/Participants/" + options.PathParticipantSid + "/MessageInteractions", client.Region, queryParams: options.GetParams() )); }
/// <summary> /// read /// </summary> /// <param name="pathServiceSid"> The SID of the Service to read the resource from </param> /// <param name="pathSessionSid"> The SID of the parent Session </param> /// <param name="pathParticipantSid"> The SID of the Participant resource </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 MessageInteraction </returns> public static async System.Threading.Tasks.Task <ResourceSet <MessageInteractionResource> > ReadAsync(string pathServiceSid, string pathSessionSid, string pathParticipantSid, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadMessageInteractionOptions(pathServiceSid, pathSessionSid, pathParticipantSid) { PageSize = pageSize, Limit = limit }; return(await ReadAsync(options, client)); }
/// <summary> /// read /// </summary> /// <param name="pathServiceSid"> The SID of the Service to read the resource from </param> /// <param name="pathSessionSid"> The SID of the parent Session </param> /// <param name="pathParticipantSid"> The SID of the Participant resource </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 MessageInteraction </returns> public static ResourceSet <MessageInteractionResource> Read(string pathServiceSid, string pathSessionSid, string pathParticipantSid, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadMessageInteractionOptions(pathServiceSid, pathSessionSid, pathParticipantSid) { PageSize = pageSize, Limit = limit }; return(Read(options, client)); }
/// <summary> /// Retrieve a list of all Message to a Participant. /// </summary> /// /// <param name="options"> Read MessageInteraction parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of MessageInteraction </returns> public static async System.Threading.Tasks.Task <ResourceSet <MessageInteractionResource> > ReadAsync(ReadMessageInteractionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildReadRequest(options, client)); var page = Page <MessageInteractionResource> .FromJson("interactions", response.Content); return(new ResourceSet <MessageInteractionResource>(page, options, client)); }