diff --git a/CHANGES.md b/CHANGES.md
index 769e0ee4b..74eac4524 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,6 +1,41 @@
twilio-csharp Changelog
=======================
+[2024-02-27] Version 7.0.0
+--------------------------
+**Note:** This release contains breaking changes, check our [upgrade guide](./UPGRADE.md#2024-02-XX-6xx-to-7xx) for detailed migration notes.
+
+**Library - Chore**
+- [PR #730](https://github.com/twilio/twilio-csharp/pull/730): add VersionSuffix to csproj file. Thanks to [@sbansla](https://github.com/sbansla)!
+- [PR #727](https://github.com/twilio/twilio-csharp/pull/727): cluster tests enabled. Thanks to [@sbansla](https://github.com/sbansla)!
+- [PR #725](https://github.com/twilio/twilio-csharp/pull/725): corrected repo name in code-signing workflow. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
+- [PR #722](https://github.com/twilio/twilio-csharp/pull/722): corrected nuget push command. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
+
+**Library - Feature**
+- [PR #728](https://github.com/twilio/twilio-csharp/pull/728): MVR Ready. Thanks to [@sbansla](https://github.com/sbansla)! **(breaking change)**
+
+**Api**
+- remove feedback and feedback summary from call resource
+
+**Flex**
+- Adding `routing_properties` to Interactions Channels Participant
+
+**Lookups**
+- Add new `line_status` package to the lookup response
+- Remove `live_activity` package from the lookup response **(breaking change)**
+
+**Messaging**
+- Add tollfree multiple rejection reasons response array
+
+**Trusthub**
+- Add ENUM for businessRegistrationAuthority in compliance_registration. **(breaking change)**
+- Add new field in isIsvEmbed in compliance_registration.
+- Add additional optional fields in compliance_registration for Individual business type.
+
+**Twiml**
+- Add support for new Amazon Polly and Google voices (Q1 2024) for `Say` verb
+
+
[2024-02-09] Version 6.18.0
---------------------------
**Library - Chore**
diff --git a/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppResource.cs b/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppResource.cs
index 00c511dca..2be4dc1d3 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppResource.cs
@@ -301,14 +301,6 @@ public static string ToJson(object model)
[JsonProperty("connect_app_sid")]
public string ConnectAppSid { get; private set; }
- /// The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_created")]
- public DateTime? DateCreated { get; private set; }
-
- /// The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_updated")]
- public DateTime? DateUpdated { get; private set; }
-
/// The set of permissions that you authorized for the Connect App. Can be: `get-all` or `post-all`.
[JsonProperty("permissions")]
public List Permissions { get; private set; }
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.cs
deleted file mode 100644
index cef032ef7..000000000
--- a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Api
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-using System.Linq;
-
-
-
-namespace Twilio.Rest.Api.V2010.Account.Call
-{
- /// Fetch a Feedback resource from a call
- public class FetchFeedbackOptions : IOptions
- {
-
- /// The call sid that uniquely identifies the call
- public string PathCallSid { get; }
-
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- public string PathAccountSid { get; set; }
-
-
-
- /// Construct a new FetchCallFeedbackOptions
- /// The call sid that uniquely identifies the call
- public FetchFeedbackOptions(string pathCallSid)
- {
- PathCallSid = pathCallSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// Update a Feedback resource for a call
- public class UpdateFeedbackOptions : IOptions
- {
-
- /// The call sid that uniquely identifies the call
- public string PathCallSid { get; }
-
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- public string PathAccountSid { get; set; }
-
- /// The call quality expressed as an integer from `1` to `5` where `1` represents very poor call quality and `5` represents a perfect call.
- public int? QualityScore { get; set; }
-
- /// One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`.
- public List Issue { get; set; }
-
-
-
- /// Construct a new UpdateCallFeedbackOptions
- /// The call sid that uniquely identifies the call
- public UpdateFeedbackOptions(string pathCallSid)
- {
- PathCallSid = pathCallSid;
- Issue = new List();
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (QualityScore != null)
- {
- p.Add(new KeyValuePair("QualityScore", QualityScore.ToString()));
- }
- if (Issue != null)
- {
- p.AddRange(Issue.Select(Issue => new KeyValuePair("Issue", Issue.ToString())));
- }
- return p;
- }
-
-
-
- }
-
-
-}
-
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackResource.cs b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackResource.cs
deleted file mode 100644
index 8d51d987d..000000000
--- a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackResource.cs
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Api
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-using Twilio.Types;
-
-
-namespace Twilio.Rest.Api.V2010.Account.Call
-{
- public class FeedbackResource : Resource
- {
-
-
-
- [JsonConverter(typeof(StringEnumConverter))]
- public sealed class IssuesEnum : StringEnum
- {
- private IssuesEnum(string value) : base(value) {}
- public IssuesEnum() {}
- public static implicit operator IssuesEnum(string value)
- {
- return new IssuesEnum(value);
- }
-
- public static readonly IssuesEnum AudioLatency = new IssuesEnum("audio-latency");
- public static readonly IssuesEnum DigitsNotCaptured = new IssuesEnum("digits-not-captured");
- public static readonly IssuesEnum DroppedCall = new IssuesEnum("dropped-call");
- public static readonly IssuesEnum ImperfectAudio = new IssuesEnum("imperfect-audio");
- public static readonly IssuesEnum IncorrectCallerId = new IssuesEnum("incorrect-caller-id");
- public static readonly IssuesEnum OneWayAudio = new IssuesEnum("one-way-audio");
- public static readonly IssuesEnum PostDialDelay = new IssuesEnum("post-dial-delay");
- public static readonly IssuesEnum UnsolicitedCall = new IssuesEnum("unsolicited-call");
- }
-
-
- private static Request BuildFetchRequest(FetchFeedbackOptions options, ITwilioRestClient client)
- {
-
- string path = "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json";
-
- string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
- path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
- string PathCallSid = options.PathCallSid;
- path = path.Replace("{"+"CallSid"+"}", PathCallSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Api,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// Fetch a Feedback resource from a call
- /// Fetch Feedback parameters
- /// Client to make requests to Twilio
- /// A single instance of Feedback
- public static FeedbackResource Fetch(FetchFeedbackOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// Fetch a Feedback resource from a call
- /// Fetch Feedback parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Feedback
- public static async System.Threading.Tasks.Task FetchAsync(FetchFeedbackOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// Fetch a Feedback resource from a call
- /// The call sid that uniquely identifies the call
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- /// Client to make requests to Twilio
- /// A single instance of Feedback
- public static FeedbackResource Fetch(
- string pathCallSid,
- string pathAccountSid = null,
- ITwilioRestClient client = null)
- {
- var options = new FetchFeedbackOptions(pathCallSid){ PathAccountSid = pathAccountSid };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// Fetch a Feedback resource from a call
- /// The call sid that uniquely identifies the call
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Feedback
- public static async System.Threading.Tasks.Task FetchAsync(string pathCallSid, string pathAccountSid = null, ITwilioRestClient client = null)
- {
- var options = new FetchFeedbackOptions(pathCallSid){ PathAccountSid = pathAccountSid };
- return await FetchAsync(options, client);
- }
- #endif
-
- private static Request BuildUpdateRequest(UpdateFeedbackOptions options, ITwilioRestClient client)
- {
-
- string path = "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json";
-
- string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
- path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
- string PathCallSid = options.PathCallSid;
- path = path.Replace("{"+"CallSid"+"}", PathCallSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Api,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// Update a Feedback resource for a call
- /// Update Feedback parameters
- /// Client to make requests to Twilio
- /// A single instance of Feedback
- public static FeedbackResource Update(UpdateFeedbackOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
-
- /// Update a Feedback resource for a call
- /// Update Feedback parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Feedback
- #if !NET35
- public static async System.Threading.Tasks.Task UpdateAsync(UpdateFeedbackOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// Update a Feedback resource for a call
- /// The call sid that uniquely identifies the call
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- /// The call quality expressed as an integer from `1` to `5` where `1` represents very poor call quality and `5` represents a perfect call.
- /// One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`.
- /// Client to make requests to Twilio
- /// A single instance of Feedback
- public static FeedbackResource Update(
- string pathCallSid,
- string pathAccountSid = null,
- int? qualityScore = null,
- List issue = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateFeedbackOptions(pathCallSid){ PathAccountSid = pathAccountSid, QualityScore = qualityScore, Issue = issue };
- return Update(options, client);
- }
-
- #if !NET35
- /// Update a Feedback resource for a call
- /// The call sid that uniquely identifies the call
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- /// The call quality expressed as an integer from `1` to `5` where `1` represents very poor call quality and `5` represents a perfect call.
- /// One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Feedback
- public static async System.Threading.Tasks.Task UpdateAsync(
- string pathCallSid,
- string pathAccountSid = null,
- int? qualityScore = null,
- List issue = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateFeedbackOptions(pathCallSid){ PathAccountSid = pathAccountSid, QualityScore = qualityScore, Issue = issue };
- return await UpdateAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a FeedbackResource object
- ///
- /// Raw JSON string
- /// FeedbackResource object represented by the provided JSON
- public static FeedbackResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- [JsonProperty("account_sid")]
- public string AccountSid { get; private set; }
-
- /// The date that this resource was created, given in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
- [JsonProperty("date_created")]
- public DateTime? DateCreated { get; private set; }
-
- /// The date that this resource was last updated, given in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
- [JsonProperty("date_updated")]
- public DateTime? DateUpdated { get; private set; }
-
- /// A list of issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`.
- [JsonProperty("issues")]
- public List Issues { get; private set; }
-
- /// `1` to `5` quality score where `1` represents imperfect experience and `5` represents a perfect call.
- [JsonProperty("quality_score")]
- public int? QualityScore { get; private set; }
-
- /// A 34 character string that uniquely identifies this resource.
- [JsonProperty("sid")]
- public string Sid { get; private set; }
-
-
-
- private FeedbackResource() {
-
- }
- }
-}
-
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryOptions.cs
deleted file mode 100644
index dfc94472e..000000000
--- a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryOptions.cs
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Api
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Api.V2010.Account.Call
-{
-
- /// Create a FeedbackSummary resource for a call
- public class CreateFeedbackSummaryOptions : IOptions
- {
-
- /// Only include feedback given on or after this date. Format is `YYYY-MM-DD` and specified in UTC.
- public DateTime? StartDate { get; }
-
- /// Only include feedback given on or before this date. Format is `YYYY-MM-DD` and specified in UTC.
- public DateTime? EndDate { get; }
-
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- public string PathAccountSid { get; set; }
-
- /// Whether to also include Feedback resources from all subaccounts. `true` includes feedback from all subaccounts and `false`, the default, includes feedback from only the specified account.
- public bool? IncludeSubaccounts { get; set; }
-
- /// The URL that we will request when the feedback summary is complete.
- public Uri StatusCallback { get; set; }
-
- /// The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL.
- public Twilio.Http.HttpMethod StatusCallbackMethod { get; set; }
-
-
- /// Construct a new CreateCallFeedbackSummaryOptions
- /// Only include feedback given on or after this date. Format is `YYYY-MM-DD` and specified in UTC.
- /// Only include feedback given on or before this date. Format is `YYYY-MM-DD` and specified in UTC.
- public CreateFeedbackSummaryOptions(DateTime? startDate, DateTime? endDate)
- {
- StartDate = startDate;
- EndDate = endDate;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (StartDate != null)
- {
- p.Add(new KeyValuePair("StartDate", StartDate.Value.ToString("yyyy-MM-dd")));
- }
- if (EndDate != null)
- {
- p.Add(new KeyValuePair("EndDate", EndDate.Value.ToString("yyyy-MM-dd")));
- }
- if (IncludeSubaccounts != null)
- {
- p.Add(new KeyValuePair("IncludeSubaccounts", IncludeSubaccounts.Value.ToString().ToLower()));
- }
- if (StatusCallback != null)
- {
- p.Add(new KeyValuePair("StatusCallback", Serializers.Url(StatusCallback)));
- }
- if (StatusCallbackMethod != null)
- {
- p.Add(new KeyValuePair("StatusCallbackMethod", StatusCallbackMethod.ToString()));
- }
- return p;
- }
-
-
-
- }
- /// Delete a FeedbackSummary resource from a call
- public class DeleteFeedbackSummaryOptions : IOptions
- {
-
- /// A 34 character string that uniquely identifies this resource.
- public string PathSid { get; }
-
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- public string PathAccountSid { get; set; }
-
-
-
- /// Construct a new DeleteCallFeedbackSummaryOptions
- /// A 34 character string that uniquely identifies this resource.
- public DeleteFeedbackSummaryOptions(string pathSid)
- {
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// Fetch a FeedbackSummary resource from a call
- public class FetchFeedbackSummaryOptions : IOptions
- {
-
- /// A 34 character string that uniquely identifies this resource.
- public string PathSid { get; }
-
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- public string PathAccountSid { get; set; }
-
-
-
- /// Construct a new FetchCallFeedbackSummaryOptions
- /// A 34 character string that uniquely identifies this resource.
- public FetchFeedbackSummaryOptions(string pathSid)
- {
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
-}
-
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryResource.cs b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryResource.cs
deleted file mode 100644
index 6b9693b24..000000000
--- a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryResource.cs
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Api
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-using Twilio.Types;
-
-
-namespace Twilio.Rest.Api.V2010.Account.Call
-{
- public class FeedbackSummaryResource : Resource
- {
-
-
-
- [JsonConverter(typeof(StringEnumConverter))]
- public sealed class StatusEnum : StringEnum
- {
- private StatusEnum(string value) : base(value) {}
- public StatusEnum() {}
- public static implicit operator StatusEnum(string value)
- {
- return new StatusEnum(value);
- }
- public static readonly StatusEnum Queued = new StatusEnum("queued");
- public static readonly StatusEnum InProgress = new StatusEnum("in-progress");
- public static readonly StatusEnum Completed = new StatusEnum("completed");
- public static readonly StatusEnum Failed = new StatusEnum("failed");
-
- }
-
-
- private static Request BuildCreateRequest(CreateFeedbackSummaryOptions options, ITwilioRestClient client)
- {
-
- string path = "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary.json";
-
- string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
- path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Api,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// Create a FeedbackSummary resource for a call
- /// Create FeedbackSummary parameters
- /// Client to make requests to Twilio
- /// A single instance of FeedbackSummary
- public static FeedbackSummaryResource Create(CreateFeedbackSummaryOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// Create a FeedbackSummary resource for a call
- /// Create FeedbackSummary parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FeedbackSummary
- public static async System.Threading.Tasks.Task CreateAsync(CreateFeedbackSummaryOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// Create a FeedbackSummary resource for a call
- /// Only include feedback given on or after this date. Format is `YYYY-MM-DD` and specified in UTC.
- /// Only include feedback given on or before this date. Format is `YYYY-MM-DD` and specified in UTC.
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- /// Whether to also include Feedback resources from all subaccounts. `true` includes feedback from all subaccounts and `false`, the default, includes feedback from only the specified account.
- /// The URL that we will request when the feedback summary is complete.
- /// The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL.
- /// Client to make requests to Twilio
- /// A single instance of FeedbackSummary
- public static FeedbackSummaryResource Create(
- DateTime? startDate,
- DateTime? endDate,
- string pathAccountSid = null,
- bool? includeSubaccounts = null,
- Uri statusCallback = null,
- Twilio.Http.HttpMethod statusCallbackMethod = null,
- ITwilioRestClient client = null)
- {
- var options = new CreateFeedbackSummaryOptions(startDate, endDate){ PathAccountSid = pathAccountSid, IncludeSubaccounts = includeSubaccounts, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod };
- return Create(options, client);
- }
-
- #if !NET35
- /// Create a FeedbackSummary resource for a call
- /// Only include feedback given on or after this date. Format is `YYYY-MM-DD` and specified in UTC.
- /// Only include feedback given on or before this date. Format is `YYYY-MM-DD` and specified in UTC.
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- /// Whether to also include Feedback resources from all subaccounts. `true` includes feedback from all subaccounts and `false`, the default, includes feedback from only the specified account.
- /// The URL that we will request when the feedback summary is complete.
- /// The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FeedbackSummary
- public static async System.Threading.Tasks.Task CreateAsync(
- DateTime? startDate,
- DateTime? endDate,
- string pathAccountSid = null,
- bool? includeSubaccounts = null,
- Uri statusCallback = null,
- Twilio.Http.HttpMethod statusCallbackMethod = null,
- ITwilioRestClient client = null)
- {
- var options = new CreateFeedbackSummaryOptions(startDate, endDate){ PathAccountSid = pathAccountSid, IncludeSubaccounts = includeSubaccounts, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod };
- return await CreateAsync(options, client);
- }
- #endif
-
- /// Delete a FeedbackSummary resource from a call
- /// Delete FeedbackSummary parameters
- /// Client to make requests to Twilio
- /// A single instance of FeedbackSummary
- private static Request BuildDeleteRequest(DeleteFeedbackSummaryOptions options, ITwilioRestClient client)
- {
-
- string path = "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json";
-
- string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
- path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Delete,
- Rest.Domain.Api,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// Delete a FeedbackSummary resource from a call
- /// Delete FeedbackSummary parameters
- /// Client to make requests to Twilio
- /// A single instance of FeedbackSummary
- public static bool Delete(DeleteFeedbackSummaryOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
-
- #if !NET35
- /// Delete a FeedbackSummary resource from a call
- /// Delete FeedbackSummary parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FeedbackSummary
- public static async System.Threading.Tasks.Task DeleteAsync(DeleteFeedbackSummaryOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
- #endif
-
- /// Delete a FeedbackSummary resource from a call
- /// A 34 character string that uniquely identifies this resource.
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- /// Client to make requests to Twilio
- /// A single instance of FeedbackSummary
- public static bool Delete(string pathSid, string pathAccountSid = null, ITwilioRestClient client = null)
- {
- var options = new DeleteFeedbackSummaryOptions(pathSid) { PathAccountSid = pathAccountSid } ;
- return Delete(options, client);
- }
-
- #if !NET35
- /// Delete a FeedbackSummary resource from a call
- /// A 34 character string that uniquely identifies this resource.
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FeedbackSummary
- public static async System.Threading.Tasks.Task DeleteAsync(string pathSid, string pathAccountSid = null, ITwilioRestClient client = null)
- {
- var options = new DeleteFeedbackSummaryOptions(pathSid) { PathAccountSid = pathAccountSid };
- return await DeleteAsync(options, client);
- }
- #endif
-
- private static Request BuildFetchRequest(FetchFeedbackSummaryOptions options, ITwilioRestClient client)
- {
-
- string path = "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json";
-
- string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
- path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Api,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// Fetch a FeedbackSummary resource from a call
- /// Fetch FeedbackSummary parameters
- /// Client to make requests to Twilio
- /// A single instance of FeedbackSummary
- public static FeedbackSummaryResource Fetch(FetchFeedbackSummaryOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// Fetch a FeedbackSummary resource from a call
- /// Fetch FeedbackSummary parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FeedbackSummary
- public static async System.Threading.Tasks.Task FetchAsync(FetchFeedbackSummaryOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// Fetch a FeedbackSummary resource from a call
- /// A 34 character string that uniquely identifies this resource.
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- /// Client to make requests to Twilio
- /// A single instance of FeedbackSummary
- public static FeedbackSummaryResource Fetch(
- string pathSid,
- string pathAccountSid = null,
- ITwilioRestClient client = null)
- {
- var options = new FetchFeedbackSummaryOptions(pathSid){ PathAccountSid = pathAccountSid };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// Fetch a FeedbackSummary resource from a call
- /// A 34 character string that uniquely identifies this resource.
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FeedbackSummary
- public static async System.Threading.Tasks.Task FetchAsync(string pathSid, string pathAccountSid = null, ITwilioRestClient client = null)
- {
- var options = new FetchFeedbackSummaryOptions(pathSid){ PathAccountSid = pathAccountSid };
- return await FetchAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a FeedbackSummaryResource object
- ///
- /// Raw JSON string
- /// FeedbackSummaryResource object represented by the provided JSON
- public static FeedbackSummaryResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
- [JsonProperty("account_sid")]
- public string AccountSid { get; private set; }
-
- /// The total number of calls.
- [JsonProperty("call_count")]
- public int? CallCount { get; private set; }
-
- /// The total number of calls with a feedback entry.
- [JsonProperty("call_feedback_count")]
- public int? CallFeedbackCount { get; private set; }
-
- /// The date that this resource was created, given in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
- [JsonProperty("date_created")]
- public DateTime? DateCreated { get; private set; }
-
- /// The date that this resource was last updated, given in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
- [JsonProperty("date_updated")]
- public DateTime? DateUpdated { get; private set; }
-
- /// The last date for which feedback entries are included in this Feedback Summary, formatted as `YYYY-MM-DD` and specified in UTC.
- [JsonProperty("end_date")]
- public DateTime? EndDate { get; private set; }
-
- /// Whether the feedback summary includes subaccounts; `true` if it does, otherwise `false`.
- [JsonProperty("include_subaccounts")]
- public bool? IncludeSubaccounts { get; private set; }
-
- /// A list of issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, or `one-way-audio`.
- [JsonProperty("issues")]
- public List Issues { get; private set; }
-
- /// The average QualityScore of the feedback entries.
- [JsonProperty("quality_score_average")]
- public decimal? QualityScoreAverage { get; private set; }
-
- /// The median QualityScore of the feedback entries.
- [JsonProperty("quality_score_median")]
- public decimal? QualityScoreMedian { get; private set; }
-
- /// The standard deviation of the quality scores.
- [JsonProperty("quality_score_standard_deviation")]
- public decimal? QualityScoreStandardDeviation { get; private set; }
-
- /// A 34 character string that uniquely identifies this resource.
- [JsonProperty("sid")]
- public string Sid { get; private set; }
-
- /// The first date for which feedback entries are included in this feedback summary, formatted as `YYYY-MM-DD` and specified in UTC.
- [JsonProperty("start_date")]
- public DateTime? StartDate { get; private set; }
-
-
- [JsonProperty("status")]
- public FeedbackSummaryResource.StatusEnum Status { get; private set; }
-
-
-
- private FeedbackSummaryResource() {
-
- }
- }
-}
-
diff --git a/src/Twilio/Rest/Content/V1/Content/ApprovalCreateOptions.cs b/src/Twilio/Rest/Content/V1/Content/ApprovalCreateOptions.cs
new file mode 100644
index 000000000..f8a028c59
--- /dev/null
+++ b/src/Twilio/Rest/Content/V1/Content/ApprovalCreateOptions.cs
@@ -0,0 +1,63 @@
+/*
+ * This code was generated by
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Content
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+using System;
+using System.Collections.Generic;
+using Twilio.Base;
+using Twilio.Converters;
+
+
+
+
+namespace Twilio.Rest.Content.V1.Content
+{
+
+ /// create
+ public class CreateApprovalCreateOptions : IOptions
+ {
+
+
+ public string PathSid { get; }
+
+
+ public ApprovalCreateResource.ContentApprovalRequest ContentApprovalRequest { get; }
+
+
+ /// Construct a new CreateContentApprovalRequestOptions
+ ///
+ ///
+ public CreateApprovalCreateOptions(string pathSid, ApprovalCreateResource.ContentApprovalRequest contentApprovalRequest)
+ {
+ PathSid = pathSid;
+ ContentApprovalRequest = contentApprovalRequest;
+ }
+
+
+ /// Generate the request body
+ public string GetBody()
+ {
+ string body = "";
+
+ if (ContentApprovalRequest != null)
+ {
+ body = ApprovalCreateResource.ToJson(ContentApprovalRequest);
+ }
+ return body;
+ }
+
+
+ }
+}
+
diff --git a/src/Twilio/Rest/Content/V1/Content/ApprovalCreateResource.cs b/src/Twilio/Rest/Content/V1/Content/ApprovalCreateResource.cs
new file mode 100644
index 000000000..977266744
--- /dev/null
+++ b/src/Twilio/Rest/Content/V1/Content/ApprovalCreateResource.cs
@@ -0,0 +1,205 @@
+/*
+ * This code was generated by
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Content
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using Twilio.Base;
+using Twilio.Clients;
+using Twilio.Constant;
+using Twilio.Converters;
+using Twilio.Exceptions;
+using Twilio.Http;
+
+
+
+namespace Twilio.Rest.Content.V1.Content
+{
+ public class ApprovalCreateResource : Resource
+ {
+
+ public class ContentApprovalRequest
+ {
+ [JsonProperty("name")]
+ private string Name {get; set;}
+ [JsonProperty("category")]
+ private string Category {get; set;}
+ public ContentApprovalRequest() { }
+ public class Builder
+ {
+ private ContentApprovalRequest _contentApprovalRequest = new ContentApprovalRequest();
+ public Builder()
+ {
+ }
+ public Builder WithName(string name)
+ {
+ _contentApprovalRequest.Name= name;
+ return this;
+ }
+ public Builder WithCategory(string category)
+ {
+ _contentApprovalRequest.Category= category;
+ return this;
+ }
+ public ContentApprovalRequest Build()
+ {
+ return _contentApprovalRequest;
+ }
+ }
+ }
+
+
+
+
+ private static Request BuildCreateRequest(CreateApprovalCreateOptions options, ITwilioRestClient client)
+ {
+
+ string path = "/v1/Content/{Sid}/ApprovalRequests/whatsapp";
+
+ string PathSid = options.PathSid;
+ path = path.Replace("{"+"Sid"+"}", PathSid);
+
+ return new Request(
+ HttpMethod.Post,
+ Rest.Domain.Content,
+ path,
+
+ contentType: EnumConstants.ContentTypeEnum.JSON,
+ body: options.GetBody(),
+ headerParams: null
+ );
+ }
+
+ /// create
+ /// Create ApprovalCreate parameters
+ /// Client to make requests to Twilio
+ /// A single instance of ApprovalCreate
+ public static ApprovalCreateResource Create(CreateApprovalCreateOptions options, ITwilioRestClient client = null)
+ {
+ client = client ?? TwilioClient.GetRestClient();
+ var response = client.Request(BuildCreateRequest(options, client));
+ return FromJson(response.Content);
+ }
+
+ #if !NET35
+ /// create
+ /// Create ApprovalCreate parameters
+ /// Client to make requests to Twilio
+ /// Task that resolves to A single instance of ApprovalCreate
+ public static async System.Threading.Tasks.Task CreateAsync(CreateApprovalCreateOptions options,
+ ITwilioRestClient client = null)
+ {
+ client = client ?? TwilioClient.GetRestClient();
+ var response = await client.RequestAsync(BuildCreateRequest(options, client));
+ return FromJson(response.Content);
+ }
+ #endif
+
+ /// create
+ ///
+ ///
+ /// Client to make requests to Twilio
+ /// A single instance of ApprovalCreate
+ public static ApprovalCreateResource Create(
+ string pathSid,
+ ApprovalCreateResource.ContentApprovalRequest contentApprovalRequest,
+ ITwilioRestClient client = null)
+ {
+ var options = new CreateApprovalCreateOptions(pathSid, contentApprovalRequest){ };
+ return Create(options, client);
+ }
+
+ #if !NET35
+ /// create
+ ///
+ ///
+ /// Client to make requests to Twilio
+ /// Task that resolves to A single instance of ApprovalCreate
+ public static async System.Threading.Tasks.Task CreateAsync(
+ string pathSid,
+ ApprovalCreateResource.ContentApprovalRequest contentApprovalRequest,
+ ITwilioRestClient client = null)
+ {
+ var options = new CreateApprovalCreateOptions(pathSid, contentApprovalRequest){ };
+ return await CreateAsync(options, client);
+ }
+ #endif
+
+ ///
+ /// Converts a JSON string into a ApprovalCreateResource object
+ ///
+ /// Raw JSON string
+ /// ApprovalCreateResource object represented by the provided JSON
+ public static ApprovalCreateResource FromJson(string json)
+ {
+ try
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
+
+
+ /// The name
+ [JsonProperty("name")]
+ public string Name { get; private set; }
+
+ /// The category
+ [JsonProperty("category")]
+ public string Category { get; private set; }
+
+ /// The content_type
+ [JsonProperty("content_type")]
+ public string ContentType { get; private set; }
+
+ /// The status
+ [JsonProperty("status")]
+ public string Status { get; private set; }
+
+ /// The rejection_reason
+ [JsonProperty("rejection_reason")]
+ public string RejectionReason { get; private set; }
+
+ /// The allow_category_change
+ [JsonProperty("allow_category_change")]
+ public bool? AllowCategoryChange { get; private set; }
+
+
+
+ private ApprovalCreateResource() {
+
+ }
+ }
+}
+
diff --git a/src/Twilio/Rest/Content/V1/Content/ApprovalFetchOptions.cs b/src/Twilio/Rest/Content/V1/Content/ApprovalFetchOptions.cs
index 3653c6286..8a32b5520 100644
--- a/src/Twilio/Rest/Content/V1/Content/ApprovalFetchOptions.cs
+++ b/src/Twilio/Rest/Content/V1/Content/ApprovalFetchOptions.cs
@@ -32,7 +32,7 @@ public class FetchApprovalFetchOptions : IOptions
- /// Construct a new FetchApprovalFetchOptions
+ /// Construct a new FetchApprovalOptions
/// The Twilio-provided string that uniquely identifies the Content resource whose approval information to fetch.
public FetchApprovalFetchOptions(string pathSid)
{
diff --git a/src/Twilio/Rest/Content/V1/ContentOptions.cs b/src/Twilio/Rest/Content/V1/ContentOptions.cs
index 628b22f41..bcf7adec1 100644
--- a/src/Twilio/Rest/Content/V1/ContentOptions.cs
+++ b/src/Twilio/Rest/Content/V1/ContentOptions.cs
@@ -23,6 +23,37 @@
namespace Twilio.Rest.Content.V1
{
+
+ /// Create a Content resource
+ public class CreateContentOptions : IOptions
+ {
+
+
+ public ContentResource.ContentCreateRequest ContentCreateRequest { get; }
+
+
+ /// Construct a new CreateContentOptions
+ ///
+ public CreateContentOptions(ContentResource.ContentCreateRequest contentCreateRequest)
+ {
+ ContentCreateRequest = contentCreateRequest;
+ }
+
+
+ /// Generate the request body
+ public string GetBody()
+ {
+ string body = "";
+
+ if (ContentCreateRequest != null)
+ {
+ body = ContentResource.ToJson(ContentCreateRequest);
+ }
+ return body;
+ }
+
+
+ }
/// Deletes a Content resource
public class DeleteContentOptions : IOptions
{
diff --git a/src/Twilio/Rest/Content/V1/ContentResource.cs b/src/Twilio/Rest/Content/V1/ContentResource.cs
index 290bbe11b..7a3098381 100644
--- a/src/Twilio/Rest/Content/V1/ContentResource.cs
+++ b/src/Twilio/Rest/Content/V1/ContentResource.cs
@@ -22,7 +22,7 @@
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
-
+using Twilio.Types;
namespace Twilio.Rest.Content.V1
@@ -30,9 +30,764 @@ namespace Twilio.Rest.Content.V1
public class ContentResource : Resource
{
+ public class TwilioText
+ {
+ [JsonProperty("body")]
+ private string Body {get; set;}
+ public TwilioText() { }
+ public class Builder
+ {
+ private TwilioText _twilioText = new TwilioText();
+ public Builder()
+ {
+ }
+ public Builder WithBody(string body)
+ {
+ _twilioText.Body= body;
+ return this;
+ }
+ public TwilioText Build()
+ {
+ return _twilioText;
+ }
+ }
+ }
+ public class TwilioMedia
+ {
+ [JsonProperty("body")]
+ private string Body {get; set;}
+ [JsonProperty("media")]
+ private List Media {get; set;}
+ public TwilioMedia() { }
+ public class Builder
+ {
+ private TwilioMedia _twilioMedia = new TwilioMedia();
+ public Builder()
+ {
+ }
+ public Builder WithBody(string body)
+ {
+ _twilioMedia.Body= body;
+ return this;
+ }
+ public Builder WithMedia(List media)
+ {
+ _twilioMedia.Media= media;
+ return this;
+ }
+ public TwilioMedia Build()
+ {
+ return _twilioMedia;
+ }
+ }
+ }
+ public class TwilioLocation
+ {
+ [JsonProperty("latitude")]
+ private decimal? Latitude {get; set;}
+ [JsonProperty("longitude")]
+ private decimal? Longitude {get; set;}
+ [JsonProperty("label")]
+ private string Label {get; set;}
+ public TwilioLocation() { }
+ public class Builder
+ {
+ private TwilioLocation _twilioLocation = new TwilioLocation();
+ public Builder()
+ {
+ }
+ public Builder WithLatitude(decimal? latitude)
+ {
+ _twilioLocation.Latitude= latitude;
+ return this;
+ }
+ public Builder WithLongitude(decimal? longitude)
+ {
+ _twilioLocation.Longitude= longitude;
+ return this;
+ }
+ public Builder WithLabel(string label)
+ {
+ _twilioLocation.Label= label;
+ return this;
+ }
+ public TwilioLocation Build()
+ {
+ return _twilioLocation;
+ }
+ }
+ }
+ public class ListItem
+ {
+ [JsonProperty("id")]
+ private string Id {get; set;}
+ [JsonProperty("item")]
+ private string Item {get; set;}
+ [JsonProperty("description")]
+ private string Description {get; set;}
+ public ListItem() { }
+ public class Builder
+ {
+ private ListItem _listItem = new ListItem();
+ public Builder()
+ {
+ }
+ public Builder WithId(string id)
+ {
+ _listItem.Id= id;
+ return this;
+ }
+ public Builder WithItem(string item)
+ {
+ _listItem.Item= item;
+ return this;
+ }
+ public Builder WithDescription(string description)
+ {
+ _listItem.Description= description;
+ return this;
+ }
+ public ListItem Build()
+ {
+ return _listItem;
+ }
+ }
+ }
+ public class TwilioListPicker
+ {
+ [JsonProperty("body")]
+ private string Body {get; set;}
+ [JsonProperty("button")]
+ private string Button {get; set;}
+ [JsonProperty("items")]
+ private List Items {get; set;}
+ public TwilioListPicker() { }
+ public class Builder
+ {
+ private TwilioListPicker _twilioListPicker = new TwilioListPicker();
+ public Builder()
+ {
+ }
+ public Builder WithBody(string body)
+ {
+ _twilioListPicker.Body= body;
+ return this;
+ }
+ public Builder WithButton(string button)
+ {
+ _twilioListPicker.Button= button;
+ return this;
+ }
+ public Builder WithItems(List items)
+ {
+ _twilioListPicker.Items= items;
+ return this;
+ }
+ public TwilioListPicker Build()
+ {
+ return _twilioListPicker;
+ }
+ }
+ }
+ public class CallToActionAction
+ {
+ [JsonConverter(typeof(StringEnumConverter))]
+ [JsonProperty("type")]
+ private ContentResource.CallToActionActionType Type {get; set;}
+ [JsonProperty("title")]
+ private string Title {get; set;}
+ [JsonProperty("url")]
+ private string Url {get; set;}
+ [JsonProperty("phone")]
+ private string Phone {get; set;}
+ [JsonProperty("id")]
+ private string Id {get; set;}
+ public CallToActionAction() { }
+ public class Builder
+ {
+ private CallToActionAction _callToActionAction = new CallToActionAction();
+ public Builder()
+ {
+ }
+ public Builder WithType(ContentResource.CallToActionActionType type)
+ {
+ _callToActionAction.Type= type;
+ return this;
+ }
+ public Builder WithTitle(string title)
+ {
+ _callToActionAction.Title= title;
+ return this;
+ }
+ public Builder WithUrl(string url)
+ {
+ _callToActionAction.Url= url;
+ return this;
+ }
+ public Builder WithPhone(string phone)
+ {
+ _callToActionAction.Phone= phone;
+ return this;
+ }
+ public Builder WithId(string id)
+ {
+ _callToActionAction.Id= id;
+ return this;
+ }
+ public CallToActionAction Build()
+ {
+ return _callToActionAction;
+ }
+ }
+ }
+ public class TwilioCallToAction
+ {
+ [JsonProperty("body")]
+ private string Body {get; set;}
+ [JsonProperty("actions")]
+ private List Actions {get; set;}
+ public TwilioCallToAction() { }
+ public class Builder
+ {
+ private TwilioCallToAction _twilioCallToAction = new TwilioCallToAction();
+ public Builder()
+ {
+ }
+ public Builder WithBody(string body)
+ {
+ _twilioCallToAction.Body= body;
+ return this;
+ }
+ public Builder WithActions(List actions)
+ {
+ _twilioCallToAction.Actions= actions;
+ return this;
+ }
+ public TwilioCallToAction Build()
+ {
+ return _twilioCallToAction;
+ }
+ }
+ }
+ public class QuickReplyAction
+ {
+ [JsonConverter(typeof(StringEnumConverter))]
+ [JsonProperty("type")]
+ private ContentResource.QuickReplyActionType Type {get; set;}
+ [JsonProperty("title")]
+ private string Title {get; set;}
+ [JsonProperty("id")]
+ private string Id {get; set;}
+ public QuickReplyAction() { }
+ public class Builder
+ {
+ private QuickReplyAction _quickReplyAction = new QuickReplyAction();
+ public Builder()
+ {
+ }
+ public Builder WithType(ContentResource.QuickReplyActionType type)
+ {
+ _quickReplyAction.Type= type;
+ return this;
+ }
+ public Builder WithTitle(string title)
+ {
+ _quickReplyAction.Title= title;
+ return this;
+ }
+ public Builder WithId(string id)
+ {
+ _quickReplyAction.Id= id;
+ return this;
+ }
+ public QuickReplyAction Build()
+ {
+ return _quickReplyAction;
+ }
+ }
+ }
+ public class TwilioQuickReply
+ {
+ [JsonProperty("body")]
+ private string Body {get; set;}
+ [JsonProperty("actions")]
+ private List Actions {get; set;}
+ public TwilioQuickReply() { }
+ public class Builder
+ {
+ private TwilioQuickReply _twilioQuickReply = new TwilioQuickReply();
+ public Builder()
+ {
+ }
+ public Builder WithBody(string body)
+ {
+ _twilioQuickReply.Body= body;
+ return this;
+ }
+ public Builder WithActions(List actions)
+ {
+ _twilioQuickReply.Actions= actions;
+ return this;
+ }
+ public TwilioQuickReply Build()
+ {
+ return _twilioQuickReply;
+ }
+ }
+ }
+ public class CardAction
+ {
+ [JsonConverter(typeof(StringEnumConverter))]
+ [JsonProperty("type")]
+ private ContentResource.CardActionType Type {get; set;}
+ [JsonProperty("title")]
+ private string Title {get; set;}
+ [JsonProperty("url")]
+ private string Url {get; set;}
+ [JsonProperty("phone")]
+ private string Phone {get; set;}
+ [JsonProperty("id")]
+ private string Id {get; set;}
+ public CardAction() { }
+ public class Builder
+ {
+ private CardAction _cardAction = new CardAction();
+ public Builder()
+ {
+ }
+ public Builder WithType(ContentResource.CardActionType type)
+ {
+ _cardAction.Type= type;
+ return this;
+ }
+ public Builder WithTitle(string title)
+ {
+ _cardAction.Title= title;
+ return this;
+ }
+ public Builder WithUrl(string url)
+ {
+ _cardAction.Url= url;
+ return this;
+ }
+ public Builder WithPhone(string phone)
+ {
+ _cardAction.Phone= phone;
+ return this;
+ }
+ public Builder WithId(string id)
+ {
+ _cardAction.Id= id;
+ return this;
+ }
+ public CardAction Build()
+ {
+ return _cardAction;
+ }
+ }
+ }
+ public class TwilioCard
+ {
+ [JsonProperty("title")]
+ private string Title {get; set;}
+ [JsonProperty("subtitle")]
+ private string Subtitle {get; set;}
+ [JsonProperty("media")]
+ private List Media {get; set;}
+ [JsonProperty("actions")]
+ private List Actions {get; set;}
+ public TwilioCard() { }
+ public class Builder
+ {
+ private TwilioCard _twilioCard = new TwilioCard();
+ public Builder()
+ {
+ }
+ public Builder WithTitle(string title)
+ {
+ _twilioCard.Title= title;
+ return this;
+ }
+ public Builder WithSubtitle(string subtitle)
+ {
+ _twilioCard.Subtitle= subtitle;
+ return this;
+ }
+ public Builder WithMedia(List media)
+ {
+ _twilioCard.Media= media;
+ return this;
+ }
+ public Builder WithActions(List actions)
+ {
+ _twilioCard.Actions= actions;
+ return this;
+ }
+ public TwilioCard Build()
+ {
+ return _twilioCard;
+ }
+ }
+ }
+ public class WhatsappCard
+ {
+ [JsonProperty("body")]
+ private string Body {get; set;}
+ [JsonProperty("footer")]
+ private string Footer {get; set;}
+ [JsonProperty("media")]
+ private List Media {get; set;}
+ [JsonProperty("header_text")]
+ private string HeaderText {get; set;}
+ [JsonProperty("actions")]
+ private List Actions {get; set;}
+ public WhatsappCard() { }
+ public class Builder
+ {
+ private WhatsappCard _whatsappCard = new WhatsappCard();
+ public Builder()
+ {
+ }
+ public Builder WithBody(string body)
+ {
+ _whatsappCard.Body= body;
+ return this;
+ }
+ public Builder WithFooter(string footer)
+ {
+ _whatsappCard.Footer= footer;
+ return this;
+ }
+ public Builder WithMedia(List media)
+ {
+ _whatsappCard.Media= media;
+ return this;
+ }
+ public Builder WithHeaderText(string headerText)
+ {
+ _whatsappCard.HeaderText= headerText;
+ return this;
+ }
+ public Builder WithActions(List actions)
+ {
+ _whatsappCard.Actions= actions;
+ return this;
+ }
+ public WhatsappCard Build()
+ {
+ return _whatsappCard;
+ }
+ }
+ }
+ public class AuthenticationAction
+ {
+ [JsonConverter(typeof(StringEnumConverter))]
+ [JsonProperty("type")]
+ private ContentResource.AuthenticationActionType Type {get; set;}
+ [JsonProperty("copy_code_text")]
+ private string CopyCodeText {get; set;}
+ public AuthenticationAction() { }
+ public class Builder
+ {
+ private AuthenticationAction _authenticationAction = new AuthenticationAction();
+ public Builder()
+ {
+ }
+ public Builder WithType(ContentResource.AuthenticationActionType type)
+ {
+ _authenticationAction.Type= type;
+ return this;
+ }
+ public Builder WithCopyCodeText(string copyCodeText)
+ {
+ _authenticationAction.CopyCodeText= copyCodeText;
+ return this;
+ }
+ public AuthenticationAction Build()
+ {
+ return _authenticationAction;
+ }
+ }
+ }
+ public class WhatsappAuthentication
+ {
+ [JsonProperty("add_security_recommendation")]
+ private bool? AddSecurityRecommendation {get; set;}
+ [JsonProperty("code_expiration_minutes")]
+ private decimal? CodeExpirationMinutes {get; set;}
+ [JsonProperty("actions")]
+ private List Actions {get; set;}
+ public WhatsappAuthentication() { }
+ public class Builder
+ {
+ private WhatsappAuthentication _whatsappAuthentication = new WhatsappAuthentication();
+ public Builder()
+ {
+ }
+ public Builder WithAddSecurityRecommendation(bool? addSecurityRecommendation)
+ {
+ _whatsappAuthentication.AddSecurityRecommendation= addSecurityRecommendation;
+ return this;
+ }
+ public Builder WithCodeExpirationMinutes(decimal? codeExpirationMinutes)
+ {
+ _whatsappAuthentication.CodeExpirationMinutes= codeExpirationMinutes;
+ return this;
+ }
+ public Builder WithActions(List actions)
+ {
+ _whatsappAuthentication.Actions= actions;
+ return this;
+ }
+ public WhatsappAuthentication Build()
+ {
+ return _whatsappAuthentication;
+ }
+ }
+ }
+ public class Types
+ {
+ [JsonProperty("twilio/text")]
+ private TwilioText TwilioText {get; set;}
+ [JsonProperty("twilio/media")]
+ private TwilioMedia TwilioMedia {get; set;}
+ [JsonProperty("twilio/location")]
+ private TwilioLocation TwilioLocation {get; set;}
+ [JsonProperty("twilio/list-picker")]
+ private TwilioListPicker TwilioListPicker {get; set;}
+ [JsonProperty("twilio/call-to-action")]
+ private TwilioCallToAction TwilioCallToAction {get; set;}
+ [JsonProperty("twilio/quick-reply")]
+ private TwilioQuickReply TwilioQuickReply {get; set;}
+ [JsonProperty("twilio/card")]
+ private TwilioCard TwilioCard {get; set;}
+ [JsonProperty("whatsapp/card")]
+ private WhatsappCard WhatsappCard {get; set;}
+ [JsonProperty("whatsapp/authentication")]
+ private WhatsappAuthentication WhatsappAuthentication {get; set;}
+ public Types() { }
+ public class Builder
+ {
+ private Types _types = new Types();
+ public Builder()
+ {
+ }
+ public Builder WithTwilioText(TwilioText twilioText)
+ {
+ _types.TwilioText= twilioText;
+ return this;
+ }
+ public Builder WithTwilioMedia(TwilioMedia twilioMedia)
+ {
+ _types.TwilioMedia= twilioMedia;
+ return this;
+ }
+ public Builder WithTwilioLocation(TwilioLocation twilioLocation)
+ {
+ _types.TwilioLocation= twilioLocation;
+ return this;
+ }
+ public Builder WithTwilioListPicker(TwilioListPicker twilioListPicker)
+ {
+ _types.TwilioListPicker= twilioListPicker;
+ return this;
+ }
+ public Builder WithTwilioCallToAction(TwilioCallToAction twilioCallToAction)
+ {
+ _types.TwilioCallToAction= twilioCallToAction;
+ return this;
+ }
+ public Builder WithTwilioQuickReply(TwilioQuickReply twilioQuickReply)
+ {
+ _types.TwilioQuickReply= twilioQuickReply;
+ return this;
+ }
+ public Builder WithTwilioCard(TwilioCard twilioCard)
+ {
+ _types.TwilioCard= twilioCard;
+ return this;
+ }
+ public Builder WithWhatsappCard(WhatsappCard whatsappCard)
+ {
+ _types.WhatsappCard= whatsappCard;
+ return this;
+ }
+ public Builder WithWhatsappAuthentication(WhatsappAuthentication whatsappAuthentication)
+ {
+ _types.WhatsappAuthentication= whatsappAuthentication;
+ return this;
+ }
+ public Types Build()
+ {
+ return _types;
+ }
+ }
+ }
+ public class ContentCreateRequest
+ {
+ [JsonProperty("friendly_name")]
+ private string FriendlyName {get; set;}
+ [JsonProperty("variables")]
+ private Dictionary Variables {get; set;}
+ [JsonProperty("language")]
+ private string Language {get; set;}
+ [JsonProperty("types")]
+ private Types Types {get; set;}
+ public ContentCreateRequest() { }
+ public class Builder
+ {
+ private ContentCreateRequest _contentCreateRequest = new ContentCreateRequest();
+ public Builder()
+ {
+ }
+ public Builder WithFriendlyName(string friendlyName)
+ {
+ _contentCreateRequest.FriendlyName= friendlyName;
+ return this;
+ }
+ public Builder WithVariables(Dictionary variables)
+ {
+ _contentCreateRequest.Variables= variables;
+ return this;
+ }
+ public Builder WithLanguage(string language)
+ {
+ _contentCreateRequest.Language= language;
+ return this;
+ }
+ public Builder WithTypes(Types types)
+ {
+ _contentCreateRequest.Types= types;
+ return this;
+ }
+ public ContentCreateRequest Build()
+ {
+ return _contentCreateRequest;
+ }
+ }
+ }
+ [JsonConverter(typeof(StringEnumConverter))]
+ public sealed class AuthenticationActionType : StringEnum
+ {
+ private AuthenticationActionType(string value) : base(value) {}
+ public AuthenticationActionType() {}
+ public static implicit operator AuthenticationActionType(string value)
+ {
+ return new AuthenticationActionType(value);
+ }
+ public static readonly AuthenticationActionType CopyCode = new AuthenticationActionType("COPY_CODE");
+
+ }
+ [JsonConverter(typeof(StringEnumConverter))]
+ public sealed class CardActionType : StringEnum
+ {
+ private CardActionType(string value) : base(value) {}
+ public CardActionType() {}
+ public static implicit operator CardActionType(string value)
+ {
+ return new CardActionType(value);
+ }
+ public static readonly CardActionType Url = new CardActionType("URL");
+ public static readonly CardActionType PhoneNumber = new CardActionType("PHONE_NUMBER");
+ public static readonly CardActionType QuickReply = new CardActionType("QUICK_REPLY");
+
+ }
+ [JsonConverter(typeof(StringEnumConverter))]
+ public sealed class QuickReplyActionType : StringEnum
+ {
+ private QuickReplyActionType(string value) : base(value) {}
+ public QuickReplyActionType() {}
+ public static implicit operator QuickReplyActionType(string value)
+ {
+ return new QuickReplyActionType(value);
+ }
+ public static readonly QuickReplyActionType QuickReply = new QuickReplyActionType("QUICK_REPLY");
+
+ }
+ [JsonConverter(typeof(StringEnumConverter))]
+ public sealed class CallToActionActionType : StringEnum
+ {
+ private CallToActionActionType(string value) : base(value) {}
+ public CallToActionActionType() {}
+ public static implicit operator CallToActionActionType(string value)
+ {
+ return new CallToActionActionType(value);
+ }
+ public static readonly CallToActionActionType Url = new CallToActionActionType("URL");
+ public static readonly CallToActionActionType PhoneNumber = new CallToActionActionType("PHONE_NUMBER");
+
+ }
+
+
+ private static Request BuildCreateRequest(CreateContentOptions options, ITwilioRestClient client)
+ {
+
+ string path = "/v1/Content";
+
+
+ return new Request(
+ HttpMethod.Post,
+ Rest.Domain.Content,
+ path,
+
+ contentType: EnumConstants.ContentTypeEnum.JSON,
+ body: options.GetBody(),
+ headerParams: null
+ );
+ }
+
+ /// Create a Content resource
+ /// Create Content parameters
+ /// Client to make requests to Twilio
+ /// A single instance of Content
+ public static ContentResource Create(CreateContentOptions options, ITwilioRestClient client = null)
+ {
+ client = client ?? TwilioClient.GetRestClient();
+ var response = client.Request(BuildCreateRequest(options, client));
+ return FromJson(response.Content);
+ }
+ #if !NET35
+ /// Create a Content resource
+ /// Create Content parameters
+ /// Client to make requests to Twilio
+ /// Task that resolves to A single instance of Content
+ public static async System.Threading.Tasks.Task CreateAsync(CreateContentOptions options,
+ ITwilioRestClient client = null)
+ {
+ client = client ?? TwilioClient.GetRestClient();
+ var response = await client.RequestAsync(BuildCreateRequest(options, client));
+ return FromJson(response.Content);
+ }
+ #endif
+
+ /// Create a Content resource
+ ///
+ /// Client to make requests to Twilio
+ /// A single instance of Content
+ public static ContentResource Create(
+ ContentResource.ContentCreateRequest contentCreateRequest,
+ ITwilioRestClient client = null)
+ {
+ var options = new CreateContentOptions(contentCreateRequest){ };
+ return Create(options, client);
+ }
+
+ #if !NET35
+ /// Create a Content resource
+ ///
+ /// Client to make requests to Twilio
+ /// Task that resolves to A single instance of Content
+ public static async System.Threading.Tasks.Task CreateAsync(
+ ContentResource.ContentCreateRequest contentCreateRequest,
+ ITwilioRestClient client = null)
+ {
+ var options = new CreateContentOptions(contentCreateRequest){ };
+ return await CreateAsync(options, client);
+ }
+ #endif
/// Deletes a Content resource
/// Delete Content parameters
@@ -351,7 +1106,7 @@ public static string ToJson(object model)
/// The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
[JsonProperty("types")]
- public object Types { get; private set; }
+ public object _Types { get; private set; }
/// The URL of the resource, relative to `https://content.twilio.com`.
[JsonProperty("url")]
diff --git a/src/Twilio/Rest/Conversations/V1/Conversation/MessageOptions.cs b/src/Twilio/Rest/Conversations/V1/Conversation/MessageOptions.cs
index 300c3b617..a36ec8a41 100644
--- a/src/Twilio/Rest/Conversations/V1/Conversation/MessageOptions.cs
+++ b/src/Twilio/Rest/Conversations/V1/Conversation/MessageOptions.cs
@@ -52,7 +52,7 @@ public class CreateMessageOptions : IOptions
/// The Media SID to be attached to the new Message.
public string MediaSid { get; set; }
- /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
+ /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
public string ContentSid { get; set; }
/// A structurally valid JSON string that contains values to resolve Rich Content template variables.
diff --git a/src/Twilio/Rest/Conversations/V1/Conversation/MessageResource.cs b/src/Twilio/Rest/Conversations/V1/Conversation/MessageResource.cs
index c2bf2d2b0..d805da0a5 100644
--- a/src/Twilio/Rest/Conversations/V1/Conversation/MessageResource.cs
+++ b/src/Twilio/Rest/Conversations/V1/Conversation/MessageResource.cs
@@ -108,7 +108,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre
/// The date that this resource was last updated. `null` if the message has not been edited.
/// A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
/// The Media SID to be attached to the new Message.
- /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
+ /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
/// A structurally valid JSON string that contains values to resolve Rich Content template variables.
/// The subject of the message, can be up to 256 characters long.
/// The X-Twilio-Webhook-Enabled HTTP request header
@@ -141,7 +141,7 @@ public static MessageResource Create(
/// The date that this resource was last updated. `null` if the message has not been edited.
/// A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
/// The Media SID to be attached to the new Message.
- /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
+ /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
/// A structurally valid JSON string that contains values to resolve Rich Content template variables.
/// The subject of the message, can be up to 256 characters long.
/// The X-Twilio-Webhook-Enabled HTTP request header
@@ -632,7 +632,7 @@ public static string ToJson(object model)
[JsonProperty("links")]
public Dictionary Links { get; private set; }
- /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template.
+ /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template.
[JsonProperty("content_sid")]
public string ContentSid { get; private set; }
diff --git a/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageOptions.cs b/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageOptions.cs
index 8b8210868..a66ed7684 100644
--- a/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageOptions.cs
+++ b/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageOptions.cs
@@ -55,7 +55,7 @@ public class CreateMessageOptions : IOptions
/// The Media SID to be attached to the new Message.
public string MediaSid { get; set; }
- /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
+ /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
public string ContentSid { get; set; }
/// A structurally valid JSON string that contains values to resolve Rich Content template variables.
diff --git a/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageResource.cs b/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageResource.cs
index 6d16a3508..215f8557f 100644
--- a/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageResource.cs
+++ b/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageResource.cs
@@ -111,7 +111,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre
/// The date that this resource was last updated. `null` if the message has not been edited.
/// A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
/// The Media SID to be attached to the new Message.
- /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
+ /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
/// A structurally valid JSON string that contains values to resolve Rich Content template variables.
/// The subject of the message, can be up to 256 characters long.
/// The X-Twilio-Webhook-Enabled HTTP request header
@@ -146,7 +146,7 @@ public static MessageResource Create(
/// The date that this resource was last updated. `null` if the message has not been edited.
/// A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
/// The Media SID to be attached to the new Message.
- /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
+ /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
/// A structurally valid JSON string that contains values to resolve Rich Content template variables.
/// The subject of the message, can be up to 256 characters long.
/// The X-Twilio-Webhook-Enabled HTTP request header
@@ -663,7 +663,7 @@ public static string ToJson(object model)
[JsonProperty("links")]
public Dictionary Links { get; private set; }
- /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template.
+ /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template.
[JsonProperty("content_sid")]
public string ContentSid { get; private set; }
diff --git a/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventOptions.cs b/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventOptions.cs
index ebdbea56f..348cc6a91 100644
--- a/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventOptions.cs
+++ b/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventOptions.cs
@@ -24,7 +24,7 @@
namespace Twilio.Rest.Events.V1.Subscription
{
- /// Create a new Subscribed Event type for the subscription
+ /// Add an event type to a Subscription.
public class CreateSubscribedEventOptions : IOptions
{
@@ -34,7 +34,7 @@ public class CreateSubscribedEventOptions : IOptions
/// Type of event being subscribed to.
public string Type { get; }
- /// The schema version that the subscription should use.
+ /// The schema version that the Subscription should use.
public int? SchemaVersion { get; set; }
@@ -67,7 +67,7 @@ public List> GetParams()
}
- /// Remove an event type from a subscription.
+ /// Remove an event type from a Subscription.
public class DeleteSubscribedEventOptions : IOptions
{
@@ -180,7 +180,7 @@ public class UpdateSubscribedEventOptions : IOptions
/// Type of event being subscribed to.
public string PathType { get; }
- /// The schema version that the subscription should use.
+ /// The schema version that the Subscription should use.
public int? SchemaVersion { get; set; }
diff --git a/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventResource.cs b/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventResource.cs
index a496ac9c3..3266d48bc 100644
--- a/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventResource.cs
+++ b/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventResource.cs
@@ -51,7 +51,7 @@ private static Request BuildCreateRequest(CreateSubscribedEventOptions options,
);
}
- /// Create a new Subscribed Event type for the subscription
+ /// Add an event type to a Subscription.
/// Create SubscribedEvent parameters
/// Client to make requests to Twilio
/// A single instance of SubscribedEvent
@@ -63,7 +63,7 @@ public static SubscribedEventResource Create(CreateSubscribedEventOptions option
}
#if !NET35
- /// Create a new Subscribed Event type for the subscription
+ /// Add an event type to a Subscription.
/// Create SubscribedEvent parameters
/// Client to make requests to Twilio
/// Task that resolves to A single instance of SubscribedEvent
@@ -76,10 +76,10 @@ public static async System.Threading.Tasks.Task CreateA
}
#endif
- /// Create a new Subscribed Event type for the subscription
+ /// Add an event type to a Subscription.
/// The unique SID identifier of the Subscription.
/// Type of event being subscribed to.
- /// The schema version that the subscription should use.
+ /// The schema version that the Subscription should use.
/// Client to make requests to Twilio
/// A single instance of SubscribedEvent
public static SubscribedEventResource Create(
@@ -93,10 +93,10 @@ public static SubscribedEventResource Create(
}
#if !NET35
- /// Create a new Subscribed Event type for the subscription
+ /// Add an event type to a Subscription.
/// The unique SID identifier of the Subscription.
/// Type of event being subscribed to.
- /// The schema version that the subscription should use.
+ /// The schema version that the Subscription should use.
/// Client to make requests to Twilio
/// Task that resolves to A single instance of SubscribedEvent
public static async System.Threading.Tasks.Task CreateAsync(
@@ -110,7 +110,7 @@ public static async System.Threading.Tasks.Task CreateA
}
#endif
- /// Remove an event type from a subscription.
+ /// Remove an event type from a Subscription.
/// Delete SubscribedEvent parameters
/// Client to make requests to Twilio
/// A single instance of SubscribedEvent
@@ -133,7 +133,7 @@ private static Request BuildDeleteRequest(DeleteSubscribedEventOptions options,
);
}
- /// Remove an event type from a subscription.
+ /// Remove an event type from a Subscription.
/// Delete SubscribedEvent parameters
/// Client to make requests to Twilio
/// A single instance of SubscribedEvent
@@ -145,7 +145,7 @@ public static bool Delete(DeleteSubscribedEventOptions options, ITwilioRestClien
}
#if !NET35
- /// Remove an event type from a subscription.
+ /// Remove an event type from a Subscription.
/// Delete SubscribedEvent parameters
/// Client to make requests to Twilio
/// Task that resolves to A single instance of SubscribedEvent
@@ -158,7 +158,7 @@ public static async System.Threading.Tasks.Task DeleteAsync(DeleteSubscrib
}
#endif
- /// Remove an event type from a subscription.
+ /// Remove an event type from a Subscription.
/// The unique SID identifier of the Subscription.
/// Type of event being subscribed to.
/// Client to make requests to Twilio
@@ -170,7 +170,7 @@ public static bool Delete(string pathSubscriptionSid, string pathType, ITwilioRe
}
#if !NET35
- /// Remove an event type from a subscription.
+ /// Remove an event type from a Subscription.
/// The unique SID identifier of the Subscription.
/// Type of event being subscribed to.
/// Client to make requests to Twilio
@@ -425,7 +425,7 @@ public static async System.Threading.Tasks.Task UpdateA
/// Update an Event for a Subscription.
/// The unique SID identifier of the Subscription.
/// Type of event being subscribed to.
- /// The schema version that the subscription should use.
+ /// The schema version that the Subscription should use.
/// Client to make requests to Twilio
/// A single instance of SubscribedEvent
public static SubscribedEventResource Update(
@@ -442,7 +442,7 @@ public static SubscribedEventResource Update(
/// Update an Event for a Subscription.
/// The unique SID identifier of the Subscription.
/// Type of event being subscribed to.
- /// The schema version that the subscription should use.
+ /// The schema version that the Subscription should use.
/// Client to make requests to Twilio
/// Task that resolves to A single instance of SubscribedEvent
public static async System.Threading.Tasks.Task UpdateAsync(
@@ -498,7 +498,7 @@ public static string ToJson(object model)
[JsonProperty("type")]
public string Type { get; private set; }
- /// The schema version that the subscription should use.
+ /// The schema version that the Subscription should use.
[JsonProperty("schema_version")]
public int? SchemaVersion { get; private set; }
diff --git a/src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.cs b/src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.cs
index c4b9c8bd3..740027ab2 100644
--- a/src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.cs
+++ b/src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.cs
@@ -55,6 +55,9 @@ public List> GetParams()
public class UpdateConfigurationOptions : IOptions
{
+
+ public object Body { get; set; }
+
@@ -64,6 +67,10 @@ public List> GetParams()
{
var p = new List>();
+ if (Body != null)
+ {
+ p.Add(new KeyValuePair("body", Serializers.JsonObject(Body)));
+ }
return p;
}
diff --git a/src/Twilio/Rest/FlexApi/V1/ConfigurationResource.cs b/src/Twilio/Rest/FlexApi/V1/ConfigurationResource.cs
index 0de74174d..d86a76f9a 100644
--- a/src/Twilio/Rest/FlexApi/V1/ConfigurationResource.cs
+++ b/src/Twilio/Rest/FlexApi/V1/ConfigurationResource.cs
@@ -275,6 +275,10 @@ public static string ToJson(object model)
[JsonProperty("flex_service_instance_sid")]
public string FlexServiceInstanceSid { get; private set; }
+ /// The SID of the Flex instance.
+ [JsonProperty("flex_instance_sid")]
+ public string FlexInstanceSid { get; private set; }
+
/// The primary language of the Flex UI.
[JsonProperty("ui_language")]
public string UiLanguage { get; private set; }
diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsConversationalAiOptions.cs b/src/Twilio/Rest/FlexApi/V1/InsightsConversationalAiOptions.cs
deleted file mode 100644
index f5f4d5293..000000000
--- a/src/Twilio/Rest/FlexApi/V1/InsightsConversationalAiOptions.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Flex
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.FlexApi.V1
-{
- /// Fetch Account Based Conversational AI Reports
- public class FetchInsightsConversationalAiOptions : IOptions
- {
-
- /// Sid of Flex Service Instance
- public string PathInstanceSid { get; }
-
- /// Maximum number of rows to return
- public int? MaxRows { get; set; }
-
- /// The type of report required to fetch.Like gauge,channel-metrics,queue-metrics
- public string ReportId { get; set; }
-
- /// The time period for which report is needed
- public InsightsConversationalAiResource.GranularityEnum Granularity { get; set; }
-
- /// A reference date that should be included in the returned period
- public DateTime? IncludeDate { get; set; }
-
-
-
- /// Construct a new FetchInsightsConversationalAiOptions
- /// Sid of Flex Service Instance
- public FetchInsightsConversationalAiOptions(string pathInstanceSid)
- {
- PathInstanceSid = pathInstanceSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (MaxRows != null)
- {
- p.Add(new KeyValuePair("MaxRows", MaxRows.ToString()));
- }
- if (ReportId != null)
- {
- p.Add(new KeyValuePair("ReportId", ReportId));
- }
- if (Granularity != null)
- {
- p.Add(new KeyValuePair("Granularity", Granularity.ToString()));
- }
- if (IncludeDate != null)
- {
- p.Add(new KeyValuePair("IncludeDate", Serializers.DateTimeIso8601(IncludeDate)));
- }
- return p;
- }
-
-
-
- }
-
-
-}
-
diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsConversationalAiReportInsightsOptions.cs b/src/Twilio/Rest/FlexApi/V1/InsightsConversationalAiReportInsightsOptions.cs
deleted file mode 100644
index 4c0081aec..000000000
--- a/src/Twilio/Rest/FlexApi/V1/InsightsConversationalAiReportInsightsOptions.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Flex
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.FlexApi.V1
-{
- /// Fetch Instance Based Conversational AI Report Insights
- public class FetchInsightsConversationalAiReportInsightsOptions : IOptions
- {
-
- /// The Instance SID of the instance for which report insights will be fetched
- public string PathInstanceSid { get; }
-
- /// Maximum number of rows to return
- public int? MaxRows { get; set; }
-
- /// The type of report insights required to fetch.Like gauge,channel-metrics,queue-metrics
- public string ReportId { get; set; }
-
- /// The time period for which report insights is needed
- public string Granularity { get; set; }
-
- /// A reference date that should be included in the returned period
- public DateTime? IncludeDate { get; set; }
-
-
-
- /// Construct a new FetchInsightsConversationalAiReportInsightsOptions
- /// The Instance SID of the instance for which report insights will be fetched
- public FetchInsightsConversationalAiReportInsightsOptions(string pathInstanceSid)
- {
- PathInstanceSid = pathInstanceSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (MaxRows != null)
- {
- p.Add(new KeyValuePair("MaxRows", MaxRows.ToString()));
- }
- if (ReportId != null)
- {
- p.Add(new KeyValuePair("ReportId", ReportId));
- }
- if (Granularity != null)
- {
- p.Add(new KeyValuePair("Granularity", Granularity));
- }
- if (IncludeDate != null)
- {
- p.Add(new KeyValuePair("IncludeDate", Serializers.DateTimeIso8601(IncludeDate)));
- }
- return p;
- }
-
-
-
- }
-
-
-}
-
diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsConversationalAiReportInsightsResource.cs b/src/Twilio/Rest/FlexApi/V1/InsightsConversationalAiReportInsightsResource.cs
deleted file mode 100644
index e29184cf7..000000000
--- a/src/Twilio/Rest/FlexApi/V1/InsightsConversationalAiReportInsightsResource.cs
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Flex
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-
-
-
-namespace Twilio.Rest.FlexApi.V1
-{
- public class InsightsConversationalAiReportInsightsResource : Resource
- {
-
-
-
-
-
- private static Request BuildFetchRequest(FetchInsightsConversationalAiReportInsightsOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Insights/Instances/{InstanceSid}/AI/ReportInsights";
-
- string PathInstanceSid = options.PathInstanceSid;
- path = path.Replace("{"+"InstanceSid"+"}", PathInstanceSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.FlexApi,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// Fetch Instance Based Conversational AI Report Insights
- /// Fetch InsightsConversationalAiReportInsights parameters
- /// Client to make requests to Twilio
- /// A single instance of InsightsConversationalAiReportInsights
- public static InsightsConversationalAiReportInsightsResource Fetch(FetchInsightsConversationalAiReportInsightsOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// Fetch Instance Based Conversational AI Report Insights
- /// Fetch InsightsConversationalAiReportInsights parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of InsightsConversationalAiReportInsights
- public static async System.Threading.Tasks.Task FetchAsync(FetchInsightsConversationalAiReportInsightsOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// Fetch Instance Based Conversational AI Report Insights
- /// The Instance SID of the instance for which report insights will be fetched
- /// Maximum number of rows to return
- /// The type of report insights required to fetch.Like gauge,channel-metrics,queue-metrics
- /// The time period for which report insights is needed
- /// A reference date that should be included in the returned period
- /// Client to make requests to Twilio
- /// A single instance of InsightsConversationalAiReportInsights
- public static InsightsConversationalAiReportInsightsResource Fetch(
- string pathInstanceSid,
- int? maxRows = null,
- string reportId = null,
- string granularity = null,
- DateTime? includeDate = null,
- ITwilioRestClient client = null)
- {
- var options = new FetchInsightsConversationalAiReportInsightsOptions(pathInstanceSid){ MaxRows = maxRows,ReportId = reportId,Granularity = granularity,IncludeDate = includeDate };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// Fetch Instance Based Conversational AI Report Insights
- /// The Instance SID of the instance for which report insights will be fetched
- /// Maximum number of rows to return
- /// The type of report insights required to fetch.Like gauge,channel-metrics,queue-metrics
- /// The time period for which report insights is needed
- /// A reference date that should be included in the returned period
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of InsightsConversationalAiReportInsights
- public static async System.Threading.Tasks.Task FetchAsync(string pathInstanceSid, int? maxRows = null, string reportId = null, string granularity = null, DateTime? includeDate = null, ITwilioRestClient client = null)
- {
- var options = new FetchInsightsConversationalAiReportInsightsOptions(pathInstanceSid){ MaxRows = maxRows,ReportId = reportId,Granularity = granularity,IncludeDate = includeDate };
- return await FetchAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a InsightsConversationalAiReportInsightsResource object
- ///
- /// Raw JSON string
- /// InsightsConversationalAiReportInsightsResource object represented by the provided JSON
- public static InsightsConversationalAiReportInsightsResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The Instance SID of the instance for which report insights is fetched
- [JsonProperty("instance_sid")]
- public string InstanceSid { get; private set; }
-
- /// The type of report insights required to fetch.Like gauge,channel-metrics,queue-metrics
- [JsonProperty("report_id")]
- public string ReportId { get; private set; }
-
- /// The start date from which report insights data is included
- [JsonProperty("period_start")]
- public DateTime? PeriodStart { get; private set; }
-
- /// The end date till report insights data is included
- [JsonProperty("period_end")]
- public DateTime? PeriodEnd { get; private set; }
-
- /// Updated time of the report insights
- [JsonProperty("updated")]
- public DateTime? Updated { get; private set; }
-
- /// List of report insights breakdown
- [JsonProperty("insights")]
- public List Insights { get; private set; }
-
- /// The URL of this resource
- [JsonProperty("url")]
- public Uri Url { get; private set; }
-
-
-
- private InsightsConversationalAiReportInsightsResource() {
-
- }
- }
-}
-
diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsConversationalAiResource.cs b/src/Twilio/Rest/FlexApi/V1/InsightsConversationalAiResource.cs
deleted file mode 100644
index 2304cb368..000000000
--- a/src/Twilio/Rest/FlexApi/V1/InsightsConversationalAiResource.cs
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Flex
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-using Twilio.Types;
-
-
-namespace Twilio.Rest.FlexApi.V1
-{
- public class InsightsConversationalAiResource : Resource
- {
-
-
-
- [JsonConverter(typeof(StringEnumConverter))]
- public sealed class GranularityEnum : StringEnum
- {
- private GranularityEnum(string value) : base(value) {}
- public GranularityEnum() {}
- public static implicit operator GranularityEnum(string value)
- {
- return new GranularityEnum(value);
- }
- public static readonly GranularityEnum Days = new GranularityEnum("days");
- public static readonly GranularityEnum Weeks = new GranularityEnum("weeks");
- public static readonly GranularityEnum Months = new GranularityEnum("months");
- public static readonly GranularityEnum Quarters = new GranularityEnum("quarters");
- public static readonly GranularityEnum Years = new GranularityEnum("years");
-
- }
-
-
- private static Request BuildFetchRequest(FetchInsightsConversationalAiOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Insights/Instances/{InstanceSid}/AI/Reports";
-
- string PathInstanceSid = options.PathInstanceSid;
- path = path.Replace("{"+"InstanceSid"+"}", PathInstanceSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.FlexApi,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// Fetch Account Based Conversational AI Reports
- /// Fetch InsightsConversationalAi parameters
- /// Client to make requests to Twilio
- /// A single instance of InsightsConversationalAi
- public static InsightsConversationalAiResource Fetch(FetchInsightsConversationalAiOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// Fetch Account Based Conversational AI Reports
- /// Fetch InsightsConversationalAi parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of InsightsConversationalAi
- public static async System.Threading.Tasks.Task FetchAsync(FetchInsightsConversationalAiOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// Fetch Account Based Conversational AI Reports
- /// Sid of Flex Service Instance
- /// Maximum number of rows to return
- /// The type of report required to fetch.Like gauge,channel-metrics,queue-metrics
- /// The time period for which report is needed
- /// A reference date that should be included in the returned period
- /// Client to make requests to Twilio
- /// A single instance of InsightsConversationalAi
- public static InsightsConversationalAiResource Fetch(
- string pathInstanceSid,
- int? maxRows = null,
- string reportId = null,
- InsightsConversationalAiResource.GranularityEnum granularity = null,
- DateTime? includeDate = null,
- ITwilioRestClient client = null)
- {
- var options = new FetchInsightsConversationalAiOptions(pathInstanceSid){ MaxRows = maxRows,ReportId = reportId,Granularity = granularity,IncludeDate = includeDate };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// Fetch Account Based Conversational AI Reports
- /// Sid of Flex Service Instance
- /// Maximum number of rows to return
- /// The type of report required to fetch.Like gauge,channel-metrics,queue-metrics
- /// The time period for which report is needed
- /// A reference date that should be included in the returned period
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of InsightsConversationalAi
- public static async System.Threading.Tasks.Task FetchAsync(string pathInstanceSid, int? maxRows = null, string reportId = null, InsightsConversationalAiResource.GranularityEnum granularity = null, DateTime? includeDate = null, ITwilioRestClient client = null)
- {
- var options = new FetchInsightsConversationalAiOptions(pathInstanceSid){ MaxRows = maxRows,ReportId = reportId,Granularity = granularity,IncludeDate = includeDate };
- return await FetchAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a InsightsConversationalAiResource object
- ///
- /// Raw JSON string
- /// InsightsConversationalAiResource object represented by the provided JSON
- public static InsightsConversationalAiResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// Sid of Flex Service Instance
- [JsonProperty("instance_sid")]
- public string InstanceSid { get; private set; }
-
- /// The type of report required to fetch.Like gauge,channel-metrics,queue-metrics
- [JsonProperty("report_id")]
- public string ReportId { get; private set; }
-
-
- [JsonProperty("granularity")]
- public InsightsConversationalAiResource.GranularityEnum Granularity { get; private set; }
-
- /// The start date from which report data is included
- [JsonProperty("period_start")]
- public DateTime? PeriodStart { get; private set; }
-
- /// The end date till report data is included
- [JsonProperty("period_end")]
- public DateTime? PeriodEnd { get; private set; }
-
- /// Updated time of the report
- [JsonProperty("updated")]
- public DateTime? Updated { get; private set; }
-
- /// Represents total number of pages fetched report has
- [JsonProperty("total_pages")]
- public int? TotalPages { get; private set; }
-
- /// Page offset required for pagination
- [JsonProperty("page")]
- public int? Page { get; private set; }
-
- /// List of report breakdown
- [JsonProperty("rows")]
- public List Rows { get; private set; }
-
- /// The URL of this resource.
- [JsonProperty("url")]
- public Uri Url { get; private set; }
-
-
-
- private InsightsConversationalAiResource() {
-
- }
- }
-}
-
diff --git a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantOptions.cs b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantOptions.cs
index 49c727aa1..aa67337ee 100644
--- a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantOptions.cs
+++ b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantOptions.cs
@@ -40,6 +40,9 @@ public class CreateInteractionChannelParticipantOptions : IOptions JSON representing the Media Properties for the new Participant.
public object MediaProperties { get; }
+ /// Object representing the Routing Properties for the new Participant.
+ public object RoutingProperties { get; set; }
+
/// Construct a new CreateInteractionChannelParticipantOptions
/// The Interaction Sid for the new Channel Participant.
@@ -68,6 +71,10 @@ public List> GetParams()
{
p.Add(new KeyValuePair("MediaProperties", Serializers.JsonObject(MediaProperties)));
}
+ if (RoutingProperties != null)
+ {
+ p.Add(new KeyValuePair("RoutingProperties", Serializers.JsonObject(RoutingProperties)));
+ }
return p;
}
diff --git a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantResource.cs b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantResource.cs
index 05b9d038f..6d8c7aa18 100644
--- a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantResource.cs
+++ b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantResource.cs
@@ -111,6 +111,7 @@ public static async System.Threading.Tasks.Task The Channel Sid for the new Channel Participant.
///
/// JSON representing the Media Properties for the new Participant.
+ /// Object representing the Routing Properties for the new Participant.
/// Client to make requests to Twilio
/// A single instance of InteractionChannelParticipant
public static InteractionChannelParticipantResource Create(
@@ -118,9 +119,10 @@ public static InteractionChannelParticipantResource Create(
string pathChannelSid,
InteractionChannelParticipantResource.TypeEnum type,
object mediaProperties,
+ object routingProperties = null,
ITwilioRestClient client = null)
{
- var options = new CreateInteractionChannelParticipantOptions(pathInteractionSid, pathChannelSid, type, mediaProperties){ };
+ var options = new CreateInteractionChannelParticipantOptions(pathInteractionSid, pathChannelSid, type, mediaProperties){ RoutingProperties = routingProperties };
return Create(options, client);
}
@@ -130,6 +132,7 @@ public static InteractionChannelParticipantResource Create(
/// The Channel Sid for the new Channel Participant.
///
/// JSON representing the Media Properties for the new Participant.
+ /// Object representing the Routing Properties for the new Participant.
/// Client to make requests to Twilio
/// Task that resolves to A single instance of InteractionChannelParticipant
public static async System.Threading.Tasks.Task CreateAsync(
@@ -137,9 +140,10 @@ public static async System.Threading.Tasks.Task The Participant's routing properties.
+ [JsonProperty("routing_properties")]
+ public object RoutingProperties { get; private set; }
+
private InteractionChannelParticipantResource() {
diff --git a/src/Twilio/Rest/Intelligence/V2/ServiceOptions.cs b/src/Twilio/Rest/Intelligence/V2/ServiceOptions.cs
index 5e4675b54..34bc9f8c9 100644
--- a/src/Twilio/Rest/Intelligence/V2/ServiceOptions.cs
+++ b/src/Twilio/Rest/Intelligence/V2/ServiceOptions.cs
@@ -34,7 +34,7 @@ public class CreateServiceOptions : IOptions
/// Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
public bool? AutoTranscribe { get; set; }
- /// Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models.
+ /// Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
public bool? DataLogging { get; set; }
/// A human readable description of this resource, up to 64 characters.
@@ -208,7 +208,7 @@ public class UpdateServiceOptions : IOptions
/// Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
public bool? AutoTranscribe { get; set; }
- /// Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models.
+ /// Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
public bool? DataLogging { get; set; }
/// A human readable description of this resource, up to 64 characters.
diff --git a/src/Twilio/Rest/Intelligence/V2/ServiceResource.cs b/src/Twilio/Rest/Intelligence/V2/ServiceResource.cs
index 5fd1d7552..0aa668c73 100644
--- a/src/Twilio/Rest/Intelligence/V2/ServiceResource.cs
+++ b/src/Twilio/Rest/Intelligence/V2/ServiceResource.cs
@@ -91,7 +91,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre
/// Create a new Service for the given Account
/// Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID.
/// Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
- /// Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models.
+ /// Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
/// A human readable description of this resource, up to 64 characters.
/// The default language code of the audio.
/// Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service.
@@ -120,7 +120,7 @@ public static ServiceResource Create(
/// Create a new Service for the given Account
/// Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID.
/// Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
- /// Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models.
+ /// Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
/// A human readable description of this resource, up to 64 characters.
/// The default language code of the audio.
/// Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service.
@@ -444,7 +444,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd
/// Update a specific Service.
/// A 34 character string that uniquely identifies this Service.
/// Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
- /// Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models.
+ /// Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
/// A human readable description of this resource, up to 64 characters.
/// The default language code of the audio.
/// Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID.
@@ -477,7 +477,7 @@ public static ServiceResource Update(
/// Update a specific Service.
/// A 34 character string that uniquely identifies this Service.
/// Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
- /// Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models.
+ /// Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
/// A human readable description of this resource, up to 64 characters.
/// The default language code of the audio.
/// Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID.
@@ -557,7 +557,7 @@ public static string ToJson(object model)
[JsonProperty("auto_transcribe")]
public bool? AutoTranscribe { get; private set; }
- /// Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models.
+ /// Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
[JsonProperty("data_logging")]
public bool? DataLogging { get; private set; }
diff --git a/src/Twilio/Rest/Intelligence/V2/TranscriptResource.cs b/src/Twilio/Rest/Intelligence/V2/TranscriptResource.cs
index 24a76ec3e..261eacd62 100644
--- a/src/Twilio/Rest/Intelligence/V2/TranscriptResource.cs
+++ b/src/Twilio/Rest/Intelligence/V2/TranscriptResource.cs
@@ -475,7 +475,7 @@ public static string ToJson(object model)
[JsonProperty("channel")]
public object Channel { get; private set; }
- /// Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models.
+ /// Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
[JsonProperty("data_logging")]
public bool? DataLogging { get; private set; }
diff --git a/src/Twilio/Rest/Lookups/V2/PhoneNumberOptions.cs b/src/Twilio/Rest/Lookups/V2/PhoneNumberOptions.cs
index ff50cd7d8..8a829ada9 100644
--- a/src/Twilio/Rest/Lookups/V2/PhoneNumberOptions.cs
+++ b/src/Twilio/Rest/Lookups/V2/PhoneNumberOptions.cs
@@ -30,7 +30,7 @@ public class FetchPhoneNumberOptions : IOptions
/// The phone number to lookup in E.164 or national format. Default country code is +1 (North America).
public string PathPhoneNumber { get; }
- /// A comma-separated list of fields to return. Possible values are caller_name, sim_swap, call_forwarding, live_activity, line_type_intelligence, identity_match, reassigned_number.
+ /// A comma-separated list of fields to return. Possible values are validation, caller_name, sim_swap, call_forwarding, line_status, line_type_intelligence, identity_match, reassigned_number, sms_pumping_risk, phone_number_quality_score.
public string Fields { get; set; }
/// The [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) used if the phone number provided is in national format.
diff --git a/src/Twilio/Rest/Lookups/V2/PhoneNumberResource.cs b/src/Twilio/Rest/Lookups/V2/PhoneNumberResource.cs
index 958268999..1f0a5fc0e 100644
--- a/src/Twilio/Rest/Lookups/V2/PhoneNumberResource.cs
+++ b/src/Twilio/Rest/Lookups/V2/PhoneNumberResource.cs
@@ -94,7 +94,7 @@ public static async System.Threading.Tasks.Task FetchAsync(
#endif
/// fetch
/// The phone number to lookup in E.164 or national format. Default country code is +1 (North America).
- /// A comma-separated list of fields to return. Possible values are caller_name, sim_swap, call_forwarding, live_activity, line_type_intelligence, identity_match, reassigned_number.
+ /// A comma-separated list of fields to return. Possible values are validation, caller_name, sim_swap, call_forwarding, line_status, line_type_intelligence, identity_match, reassigned_number, sms_pumping_risk, phone_number_quality_score.
/// The [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) used if the phone number provided is in national format.
/// User’s first name. This query parameter is only used (optionally) for identity_match package requests.
/// User’s last name. This query parameter is only used (optionally) for identity_match package requests.
@@ -133,7 +133,7 @@ public static PhoneNumberResource Fetch(
#if !NET35
/// fetch
/// The phone number to lookup in E.164 or national format. Default country code is +1 (North America).
- /// A comma-separated list of fields to return. Possible values are caller_name, sim_swap, call_forwarding, live_activity, line_type_intelligence, identity_match, reassigned_number.
+ /// A comma-separated list of fields to return. Possible values are validation, caller_name, sim_swap, call_forwarding, line_status, line_type_intelligence, identity_match, reassigned_number, sms_pumping_risk, phone_number_quality_score.
/// The [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) used if the phone number provided is in national format.
/// User’s first name. This query parameter is only used (optionally) for identity_match package requests.
/// User’s last name. This query parameter is only used (optionally) for identity_match package requests.
@@ -226,9 +226,9 @@ public static string ToJson(object model)
[JsonProperty("call_forwarding")]
public object CallForwarding { get; private set; }
- /// An object that contains live activity information for a mobile phone number.
- [JsonProperty("live_activity")]
- public object LiveActivity { get; private set; }
+ /// An object that contains line status information for a mobile phone number.
+ [JsonProperty("line_status")]
+ public object LineStatus { get; private set; }
/// An object that contains line type information including the carrier name, mobile country code, and mobile network code.
[JsonProperty("line_type_intelligence")]
diff --git a/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonOptions.cs b/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonOptions.cs
index 5248f6f5f..862078f31 100644
--- a/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonOptions.cs
+++ b/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonOptions.cs
@@ -70,6 +70,15 @@ public class CreateUsAppToPersonOptions : IOptions
/// End users should be able to text in a keyword to receive help. Those keywords must be provided as part of the campaign registration request. This field is required if managing help keywords yourself (i.e. not using Twilio's Default or Advanced Opt Out features). Values must be alphanumeric. 255 character maximum.
public List HelpKeywords { get; set; }
+ /// A boolean that specifies whether campaign has Subscriber Optin or not.
+ public bool? SubscriberOptIn { get; set; }
+
+ /// A boolean that specifies whether campaign is age gated or not.
+ public bool? AgeGated { get; set; }
+
+ /// A boolean that specifies whether campaign allows direct lending or not.
+ public bool? DirectLending { get; set; }
+
/// Construct a new CreateUsAppToPersonOptions
/// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to create the resources from.
@@ -153,6 +162,18 @@ public List> GetParams()
{
p.AddRange(HelpKeywords.Select(HelpKeywords => new KeyValuePair("HelpKeywords", HelpKeywords)));
}
+ if (SubscriberOptIn != null)
+ {
+ p.Add(new KeyValuePair("SubscriberOptIn", SubscriberOptIn.Value.ToString().ToLower()));
+ }
+ if (AgeGated != null)
+ {
+ p.Add(new KeyValuePair("AgeGated", AgeGated.Value.ToString().ToLower()));
+ }
+ if (DirectLending != null)
+ {
+ p.Add(new KeyValuePair("DirectLending", DirectLending.Value.ToString().ToLower()));
+ }
return p;
}
@@ -262,5 +283,103 @@ public List> GetParams()
}
+ /// update
+ public class UpdateUsAppToPersonOptions : IOptions
+ {
+
+ /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to update the resource from.
+ public string PathMessagingServiceSid { get; }
+
+ /// The SID of the US A2P Compliance resource to update `QE2c6890da8086d771620e9b13fadeba0b`.
+ public string PathSid { get; }
+
+ /// Indicates that this SMS campaign will send messages that contain links.
+ public bool? HasEmbeddedLinks { get; }
+
+ /// Indicates that this SMS campaign will send messages that contain phone numbers.
+ public bool? HasEmbeddedPhone { get; }
+
+ /// An array of sample message strings, min two and max five. Min length for each sample: 20 chars. Max length for each sample: 1024 chars.
+ public List MessageSamples { get; }
+
+ /// Required for all Campaigns. Details around how a consumer opts-in to their campaign, therefore giving consent to receive their messages. If multiple opt-in methods can be used for the same campaign, they must all be listed. 40 character minimum. 2048 character maximum.
+ public string MessageFlow { get; }
+
+ /// A short description of what this SMS campaign does. Min length: 40 characters. Max length: 4096 characters.
+ public string Description { get; }
+
+ /// A boolean that specifies whether campaign requires age gate for federally legal content.
+ public bool? AgeGated { get; }
+
+ /// A boolean that specifies whether campaign allows direct lending or not.
+ public bool? DirectLending { get; }
+
+
+
+ /// Construct a new UpdateUsAppToPersonOptions
+ /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to update the resource from.
+ /// The SID of the US A2P Compliance resource to update `QE2c6890da8086d771620e9b13fadeba0b`.
+ /// Indicates that this SMS campaign will send messages that contain links.
+ /// Indicates that this SMS campaign will send messages that contain phone numbers.
+ /// An array of sample message strings, min two and max five. Min length for each sample: 20 chars. Max length for each sample: 1024 chars.
+ /// Required for all Campaigns. Details around how a consumer opts-in to their campaign, therefore giving consent to receive their messages. If multiple opt-in methods can be used for the same campaign, they must all be listed. 40 character minimum. 2048 character maximum.
+ /// A short description of what this SMS campaign does. Min length: 40 characters. Max length: 4096 characters.
+ /// A boolean that specifies whether campaign requires age gate for federally legal content.
+ /// A boolean that specifies whether campaign allows direct lending or not.
+ public UpdateUsAppToPersonOptions(string pathMessagingServiceSid, string pathSid, bool? hasEmbeddedLinks, bool? hasEmbeddedPhone, List messageSamples, string messageFlow, string description, bool? ageGated, bool? directLending)
+ {
+ PathMessagingServiceSid = pathMessagingServiceSid;
+ PathSid = pathSid;
+ HasEmbeddedLinks = hasEmbeddedLinks;
+ HasEmbeddedPhone = hasEmbeddedPhone;
+ MessageSamples = messageSamples;
+ MessageFlow = messageFlow;
+ Description = description;
+ AgeGated = ageGated;
+ DirectLending = directLending;
+ }
+
+
+ /// Generate the necessary parameters
+ public List> GetParams()
+ {
+ var p = new List>();
+
+ if (HasEmbeddedLinks != null)
+ {
+ p.Add(new KeyValuePair("HasEmbeddedLinks", HasEmbeddedLinks.Value.ToString().ToLower()));
+ }
+ if (HasEmbeddedPhone != null)
+ {
+ p.Add(new KeyValuePair("HasEmbeddedPhone", HasEmbeddedPhone.Value.ToString().ToLower()));
+ }
+ if (MessageSamples != null)
+ {
+ p.AddRange(MessageSamples.Select(MessageSamples => new KeyValuePair("MessageSamples", MessageSamples)));
+ }
+ if (MessageFlow != null)
+ {
+ p.Add(new KeyValuePair("MessageFlow", MessageFlow));
+ }
+ if (Description != null)
+ {
+ p.Add(new KeyValuePair("Description", Description));
+ }
+ if (AgeGated != null)
+ {
+ p.Add(new KeyValuePair("AgeGated", AgeGated.Value.ToString().ToLower()));
+ }
+ if (DirectLending != null)
+ {
+ p.Add(new KeyValuePair("DirectLending", DirectLending.Value.ToString().ToLower()));
+ }
+ return p;
+ }
+
+
+
+ }
+
+
}
diff --git a/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonResource.cs b/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonResource.cs
index 56453a03a..4edf3c943 100644
--- a/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonResource.cs
+++ b/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonResource.cs
@@ -91,6 +91,9 @@ public static async System.Threading.Tasks.Task CreateAsy
/// If end users can text in a keyword to start receiving messages from this campaign, those keywords must be provided. This field is required if end users can text in a keyword to start receiving messages from this campaign. Values must be alphanumeric. 255 character maximum.
/// End users should be able to text in a keyword to stop receiving messages from this campaign. Those keywords must be provided. This field is required if managing opt out keywords yourself (i.e. not using Twilio's Default or Advanced Opt Out features). Values must be alphanumeric. 255 character maximum.
/// End users should be able to text in a keyword to receive help. Those keywords must be provided as part of the campaign registration request. This field is required if managing help keywords yourself (i.e. not using Twilio's Default or Advanced Opt Out features). Values must be alphanumeric. 255 character maximum.
+ /// A boolean that specifies whether campaign has Subscriber Optin or not.
+ /// A boolean that specifies whether campaign is age gated or not.
+ /// A boolean that specifies whether campaign allows direct lending or not.
/// Client to make requests to Twilio
/// A single instance of UsAppToPerson
public static UsAppToPersonResource Create(
@@ -108,9 +111,12 @@ public static UsAppToPersonResource Create(
List optInKeywords = null,
List optOutKeywords = null,
List helpKeywords = null,
+ bool? subscriberOptIn = null,
+ bool? ageGated = null,
+ bool? directLending = null,
ITwilioRestClient client = null)
{
- var options = new CreateUsAppToPersonOptions(pathMessagingServiceSid, brandRegistrationSid, description, messageFlow, messageSamples, usAppToPersonUsecase, hasEmbeddedLinks, hasEmbeddedPhone){ OptInMessage = optInMessage, OptOutMessage = optOutMessage, HelpMessage = helpMessage, OptInKeywords = optInKeywords, OptOutKeywords = optOutKeywords, HelpKeywords = helpKeywords };
+ var options = new CreateUsAppToPersonOptions(pathMessagingServiceSid, brandRegistrationSid, description, messageFlow, messageSamples, usAppToPersonUsecase, hasEmbeddedLinks, hasEmbeddedPhone){ OptInMessage = optInMessage, OptOutMessage = optOutMessage, HelpMessage = helpMessage, OptInKeywords = optInKeywords, OptOutKeywords = optOutKeywords, HelpKeywords = helpKeywords, SubscriberOptIn = subscriberOptIn, AgeGated = ageGated, DirectLending = directLending };
return Create(options, client);
}
@@ -130,6 +136,9 @@ public static UsAppToPersonResource Create(
/// If end users can text in a keyword to start receiving messages from this campaign, those keywords must be provided. This field is required if end users can text in a keyword to start receiving messages from this campaign. Values must be alphanumeric. 255 character maximum.
/// End users should be able to text in a keyword to stop receiving messages from this campaign. Those keywords must be provided. This field is required if managing opt out keywords yourself (i.e. not using Twilio's Default or Advanced Opt Out features). Values must be alphanumeric. 255 character maximum.
/// End users should be able to text in a keyword to receive help. Those keywords must be provided as part of the campaign registration request. This field is required if managing help keywords yourself (i.e. not using Twilio's Default or Advanced Opt Out features). Values must be alphanumeric. 255 character maximum.
+ /// A boolean that specifies whether campaign has Subscriber Optin or not.
+ /// A boolean that specifies whether campaign is age gated or not.
+ /// A boolean that specifies whether campaign allows direct lending or not.
/// Client to make requests to Twilio
/// Task that resolves to A single instance of UsAppToPerson
public static async System.Threading.Tasks.Task CreateAsync(
@@ -147,9 +156,12 @@ public static async System.Threading.Tasks.Task CreateAsy
List optInKeywords = null,
List optOutKeywords = null,
List helpKeywords = null,
+ bool? subscriberOptIn = null,
+ bool? ageGated = null,
+ bool? directLending = null,
ITwilioRestClient client = null)
{
- var options = new CreateUsAppToPersonOptions(pathMessagingServiceSid, brandRegistrationSid, description, messageFlow, messageSamples, usAppToPersonUsecase, hasEmbeddedLinks, hasEmbeddedPhone){ OptInMessage = optInMessage, OptOutMessage = optOutMessage, HelpMessage = helpMessage, OptInKeywords = optInKeywords, OptOutKeywords = optOutKeywords, HelpKeywords = helpKeywords };
+ var options = new CreateUsAppToPersonOptions(pathMessagingServiceSid, brandRegistrationSid, description, messageFlow, messageSamples, usAppToPersonUsecase, hasEmbeddedLinks, hasEmbeddedPhone){ OptInMessage = optInMessage, OptOutMessage = optOutMessage, HelpMessage = helpMessage, OptInKeywords = optInKeywords, OptOutKeywords = optOutKeywords, HelpKeywords = helpKeywords, SubscriberOptIn = subscriberOptIn, AgeGated = ageGated, DirectLending = directLending };
return await CreateAsync(options, client);
}
#endif
@@ -421,6 +433,108 @@ public static Page PreviousPage(Page.FromJson("compliance", response.Content);
}
+
+ private static Request BuildUpdateRequest(UpdateUsAppToPersonOptions options, ITwilioRestClient client)
+ {
+
+ string path = "/v1/Services/{MessagingServiceSid}/Compliance/Usa2p/{Sid}";
+
+ string PathMessagingServiceSid = options.PathMessagingServiceSid;
+ path = path.Replace("{"+"MessagingServiceSid"+"}", PathMessagingServiceSid);
+ string PathSid = options.PathSid;
+ path = path.Replace("{"+"Sid"+"}", PathSid);
+
+ return new Request(
+ HttpMethod.Post,
+ Rest.Domain.Messaging,
+ path,
+ postParams: options.GetParams(),
+ headerParams: null
+ );
+ }
+
+ /// update
+ /// Update UsAppToPerson parameters
+ /// Client to make requests to Twilio
+ /// A single instance of UsAppToPerson
+ public static UsAppToPersonResource Update(UpdateUsAppToPersonOptions options, ITwilioRestClient client = null)
+ {
+ client = client ?? TwilioClient.GetRestClient();
+ var response = client.Request(BuildUpdateRequest(options, client));
+ return FromJson(response.Content);
+ }
+
+ /// update
+ /// Update UsAppToPerson parameters
+ /// Client to make requests to Twilio
+ /// Task that resolves to A single instance of UsAppToPerson
+ #if !NET35
+ public static async System.Threading.Tasks.Task UpdateAsync(UpdateUsAppToPersonOptions options,
+ ITwilioRestClient client = null)
+ {
+ client = client ?? TwilioClient.GetRestClient();
+ var response = await client.RequestAsync(BuildUpdateRequest(options, client));
+ return FromJson(response.Content);
+ }
+ #endif
+
+ /// update
+ /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to update the resource from.
+ /// The SID of the US A2P Compliance resource to update `QE2c6890da8086d771620e9b13fadeba0b`.
+ /// Indicates that this SMS campaign will send messages that contain links.
+ /// Indicates that this SMS campaign will send messages that contain phone numbers.
+ /// An array of sample message strings, min two and max five. Min length for each sample: 20 chars. Max length for each sample: 1024 chars.
+ /// Required for all Campaigns. Details around how a consumer opts-in to their campaign, therefore giving consent to receive their messages. If multiple opt-in methods can be used for the same campaign, they must all be listed. 40 character minimum. 2048 character maximum.
+ /// A short description of what this SMS campaign does. Min length: 40 characters. Max length: 4096 characters.
+ /// A boolean that specifies whether campaign requires age gate for federally legal content.
+ /// A boolean that specifies whether campaign allows direct lending or not.
+ /// Client to make requests to Twilio
+ /// A single instance of UsAppToPerson
+ public static UsAppToPersonResource Update(
+ string pathMessagingServiceSid,
+ string pathSid,
+ bool? hasEmbeddedLinks,
+ bool? hasEmbeddedPhone,
+ List messageSamples,
+ string messageFlow,
+ string description,
+ bool? ageGated,
+ bool? directLending,
+ ITwilioRestClient client = null)
+ {
+ var options = new UpdateUsAppToPersonOptions(pathMessagingServiceSid, pathSid, hasEmbeddedLinks, hasEmbeddedPhone, messageSamples, messageFlow, description, ageGated, directLending){ };
+ return Update(options, client);
+ }
+
+ #if !NET35
+ /// update
+ /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to update the resource from.
+ /// The SID of the US A2P Compliance resource to update `QE2c6890da8086d771620e9b13fadeba0b`.
+ /// Indicates that this SMS campaign will send messages that contain links.
+ /// Indicates that this SMS campaign will send messages that contain phone numbers.
+ /// An array of sample message strings, min two and max five. Min length for each sample: 20 chars. Max length for each sample: 1024 chars.
+ /// Required for all Campaigns. Details around how a consumer opts-in to their campaign, therefore giving consent to receive their messages. If multiple opt-in methods can be used for the same campaign, they must all be listed. 40 character minimum. 2048 character maximum.
+ /// A short description of what this SMS campaign does. Min length: 40 characters. Max length: 4096 characters.
+ /// A boolean that specifies whether campaign requires age gate for federally legal content.
+ /// A boolean that specifies whether campaign allows direct lending or not.
+ /// Client to make requests to Twilio
+ /// Task that resolves to A single instance of UsAppToPerson
+ public static async System.Threading.Tasks.Task UpdateAsync(
+ string pathMessagingServiceSid,
+ string pathSid,
+ bool? hasEmbeddedLinks,
+ bool? hasEmbeddedPhone,
+ List messageSamples,
+ string messageFlow,
+ string description,
+ bool? ageGated,
+ bool? directLending,
+ ITwilioRestClient client = null)
+ {
+ var options = new UpdateUsAppToPersonOptions(pathMessagingServiceSid, pathSid, hasEmbeddedLinks, hasEmbeddedPhone, messageSamples, messageFlow, description, ageGated, directLending){ };
+ return await UpdateAsync(options, client);
+ }
+ #endif
///
/// Converts a JSON string into a UsAppToPersonResource object
@@ -492,6 +606,18 @@ public static string ToJson(object model)
[JsonProperty("has_embedded_phone")]
public bool? HasEmbeddedPhone { get; private set; }
+ /// A boolean that specifies whether campaign has Subscriber Optin or not.
+ [JsonProperty("subscriber_opt_in")]
+ public bool? SubscriberOptIn { get; private set; }
+
+ /// A boolean that specifies whether campaign is age gated or not.
+ [JsonProperty("age_gated")]
+ public bool? AgeGated { get; private set; }
+
+ /// A boolean that specifies whether campaign allows direct lending or not.
+ [JsonProperty("direct_lending")]
+ public bool? DirectLending { get; private set; }
+
/// Campaign status. Examples: IN_PROGRESS, VERIFIED, FAILED.
[JsonProperty("campaign_status")]
public string CampaignStatus { get; private set; }
diff --git a/src/Twilio/Rest/Messaging/V1/TollfreeVerificationOptions.cs b/src/Twilio/Rest/Messaging/V1/TollfreeVerificationOptions.cs
index 38e72d27e..bec45a93e 100644
--- a/src/Twilio/Rest/Messaging/V1/TollfreeVerificationOptions.cs
+++ b/src/Twilio/Rest/Messaging/V1/TollfreeVerificationOptions.cs
@@ -91,7 +91,7 @@ public class CreateTollfreeVerificationOptions : IOptions The email address of the contact for the business or organization using the Tollfree number.
public string BusinessContactEmail { get; set; }
- /// The phone number of the contact for the business or organization using the Tollfree number.
+ /// The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
public Types.PhoneNumber BusinessContactPhone { get; set; }
/// An optional external reference ID supplied by customer and echoed back on status retrieval.
@@ -389,7 +389,7 @@ public class UpdateTollfreeVerificationOptions : IOptions The email address of the contact for the business or organization using the Tollfree number.
public string BusinessContactEmail { get; set; }
- /// The phone number of the contact for the business or organization using the Tollfree number.
+ /// The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
public Types.PhoneNumber BusinessContactPhone { get; set; }
/// Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to 'Website fixed'.
diff --git a/src/Twilio/Rest/Messaging/V1/TollfreeVerificationResource.cs b/src/Twilio/Rest/Messaging/V1/TollfreeVerificationResource.cs
index ba2caee69..6ba089d58 100644
--- a/src/Twilio/Rest/Messaging/V1/TollfreeVerificationResource.cs
+++ b/src/Twilio/Rest/Messaging/V1/TollfreeVerificationResource.cs
@@ -127,7 +127,7 @@ public static async System.Threading.Tasks.Task Cr
/// The first name of the contact for the business or organization using the Tollfree number.
/// The last name of the contact for the business or organization using the Tollfree number.
/// The email address of the contact for the business or organization using the Tollfree number.
- /// The phone number of the contact for the business or organization using the Tollfree number.
+ /// The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
/// An optional external reference ID supplied by customer and echoed back on status retrieval.
/// Client to make requests to Twilio
/// A single instance of TollfreeVerification
@@ -184,7 +184,7 @@ public static TollfreeVerificationResource Create(
/// The first name of the contact for the business or organization using the Tollfree number.
/// The last name of the contact for the business or organization using the Tollfree number.
/// The email address of the contact for the business or organization using the Tollfree number.
- /// The phone number of the contact for the business or organization using the Tollfree number.
+ /// The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
/// An optional external reference ID supplied by customer and echoed back on status retrieval.
/// Client to make requests to Twilio
/// Task that resolves to A single instance of TollfreeVerification
@@ -543,7 +543,7 @@ public static async System.Threading.Tasks.Task Up
/// The first name of the contact for the business or organization using the Tollfree number.
/// The last name of the contact for the business or organization using the Tollfree number.
/// The email address of the contact for the business or organization using the Tollfree number.
- /// The phone number of the contact for the business or organization using the Tollfree number.
+ /// The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
/// Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to 'Website fixed'.
/// Client to make requests to Twilio
/// A single instance of TollfreeVerification
@@ -598,7 +598,7 @@ public static TollfreeVerificationResource Update(
/// The first name of the contact for the business or organization using the Tollfree number.
/// The last name of the contact for the business or organization using the Tollfree number.
/// The email address of the contact for the business or organization using the Tollfree number.
- /// The phone number of the contact for the business or organization using the Tollfree number.
+ /// The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
/// Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to 'Website fixed'.
/// Client to make requests to Twilio
/// Task that resolves to A single instance of TollfreeVerification
@@ -738,7 +738,7 @@ public static string ToJson(object model)
[JsonProperty("business_contact_email")]
public string BusinessContactEmail { get; private set; }
- /// The phone number of the contact for the business or organization using the Tollfree number.
+ /// The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
[JsonProperty("business_contact_phone")]
[JsonConverter(typeof(PhoneNumberConverter))]
public Types.PhoneNumber BusinessContactPhone { get; private set; }
@@ -803,6 +803,10 @@ public static string ToJson(object model)
[JsonProperty("edit_allowed")]
public bool? EditAllowed { get; private set; }
+ /// A list of rejection reasons and codes describing why a Tollfree Verification has been rejected.
+ [JsonProperty("rejection_reasons")]
+ public List RejectionReasons { get; private set; }
+
/// The URLs of the documents associated with the Tollfree Verification resource.
[JsonProperty("resource_links")]
public object ResourceLinks { get; private set; }
diff --git a/src/Twilio/Rest/Notify/V1/Service/NotificationOptions.cs b/src/Twilio/Rest/Notify/V1/Service/NotificationOptions.cs
index c8114241d..34d426b98 100644
--- a/src/Twilio/Rest/Notify/V1/Service/NotificationOptions.cs
+++ b/src/Twilio/Rest/Notify/V1/Service/NotificationOptions.cs
@@ -58,7 +58,7 @@ public class CreateNotificationOptions : IOptions
/// The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref).
public object Gcm { get; set; }
- /// The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/send-messages) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array.
+ /// The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/quickstart) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array.
public object Sms { get; set; }
/// Deprecated.
diff --git a/src/Twilio/Rest/Notify/V1/Service/NotificationResource.cs b/src/Twilio/Rest/Notify/V1/Service/NotificationResource.cs
index e40650abd..8afa0dd05 100644
--- a/src/Twilio/Rest/Notify/V1/Service/NotificationResource.cs
+++ b/src/Twilio/Rest/Notify/V1/Service/NotificationResource.cs
@@ -102,7 +102,7 @@ public static async System.Threading.Tasks.Task CreateAsyn
/// The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels.
/// The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed.
/// The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref).
- /// The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/send-messages) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array.
+ /// The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/quickstart) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array.
/// Deprecated.
/// The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel.
/// The Segment resource is deprecated. Use the `tag` parameter, instead.
@@ -151,7 +151,7 @@ public static NotificationResource Create(
/// The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels.
/// The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed.
/// The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref).
- /// The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/send-messages) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array.
+ /// The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/quickstart) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array.
/// Deprecated.
/// The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel.
/// The Segment resource is deprecated. Use the `tag` parameter, instead.
diff --git a/src/Twilio/Rest/Notify/V1/ServiceOptions.cs b/src/Twilio/Rest/Notify/V1/ServiceOptions.cs
index cd3545f27..213cf79b9 100644
--- a/src/Twilio/Rest/Notify/V1/ServiceOptions.cs
+++ b/src/Twilio/Rest/Notify/V1/ServiceOptions.cs
@@ -37,7 +37,7 @@ public class CreateServiceOptions : IOptions
/// The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings.
public string GcmCredentialSid { get; set; }
- /// The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
+ /// The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
public string MessagingServiceSid { get; set; }
/// Deprecated.
@@ -247,7 +247,7 @@ public class UpdateServiceOptions : IOptions
/// The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings.
public string GcmCredentialSid { get; set; }
- /// The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
+ /// The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
public string MessagingServiceSid { get; set; }
/// Deprecated.
diff --git a/src/Twilio/Rest/Notify/V1/ServiceResource.cs b/src/Twilio/Rest/Notify/V1/ServiceResource.cs
index 83a66a68f..fdebad4b4 100644
--- a/src/Twilio/Rest/Notify/V1/ServiceResource.cs
+++ b/src/Twilio/Rest/Notify/V1/ServiceResource.cs
@@ -78,7 +78,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre
/// A descriptive string that you create to describe the resource. It can be up to 64 characters long.
/// The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings.
/// The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings.
- /// The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
+ /// The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
/// Deprecated.
/// The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
/// The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
@@ -117,7 +117,7 @@ public static ServiceResource Create(
/// A descriptive string that you create to describe the resource. It can be up to 64 characters long.
/// The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings.
/// The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings.
- /// The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
+ /// The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
/// Deprecated.
/// The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
/// The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
@@ -456,7 +456,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd
/// A descriptive string that you create to describe the resource. It can be up to 64 characters long.
/// The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings.
/// The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings.
- /// The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
+ /// The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
/// Deprecated.
/// The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
/// The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
@@ -497,7 +497,7 @@ public static ServiceResource Update(
/// A descriptive string that you create to describe the resource. It can be up to 64 characters long.
/// The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings.
/// The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings.
- /// The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
+ /// The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
/// Deprecated.
/// The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
/// The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
@@ -599,7 +599,7 @@ public static string ToJson(object model)
[JsonProperty("fcm_credential_sid")]
public string FcmCredentialSid { get; private set; }
- /// The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. In order to send SMS notifications this parameter has to be set.
+ /// The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. In order to send SMS notifications this parameter has to be set.
[JsonProperty("messaging_service_sid")]
public string MessagingServiceSid { get; private set; }
diff --git a/src/Twilio/Rest/Numbers/V1/BulkEligibilityOptions.cs b/src/Twilio/Rest/Numbers/V1/BulkEligibilityOptions.cs
index a939be3b2..e5a0df6a2 100644
--- a/src/Twilio/Rest/Numbers/V1/BulkEligibilityOptions.cs
+++ b/src/Twilio/Rest/Numbers/V1/BulkEligibilityOptions.cs
@@ -28,17 +28,23 @@ namespace Twilio.Rest.Numbers.V1
public class CreateBulkEligibilityOptions : IOptions
{
+
+ public object Body { get; set; }
+
- /// Generate the necessary parameters
- public List> GetParams()
+ /// Generate the request body
+ public string GetBody()
{
- var p = new List>();
+ string body = "";
- return p;
+ if (Body != null)
+ {
+ body = BulkEligibilityResource.ToJson(Body);
+ }
+ return body;
}
-
}
diff --git a/src/Twilio/Rest/Numbers/V1/BulkEligibilityResource.cs b/src/Twilio/Rest/Numbers/V1/BulkEligibilityResource.cs
index 696375da2..6359e5298 100644
--- a/src/Twilio/Rest/Numbers/V1/BulkEligibilityResource.cs
+++ b/src/Twilio/Rest/Numbers/V1/BulkEligibilityResource.cs
@@ -44,7 +44,9 @@ private static Request BuildCreateRequest(CreateBulkEligibilityOptions options,
HttpMethod.Post,
Rest.Domain.Numbers,
path,
- postParams: options.GetParams(),
+
+ contentType: EnumConstants.ContentTypeEnum.JSON,
+ body: options.GetBody(),
headerParams: null
);
}
diff --git a/src/Twilio/Rest/Numbers/V1/EligibilityOptions.cs b/src/Twilio/Rest/Numbers/V1/EligibilityOptions.cs
index f6f3097e7..816c02210 100644
--- a/src/Twilio/Rest/Numbers/V1/EligibilityOptions.cs
+++ b/src/Twilio/Rest/Numbers/V1/EligibilityOptions.cs
@@ -28,17 +28,23 @@ namespace Twilio.Rest.Numbers.V1
public class CreateEligibilityOptions : IOptions
{
+
+ public object Body { get; set; }
+
- /// Generate the necessary parameters
- public List> GetParams()
+ /// Generate the request body
+ public string GetBody()
{
- var p = new List>();
+ string body = "";
- return p;
+ if (Body != null)
+ {
+ body = EligibilityResource.ToJson(Body);
+ }
+ return body;
}
-
}
diff --git a/src/Twilio/Rest/Numbers/V1/EligibilityResource.cs b/src/Twilio/Rest/Numbers/V1/EligibilityResource.cs
index 37ae91e3f..3db533714 100644
--- a/src/Twilio/Rest/Numbers/V1/EligibilityResource.cs
+++ b/src/Twilio/Rest/Numbers/V1/EligibilityResource.cs
@@ -44,7 +44,9 @@ private static Request BuildCreateRequest(CreateEligibilityOptions options, ITwi
HttpMethod.Post,
Rest.Domain.Numbers,
path,
- postParams: options.GetParams(),
+
+ contentType: EnumConstants.ContentTypeEnum.JSON,
+ body: options.GetBody(),
headerParams: null
);
}
diff --git a/src/Twilio/Rest/Numbers/V1/PortingPortInOptions.cs b/src/Twilio/Rest/Numbers/V1/PortingPortInOptions.cs
index e6701e9d0..d7b09aba9 100644
--- a/src/Twilio/Rest/Numbers/V1/PortingPortInOptions.cs
+++ b/src/Twilio/Rest/Numbers/V1/PortingPortInOptions.cs
@@ -24,21 +24,27 @@
namespace Twilio.Rest.Numbers.V1
{
- /// Allows to create a port in request
+ /// Allows to create a new port in request
public class CreatePortingPortInOptions : IOptions
{
+
+ public object Body { get; set; }
+
- /// Generate the necessary parameters
- public List> GetParams()
+ /// Generate the request body
+ public string GetBody()
{
- var p = new List>();
+ string body = "";
- return p;
+ if (Body != null)
+ {
+ body = PortingPortInResource.ToJson(Body);
+ }
+ return body;
}
-
}
diff --git a/src/Twilio/Rest/Numbers/V1/PortingPortInResource.cs b/src/Twilio/Rest/Numbers/V1/PortingPortInResource.cs
index 06e2c05d5..67d1bf144 100644
--- a/src/Twilio/Rest/Numbers/V1/PortingPortInResource.cs
+++ b/src/Twilio/Rest/Numbers/V1/PortingPortInResource.cs
@@ -44,12 +44,14 @@ private static Request BuildCreateRequest(CreatePortingPortInOptions options, IT
HttpMethod.Post,
Rest.Domain.Numbers,
path,
- postParams: options.GetParams(),
+
+ contentType: EnumConstants.ContentTypeEnum.JSON,
+ body: options.GetBody(),
headerParams: null
);
}
- /// Allows to create a port in request
+ /// Allows to create a new port in request
/// Create PortingPortIn parameters
/// Client to make requests to Twilio
/// A single instance of PortingPortIn
@@ -61,7 +63,7 @@ public static PortingPortInResource Create(CreatePortingPortInOptions options, I
}
#if !NET35
- /// Allows to create a port in request
+ /// Allows to create a new port in request
/// Create PortingPortIn parameters
/// Client to make requests to Twilio
/// Task that resolves to A single instance of PortingPortIn
@@ -74,7 +76,7 @@ public static async System.Threading.Tasks.Task CreateAsy
}
#endif
- /// Allows to create a port in request
+ /// Allows to create a new port in request
/// Client to make requests to Twilio
/// A single instance of PortingPortIn
public static PortingPortInResource Create(
@@ -85,7 +87,7 @@ public static PortingPortInResource Create(
}
#if !NET35
- /// Allows to create a port in request
+ /// Allows to create a new port in request
/// Client to make requests to Twilio
/// Task that resolves to A single instance of PortingPortIn
public static async System.Threading.Tasks.Task CreateAsync(
@@ -130,7 +132,7 @@ public static string ToJson(object model)
}
- /// The SID of the Port In request, It is the request identifier
+ /// The SID of the Port In request. This is a unique identifier of the port in request.
[JsonProperty("port_in_request_sid")]
public string PortInRequestSid { get; private set; }
diff --git a/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderOptions.cs b/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderOptions.cs
index dd5c2927a..818f39eb4 100644
--- a/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderOptions.cs
+++ b/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderOptions.cs
@@ -28,17 +28,23 @@ namespace Twilio.Rest.Numbers.V2
public class CreateBulkHostedNumberOrderOptions : IOptions
{
+
+ public object Body { get; set; }
+
- /// Generate the necessary parameters
- public List> GetParams()
+ /// Generate the request body
+ public string GetBody()
{
- var p = new List>();
+ string body = "";
- return p;
+ if (Body != null)
+ {
+ body = BulkHostedNumberOrderResource.ToJson(Body);
+ }
+ return body;
}
-
}
diff --git a/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderResource.cs b/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderResource.cs
index 1848abeff..248543dd9 100644
--- a/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderResource.cs
+++ b/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderResource.cs
@@ -58,7 +58,9 @@ private static Request BuildCreateRequest(CreateBulkHostedNumberOrderOptions opt
HttpMethod.Post,
Rest.Domain.Numbers,
path,
- postParams: options.GetParams(),
+
+ contentType: EnumConstants.ContentTypeEnum.JSON,
+ body: options.GetBody(),
headerParams: null
);
}
diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsOptions.cs
deleted file mode 100644
index 88769ec72..000000000
--- a/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsOptions.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Preview
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Preview.Understand.Assistant
-{
- /// fetch
- public class FetchAssistantFallbackActionsOptions : IOptions
- {
-
-
- public string PathAssistantSid { get; }
-
-
-
- /// Construct a new FetchUnderstandAssistantFallbackActionsOptions
- ///
- public FetchAssistantFallbackActionsOptions(string pathAssistantSid)
- {
- PathAssistantSid = pathAssistantSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// update
- public class UpdateAssistantFallbackActionsOptions : IOptions
- {
-
-
- public string PathAssistantSid { get; }
-
-
- public object FallbackActions { get; set; }
-
-
-
- /// Construct a new UpdateUnderstandAssistantFallbackActionsOptions
- ///
- public UpdateAssistantFallbackActionsOptions(string pathAssistantSid)
- {
- PathAssistantSid = pathAssistantSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (FallbackActions != null)
- {
- p.Add(new KeyValuePair("FallbackActions", Serializers.JsonObject(FallbackActions)));
- }
- return p;
- }
-
-
-
- }
-
-
-}
-
diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsResource.cs
deleted file mode 100644
index b7b37826c..000000000
--- a/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsResource.cs
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Preview
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-
-
-
-namespace Twilio.Rest.Preview.Understand.Assistant
-{
- public class AssistantFallbackActionsResource : Resource
- {
-
-
-
-
-
- private static Request BuildFetchRequest(FetchAssistantFallbackActionsOptions options, ITwilioRestClient client)
- {
-
- string path = "/understand/Assistants/{AssistantSid}/FallbackActions";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Preview,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// fetch
- /// Fetch AssistantFallbackActions parameters
- /// Client to make requests to Twilio
- /// A single instance of AssistantFallbackActions
- public static AssistantFallbackActionsResource Fetch(FetchAssistantFallbackActionsOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// fetch
- /// Fetch AssistantFallbackActions parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of AssistantFallbackActions
- public static async System.Threading.Tasks.Task FetchAsync(FetchAssistantFallbackActionsOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// fetch
- ///
- /// Client to make requests to Twilio
- /// A single instance of AssistantFallbackActions
- public static AssistantFallbackActionsResource Fetch(
- string pathAssistantSid,
- ITwilioRestClient client = null)
- {
- var options = new FetchAssistantFallbackActionsOptions(pathAssistantSid){ };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// fetch
- ///
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of AssistantFallbackActions
- public static async System.Threading.Tasks.Task FetchAsync(string pathAssistantSid, ITwilioRestClient client = null)
- {
- var options = new FetchAssistantFallbackActionsOptions(pathAssistantSid){ };
- return await FetchAsync(options, client);
- }
- #endif
-
- private static Request BuildUpdateRequest(UpdateAssistantFallbackActionsOptions options, ITwilioRestClient client)
- {
-
- string path = "/understand/Assistants/{AssistantSid}/FallbackActions";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Preview,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// update
- /// Update AssistantFallbackActions parameters
- /// Client to make requests to Twilio
- /// A single instance of AssistantFallbackActions
- public static AssistantFallbackActionsResource Update(UpdateAssistantFallbackActionsOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
-
- /// update
- /// Update AssistantFallbackActions parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of AssistantFallbackActions
- #if !NET35
- public static async System.Threading.Tasks.Task UpdateAsync(UpdateAssistantFallbackActionsOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// update
- ///
- ///
- /// Client to make requests to Twilio
- /// A single instance of AssistantFallbackActions
- public static AssistantFallbackActionsResource Update(
- string pathAssistantSid,
- object fallbackActions = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateAssistantFallbackActionsOptions(pathAssistantSid){ FallbackActions = fallbackActions };
- return Update(options, client);
- }
-
- #if !NET35
- /// update
- ///
- ///
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of AssistantFallbackActions
- public static async System.Threading.Tasks.Task UpdateAsync(
- string pathAssistantSid,
- object fallbackActions = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateAssistantFallbackActionsOptions(pathAssistantSid){ FallbackActions = fallbackActions };
- return await UpdateAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a AssistantFallbackActionsResource object
- ///
- /// Raw JSON string
- /// AssistantFallbackActionsResource object represented by the provided JSON
- public static AssistantFallbackActionsResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The account_sid
- [JsonProperty("account_sid")]
- public string AccountSid { get; private set; }
-
- /// The assistant_sid
- [JsonProperty("assistant_sid")]
- public string AssistantSid { get; private set; }
-
- /// The url
- [JsonProperty("url")]
- public Uri Url { get; private set; }
-
- /// The data
- [JsonProperty("data")]
- public object Data { get; private set; }
-
-
-
- private AssistantFallbackActionsResource() {
-
- }
- }
-}
-
diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsOptions.cs
deleted file mode 100644
index 4a32917fd..000000000
--- a/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsOptions.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Preview
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Preview.Understand.Assistant
-{
- /// fetch
- public class FetchAssistantInitiationActionsOptions : IOptions
- {
-
-
- public string PathAssistantSid { get; }
-
-
-
- /// Construct a new FetchUnderstandAssistantInitiationActionsOptions
- ///
- public FetchAssistantInitiationActionsOptions(string pathAssistantSid)
- {
- PathAssistantSid = pathAssistantSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// update
- public class UpdateAssistantInitiationActionsOptions : IOptions
- {
-
-
- public string PathAssistantSid { get; }
-
-
- public object InitiationActions { get; set; }
-
-
-
- /// Construct a new UpdateUnderstandAssistantInitiationActionsOptions
- ///
- public UpdateAssistantInitiationActionsOptions(string pathAssistantSid)
- {
- PathAssistantSid = pathAssistantSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (InitiationActions != null)
- {
- p.Add(new KeyValuePair("InitiationActions", Serializers.JsonObject(InitiationActions)));
- }
- return p;
- }
-
-
-
- }
-
-
-}
-
diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsResource.cs
deleted file mode 100644
index b91542fc9..000000000
--- a/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsResource.cs
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Preview
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-
-
-
-namespace Twilio.Rest.Preview.Understand.Assistant
-{
- public class AssistantInitiationActionsResource : Resource
- {
-
-
-
-
-
- private static Request BuildFetchRequest(FetchAssistantInitiationActionsOptions options, ITwilioRestClient client)
- {
-
- string path = "/understand/Assistants/{AssistantSid}/InitiationActions";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Preview,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// fetch
- /// Fetch AssistantInitiationActions parameters
- /// Client to make requests to Twilio
- /// A single instance of AssistantInitiationActions
- public static AssistantInitiationActionsResource Fetch(FetchAssistantInitiationActionsOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// fetch
- /// Fetch AssistantInitiationActions parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of AssistantInitiationActions
- public static async System.Threading.Tasks.Task FetchAsync(FetchAssistantInitiationActionsOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// fetch
- ///
- /// Client to make requests to Twilio
- /// A single instance of AssistantInitiationActions
- public static AssistantInitiationActionsResource Fetch(
- string pathAssistantSid,
- ITwilioRestClient client = null)
- {
- var options = new FetchAssistantInitiationActionsOptions(pathAssistantSid){ };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// fetch
- ///
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of AssistantInitiationActions
- public static async System.Threading.Tasks.Task FetchAsync(string pathAssistantSid, ITwilioRestClient client = null)
- {
- var options = new FetchAssistantInitiationActionsOptions(pathAssistantSid){ };
- return await FetchAsync(options, client);
- }
- #endif
-
- private static Request BuildUpdateRequest(UpdateAssistantInitiationActionsOptions options, ITwilioRestClient client)
- {
-
- string path = "/understand/Assistants/{AssistantSid}/InitiationActions";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Preview,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// update
- /// Update AssistantInitiationActions parameters
- /// Client to make requests to Twilio
- /// A single instance of AssistantInitiationActions
- public static AssistantInitiationActionsResource Update(UpdateAssistantInitiationActionsOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
-
- /// update
- /// Update AssistantInitiationActions parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of AssistantInitiationActions
- #if !NET35
- public static async System.Threading.Tasks.Task UpdateAsync(UpdateAssistantInitiationActionsOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// update
- ///
- ///
- /// Client to make requests to Twilio
- /// A single instance of AssistantInitiationActions
- public static AssistantInitiationActionsResource Update(
- string pathAssistantSid,
- object initiationActions = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateAssistantInitiationActionsOptions(pathAssistantSid){ InitiationActions = initiationActions };
- return Update(options, client);
- }
-
- #if !NET35
- /// update
- ///
- ///
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of AssistantInitiationActions
- public static async System.Threading.Tasks.Task UpdateAsync(
- string pathAssistantSid,
- object initiationActions = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateAssistantInitiationActionsOptions(pathAssistantSid){ InitiationActions = initiationActions };
- return await UpdateAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a AssistantInitiationActionsResource object
- ///
- /// Raw JSON string
- /// AssistantInitiationActionsResource object represented by the provided JSON
- public static AssistantInitiationActionsResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The account_sid
- [JsonProperty("account_sid")]
- public string AccountSid { get; private set; }
-
- /// The assistant_sid
- [JsonProperty("assistant_sid")]
- public string AssistantSid { get; private set; }
-
- /// The url
- [JsonProperty("url")]
- public Uri Url { get; private set; }
-
- /// The data
- [JsonProperty("data")]
- public object Data { get; private set; }
-
-
-
- private AssistantInitiationActionsResource() {
-
- }
- }
-}
-
diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/DialogueOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/DialogueOptions.cs
deleted file mode 100644
index 797f4c369..000000000
--- a/src/Twilio/Rest/Preview/Understand/Assistant/DialogueOptions.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Preview
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Preview.Understand.Assistant
-{
- /// fetch
- public class FetchDialogueOptions : IOptions
- {
-
-
- public string PathAssistantSid { get; }
-
-
- public string PathSid { get; }
-
-
-
- /// Construct a new FetchUnderstandDialogueOptions
- ///
- ///
- public FetchDialogueOptions(string pathAssistantSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
-}
-
diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/DialogueResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/DialogueResource.cs
deleted file mode 100644
index 49a2f4a4d..000000000
--- a/src/Twilio/Rest/Preview/Understand/Assistant/DialogueResource.cs
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Preview
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-
-
-
-namespace Twilio.Rest.Preview.Understand.Assistant
-{
- public class DialogueResource : Resource
- {
-
-
-
-
-
- private static Request BuildFetchRequest(FetchDialogueOptions options, ITwilioRestClient client)
- {
-
- string path = "/understand/Assistants/{AssistantSid}/Dialogues/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Preview,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// fetch
- /// Fetch Dialogue parameters
- /// Client to make requests to Twilio
- /// A single instance of Dialogue
- public static DialogueResource Fetch(FetchDialogueOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// fetch
- /// Fetch Dialogue parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Dialogue
- public static async System.Threading.Tasks.Task FetchAsync(FetchDialogueOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// fetch
- ///
- ///
- /// Client to make requests to Twilio
- /// A single instance of Dialogue
- public static DialogueResource Fetch(
- string pathAssistantSid,
- string pathSid,
- ITwilioRestClient client = null)
- {
- var options = new FetchDialogueOptions(pathAssistantSid, pathSid){ };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// fetch
- ///
- ///
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Dialogue
- public static async System.Threading.Tasks.Task FetchAsync(string pathAssistantSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new FetchDialogueOptions(pathAssistantSid, pathSid){ };
- return await FetchAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a DialogueResource object
- ///
- /// Raw JSON string
- /// DialogueResource object represented by the provided JSON
- public static DialogueResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The unique ID of the Account that created this Field.
- [JsonProperty("account_sid")]
- public string AccountSid { get; private set; }
-
- /// The unique ID of the parent Assistant.
- [JsonProperty("assistant_sid")]
- public string AssistantSid { get; private set; }
-
- /// The unique ID of the Dialogue
- [JsonProperty("sid")]
- public string Sid { get; private set; }
-
- /// The dialogue memory object as json
- [JsonProperty("data")]
- public object Data { get; private set; }
-
- /// The url
- [JsonProperty("url")]
- public Uri Url { get; private set; }
-
-
-
- private DialogueResource() {
-
- }
- }
-}
-
diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.cs
deleted file mode 100644
index 8b0610dfc..000000000
--- a/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.cs
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Preview
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Preview.Understand.Assistant.FieldType
-{
-
- /// create
- public class CreateFieldValueOptions : IOptions
- {
-
-
- public string PathAssistantSid { get; }
-
-
- public string PathFieldTypeSid { get; }
-
- /// An ISO language-country string of the value.
- public string Language { get; }
-
- /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
- public string Value { get; }
-
- /// A value that indicates this field value is a synonym of. Empty if the value is not a synonym.
- public string SynonymOf { get; set; }
-
-
- /// Construct a new CreateUnderstandFieldValueOptions
- ///
- ///
- /// An ISO language-country string of the value.
- /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
- public CreateFieldValueOptions(string pathAssistantSid, string pathFieldTypeSid, string language, string value)
- {
- PathAssistantSid = pathAssistantSid;
- PathFieldTypeSid = pathFieldTypeSid;
- Language = language;
- Value = value;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (Language != null)
- {
- p.Add(new KeyValuePair("Language", Language));
- }
- if (Value != null)
- {
- p.Add(new KeyValuePair("Value", Value));
- }
- if (SynonymOf != null)
- {
- p.Add(new KeyValuePair("SynonymOf", SynonymOf));
- }
- return p;
- }
-
-
-
- }
- /// delete
- public class DeleteFieldValueOptions : IOptions
- {
-
-
- public string PathAssistantSid { get; }
-
-
- public string PathFieldTypeSid { get; }
-
-
- public string PathSid { get; }
-
-
-
- /// Construct a new DeleteUnderstandFieldValueOptions
- ///
- ///
- ///
- public DeleteFieldValueOptions(string pathAssistantSid, string pathFieldTypeSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathFieldTypeSid = pathFieldTypeSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// fetch
- public class FetchFieldValueOptions : IOptions
- {
-
-
- public string PathAssistantSid { get; }
-
-
- public string PathFieldTypeSid { get; }
-
-
- public string PathSid { get; }
-
-
-
- /// Construct a new FetchUnderstandFieldValueOptions
- ///
- ///
- ///
- public FetchFieldValueOptions(string pathAssistantSid, string pathFieldTypeSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathFieldTypeSid = pathFieldTypeSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// read
- public class ReadFieldValueOptions : ReadOptions
- {
-
-
- public string PathAssistantSid { get; }
-
-
- public string PathFieldTypeSid { get; }
-
- /// An ISO language-country string of the value. For example: *en-US*
- public string Language { get; set; }
-
-
-
- /// Construct a new ListUnderstandFieldValueOptions
- ///
- ///
- public ReadFieldValueOptions(string pathAssistantSid, string pathFieldTypeSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathFieldTypeSid = pathFieldTypeSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (Language != null)
- {
- p.Add(new KeyValuePair("Language", Language));
- }
- if (PageSize != null)
- {
- p.Add(new KeyValuePair("PageSize", PageSize.ToString()));
- }
- return p;
- }
-
-
-
- }
-
-}
-
diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueResource.cs
deleted file mode 100644
index b5fea161a..000000000
--- a/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueResource.cs
+++ /dev/null
@@ -1,491 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Preview
- * This is the public Twilio REST API.
- *
- * NOTE: This class is auto generated by OpenAPI Generator.
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-
-
-
-namespace Twilio.Rest.Preview.Understand.Assistant.FieldType
-{
- public class FieldValueResource : Resource
- {
-
-
-
-
-
- private static Request BuildCreateRequest(CreateFieldValueOptions options, ITwilioRestClient client)
- {
-
- string path = "/understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathFieldTypeSid = options.PathFieldTypeSid;
- path = path.Replace("{"+"FieldTypeSid"+"}", PathFieldTypeSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Preview,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// create
- /// Create FieldValue parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static FieldValueResource Create(CreateFieldValueOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// create
- /// Create FieldValue parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task CreateAsync(CreateFieldValueOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// create
- ///
- ///
- /// An ISO language-country string of the value.
- /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
- /// A value that indicates this field value is a synonym of. Empty if the value is not a synonym.
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- 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);
- }
-
- #if !NET35
- /// create
- ///
- ///
- /// An ISO language-country string of the value.
- /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
- /// A value that indicates this field value is a synonym of. Empty if the value is not a synonym.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task 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);
- }
- #endif
-
- /// delete
- /// Delete FieldValue parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- private static Request BuildDeleteRequest(DeleteFieldValueOptions options, ITwilioRestClient client)
- {
-
- string path = "/understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathFieldTypeSid = options.PathFieldTypeSid;
- path = path.Replace("{"+"FieldTypeSid"+"}", PathFieldTypeSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Delete,
- Rest.Domain.Preview,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// delete
- /// Delete FieldValue parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static bool Delete(DeleteFieldValueOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
-
- #if !NET35
- /// delete
- /// Delete FieldValue parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task DeleteAsync(DeleteFieldValueOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
- #endif
-
- /// delete
- ///
- ///
- ///
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static bool Delete(string pathAssistantSid, string pathFieldTypeSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new DeleteFieldValueOptions(pathAssistantSid, pathFieldTypeSid, pathSid) ;
- return Delete(options, client);
- }
-
- #if !NET35
- /// delete
- ///
- ///
- ///
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task DeleteAsync(string pathAssistantSid, string pathFieldTypeSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new DeleteFieldValueOptions(pathAssistantSid, pathFieldTypeSid, pathSid) ;
- return await DeleteAsync(options, client);
- }
- #endif
-
- private static Request BuildFetchRequest(FetchFieldValueOptions options, ITwilioRestClient client)
- {
-
- string path = "/understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathFieldTypeSid = options.PathFieldTypeSid;
- path = path.Replace("{"+"FieldTypeSid"+"}", PathFieldTypeSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Preview,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// fetch
- /// Fetch FieldValue parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static FieldValueResource Fetch(FetchFieldValueOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// fetch
- /// Fetch FieldValue parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task FetchAsync(FetchFieldValueOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// fetch
- ///
- ///
- ///
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static FieldValueResource Fetch(
- string pathAssistantSid,
- string pathFieldTypeSid,
- string pathSid,
- ITwilioRestClient client = null)
- {
- var options = new FetchFieldValueOptions(pathAssistantSid, pathFieldTypeSid, pathSid){ };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// fetch
- ///
- ///
- ///
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task FetchAsync(string pathAssistantSid, string pathFieldTypeSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new FetchFieldValueOptions(pathAssistantSid, pathFieldTypeSid, pathSid){ };
- return await FetchAsync(options, client);
- }
- #endif
-
- private static Request BuildReadRequest(ReadFieldValueOptions options, ITwilioRestClient client)
- {
-
- string path = "/understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathFieldTypeSid = options.PathFieldTypeSid;
- path = path.Replace("{"+"FieldTypeSid"+"}", PathFieldTypeSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Preview,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
- /// read
- /// Read FieldValue parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static ResourceSet Read(ReadFieldValueOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildReadRequest(options, client));
- var page = Page.FromJson("field_values", response.Content);
- return new ResourceSet(page, options, client);
- }
-
- #if !NET35
- /// read
- /// Read FieldValue parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task> ReadAsync(ReadFieldValueOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildReadRequest(options, client));
-
- var page = Page.FromJson("field_values", response.Content);
- return new ResourceSet(page, options, client);
- }
- #endif
- /// read
- ///
- ///
- /// An ISO language-country string of the value. For example: *en-US*
- /// How many resources to return in each list page. The default is 50, and the maximum is 1000.
- /// Record limit
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static ResourceSet Read(
- string pathAssistantSid,
- string pathFieldTypeSid,
- string language = null,
- int? pageSize = null,
- long? limit = null,
- ITwilioRestClient client = null)
- {
- var options = new ReadFieldValueOptions(pathAssistantSid, pathFieldTypeSid){ Language = language, PageSize = pageSize, Limit = limit};
- return Read(options, client);
- }
-
- #if !NET35
- /// read
- ///
- ///
- /// An ISO language-country string of the value. For example: *en-US*
- /// How many resources to return in each list page. The default is 50, and the maximum is 1000.
- /// Record limit
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task> ReadAsync(
- string pathAssistantSid,
- string pathFieldTypeSid,
- string language = null,
- int? pageSize = null,
- long? limit = null,
- ITwilioRestClient client = null)
- {
- var options = new ReadFieldValueOptions(pathAssistantSid, pathFieldTypeSid){ Language = language, PageSize = pageSize, Limit = limit};
- return await ReadAsync(options, client);
- }
- #endif
-
-
- /// Fetch the target page of records
- /// API-generated URL for the requested results page
- /// Client to make requests to Twilio
- /// The target page of records
- public static Page GetPage(string targetUrl, ITwilioRestClient client)
- {
- client = client ?? TwilioClient.GetRestClient();
-
- var request = new Request(
- HttpMethod.Get,
- targetUrl
- );
-
- var response = client.Request(request);
- return Page.FromJson("field_values", response.Content);
- }
-
- /// Fetch the next page of records
- /// current page of records
- /// Client to make requests to Twilio
- /// The next page of records
- public static Page NextPage(Page page, ITwilioRestClient client)
- {
- var request = new Request(
- HttpMethod.Get,
- page.GetNextPageUrl(Rest.Domain.Api)
- );
-
- var response = client.Request(request);
- return Page.FromJson("field_values", response.Content);
- }
-
- /// Fetch the previous page of records
- /// current page of records
- /// Client to make requests to Twilio
- /// The previous page of records
- public static Page PreviousPage(Page page, ITwilioRestClient client)
- {
- var request = new Request(
- HttpMethod.Get,
- page.GetPreviousPageUrl(Rest.Domain.Api)
- );
-
- var response = client.Request(request);
- return Page