示例#1
0
        /// <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 CustomerProfilesEntityAssignments </returns>
        public static async System.Threading.Tasks.Task <CustomerProfilesEntityAssignmentsResource> FetchAsync(string pathCustomerProfileSid,
                                                                                                               string pathSid,
                                                                                                               ITwilioRestClient client = null)
        {
            var options = new FetchCustomerProfilesEntityAssignmentsOptions(pathCustomerProfileSid, pathSid);

            return(await FetchAsync(options, client));
        }
示例#2
0
        /// <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 CustomerProfilesEntityAssignments </returns>
        public static CustomerProfilesEntityAssignmentsResource Fetch(string pathCustomerProfileSid,
                                                                      string pathSid,
                                                                      ITwilioRestClient client = null)
        {
            var options = new FetchCustomerProfilesEntityAssignmentsOptions(pathCustomerProfileSid, pathSid);

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

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

            return(FromJson(response.Content));
        }