/// <summary>
        /// create
        /// </summary>
        /// <param name="pathAssistantSid"> The SID of the Assistant that is the parent of the FieldType associated with the
        ///                        new resource </param>
        /// <param name="pathFieldTypeSid"> The SID of the Field Type associated with the Field Value </param>
        /// <param name="language"> The ISO language-country tag that identifies the language of the value </param>
        /// <param name="value"> The Field Value data </param>
        /// <param name="synonymOf"> The string value that indicates which word the field value is a synonym of </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of FieldValue </returns>
        public static FieldValueResource Create(string pathAssistantSid,
                                                string pathFieldTypeSid,
                                                string language,
                                                string value,
                                                string synonymOf         = null,
                                                ITwilioRestClient client = null)
        {
            var options = new CreateFieldValueOptions(pathAssistantSid, pathFieldTypeSid, language, value)
            {
                SynonymOf = synonymOf
            };

            return(Create(options, client));
        }
Esempio n. 2
0
        /// <summary>
        /// create
        /// </summary>
        /// <param name="pathAssistantSid"> The SID of the Assistant that is the parent of the FieldType associated with the
        ///                        new resource </param>
        /// <param name="pathFieldTypeSid"> The SID of the Field Type associated with the Field Value </param>
        /// <param name="language"> The ISO language-country tag that identifies the language of the value </param>
        /// <param name="value"> The Field Value data </param>
        /// <param name="synonymOf"> The string value that indicates which word the field value is a synonym of </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of FieldValue </returns>
        public static async System.Threading.Tasks.Task <FieldValueResource> CreateAsync(string pathAssistantSid,
                                                                                         string pathFieldTypeSid,
                                                                                         string language,
                                                                                         string value,
                                                                                         string synonymOf         = null,
                                                                                         ITwilioRestClient client = null)
        {
            var options = new CreateFieldValueOptions(pathAssistantSid, pathFieldTypeSid, language, value)
            {
                SynonymOf = synonymOf
            };

            return(await CreateAsync(options, client));
        }
        /// <summary>
        /// create
        /// </summary>
        /// <param name="options"> Create FieldValue parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of FieldValue </returns>
        public static async System.Threading.Tasks.Task <FieldValueResource> CreateAsync(CreateFieldValueOptions options,
                                                                                         ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildCreateRequest(options, client));

            return(FromJson(response.Content));
        }