Esempio n. 1
0
        /// <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 TrustProductsEntityAssignments </returns>
        public static async System.Threading.Tasks.Task <TrustProductsEntityAssignmentsResource> FetchAsync(string pathTrustProductSid,
                                                                                                            string pathSid,
                                                                                                            ITwilioRestClient client = null)
        {
            var options = new FetchTrustProductsEntityAssignmentsOptions(pathTrustProductSid, pathSid);

            return(await FetchAsync(options, client));
        }
Esempio n. 2
0
        /// <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 TrustProductsEntityAssignments </returns>
        public static TrustProductsEntityAssignmentsResource Fetch(string pathTrustProductSid,
                                                                   string pathSid,
                                                                   ITwilioRestClient client = null)
        {
            var options = new FetchTrustProductsEntityAssignmentsOptions(pathTrustProductSid, pathSid);

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

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

            return(FromJson(response.Content));
        }