Exemple #1
0
        /// <summary>
        /// create
        /// </summary>
        /// <param name="pathAssistantSid"> The assistant_sid </param>
        /// <param name="pathFieldTypeSid"> The field_type_sid </param>
        /// <param name="language"> An ISO language-country string of the value. </param>
        /// <param name="value"> A user-provided string that uniquely identifies this resource as an alternative to the sid.
        ///             Unique up to 64 characters long. </param>
        /// <param name="synonymOf"> A value that indicates this field value is a synonym of. Empty if the value is not a
        ///                 synonym. </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));
        }
Exemple #2
0
        /// <summary>
        /// create
        /// </summary>
        /// <param name="pathAssistantSid"> The assistant_sid </param>
        /// <param name="pathFieldTypeSid"> The field_type_sid </param>
        /// <param name="language"> An ISO language-country string of the value. </param>
        /// <param name="value"> A user-provided string that uniquely identifies this resource as an alternative to the sid.
        ///             Unique up to 64 characters long. </param>
        /// <param name="synonymOf"> A value that indicates this field value is a synonym of. Empty if the value is not a
        ///                 synonym. </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));
        }
        /// <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));
        }