/// <summary> /// Create a new Evaluation /// </summary> /// <param name="pathCustomerProfileSid"> The unique string that identifies the resource. </param> /// <param name="policySid"> The unique string of a policy </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of CustomerProfilesEvaluations </returns> public static CustomerProfilesEvaluationsResource Create(string pathCustomerProfileSid, string policySid, ITwilioRestClient client = null) { var options = new CreateCustomerProfilesEvaluationsOptions(pathCustomerProfileSid, policySid); return(Create(options, client)); }
/// <summary> /// Create a new Evaluation /// </summary> /// <param name="options"> Create CustomerProfilesEvaluations parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of CustomerProfilesEvaluations </returns> public static CustomerProfilesEvaluationsResource Create(CreateCustomerProfilesEvaluationsOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Create a new Evaluation /// </summary> /// <param name="pathCustomerProfileSid"> The unique string that identifies the resource. </param> /// <param name="policySid"> The unique string of a policy </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of CustomerProfilesEvaluations </returns> public static async System.Threading.Tasks.Task <CustomerProfilesEvaluationsResource> CreateAsync(string pathCustomerProfileSid, string policySid, ITwilioRestClient client = null) { var options = new CreateCustomerProfilesEvaluationsOptions(pathCustomerProfileSid, policySid); return(await CreateAsync(options, client)); }
private static Request BuildCreateRequest(CreateCustomerProfilesEvaluationsOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Trusthub, "/v1/CustomerProfiles/" + options.PathCustomerProfileSid + "/Evaluations", postParams: options.GetParams(), headerParams: null )); }
/// <summary> /// Create a new Evaluation /// </summary> /// <param name="options"> Create CustomerProfilesEvaluations parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of CustomerProfilesEvaluations </returns> public static async System.Threading.Tasks.Task <CustomerProfilesEvaluationsResource> CreateAsync(CreateCustomerProfilesEvaluationsOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }