diff --git a/CHANGES.md b/CHANGES.md index 6b7a218f4..28804b2b8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,15 @@ twilio-csharp Changelog ======================= +[2018-05-11] Version 5.13.0 +---------------------------- +**Chat** +- Add Channel Webhooks resource + +**Monitor** +- Update event filtering to support date/time **(breaking change)** + + [2018-05-04] Version 5.12.1 ---------------------------- **Wireless** diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.cs index d428414ec..7d2d41474 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.cs +++ b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.cs @@ -13,7 +13,7 @@ namespace Twilio.Rest.Api.V2010.Account.Call { /// - /// CreateFeedbackOptions + /// Create a feedback entry for a call /// public class CreateFeedbackOptions : IOptions { @@ -26,11 +26,11 @@ public class CreateFeedbackOptions : IOptions /// public string PathCallSid { get; } /// - /// The quality_score + /// An integer from 1 to 5 /// public int? QualityScore { get; } /// - /// The issue + /// Issues experienced during the call /// public List Issue { get; set; } @@ -38,7 +38,7 @@ public class CreateFeedbackOptions : IOptions /// Construct a new CreateFeedbackOptions /// /// The call_sid - /// The quality_score + /// An integer from 1 to 5 public CreateFeedbackOptions(string pathCallSid, int? qualityScore) { PathCallSid = pathCallSid; @@ -100,7 +100,7 @@ public List> GetParams() } /// - /// Create or update a feedback entry for a call + /// Update a feedback entry for a call /// public class UpdateFeedbackOptions : IOptions { diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackResource.cs b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackResource.cs index c18f86eaf..8e39479c5 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackResource.cs +++ b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackResource.cs @@ -52,7 +52,7 @@ private static Request BuildCreateRequest(CreateFeedbackOptions options, ITwilio } /// - /// create + /// Create a feedback entry for a call /// /// Create Feedback parameters /// Client to make requests to Twilio @@ -66,7 +66,7 @@ public static FeedbackResource Create(CreateFeedbackOptions options, ITwilioRest #if !NET35 /// - /// create + /// Create a feedback entry for a call /// /// Create Feedback parameters /// Client to make requests to Twilio @@ -81,12 +81,12 @@ public static async System.Threading.Tasks.Task CreateAsync(Cr #endif /// - /// create + /// Create a feedback entry for a call /// /// The call_sid - /// The quality_score + /// An integer from 1 to 5 /// The account_sid - /// The issue + /// Issues experienced during the call /// Client to make requests to Twilio /// A single instance of Feedback public static FeedbackResource Create(string pathCallSid, @@ -101,12 +101,12 @@ public static FeedbackResource Create(string pathCallSid, #if !NET35 /// - /// create + /// Create a feedback entry for a call /// /// The call_sid - /// The quality_score + /// An integer from 1 to 5 /// The account_sid - /// The issue + /// Issues experienced during the call /// Client to make requests to Twilio /// Task that resolves to A single instance of Feedback public static async System.Threading.Tasks.Task CreateAsync(string pathCallSid, @@ -204,7 +204,7 @@ private static Request BuildUpdateRequest(UpdateFeedbackOptions options, ITwilio } /// - /// Create or update a feedback entry for a call + /// Update a feedback entry for a call /// /// Update Feedback parameters /// Client to make requests to Twilio @@ -218,7 +218,7 @@ public static FeedbackResource Update(UpdateFeedbackOptions options, ITwilioRest #if !NET35 /// - /// Create or update a feedback entry for a call + /// Update a feedback entry for a call /// /// Update Feedback parameters /// Client to make requests to Twilio @@ -233,7 +233,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(Up #endif /// - /// Create or update a feedback entry for a call + /// Update a feedback entry for a call /// /// The call_sid /// An integer from 1 to 5 @@ -253,7 +253,7 @@ public static FeedbackResource Update(string pathCallSid, #if !NET35 /// - /// Create or update a feedback entry for a call + /// Update a feedback entry for a call /// /// The call_sid /// An integer from 1 to 5 diff --git a/src/Twilio/Rest/Api/V2010/Account/KeyOptions.cs b/src/Twilio/Rest/Api/V2010/Account/KeyOptions.cs index 2534e4531..2cb8b7a92 100644 --- a/src/Twilio/Rest/Api/V2010/Account/KeyOptions.cs +++ b/src/Twilio/Rest/Api/V2010/Account/KeyOptions.cs @@ -58,7 +58,7 @@ public class UpdateKeyOptions : IOptions /// public string PathSid { get; } /// - /// A descriptive string for this resource, chosen by your application, up to 64 characters long. + /// The friendly_name /// public string FriendlyName { get; set; } diff --git a/src/Twilio/Rest/Api/V2010/Account/KeyResource.cs b/src/Twilio/Rest/Api/V2010/Account/KeyResource.cs index f7805f015..7506542ac 100644 --- a/src/Twilio/Rest/Api/V2010/Account/KeyResource.cs +++ b/src/Twilio/Rest/Api/V2010/Account/KeyResource.cs @@ -135,8 +135,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(UpdateK /// /// The sid /// The account_sid - /// A descriptive string for this resource, chosen by your application, up to 64 characters - /// long. + /// The friendly_name /// Client to make requests to Twilio /// A single instance of Key public static KeyResource Update(string pathSid, @@ -154,8 +153,7 @@ public static KeyResource Update(string pathSid, /// /// The sid /// The account_sid - /// A descriptive string for this resource, chosen by your application, up to 64 characters - /// long. + /// The friendly_name /// Client to make requests to Twilio /// Task that resolves to A single instance of Key public static async System.Threading.Tasks.Task UpdateAsync(string pathSid, diff --git a/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackResource.cs b/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackResource.cs index aa3fdd512..e78a80319 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackResource.cs +++ b/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackResource.cs @@ -139,7 +139,7 @@ public static FeedbackResource FromJson(string json) [JsonProperty("message_sid")] public string MessageSid { get; private set; } /// - /// The outcome + /// unconfirmed or confirmed. If ProvideFeedback=true in the initial HTTP POST, this value will default to unconfirmed. Make an HTTP POST to update this value to confirmed after the message arrives. /// [JsonProperty("outcome")] [JsonConverter(typeof(StringEnumConverter))] diff --git a/src/Twilio/Rest/Api/V2010/Account/NewKeyOptions.cs b/src/Twilio/Rest/Api/V2010/Account/NewKeyOptions.cs index d715e01a0..938db4af4 100644 --- a/src/Twilio/Rest/Api/V2010/Account/NewKeyOptions.cs +++ b/src/Twilio/Rest/Api/V2010/Account/NewKeyOptions.cs @@ -21,7 +21,7 @@ public class CreateNewKeyOptions : IOptions /// public string PathAccountSid { get; set; } /// - /// A descriptive string for this resource, chosen by your application, up to 64 characters long. + /// The friendly_name /// public string FriendlyName { get; set; } diff --git a/src/Twilio/Rest/Api/V2010/Account/NewKeyResource.cs b/src/Twilio/Rest/Api/V2010/Account/NewKeyResource.cs index 872d11508..9eda26bf5 100644 --- a/src/Twilio/Rest/Api/V2010/Account/NewKeyResource.cs +++ b/src/Twilio/Rest/Api/V2010/Account/NewKeyResource.cs @@ -64,8 +64,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Crea /// create /// /// The account_sid - /// A descriptive string for this resource, chosen by your application, up to 64 characters - /// long. + /// The friendly_name /// Client to make requests to Twilio /// A single instance of NewKey public static NewKeyResource Create(string pathAccountSid = null, @@ -81,8 +80,7 @@ public static NewKeyResource Create(string pathAccountSid = null, /// create /// /// The account_sid - /// A descriptive string for this resource, chosen by your application, up to 64 characters - /// long. + /// The friendly_name /// Client to make requests to Twilio /// Task that resolves to A single instance of NewKey public static async System.Threading.Tasks.Task CreateAsync(string pathAccountSid = null, @@ -113,27 +111,27 @@ public static NewKeyResource FromJson(string json) } /// - /// A 34 character string that uniquely identifies this API Key. + /// The sid /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// A descriptive string for this resource, chosen by your application, up to 64 characters long. + /// The friendly_name /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The date-time this API Key was created, given as a RFC 2822 Timestamp. + /// The date_created /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date-time this API Key was most recently updated, given as a RFC 2822 Timestamp. + /// The date_updated /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The secret your application uses to sign Access Tokens and to authenticate to the REST API. + /// The secret /// [JsonProperty("secret")] public string Secret { get; private set; } diff --git a/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadResource.cs b/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadResource.cs index d44075a43..0d49659ee 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadResource.cs +++ b/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadResource.cs @@ -396,7 +396,7 @@ public static PayloadResource FromJson(string json) [JsonProperty("reference_sid")] public string ReferenceSid { get; private set; } /// - /// The subresource_uris + /// A dictionary of URIs for related resources /// [JsonProperty("subresource_uris")] public Dictionary SubresourceUris { get; private set; } diff --git a/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultResource.cs b/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultResource.cs index f7bfe5289..03fec67e1 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultResource.cs +++ b/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultResource.cs @@ -400,7 +400,7 @@ public static AddOnResultResource FromJson(string json) [JsonProperty("reference_sid")] public string ReferenceSid { get; private set; } /// - /// The subresource_uris + /// A dictionary of URIs for related resources /// [JsonProperty("subresource_uris")] public Dictionary SubresourceUris { get; private set; } diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialOptions.cs index 31f345a4b..af6d9f4f5 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialOptions.cs +++ b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialOptions.cs @@ -161,7 +161,7 @@ public class UpdateCredentialOptions : IOptions /// public string PathSid { get; } /// - /// The password + /// The password will not be returned in the response. /// public string Password { get; set; } diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialResource.cs index 52c051b51..07fe3d46f 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialResource.cs +++ b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialResource.cs @@ -365,7 +365,7 @@ public static async System.Threading.Tasks.Task UpdateAsync( /// The credential_list_sid /// The sid /// The account_sid - /// The password + /// The password will not be returned in the response. /// Client to make requests to Twilio /// A single instance of Credential public static CredentialResource Update(string pathCredentialListSid, @@ -385,7 +385,7 @@ public static CredentialResource Update(string pathCredentialListSid, /// The credential_list_sid /// The sid /// The account_sid - /// The password + /// The password will not be returned in the response. /// Client to make requests to Twilio /// Task that resolves to A single instance of Credential public static async System.Threading.Tasks.Task UpdateAsync(string pathCredentialListSid, diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListOptions.cs index 81fd7b6f9..34f79937f 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListOptions.cs +++ b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListOptions.cs @@ -12,7 +12,7 @@ namespace Twilio.Rest.Api.V2010.Account.Sip { /// - /// Retrieve a list of Credentials belonging to the account used to make the request + /// Get All Credential Lists /// public class ReadCredentialListOptions : ReadOptions { @@ -37,7 +37,7 @@ public override List> GetParams() } /// - /// Add a Credential to the list + /// Create a Credential List /// public class CreateCredentialListOptions : IOptions { @@ -46,14 +46,14 @@ public class CreateCredentialListOptions : IOptions /// public string PathAccountSid { get; set; } /// - /// The friendly_name + /// Human readable descriptive text /// public string FriendlyName { get; } /// /// Construct a new CreateCredentialListOptions /// - /// The friendly_name + /// Human readable descriptive text public CreateCredentialListOptions(string friendlyName) { FriendlyName = friendlyName; @@ -75,7 +75,7 @@ public List> GetParams() } /// - /// Retrieve a specific Credential in a list + /// Get a Credential List /// public class FetchCredentialListOptions : IOptions { @@ -84,14 +84,14 @@ public class FetchCredentialListOptions : IOptions /// public string PathAccountSid { get; set; } /// - /// Fetch by unique credential Sid + /// Fetch by unique credential list Sid /// public string PathSid { get; } /// /// Construct a new FetchCredentialListOptions /// - /// Fetch by unique credential Sid + /// Fetch by unique credential list Sid public FetchCredentialListOptions(string pathSid) { PathSid = pathSid; @@ -108,7 +108,7 @@ public List> GetParams() } /// - /// Change the password of a Credential record + /// Update a Credential List /// public class UpdateCredentialListOptions : IOptions { @@ -121,7 +121,7 @@ public class UpdateCredentialListOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// Human readable descriptive text /// public string FriendlyName { get; } @@ -129,7 +129,7 @@ public class UpdateCredentialListOptions : IOptions /// Construct a new UpdateCredentialListOptions /// /// The sid - /// The friendly_name + /// Human readable descriptive text public UpdateCredentialListOptions(string pathSid, string friendlyName) { PathSid = pathSid; @@ -152,7 +152,7 @@ public List> GetParams() } /// - /// Remove a credential from a CredentialList + /// Delete a Credential List /// public class DeleteCredentialListOptions : IOptions { @@ -161,14 +161,14 @@ public class DeleteCredentialListOptions : IOptions /// public string PathAccountSid { get; set; } /// - /// Delete by unique credential Sid + /// Delete by unique credential list Sid /// public string PathSid { get; } /// /// Construct a new DeleteCredentialListOptions /// - /// Delete by unique credential Sid + /// Delete by unique credential list Sid public DeleteCredentialListOptions(string pathSid) { PathSid = pathSid; diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListResource.cs index fe7190ed8..5e78cf12e 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListResource.cs +++ b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListResource.cs @@ -32,7 +32,7 @@ private static Request BuildReadRequest(ReadCredentialListOptions options, ITwil } /// - /// Retrieve a list of Credentials belonging to the account used to make the request + /// Get All Credential Lists /// /// Read CredentialList parameters /// Client to make requests to Twilio @@ -49,7 +49,7 @@ public static ResourceSet Read(ReadCredentialListOptions #if !NET35 /// - /// Retrieve a list of Credentials belonging to the account used to make the request + /// Get All Credential Lists /// /// Read CredentialList parameters /// Client to make requests to Twilio @@ -66,7 +66,7 @@ public static async System.Threading.Tasks.Task - /// Retrieve a list of Credentials belonging to the account used to make the request + /// Get All Credential Lists /// /// The account_sid /// Page size @@ -84,7 +84,7 @@ public static ResourceSet Read(string pathAccountSid = n #if !NET35 /// - /// Retrieve a list of Credentials belonging to the account used to make the request + /// Get All Credential Lists /// /// The account_sid /// Page size @@ -172,7 +172,7 @@ private static Request BuildCreateRequest(CreateCredentialListOptions options, I } /// - /// Add a Credential to the list + /// Create a Credential List /// /// Create CredentialList parameters /// Client to make requests to Twilio @@ -186,7 +186,7 @@ public static CredentialListResource Create(CreateCredentialListOptions options, #if !NET35 /// - /// Add a Credential to the list + /// Create a Credential List /// /// Create CredentialList parameters /// Client to make requests to Twilio @@ -201,9 +201,9 @@ public static async System.Threading.Tasks.Task CreateAs #endif /// - /// Add a Credential to the list + /// Create a Credential List /// - /// The friendly_name + /// Human readable descriptive text /// The account_sid /// Client to make requests to Twilio /// A single instance of CredentialList @@ -217,9 +217,9 @@ public static CredentialListResource Create(string friendlyName, #if !NET35 /// - /// Add a Credential to the list + /// Create a Credential List /// - /// The friendly_name + /// Human readable descriptive text /// The account_sid /// Client to make requests to Twilio /// Task that resolves to A single instance of CredentialList @@ -244,7 +244,7 @@ private static Request BuildFetchRequest(FetchCredentialListOptions options, ITw } /// - /// Retrieve a specific Credential in a list + /// Get a Credential List /// /// Fetch CredentialList parameters /// Client to make requests to Twilio @@ -258,7 +258,7 @@ public static CredentialListResource Fetch(FetchCredentialListOptions options, I #if !NET35 /// - /// Retrieve a specific Credential in a list + /// Get a Credential List /// /// Fetch CredentialList parameters /// Client to make requests to Twilio @@ -273,9 +273,9 @@ public static async System.Threading.Tasks.Task FetchAsy #endif /// - /// Retrieve a specific Credential in a list + /// Get a Credential List /// - /// Fetch by unique credential Sid + /// Fetch by unique credential list Sid /// The account_sid /// Client to make requests to Twilio /// A single instance of CredentialList @@ -289,9 +289,9 @@ public static CredentialListResource Fetch(string pathSid, #if !NET35 /// - /// Retrieve a specific Credential in a list + /// Get a Credential List /// - /// Fetch by unique credential Sid + /// Fetch by unique credential list Sid /// The account_sid /// Client to make requests to Twilio /// Task that resolves to A single instance of CredentialList @@ -316,7 +316,7 @@ private static Request BuildUpdateRequest(UpdateCredentialListOptions options, I } /// - /// Change the password of a Credential record + /// Update a Credential List /// /// Update CredentialList parameters /// Client to make requests to Twilio @@ -330,7 +330,7 @@ public static CredentialListResource Update(UpdateCredentialListOptions options, #if !NET35 /// - /// Change the password of a Credential record + /// Update a Credential List /// /// Update CredentialList parameters /// Client to make requests to Twilio @@ -345,10 +345,10 @@ public static async System.Threading.Tasks.Task UpdateAs #endif /// - /// Change the password of a Credential record + /// Update a Credential List /// /// The sid - /// The friendly_name + /// Human readable descriptive text /// The account_sid /// Client to make requests to Twilio /// A single instance of CredentialList @@ -363,10 +363,10 @@ public static CredentialListResource Update(string pathSid, #if !NET35 /// - /// Change the password of a Credential record + /// Update a Credential List /// /// The sid - /// The friendly_name + /// Human readable descriptive text /// The account_sid /// Client to make requests to Twilio /// Task that resolves to A single instance of CredentialList @@ -392,7 +392,7 @@ private static Request BuildDeleteRequest(DeleteCredentialListOptions options, I } /// - /// Remove a credential from a CredentialList + /// Delete a Credential List /// /// Delete CredentialList parameters /// Client to make requests to Twilio @@ -406,7 +406,7 @@ public static bool Delete(DeleteCredentialListOptions options, ITwilioRestClient #if !NET35 /// - /// Remove a credential from a CredentialList + /// Delete a Credential List /// /// Delete CredentialList parameters /// Client to make requests to Twilio @@ -421,9 +421,9 @@ public static async System.Threading.Tasks.Task DeleteAsync(DeleteCredenti #endif /// - /// Remove a credential from a CredentialList + /// Delete a Credential List /// - /// Delete by unique credential Sid + /// Delete by unique credential list Sid /// The account_sid /// Client to make requests to Twilio /// A single instance of CredentialList @@ -435,9 +435,9 @@ public static bool Delete(string pathSid, string pathAccountSid = null, ITwilioR #if !NET35 /// - /// Remove a credential from a CredentialList + /// Delete a Credential List /// - /// Delete by unique credential Sid + /// Delete by unique credential list Sid /// The account_sid /// Client to make requests to Twilio /// Task that resolves to A single instance of CredentialList @@ -484,7 +484,7 @@ public static CredentialListResource FromJson(string json) [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The friendly_name + /// Human readable descriptive text /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingResource.cs index 0e147c403..1e660c064 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingResource.cs +++ b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingResource.cs @@ -415,32 +415,32 @@ public static CredentialListMappingResource FromJson(string json) } /// - /// The account_sid + /// The unique id of the Account that responsible for this resource. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The date_created + /// The date that this resource was created, given as GMT in RFC 2822 format. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated, given as GMT in RFC 2822 format. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The friendly_name + /// A human readable descriptive text for this resource, up to 64 characters long. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The uri + /// The URI for this resource, relative to https://api.twilio.com /// [JsonProperty("uri")] public string Uri { get; private set; } diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingResource.cs index 5293ad1a9..51aa2da50 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingResource.cs +++ b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingResource.cs @@ -415,32 +415,32 @@ public static IpAccessControlListMappingResource FromJson(string json) } /// - /// The account_sid + /// The unique id of the Account that responsible for this resource. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The date_created + /// The date that this resource was created, given as GMT in RFC 2822 format. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated, given as GMT in RFC 2822 format. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The friendly_name + /// A human readable descriptive text for this resource, up to 64 characters long. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The uri + /// The URI for this resource, relative to https://api.twilio.com /// [JsonProperty("uri")] public string Uri { get; private set; } diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressResource.cs index 7c0d0526e..1a244ee92 100644 --- a/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressResource.cs +++ b/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressResource.cs @@ -498,22 +498,22 @@ public static IpAddressResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account that responsible for this resource. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The friendly_name + /// A human readable descriptive text for this resource, up to 64 characters long. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The ip_address + /// An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. /// [JsonProperty("ip_address")] public string IpAddress { get; private set; } @@ -523,17 +523,17 @@ public static IpAddressResource FromJson(string json) [JsonProperty("ip_access_control_list_sid")] public string IpAccessControlListSid { get; private set; } /// - /// The date_created + /// The date that this resource was created, given as GMT in RFC 2822 format. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated, given as GMT in RFC 2822 format. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The uri + /// The URI for this resource, relative to https://api.twilio.com /// [JsonProperty("uri")] public string Uri { get; private set; } diff --git a/src/Twilio/Rest/Api/V2010/AccountOptions.cs b/src/Twilio/Rest/Api/V2010/AccountOptions.cs index d034a3926..2e991b9b7 100644 --- a/src/Twilio/Rest/Api/V2010/AccountOptions.cs +++ b/src/Twilio/Rest/Api/V2010/AccountOptions.cs @@ -68,7 +68,7 @@ public class ReadAccountOptions : ReadOptions /// /// Status to filter on /// - public string Status { get; set; } + public AccountResource.StatusEnum Status { get; set; } /// /// Generate the necessary parameters @@ -83,7 +83,7 @@ public override List> GetParams() if (Status != null) { - p.Add(new KeyValuePair("Status", Status)); + p.Add(new KeyValuePair("Status", Status.ToString())); } if (PageSize != null) @@ -111,7 +111,7 @@ public class UpdateAccountOptions : IOptions /// /// Status to update the Account with /// - public string Status { get; set; } + public AccountResource.StatusEnum Status { get; set; } /// /// Generate the necessary parameters @@ -126,7 +126,7 @@ public List> GetParams() if (Status != null) { - p.Add(new KeyValuePair("Status", Status)); + p.Add(new KeyValuePair("Status", Status.ToString())); } return p; diff --git a/src/Twilio/Rest/Api/V2010/AccountResource.cs b/src/Twilio/Rest/Api/V2010/AccountResource.cs index 8be7154d5..3f74fdc62 100644 --- a/src/Twilio/Rest/Api/V2010/AccountResource.cs +++ b/src/Twilio/Rest/Api/V2010/AccountResource.cs @@ -21,6 +21,20 @@ namespace Twilio.Rest.Api.V2010 public class AccountResource : Resource { + 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 Active = new StatusEnum("active"); + public static readonly StatusEnum Suspended = new StatusEnum("suspended"); + public static readonly StatusEnum Closed = new StatusEnum("closed"); + } + public sealed class TypeEnum : StringEnum { private TypeEnum(string value) : base(value) {} @@ -222,7 +236,7 @@ public static async System.Threading.Tasks.Task> Re /// Client to make requests to Twilio /// A single instance of Account public static ResourceSet Read(string friendlyName = null, - string status = null, + AccountResource.StatusEnum status = null, int? pageSize = null, long? limit = null, ITwilioRestClient client = null) @@ -242,7 +256,7 @@ public static ResourceSet Read(string friendlyName = null, /// Client to make requests to Twilio /// Task that resolves to A single instance of Account public static async System.Threading.Tasks.Task> ReadAsync(string friendlyName = null, - string status = null, + AccountResource.StatusEnum status = null, int? pageSize = null, long? limit = null, ITwilioRestClient client = null) @@ -361,7 +375,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// A single instance of Account public static AccountResource Update(string pathSid = null, string friendlyName = null, - string status = null, + AccountResource.StatusEnum status = null, ITwilioRestClient client = null) { var options = new UpdateAccountOptions(){PathSid = pathSid, FriendlyName = friendlyName, Status = status}; @@ -379,7 +393,7 @@ public static AccountResource Update(string pathSid = null, /// Task that resolves to A single instance of Account public static async System.Threading.Tasks.Task UpdateAsync(string pathSid = null, string friendlyName = null, - string status = null, + AccountResource.StatusEnum status = null, ITwilioRestClient client = null) { var options = new UpdateAccountOptions(){PathSid = pathSid, FriendlyName = friendlyName, Status = status}; @@ -439,7 +453,8 @@ public static AccountResource FromJson(string json) /// The status of this account /// [JsonProperty("status")] - public string Status { get; private set; } + [JsonConverter(typeof(StringEnumConverter))] + public AccountResource.StatusEnum Status { get; private set; } /// /// Account Instance Subresources /// diff --git a/src/Twilio/Rest/Chat/V1/CredentialOptions.cs b/src/Twilio/Rest/Chat/V1/CredentialOptions.cs index a91625db3..d05180835 100644 --- a/src/Twilio/Rest/Chat/V1/CredentialOptions.cs +++ b/src/Twilio/Rest/Chat/V1/CredentialOptions.cs @@ -37,27 +37,27 @@ public override List> GetParams() public class CreateCredentialOptions : IOptions { /// - /// The type + /// Credential type, one of "gcm" or "apn" /// public CredentialResource.PushServiceEnum Type { get; } /// - /// The friendly_name + /// Friendly name for stored credential /// public string FriendlyName { get; set; } /// - /// The certificate + /// [APN only] URL encoded representation of the certificate, e. /// public string Certificate { get; set; } /// - /// The private_key + /// [APN only] URL encoded representation of the private key, e. /// public string PrivateKey { get; set; } /// - /// The sandbox + /// [APN only] use this credential for sending to production or sandbox APNs /// public bool? Sandbox { get; set; } /// - /// The api_key + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM Service application credential /// public string ApiKey { get; set; } /// @@ -68,7 +68,7 @@ public class CreateCredentialOptions : IOptions /// /// Construct a new CreateCredentialOptions /// - /// The type + /// Credential type, one of "gcm" or "apn" public CreateCredentialOptions(CredentialResource.PushServiceEnum type) { Type = type; @@ -158,23 +158,23 @@ public class UpdateCredentialOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// Friendly name for stored credential /// public string FriendlyName { get; set; } /// - /// The certificate + /// [APN only] URL encoded representation of the certificate, e. /// public string Certificate { get; set; } /// - /// The private_key + /// [APN only] URL encoded representation of the private key, e. /// public string PrivateKey { get; set; } /// - /// The sandbox + /// [APN only] use this credential for sending to production or sandbox APNs /// public bool? Sandbox { get; set; } /// - /// The api_key + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM Service application credential /// public string ApiKey { get; set; } /// diff --git a/src/Twilio/Rest/Chat/V1/CredentialResource.cs b/src/Twilio/Rest/Chat/V1/CredentialResource.cs index c0184bc42..8d468f7de 100644 --- a/src/Twilio/Rest/Chat/V1/CredentialResource.cs +++ b/src/Twilio/Rest/Chat/V1/CredentialResource.cs @@ -213,12 +213,13 @@ public static async System.Threading.Tasks.Task CreateAsync( /// /// create /// - /// The type - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key + /// Credential type, one of "gcm" or "apn" + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential /// The secret /// Client to make requests to Twilio /// A single instance of Credential @@ -239,12 +240,13 @@ public static CredentialResource Create(CredentialResource.PushServiceEnum type, /// /// create /// - /// The type - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key + /// Credential type, one of "gcm" or "apn" + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential /// The secret /// Client to make requests to Twilio /// Task that resolves to A single instance of Credential @@ -373,11 +375,12 @@ public static async System.Threading.Tasks.Task UpdateAsync( /// update /// /// The sid - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential /// The secret /// Client to make requests to Twilio /// A single instance of Credential @@ -399,11 +402,12 @@ public static CredentialResource Update(string pathSid, /// update /// /// The sid - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential /// The secret /// Client to make requests to Twilio /// Task that resolves to A single instance of Credential @@ -506,43 +510,43 @@ public static CredentialResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account[/console] responsible for this resource. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this resource. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The type + /// Indicates which push notifications service this credential is for - either gcm or apn /// [JsonProperty("type")] [JsonConverter(typeof(StringEnumConverter))] public CredentialResource.PushServiceEnum Type { get; private set; } /// - /// The sandbox + /// [APN only] true when this resource should use the sandbox APN service. /// [JsonProperty("sandbox")] public string Sandbox { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The url + /// An absolute URL for this credential resource. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/Chat/V1/Service/Channel/InviteOptions.cs b/src/Twilio/Rest/Chat/V1/Service/Channel/InviteOptions.cs index fc9e538d8..26f5a9964 100644 --- a/src/Twilio/Rest/Chat/V1/Service/Channel/InviteOptions.cs +++ b/src/Twilio/Rest/Chat/V1/Service/Channel/InviteOptions.cs @@ -67,11 +67,11 @@ public class CreateInviteOptions : IOptions /// public string PathChannelSid { get; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// public string Identity { get; } /// - /// The role_sid + /// The Role assigned to this member. /// public string RoleSid { get; set; } @@ -80,7 +80,7 @@ public class CreateInviteOptions : IOptions /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. public CreateInviteOptions(string pathServiceSid, string pathChannelSid, string identity) { PathServiceSid = pathServiceSid; @@ -122,7 +122,7 @@ public class ReadInviteOptions : ReadOptions /// public string PathChannelSid { get; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// public List Identity { get; set; } diff --git a/src/Twilio/Rest/Chat/V1/Service/Channel/InviteResource.cs b/src/Twilio/Rest/Chat/V1/Service/Channel/InviteResource.cs index fc608e0ec..7cda91b56 100644 --- a/src/Twilio/Rest/Chat/V1/Service/Channel/InviteResource.cs +++ b/src/Twilio/Rest/Chat/V1/Service/Channel/InviteResource.cs @@ -141,8 +141,8 @@ public static async System.Threading.Tasks.Task CreateAsync(Crea /// /// The service_sid /// The channel_sid - /// The identity - /// The role_sid + /// A unique string identifier for this User in this Service. + /// The Role assigned to this member. /// Client to make requests to Twilio /// A single instance of Invite public static InviteResource Create(string pathServiceSid, @@ -161,8 +161,8 @@ public static InviteResource Create(string pathServiceSid, /// /// The service_sid /// The channel_sid - /// The identity - /// The role_sid + /// A unique string identifier for this User in this Service. + /// The Role assigned to this member. /// Client to make requests to Twilio /// Task that resolves to A single instance of Invite public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -225,7 +225,7 @@ public static async System.Threading.Tasks.Task> Rea /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. /// Page size /// Record limit /// Client to make requests to Twilio @@ -247,7 +247,7 @@ public static ResourceSet Read(string pathServiceSid, /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. /// Page size /// Record limit /// Client to make requests to Twilio @@ -418,42 +418,42 @@ public static InviteResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account[/console] responsible for this member. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The channel_sid + /// The unique id of the Channel for this member. /// [JsonProperty("channel_sid")] public string ChannelSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this member belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// [JsonProperty("identity")] public string Identity { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The role_sid + /// The Role assigned to this member. /// [JsonProperty("role_sid")] public string RoleSid { get; private set; } @@ -463,7 +463,7 @@ public static InviteResource FromJson(string json) [JsonProperty("created_by")] public string CreatedBy { get; private set; } /// - /// The url + /// An absolute URL for this member. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/Chat/V1/Service/Channel/MemberOptions.cs b/src/Twilio/Rest/Chat/V1/Service/Channel/MemberOptions.cs index 91093b54f..28efb2bcc 100644 --- a/src/Twilio/Rest/Chat/V1/Service/Channel/MemberOptions.cs +++ b/src/Twilio/Rest/Chat/V1/Service/Channel/MemberOptions.cs @@ -67,11 +67,11 @@ public class CreateMemberOptions : IOptions /// public string PathChannelSid { get; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// public string Identity { get; } /// - /// The role_sid + /// The Role assigned to this member. /// public string RoleSid { get; set; } @@ -80,7 +80,7 @@ public class CreateMemberOptions : IOptions /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. public CreateMemberOptions(string pathServiceSid, string pathChannelSid, string identity) { PathServiceSid = pathServiceSid; @@ -122,7 +122,7 @@ public class ReadMemberOptions : ReadOptions /// public string PathChannelSid { get; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// public List Identity { get; set; } @@ -217,11 +217,11 @@ public class UpdateMemberOptions : IOptions /// public string PathSid { get; } /// - /// The role_sid + /// The Role assigned to this member. /// public string RoleSid { get; set; } /// - /// The last_consumed_message_index + /// An Integer representing index of the last Message this Member has read within this Channel /// public int? LastConsumedMessageIndex { get; set; } diff --git a/src/Twilio/Rest/Chat/V1/Service/Channel/MemberResource.cs b/src/Twilio/Rest/Chat/V1/Service/Channel/MemberResource.cs index 880df317c..8cda311bb 100644 --- a/src/Twilio/Rest/Chat/V1/Service/Channel/MemberResource.cs +++ b/src/Twilio/Rest/Chat/V1/Service/Channel/MemberResource.cs @@ -141,8 +141,8 @@ public static async System.Threading.Tasks.Task CreateAsync(Crea /// /// The service_sid /// The channel_sid - /// The identity - /// The role_sid + /// A unique string identifier for this User in this Service. + /// The Role assigned to this member. /// Client to make requests to Twilio /// A single instance of Member public static MemberResource Create(string pathServiceSid, @@ -161,8 +161,8 @@ public static MemberResource Create(string pathServiceSid, /// /// The service_sid /// The channel_sid - /// The identity - /// The role_sid + /// A unique string identifier for this User in this Service. + /// The Role assigned to this member. /// Client to make requests to Twilio /// Task that resolves to A single instance of Member public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -225,7 +225,7 @@ public static async System.Threading.Tasks.Task> Rea /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. /// Page size /// Record limit /// Client to make requests to Twilio @@ -247,7 +247,7 @@ public static ResourceSet Read(string pathServiceSid, /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. /// Page size /// Record limit /// Client to make requests to Twilio @@ -445,8 +445,9 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upda /// The service_sid /// The channel_sid /// The sid - /// The role_sid - /// The last_consumed_message_index + /// The Role assigned to this member. + /// An Integer representing index of the last Message this Member has read + /// within this Channel /// Client to make requests to Twilio /// A single instance of Member public static MemberResource Update(string pathServiceSid, @@ -467,8 +468,9 @@ public static MemberResource Update(string pathServiceSid, /// The service_sid /// The channel_sid /// The sid - /// The role_sid - /// The last_consumed_message_index + /// The Role assigned to this member. + /// An Integer representing index of the last Message this Member has read + /// within this Channel /// Client to make requests to Twilio /// Task that resolves to A single instance of Member public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -502,57 +504,57 @@ public static MemberResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this member. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The channel_sid + /// The unique id of the Channel for this member. /// [JsonProperty("channel_sid")] public string ChannelSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this member belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// [JsonProperty("identity")] public string Identity { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The role_sid + /// The Role assigned to this member. /// [JsonProperty("role_sid")] public string RoleSid { get; private set; } /// - /// The last_consumed_message_index + /// An Integer representing index of the last Message this Member has read within this Channel /// [JsonProperty("last_consumed_message_index")] public int? LastConsumedMessageIndex { get; private set; } /// - /// The last_consumption_timestamp + /// An ISO8601 based timestamp string representing the datetime of the last Message read event for this Member within this Channel /// [JsonProperty("last_consumption_timestamp")] public DateTime? LastConsumptionTimestamp { get; private set; } /// - /// The url + /// An absolute URL for this member. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/Chat/V1/Service/Channel/MessageOptions.cs b/src/Twilio/Rest/Chat/V1/Service/Channel/MessageOptions.cs index d3b1dc632..45f94004b 100644 --- a/src/Twilio/Rest/Chat/V1/Service/Channel/MessageOptions.cs +++ b/src/Twilio/Rest/Chat/V1/Service/Channel/MessageOptions.cs @@ -224,11 +224,11 @@ public class UpdateMessageOptions : IOptions /// public string PathSid { get; } /// - /// The body + /// The new message body string. /// public string Body { get; set; } /// - /// The attributes + /// The new attributes metadata field you can use to store any data you wish. /// public string Attributes { get; set; } diff --git a/src/Twilio/Rest/Chat/V1/Service/Channel/MessageResource.cs b/src/Twilio/Rest/Chat/V1/Service/Channel/MessageResource.cs index 523433e43..c9ae9328a 100644 --- a/src/Twilio/Rest/Chat/V1/Service/Channel/MessageResource.cs +++ b/src/Twilio/Rest/Chat/V1/Service/Channel/MessageResource.cs @@ -463,8 +463,8 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// The service_sid /// The channel_sid /// The sid - /// The body - /// The attributes + /// The new message body string. + /// The new attributes metadata field you can use to store any data you wish. /// Client to make requests to Twilio /// A single instance of Message public static MessageResource Update(string pathServiceSid, @@ -485,8 +485,8 @@ public static MessageResource Update(string pathServiceSid, /// The service_sid /// The channel_sid /// The sid - /// The body - /// The attributes + /// The new message body string. + /// The new attributes metadata field you can use to store any data you wish. /// Client to make requests to Twilio /// Task that resolves to A single instance of Message public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -520,27 +520,27 @@ public static MessageResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this message. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The attributes + /// An optional string metadata field you can use to store any data you wish. /// [JsonProperty("attributes")] public string Attributes { get; private set; } /// - /// The service_sid + /// The unique id of the Service this message belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The to + /// The unique id of the Channel this message was sent to. /// [JsonProperty("to")] public string To { get; private set; } @@ -550,37 +550,37 @@ public static MessageResource FromJson(string json) [JsonProperty("channel_sid")] public string ChannelSid { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The was_edited + /// true if the message has been updated since it was created. /// [JsonProperty("was_edited")] public bool? WasEdited { get; private set; } /// - /// The from + /// The identity of the message's author. /// [JsonProperty("from")] public string From { get; private set; } /// - /// The body + /// The contents of the message. /// [JsonProperty("body")] public string Body { get; private set; } /// - /// The index + /// The index of the message within the Channel /// [JsonProperty("index")] public int? Index { get; private set; } /// - /// The url + /// An absolute URL for this message. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/Chat/V1/Service/ChannelOptions.cs b/src/Twilio/Rest/Chat/V1/Service/ChannelOptions.cs index dbb30020d..ae15824b4 100644 --- a/src/Twilio/Rest/Chat/V1/Service/ChannelOptions.cs +++ b/src/Twilio/Rest/Chat/V1/Service/ChannelOptions.cs @@ -92,19 +92,19 @@ public class CreateChannelOptions : IOptions /// public string PathServiceSid { get; } /// - /// The friendly_name + /// A human-readable name for the Channel. /// public string FriendlyName { get; set; } /// - /// The unique_name + /// A unique, addressable name for the Channel. /// public string UniqueName { get; set; } /// - /// The attributes + /// An optional metadata field you can use to store any data you wish. /// public string Attributes { get; set; } /// - /// The type + /// The visibility of the channel - public or private. /// public ChannelResource.ChannelTypeEnum Type { get; set; } @@ -205,15 +205,15 @@ public class UpdateChannelOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// A human-readable name for the Channel. /// public string FriendlyName { get; set; } /// - /// The unique_name + /// A unique, addressable name for the Channel. /// public string UniqueName { get; set; } /// - /// The attributes + /// An optional metadata field you can use to store any data you wish. /// public string Attributes { get; set; } diff --git a/src/Twilio/Rest/Chat/V1/Service/ChannelResource.cs b/src/Twilio/Rest/Chat/V1/Service/ChannelResource.cs index 7cdae85c2..e674ca4bd 100644 --- a/src/Twilio/Rest/Chat/V1/Service/ChannelResource.cs +++ b/src/Twilio/Rest/Chat/V1/Service/ChannelResource.cs @@ -218,10 +218,10 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre /// create /// /// The service_sid - /// The friendly_name - /// The unique_name - /// The attributes - /// The type + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. + /// The visibility of the channel - public or private. /// Client to make requests to Twilio /// A single instance of Channel public static ChannelResource Create(string pathServiceSid, @@ -240,10 +240,10 @@ public static ChannelResource Create(string pathServiceSid, /// create /// /// The service_sid - /// The friendly_name - /// The unique_name - /// The attributes - /// The type + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. + /// The visibility of the channel - public or private. /// Client to make requests to Twilio /// Task that resolves to A single instance of Channel public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -446,9 +446,9 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// /// The service_sid /// The sid - /// The friendly_name - /// The unique_name - /// The attributes + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. /// Client to make requests to Twilio /// A single instance of Channel public static ChannelResource Update(string pathServiceSid, @@ -468,9 +468,9 @@ public static ChannelResource Update(string pathServiceSid, /// /// The service_sid /// The sid - /// The friendly_name - /// The unique_name - /// The attributes + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. /// Client to make requests to Twilio /// Task that resolves to A single instance of Channel public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -504,53 +504,53 @@ public static ChannelResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the [Account][/console] responsible for this channel. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The service_sid + /// The unique id of the [Service][service] this channel belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this channel. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The unique_name + /// The unique, addressable name of this channel. /// [JsonProperty("unique_name")] public string UniqueName { get; private set; } /// - /// The attributes + /// An optional string metadata field you can use to store any data you wish. /// [JsonProperty("attributes")] public string Attributes { get; private set; } /// - /// The type + /// The visibility of this channel - either public or private /// [JsonProperty("type")] [JsonConverter(typeof(StringEnumConverter))] public ChannelResource.ChannelTypeEnum Type { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The created_by + /// Identity of the channel's creator. /// [JsonProperty("created_by")] public string CreatedBy { get; private set; } @@ -565,12 +565,12 @@ public static ChannelResource FromJson(string json) [JsonProperty("messages_count")] public int? MessagesCount { get; private set; } /// - /// The url + /// An absolute URL for this channel. /// [JsonProperty("url")] public Uri Url { get; private set; } /// - /// The links + /// Absolute URLs to access the [Members][members] and [Messages][messages] for this channel. /// [JsonProperty("links")] public Dictionary Links { get; private set; } diff --git a/src/Twilio/Rest/Chat/V1/Service/RoleOptions.cs b/src/Twilio/Rest/Chat/V1/Service/RoleOptions.cs index 95539c099..e05a0653d 100644 --- a/src/Twilio/Rest/Chat/V1/Service/RoleOptions.cs +++ b/src/Twilio/Rest/Chat/V1/Service/RoleOptions.cs @@ -92,15 +92,15 @@ public class CreateRoleOptions : IOptions /// public string PathServiceSid { get; } /// - /// The friendly_name + /// The human-readable name of this role. /// public string FriendlyName { get; } /// - /// The type + /// What kind of role this is. /// public RoleResource.RoleTypeEnum Type { get; } /// - /// The permission + /// A permission this role should have. /// public List Permission { get; } @@ -108,9 +108,9 @@ public class CreateRoleOptions : IOptions /// Construct a new CreateRoleOptions /// /// The service_sid - /// The friendly_name - /// The type - /// The permission + /// The human-readable name of this role. + /// What kind of role this is. + /// A permission this role should have. public CreateRoleOptions(string pathServiceSid, string friendlyName, RoleResource.RoleTypeEnum type, @@ -195,7 +195,7 @@ public class UpdateRoleOptions : IOptions /// public string PathSid { get; } /// - /// The permission + /// A permission this role should have. /// public List Permission { get; } @@ -204,7 +204,7 @@ public class UpdateRoleOptions : IOptions /// /// The service_sid /// The sid - /// The permission + /// A permission this role should have. public UpdateRoleOptions(string pathServiceSid, string pathSid, List permission) { PathServiceSid = pathServiceSid; diff --git a/src/Twilio/Rest/Chat/V1/Service/RoleResource.cs b/src/Twilio/Rest/Chat/V1/Service/RoleResource.cs index cf752514e..88bbfb7cc 100644 --- a/src/Twilio/Rest/Chat/V1/Service/RoleResource.cs +++ b/src/Twilio/Rest/Chat/V1/Service/RoleResource.cs @@ -218,9 +218,9 @@ public static async System.Threading.Tasks.Task CreateAsync(Create /// create /// /// The service_sid - /// The friendly_name - /// The type - /// The permission + /// The human-readable name of this role. + /// What kind of role this is. + /// A permission this role should have. /// Client to make requests to Twilio /// A single instance of Role public static RoleResource Create(string pathServiceSid, @@ -238,9 +238,9 @@ public static RoleResource Create(string pathServiceSid, /// create /// /// The service_sid - /// The friendly_name - /// The type - /// The permission + /// The human-readable name of this role. + /// What kind of role this is. + /// A permission this role should have. /// Client to make requests to Twilio /// Task that resolves to A single instance of Role public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -438,7 +438,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(Update /// /// The service_sid /// The sid - /// The permission + /// A permission this role should have. /// Client to make requests to Twilio /// A single instance of Role public static RoleResource Update(string pathServiceSid, @@ -456,7 +456,7 @@ public static RoleResource Update(string pathServiceSid, /// /// The service_sid /// The sid - /// The permission + /// A permission this role should have. /// Client to make requests to Twilio /// Task that resolves to A single instance of Role public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -488,48 +488,48 @@ public static RoleResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this role. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this role belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this role. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The type + /// What kind of role this is. /// [JsonProperty("type")] [JsonConverter(typeof(StringEnumConverter))] public RoleResource.RoleTypeEnum Type { get; private set; } /// - /// The permissions + /// A JSON array of the permissions this role has. /// [JsonProperty("permissions")] public List Permissions { get; private set; } /// - /// The date_created + /// The date that this resource was created in ISO 8601 format. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated in ISO 8601 format. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The url + /// An absolute URL for this role. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/Chat/V1/Service/UserOptions.cs b/src/Twilio/Rest/Chat/V1/Service/UserOptions.cs index 874638f49..839309921 100644 --- a/src/Twilio/Rest/Chat/V1/Service/UserOptions.cs +++ b/src/Twilio/Rest/Chat/V1/Service/UserOptions.cs @@ -91,19 +91,19 @@ public class CreateUserOptions : IOptions /// public string PathServiceSid { get; } /// - /// The identity + /// A unique string that identifies the user within this service - often a username or email address. /// public string Identity { get; } /// - /// The role_sid + /// The unique id of the Role assigned to this user. /// public string RoleSid { get; set; } /// - /// The attributes + /// An optional string used to contain any metadata or other information for the User. /// public string Attributes { get; set; } /// - /// The friendly_name + /// An optional human readable string representing the user. /// public string FriendlyName { get; set; } @@ -111,7 +111,8 @@ public class CreateUserOptions : IOptions /// Construct a new CreateUserOptions /// /// The service_sid - /// The identity + /// A unique string that identifies the user within this service - often a username or email + /// address. public CreateUserOptions(string pathServiceSid, string identity) { PathServiceSid = pathServiceSid; @@ -196,15 +197,15 @@ public class UpdateUserOptions : IOptions /// public string PathSid { get; } /// - /// The role_sid + /// The unique id of the [Role][role] assigned to this user. /// public string RoleSid { get; set; } /// - /// The attributes + /// An optional string used to contain any metadata or other information for the User. /// public string Attributes { get; set; } /// - /// The friendly_name + /// An optional human readable string representing the user. /// public string FriendlyName { get; set; } diff --git a/src/Twilio/Rest/Chat/V1/Service/UserResource.cs b/src/Twilio/Rest/Chat/V1/Service/UserResource.cs index 19356507a..9d6c6b2c4 100644 --- a/src/Twilio/Rest/Chat/V1/Service/UserResource.cs +++ b/src/Twilio/Rest/Chat/V1/Service/UserResource.cs @@ -204,10 +204,12 @@ public static async System.Threading.Tasks.Task CreateAsync(Create /// create /// /// The service_sid - /// The identity - /// The role_sid - /// The attributes - /// The friendly_name + /// A unique string that identifies the user within this service - often a username or email + /// address. + /// The unique id of the Role assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// A single instance of User public static UserResource Create(string pathServiceSid, @@ -226,10 +228,12 @@ public static UserResource Create(string pathServiceSid, /// create /// /// The service_sid - /// The identity - /// The role_sid - /// The attributes - /// The friendly_name + /// A unique string that identifies the user within this service - often a username or email + /// address. + /// The unique id of the Role assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// Task that resolves to A single instance of User public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -428,9 +432,10 @@ public static async System.Threading.Tasks.Task UpdateAsync(Update /// /// The service_sid /// The sid - /// The role_sid - /// The attributes - /// The friendly_name + /// The unique id of the [Role][role] assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// A single instance of User public static UserResource Update(string pathServiceSid, @@ -450,9 +455,10 @@ public static UserResource Update(string pathServiceSid, /// /// The service_sid /// The sid - /// The role_sid - /// The attributes - /// The friendly_name + /// The unique id of the [Role][role] assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// Task that resolves to A single instance of User public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -486,57 +492,57 @@ public static UserResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this user. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this user belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The attributes + /// An optional string metadata field you can use to store any data you wish. /// [JsonProperty("attributes")] public string Attributes { get; private set; } /// - /// The friendly_name + /// The human-readable name of this user. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The role_sid + /// The unique id of the [Role][role] assigned to this user. /// [JsonProperty("role_sid")] public string RoleSid { get; private set; } /// - /// The identity + /// A unique string that identifies the user within this service - often a username or email address. /// [JsonProperty("identity")] public string Identity { get; private set; } /// - /// The is_online + /// Indicates whether the User is actively connected to the Service instance and online. /// [JsonProperty("is_online")] public bool? IsOnline { get; private set; } /// - /// The is_notifiable + /// Indicates whether the User has a potentially valid Push Notification registration for the Service instance. /// [JsonProperty("is_notifiable")] public bool? IsNotifiable { get; private set; } /// - /// The date_created + /// The date that this resource was created in ISO 8601 format. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated in ISO 8601 format. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } @@ -551,7 +557,7 @@ public static UserResource FromJson(string json) [JsonProperty("links")] public Dictionary Links { get; private set; } /// - /// The url + /// An absolute URL for this user. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/Chat/V1/ServiceOptions.cs b/src/Twilio/Rest/Chat/V1/ServiceOptions.cs index 2eca82618..53e4026be 100644 --- a/src/Twilio/Rest/Chat/V1/ServiceOptions.cs +++ b/src/Twilio/Rest/Chat/V1/ServiceOptions.cs @@ -76,14 +76,14 @@ public List> GetParams() public class CreateServiceOptions : IOptions { /// - /// The friendly_name + /// Human-readable name for this service instance /// public string FriendlyName { get; } /// /// Construct a new CreateServiceOptions /// - /// The friendly_name + /// Human-readable name for this service instance public CreateServiceOptions(string friendlyName) { FriendlyName = friendlyName; @@ -134,7 +134,7 @@ public class UpdateServiceOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// Human-readable name for this service instance /// public string FriendlyName { get; set; } /// @@ -142,27 +142,27 @@ public class UpdateServiceOptions : IOptions /// public string DefaultServiceRoleSid { get; set; } /// - /// The default_channel_role_sid + /// Channel role assigned on channel join /// public string DefaultChannelRoleSid { get; set; } /// - /// The default_channel_creator_role_sid + /// Channel role assigned to creator of channel when joining for first time /// public string DefaultChannelCreatorRoleSid { get; set; } /// - /// The read_status_enabled + /// true if the member read status feature is enabled, false if not. /// public bool? ReadStatusEnabled { get; set; } /// - /// The reachability_enabled + /// true if the reachability feature should be enabled. /// public bool? ReachabilityEnabled { get; set; } /// - /// The typing_indicator_timeout + /// ISO 8601 duration indicating the timeout after "started typing" event when client should assume that user is not typing anymore even if no "ended typing" message received /// public int? TypingIndicatorTimeout { get; set; } /// - /// The consumption_report_interval + /// ISO 8601 duration indicating the interval between consumption reports sent from client endpoints. /// public int? ConsumptionReportInterval { get; set; } /// @@ -198,19 +198,19 @@ public class UpdateServiceOptions : IOptions /// public string NotificationsInvitedToChannelTemplate { get; set; } /// - /// The pre_webhook_url + /// The webhook URL for PRE-Event webhooks. /// public Uri PreWebhookUrl { get; set; } /// - /// The post_webhook_url + /// The webhook URL for POST-Event webhooks. /// public Uri PostWebhookUrl { get; set; } /// - /// The webhook_method + /// The webhook request format to use. /// public Twilio.Http.HttpMethod WebhookMethod { get; set; } /// - /// The webhook_filters + /// The list of WebHook events that are enabled for this Service instance. /// public List WebhookFilters { get; set; } /// diff --git a/src/Twilio/Rest/Chat/V1/ServiceResource.cs b/src/Twilio/Rest/Chat/V1/ServiceResource.cs index f9904d703..78004dccb 100644 --- a/src/Twilio/Rest/Chat/V1/ServiceResource.cs +++ b/src/Twilio/Rest/Chat/V1/ServiceResource.cs @@ -196,7 +196,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre /// /// create /// - /// The friendly_name + /// Human-readable name for this service instance /// Client to make requests to Twilio /// A single instance of Service public static ServiceResource Create(string friendlyName, ITwilioRestClient client = null) @@ -209,7 +209,7 @@ public static ServiceResource Create(string friendlyName, ITwilioRestClient clie /// /// create /// - /// The friendly_name + /// Human-readable name for this service instance /// Client to make requests to Twilio /// Task that resolves to A single instance of Service public static async System.Threading.Tasks.Task CreateAsync(string friendlyName, @@ -399,14 +399,18 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// update /// /// The sid - /// The friendly_name + /// Human-readable name for this service instance /// The default_service_role_sid - /// The default_channel_role_sid - /// The default_channel_creator_role_sid - /// The read_status_enabled - /// The reachability_enabled - /// The typing_indicator_timeout - /// The consumption_report_interval + /// Channel role assigned on channel join + /// Channel role assigned to creator of channel when joining for first time + /// + /// true if the member read status feature is enabled, false if not. + /// true if the reachability feature should be enabled. + /// ISO 8601 duration indicating the timeout after "started typing" event when + /// client should assume that user is not typing anymore even if no "ended typing" message + /// received + /// ISO 8601 duration indicating the interval between consumption reports sent + /// from client endpoints. /// The notifications.new_message.enabled /// The notifications.new_message.template /// The notifications.added_to_channel.enabled @@ -415,10 +419,10 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// The notifications.removed_from_channel.template /// The notifications.invited_to_channel.enabled /// The notifications.invited_to_channel.template - /// The pre_webhook_url - /// The post_webhook_url - /// The webhook_method - /// The webhook_filters + /// The webhook URL for PRE-Event webhooks. + /// The webhook URL for POST-Event webhooks. + /// The webhook request format to use. + /// The list of WebHook events that are enabled for this Service instance. /// The webhooks.on_message_send.url /// The webhooks.on_message_send.method /// The webhooks.on_message_send.format @@ -553,14 +557,18 @@ public static ServiceResource Update(string pathSid, /// update /// /// The sid - /// The friendly_name + /// Human-readable name for this service instance /// The default_service_role_sid - /// The default_channel_role_sid - /// The default_channel_creator_role_sid - /// The read_status_enabled - /// The reachability_enabled - /// The typing_indicator_timeout - /// The consumption_report_interval + /// Channel role assigned on channel join + /// Channel role assigned to creator of channel when joining for first time + /// + /// true if the member read status feature is enabled, false if not. + /// true if the reachability feature should be enabled. + /// ISO 8601 duration indicating the timeout after "started typing" event when + /// client should assume that user is not typing anymore even if no "ended typing" message + /// received + /// ISO 8601 duration indicating the interval between consumption reports sent + /// from client endpoints. /// The notifications.new_message.enabled /// The notifications.new_message.template /// The notifications.added_to_channel.enabled @@ -569,10 +577,10 @@ public static ServiceResource Update(string pathSid, /// The notifications.removed_from_channel.template /// The notifications.invited_to_channel.enabled /// The notifications.invited_to_channel.template - /// The pre_webhook_url - /// The post_webhook_url - /// The webhook_method - /// The webhook_filters + /// The webhook URL for PRE-Event webhooks. + /// The webhook URL for POST-Event webhooks. + /// The webhook request format to use. + /// The list of WebHook events that are enabled for this Service instance. /// The webhooks.on_message_send.url /// The webhooks.on_message_send.method /// The webhooks.on_message_send.format @@ -722,62 +730,62 @@ public static ServiceResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this service. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this service. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The date_created + /// The date that this resource was created /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The default_service_role_sid + /// The service role assigned to users when they are added to the service. /// [JsonProperty("default_service_role_sid")] public string DefaultServiceRoleSid { get; private set; } /// - /// The default_channel_role_sid + /// The channel role assigned to users when they are added to a channel. /// [JsonProperty("default_channel_role_sid")] public string DefaultChannelRoleSid { get; private set; } /// - /// The default_channel_creator_role_sid + /// The channel role assigned to a channel creator when joining a new channel. /// [JsonProperty("default_channel_creator_role_sid")] public string DefaultChannelCreatorRoleSid { get; private set; } /// - /// The read_status_enabled + /// Enable the Message Constumption Horizon feature. /// [JsonProperty("read_status_enabled")] public bool? ReadStatusEnabled { get; private set; } /// - /// The reachability_enabled + /// Indicates whether the the Reachability feature is enabled for this Service instance. /// [JsonProperty("reachability_enabled")] public bool? ReachabilityEnabled { get; private set; } /// - /// The typing_indicator_timeout + /// The amount of time after a "started typing" event when clients should assume that user is no longer typing, even if no "ended typing" message was received. /// [JsonProperty("typing_indicator_timeout")] public int? TypingIndicatorTimeout { get; private set; } /// - /// The consumption_report_interval + /// The interval between consumption reports submission batches from client endpoints. /// [JsonProperty("consumption_report_interval")] public int? ConsumptionReportInterval { get; private set; } @@ -792,37 +800,37 @@ public static ServiceResource FromJson(string json) [JsonProperty("webhooks")] public object Webhooks { get; private set; } /// - /// The pre_webhook_url + /// The webhook URL for PRE-Event webhooks. /// [JsonProperty("pre_webhook_url")] public string PreWebhookUrl { get; private set; } /// - /// The post_webhook_url + /// The webhook URL for POST-Event webhooks. /// [JsonProperty("post_webhook_url")] public string PostWebhookUrl { get; private set; } /// - /// The webhook_method + /// The webhook request format to use. /// [JsonProperty("webhook_method")] public string WebhookMethod { get; private set; } /// - /// The webhook_filters + /// The list of WebHook events that are enabled for this Service instance. /// [JsonProperty("webhook_filters")] public List WebhookFilters { get; private set; } /// - /// The notifications + /// Notification configuration for the Service instance. /// [JsonProperty("notifications")] public object Notifications { get; private set; } /// - /// The url + /// An absolute URL for this service. /// [JsonProperty("url")] public Uri Url { get; private set; } /// - /// The links + /// URLs to access the Channels, Roles, and Users for this service. /// [JsonProperty("links")] public Dictionary Links { get; private set; } diff --git a/src/Twilio/Rest/Chat/V2/CredentialOptions.cs b/src/Twilio/Rest/Chat/V2/CredentialOptions.cs index b01a3a1a1..b3e3a79db 100644 --- a/src/Twilio/Rest/Chat/V2/CredentialOptions.cs +++ b/src/Twilio/Rest/Chat/V2/CredentialOptions.cs @@ -37,38 +37,38 @@ public override List> GetParams() public class CreateCredentialOptions : IOptions { /// - /// The type + /// Credential type, one of "gcm", "fcm", or "apn" /// public CredentialResource.PushServiceEnum Type { get; } /// - /// The friendly_name + /// Friendly name for stored credential /// public string FriendlyName { get; set; } /// - /// The certificate + /// [APN only] URL encoded representation of the certificate, e. /// public string Certificate { get; set; } /// - /// The private_key + /// [APN only] URL encoded representation of the private key, e. /// public string PrivateKey { get; set; } /// - /// The sandbox + /// [APN only] use this credential for sending to production or sandbox APNs /// public bool? Sandbox { get; set; } /// - /// The api_key + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM Service application credential /// public string ApiKey { get; set; } /// - /// The secret + /// [FCM only] This is the "Server key" of your project from Firebase console under Settings / Cloud messaging. /// public string Secret { get; set; } /// /// Construct a new CreateCredentialOptions /// - /// The type + /// Credential type, one of "gcm", "fcm", or "apn" public CreateCredentialOptions(CredentialResource.PushServiceEnum type) { Type = type; @@ -158,27 +158,27 @@ public class UpdateCredentialOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// Friendly name for stored credential /// public string FriendlyName { get; set; } /// - /// The certificate + /// [APN only] URL encoded representation of the certificate, e. /// public string Certificate { get; set; } /// - /// The private_key + /// [APN only] URL encoded representation of the private key, e. /// public string PrivateKey { get; set; } /// - /// The sandbox + /// [APN only] use this credential for sending to production or sandbox APNs /// public bool? Sandbox { get; set; } /// - /// The api_key + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM Service application credential /// public string ApiKey { get; set; } /// - /// The secret + /// [FCM only] This is the "Server key" of your project from Firebase console under Settings / Cloud messaging. /// public string Secret { get; set; } diff --git a/src/Twilio/Rest/Chat/V2/CredentialResource.cs b/src/Twilio/Rest/Chat/V2/CredentialResource.cs index 6a28dab5f..4a76c2b78 100644 --- a/src/Twilio/Rest/Chat/V2/CredentialResource.cs +++ b/src/Twilio/Rest/Chat/V2/CredentialResource.cs @@ -213,13 +213,15 @@ public static async System.Threading.Tasks.Task CreateAsync( /// /// create /// - /// The type - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key - /// The secret + /// Credential type, one of "gcm", "fcm", or "apn" + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential + /// [FCM only] This is the "Server key" of your project from Firebase console under Settings / + /// Cloud messaging. /// Client to make requests to Twilio /// A single instance of Credential public static CredentialResource Create(CredentialResource.PushServiceEnum type, @@ -239,13 +241,15 @@ public static CredentialResource Create(CredentialResource.PushServiceEnum type, /// /// create /// - /// The type - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key - /// The secret + /// Credential type, one of "gcm", "fcm", or "apn" + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential + /// [FCM only] This is the "Server key" of your project from Firebase console under Settings / + /// Cloud messaging. /// Client to make requests to Twilio /// Task that resolves to A single instance of Credential public static async System.Threading.Tasks.Task CreateAsync(CredentialResource.PushServiceEnum type, @@ -373,12 +377,14 @@ public static async System.Threading.Tasks.Task UpdateAsync( /// update /// /// The sid - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key - /// The secret + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential + /// [FCM only] This is the "Server key" of your project from Firebase console under Settings / + /// Cloud messaging. /// Client to make requests to Twilio /// A single instance of Credential public static CredentialResource Update(string pathSid, @@ -399,12 +405,14 @@ public static CredentialResource Update(string pathSid, /// update /// /// The sid - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key - /// The secret + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential + /// [FCM only] This is the "Server key" of your project from Firebase console under Settings / + /// Cloud messaging. /// Client to make requests to Twilio /// Task that resolves to A single instance of Credential public static async System.Threading.Tasks.Task UpdateAsync(string pathSid, @@ -506,43 +514,43 @@ public static CredentialResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this resource. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this resource. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The type + /// Indicates which push notifications service this credential is for - either gcm, fcm, or apn /// [JsonProperty("type")] [JsonConverter(typeof(StringEnumConverter))] public CredentialResource.PushServiceEnum Type { get; private set; } /// - /// The sandbox + /// [APN only] true when this resource should use the sandbox APN service. /// [JsonProperty("sandbox")] public string Sandbox { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The url + /// An absolute URL for this credential resource. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/InviteOptions.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/InviteOptions.cs index 03cf2e9be..552690592 100644 --- a/src/Twilio/Rest/Chat/V2/Service/Channel/InviteOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/InviteOptions.cs @@ -67,11 +67,11 @@ public class CreateInviteOptions : IOptions /// public string PathChannelSid { get; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// public string Identity { get; } /// - /// The role_sid + /// The Role assigned to this member. /// public string RoleSid { get; set; } @@ -80,7 +80,7 @@ public class CreateInviteOptions : IOptions /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. public CreateInviteOptions(string pathServiceSid, string pathChannelSid, string identity) { PathServiceSid = pathServiceSid; @@ -122,7 +122,7 @@ public class ReadInviteOptions : ReadOptions /// public string PathChannelSid { get; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// public List Identity { get; set; } diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/InviteResource.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/InviteResource.cs index 453fd6475..12d3be870 100644 --- a/src/Twilio/Rest/Chat/V2/Service/Channel/InviteResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/InviteResource.cs @@ -141,8 +141,8 @@ public static async System.Threading.Tasks.Task CreateAsync(Crea /// /// The service_sid /// The channel_sid - /// The identity - /// The role_sid + /// A unique string identifier for this User in this Service. + /// The Role assigned to this member. /// Client to make requests to Twilio /// A single instance of Invite public static InviteResource Create(string pathServiceSid, @@ -161,8 +161,8 @@ public static InviteResource Create(string pathServiceSid, /// /// The service_sid /// The channel_sid - /// The identity - /// The role_sid + /// A unique string identifier for this User in this Service. + /// The Role assigned to this member. /// Client to make requests to Twilio /// Task that resolves to A single instance of Invite public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -225,7 +225,7 @@ public static async System.Threading.Tasks.Task> Rea /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. /// Page size /// Record limit /// Client to make requests to Twilio @@ -247,7 +247,7 @@ public static ResourceSet Read(string pathServiceSid, /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. /// Page size /// Record limit /// Client to make requests to Twilio @@ -418,42 +418,42 @@ public static InviteResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this member. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The channel_sid + /// The unique id of the Channel for this member. /// [JsonProperty("channel_sid")] public string ChannelSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this member belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// [JsonProperty("identity")] public string Identity { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The role_sid + /// The Role assigned to this member. /// [JsonProperty("role_sid")] public string RoleSid { get; private set; } @@ -463,7 +463,7 @@ public static InviteResource FromJson(string json) [JsonProperty("created_by")] public string CreatedBy { get; private set; } /// - /// The url + /// An absolute URL for this member. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/MemberOptions.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/MemberOptions.cs index 5064bd5f1..88e70530a 100644 --- a/src/Twilio/Rest/Chat/V2/Service/Channel/MemberOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/MemberOptions.cs @@ -253,23 +253,23 @@ public class UpdateMemberOptions : IOptions /// public string PathSid { get; } /// - /// The role_sid + /// The role to be assigned to this member. /// public string RoleSid { get; set; } /// - /// The last_consumed_message_index + /// Optional field used to specify the last consumed Message index for the Channel for this Member. /// public int? LastConsumedMessageIndex { get; set; } /// - /// The last_consumption_timestamp + /// Optional ISO8601 time indicating the last datetime the Member consumed a Message in the Channel. /// public DateTime? LastConsumptionTimestamp { get; set; } /// - /// The date_created + /// The optional ISO8601 time specifying the datetime the Members should be set as being created. /// public DateTime? DateCreated { get; set; } /// - /// The date_updated + /// The optional ISO8601 time specifying the datetime the Member should be set as having been last updated. /// public DateTime? DateUpdated { get; set; } diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/MemberResource.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/MemberResource.cs index 790a39a2c..5d3f8eca4 100644 --- a/src/Twilio/Rest/Chat/V2/Service/Channel/MemberResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/MemberResource.cs @@ -461,11 +461,15 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upda /// The service_sid /// The channel_sid /// The sid - /// The role_sid - /// The last_consumed_message_index - /// The last_consumption_timestamp - /// The date_created - /// The date_updated + /// The role to be assigned to this member. + /// Optional field used to specify the last consumed Message index for the + /// Channel for this Member. + /// Optional ISO8601 time indicating the last datetime the Member consumed a + /// Message in the Channel. + /// The optional ISO8601 time specifying the datetime the Members should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Member should be set as having + /// been last updated. /// Client to make requests to Twilio /// A single instance of Member public static MemberResource Update(string pathServiceSid, @@ -489,11 +493,15 @@ public static MemberResource Update(string pathServiceSid, /// The service_sid /// The channel_sid /// The sid - /// The role_sid - /// The last_consumed_message_index - /// The last_consumption_timestamp - /// The date_created - /// The date_updated + /// The role to be assigned to this member. + /// Optional field used to specify the last consumed Message index for the + /// Channel for this Member. + /// Optional ISO8601 time indicating the last datetime the Member consumed a + /// Message in the Channel. + /// The optional ISO8601 time specifying the datetime the Members should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Member should be set as having + /// been last updated. /// Client to make requests to Twilio /// Task that resolves to A single instance of Member public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -530,57 +538,57 @@ public static MemberResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this member. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The channel_sid + /// The unique id of the Channel for this member. /// [JsonProperty("channel_sid")] public string ChannelSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this member belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// [JsonProperty("identity")] public string Identity { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The role_sid + /// The Role assigned to this member. /// [JsonProperty("role_sid")] public string RoleSid { get; private set; } /// - /// The last_consumed_message_index + /// An Integer representing index of the last Message this Member has read within this Channel /// [JsonProperty("last_consumed_message_index")] public int? LastConsumedMessageIndex { get; private set; } /// - /// The last_consumption_timestamp + /// An ISO8601 based timestamp string representing the datetime of the last Message read event for this Member within this Channel /// [JsonProperty("last_consumption_timestamp")] public DateTime? LastConsumptionTimestamp { get; private set; } /// - /// The url + /// An absolute URL for this member. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/MessageOptions.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/MessageOptions.cs index 6a264e026..1186eb523 100644 --- a/src/Twilio/Rest/Chat/V2/Service/Channel/MessageOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/MessageOptions.cs @@ -164,7 +164,7 @@ public class ReadMessageOptions : ReadOptions /// public string PathChannelSid { get; } /// - /// The order + /// Optional. /// public MessageResource.OrderTypeEnum Order { get; set; } @@ -258,23 +258,23 @@ public class UpdateMessageOptions : IOptions /// public string PathSid { get; } /// - /// The body + /// The optional message body string. /// public string Body { get; set; } /// - /// The attributes + /// The optional attributes metadata field you can use to store any data you wish. /// public string Attributes { get; set; } /// - /// The date_created + /// The optional ISO8601 time specifying the datetime the Message should be set as being created. /// public DateTime? DateCreated { get; set; } /// - /// The date_updated + /// The optional ISO8601 time specifying the datetime the Message should be set as having been last updated. /// public DateTime? DateUpdated { get; set; } /// - /// The last_updated_by + /// Optional field to specify the Identity of the User that last updated the Message /// public string LastUpdatedBy { get; set; } diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/MessageResource.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/MessageResource.cs index d18c7bcd6..69d77a9a8 100644 --- a/src/Twilio/Rest/Chat/V2/Service/Channel/MessageResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/MessageResource.cs @@ -259,7 +259,7 @@ public static async System.Threading.Tasks.Task> Re /// /// The service_sid /// The channel_sid - /// The order + /// Optional. /// Page size /// Record limit /// Client to make requests to Twilio @@ -281,7 +281,7 @@ public static ResourceSet Read(string pathServiceSid, /// /// The service_sid /// The channel_sid - /// The order + /// Optional. /// Page size /// Record limit /// Client to make requests to Twilio @@ -479,11 +479,14 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// The service_sid /// The channel_sid /// The sid - /// The body - /// The attributes - /// The date_created - /// The date_updated - /// The last_updated_by + /// The optional message body string. + /// The optional attributes metadata field you can use to store any data you wish. + /// The optional ISO8601 time specifying the datetime the Message should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Message should be set as having + /// been last updated. + /// Optional field to specify the Identity of the User that last updated the Message + /// /// Client to make requests to Twilio /// A single instance of Message public static MessageResource Update(string pathServiceSid, @@ -507,11 +510,14 @@ public static MessageResource Update(string pathServiceSid, /// The service_sid /// The channel_sid /// The sid - /// The body - /// The attributes - /// The date_created - /// The date_updated - /// The last_updated_by + /// The optional message body string. + /// The optional attributes metadata field you can use to store any data you wish. + /// The optional ISO8601 time specifying the datetime the Message should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Message should be set as having + /// been last updated. + /// Optional field to specify the Identity of the User that last updated the Message + /// /// Client to make requests to Twilio /// Task that resolves to A single instance of Message public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -548,27 +554,27 @@ public static MessageResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this message. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The attributes + /// An optional string metadata field you can use to store any data you wish. /// [JsonProperty("attributes")] public string Attributes { get; private set; } /// - /// The service_sid + /// The unique id of the Service this message belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The to + /// The unique id of the Channel this message was sent to. /// [JsonProperty("to")] public string To { get; private set; } @@ -578,52 +584,52 @@ public static MessageResource FromJson(string json) [JsonProperty("channel_sid")] public string ChannelSid { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The last_updated_by + /// Optional field to specify the Identity of the User that last updated the Message /// [JsonProperty("last_updated_by")] public string LastUpdatedBy { get; private set; } /// - /// The was_edited + /// true if the message has been updated since it was created. /// [JsonProperty("was_edited")] public bool? WasEdited { get; private set; } /// - /// The from + /// The identity of the message's author. /// [JsonProperty("from")] public string From { get; private set; } /// - /// The body + /// Optional — the contents of the message. /// [JsonProperty("body")] public string Body { get; private set; } /// - /// The index + /// The index of the message within the Channel /// [JsonProperty("index")] public int? Index { get; private set; } /// - /// The type + /// Message type. /// [JsonProperty("type")] public string Type { get; private set; } /// - /// The media + /// Optional — if a Media resource instance is attached to the Message, this will contain the Media object for the attached Media. /// [JsonProperty("media")] public object Media { get; private set; } /// - /// The url + /// An absolute URL for this message. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookOptions.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookOptions.cs new file mode 100644 index 000000000..858483911 --- /dev/null +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookOptions.cs @@ -0,0 +1,336 @@ +/// This code was generated by +/// \ / _ _ _| _ _ +/// | (_)\/(_)(_|\/| |(/_ v1.0.0 +/// / / + +using System; +using System.Collections.Generic; +using System.Linq; +using Twilio.Base; +using Twilio.Converters; + +namespace Twilio.Rest.Chat.V2.Service.Channel +{ + + /// + /// ReadWebhookOptions + /// + public class ReadWebhookOptions : ReadOptions + { + /// + /// The service_sid + /// + public string PathServiceSid { get; } + /// + /// The channel_sid + /// + public string PathChannelSid { get; } + + /// + /// Construct a new ReadWebhookOptions + /// + /// The service_sid + /// The channel_sid + public ReadWebhookOptions(string pathServiceSid, string pathChannelSid) + { + PathServiceSid = pathServiceSid; + PathChannelSid = pathChannelSid; + } + + /// + /// Generate the necessary parameters + /// + public override List> GetParams() + { + var p = new List>(); + if (PageSize != null) + { + p.Add(new KeyValuePair("PageSize", PageSize.ToString())); + } + + return p; + } + } + + /// + /// FetchWebhookOptions + /// + public class FetchWebhookOptions : IOptions + { + /// + /// The service_sid + /// + public string PathServiceSid { get; } + /// + /// The channel_sid + /// + public string PathChannelSid { get; } + /// + /// The sid + /// + public string PathSid { get; } + + /// + /// Construct a new FetchWebhookOptions + /// + /// The service_sid + /// The channel_sid + /// The sid + public FetchWebhookOptions(string pathServiceSid, string pathChannelSid, string pathSid) + { + PathServiceSid = pathServiceSid; + PathChannelSid = pathChannelSid; + PathSid = pathSid; + } + + /// + /// Generate the necessary parameters + /// + public List> GetParams() + { + var p = new List>(); + return p; + } + } + + /// + /// CreateWebhookOptions + /// + public class CreateWebhookOptions : IOptions + { + /// + /// The service_sid + /// + public string PathServiceSid { get; } + /// + /// The channel_sid + /// + public string PathChannelSid { get; } + /// + /// The type + /// + public WebhookResource.TypeEnum Type { get; } + /// + /// The configuration.url + /// + public string ConfigurationUrl { get; set; } + /// + /// The configuration.method + /// + public WebhookResource.MethodEnum ConfigurationMethod { get; set; } + /// + /// The configuration.filters + /// + public List ConfigurationFilters { get; set; } + /// + /// The configuration.triggers + /// + public List ConfigurationTriggers { get; set; } + /// + /// The configuration.flow_sid + /// + public string ConfigurationFlowSid { get; set; } + /// + /// The configuration.retry_count + /// + public int? ConfigurationRetryCount { get; set; } + + /// + /// Construct a new CreateWebhookOptions + /// + /// The service_sid + /// The channel_sid + /// The type + public CreateWebhookOptions(string pathServiceSid, string pathChannelSid, WebhookResource.TypeEnum type) + { + PathServiceSid = pathServiceSid; + PathChannelSid = pathChannelSid; + Type = type; + ConfigurationFilters = new List(); + ConfigurationTriggers = new List(); + } + + /// + /// Generate the necessary parameters + /// + public List> GetParams() + { + var p = new List>(); + if (Type != null) + { + p.Add(new KeyValuePair("Type", Type.ToString())); + } + + if (ConfigurationUrl != null) + { + p.Add(new KeyValuePair("Configuration.Url", ConfigurationUrl)); + } + + if (ConfigurationMethod != null) + { + p.Add(new KeyValuePair("Configuration.Method", ConfigurationMethod.ToString())); + } + + if (ConfigurationFilters != null) + { + p.AddRange(ConfigurationFilters.Select(prop => new KeyValuePair("Configuration.Filters", prop))); + } + + if (ConfigurationTriggers != null) + { + p.AddRange(ConfigurationTriggers.Select(prop => new KeyValuePair("Configuration.Triggers", prop))); + } + + if (ConfigurationFlowSid != null) + { + p.Add(new KeyValuePair("Configuration.FlowSid", ConfigurationFlowSid.ToString())); + } + + if (ConfigurationRetryCount != null) + { + p.Add(new KeyValuePair("Configuration.RetryCount", ConfigurationRetryCount.Value.ToString())); + } + + return p; + } + } + + /// + /// UpdateWebhookOptions + /// + public class UpdateWebhookOptions : IOptions + { + /// + /// The service_sid + /// + public string PathServiceSid { get; } + /// + /// The channel_sid + /// + public string PathChannelSid { get; } + /// + /// The sid + /// + public string PathSid { get; } + /// + /// The configuration.url + /// + public string ConfigurationUrl { get; set; } + /// + /// The configuration.method + /// + public WebhookResource.MethodEnum ConfigurationMethod { get; set; } + /// + /// The configuration.filters + /// + public List ConfigurationFilters { get; set; } + /// + /// The configuration.triggers + /// + public List ConfigurationTriggers { get; set; } + /// + /// The configuration.flow_sid + /// + public string ConfigurationFlowSid { get; set; } + /// + /// The configuration.retry_count + /// + public int? ConfigurationRetryCount { get; set; } + + /// + /// Construct a new UpdateWebhookOptions + /// + /// The service_sid + /// The channel_sid + /// The sid + public UpdateWebhookOptions(string pathServiceSid, string pathChannelSid, string pathSid) + { + PathServiceSid = pathServiceSid; + PathChannelSid = pathChannelSid; + PathSid = pathSid; + ConfigurationFilters = new List(); + ConfigurationTriggers = new List(); + } + + /// + /// Generate the necessary parameters + /// + public List> GetParams() + { + var p = new List>(); + if (ConfigurationUrl != null) + { + p.Add(new KeyValuePair("Configuration.Url", ConfigurationUrl)); + } + + if (ConfigurationMethod != null) + { + p.Add(new KeyValuePair("Configuration.Method", ConfigurationMethod.ToString())); + } + + if (ConfigurationFilters != null) + { + p.AddRange(ConfigurationFilters.Select(prop => new KeyValuePair("Configuration.Filters", prop))); + } + + if (ConfigurationTriggers != null) + { + p.AddRange(ConfigurationTriggers.Select(prop => new KeyValuePair("Configuration.Triggers", prop))); + } + + if (ConfigurationFlowSid != null) + { + p.Add(new KeyValuePair("Configuration.FlowSid", ConfigurationFlowSid.ToString())); + } + + if (ConfigurationRetryCount != null) + { + p.Add(new KeyValuePair("Configuration.RetryCount", ConfigurationRetryCount.Value.ToString())); + } + + return p; + } + } + + /// + /// DeleteWebhookOptions + /// + public class DeleteWebhookOptions : IOptions + { + /// + /// The service_sid + /// + public string PathServiceSid { get; } + /// + /// The channel_sid + /// + public string PathChannelSid { get; } + /// + /// The sid + /// + public string PathSid { get; } + + /// + /// Construct a new DeleteWebhookOptions + /// + /// The service_sid + /// The channel_sid + /// The sid + public DeleteWebhookOptions(string pathServiceSid, string pathChannelSid, string pathSid) + { + PathServiceSid = pathServiceSid; + PathChannelSid = pathChannelSid; + PathSid = pathSid; + } + + /// + /// Generate the necessary parameters + /// + public List> GetParams() + { + var p = new List>(); + return p; + } + } + +} \ No newline at end of file diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookResource.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookResource.cs new file mode 100644 index 000000000..30b29693a --- /dev/null +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookResource.cs @@ -0,0 +1,616 @@ +/// This code was generated by +/// \ / _ _ _| _ _ +/// | (_)\/(_)(_|\/| |(/_ v1.0.0 +/// / / +/// +/// WebhookResource +/// + +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using Twilio.Base; +using Twilio.Clients; +using Twilio.Converters; +using Twilio.Exceptions; +using Twilio.Http; +using Twilio.Types; + +namespace Twilio.Rest.Chat.V2.Service.Channel +{ + + public class WebhookResource : Resource + { + public sealed class TypeEnum : StringEnum + { + private TypeEnum(string value) : base(value) {} + public TypeEnum() {} + public static implicit operator TypeEnum(string value) + { + return new TypeEnum(value); + } + + public static readonly TypeEnum Webhook = new TypeEnum("webhook"); + public static readonly TypeEnum Trigger = new TypeEnum("trigger"); + public static readonly TypeEnum Studio = new TypeEnum("studio"); + } + + public sealed class MethodEnum : StringEnum + { + private MethodEnum(string value) : base(value) {} + public MethodEnum() {} + public static implicit operator MethodEnum(string value) + { + return new MethodEnum(value); + } + + public static readonly MethodEnum Get = new MethodEnum("GET"); + public static readonly MethodEnum Post = new MethodEnum("POST"); + } + + private static Request BuildReadRequest(ReadWebhookOptions options, ITwilioRestClient client) + { + return new Request( + HttpMethod.Get, + Rest.Domain.Chat, + "/v2/Services/" + options.PathServiceSid + "/Channels/" + options.PathChannelSid + "/Webhooks", + client.Region, + queryParams: options.GetParams() + ); + } + + /// + /// read + /// + /// Read Webhook parameters + /// Client to make requests to Twilio + /// A single instance of Webhook + public static ResourceSet Read(ReadWebhookOptions options, ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = client.Request(BuildReadRequest(options, client)); + + var page = Page.FromJson("webhooks", response.Content); + return new ResourceSet(page, options, client); + } + + #if !NET35 + /// + /// read + /// + /// Read Webhook parameters + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task> ReadAsync(ReadWebhookOptions options, + ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = await client.RequestAsync(BuildReadRequest(options, client)); + + var page = Page.FromJson("webhooks", response.Content); + return new ResourceSet(page, options, client); + } + #endif + + /// + /// read + /// + /// The service_sid + /// The channel_sid + /// Page size + /// Record limit + /// Client to make requests to Twilio + /// A single instance of Webhook + public static ResourceSet Read(string pathServiceSid, + string pathChannelSid, + int? pageSize = null, + long? limit = null, + ITwilioRestClient client = null) + { + var options = new ReadWebhookOptions(pathServiceSid, pathChannelSid){PageSize = pageSize, Limit = limit}; + return Read(options, client); + } + + #if !NET35 + /// + /// read + /// + /// The service_sid + /// The channel_sid + /// Page size + /// Record limit + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task> ReadAsync(string pathServiceSid, + string pathChannelSid, + int? pageSize = null, + long? limit = null, + ITwilioRestClient client = null) + { + var options = new ReadWebhookOptions(pathServiceSid, pathChannelSid){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("webhooks", 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.Chat, + client.Region + ) + ); + + var response = client.Request(request); + return Page.FromJson("webhooks", 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.Chat, + client.Region + ) + ); + + var response = client.Request(request); + return Page.FromJson("webhooks", response.Content); + } + + private static Request BuildFetchRequest(FetchWebhookOptions options, ITwilioRestClient client) + { + return new Request( + HttpMethod.Get, + Rest.Domain.Chat, + "/v2/Services/" + options.PathServiceSid + "/Channels/" + options.PathChannelSid + "/Webhooks/" + options.PathSid + "", + client.Region, + queryParams: options.GetParams() + ); + } + + /// + /// fetch + /// + /// Fetch Webhook parameters + /// Client to make requests to Twilio + /// A single instance of Webhook + public static WebhookResource Fetch(FetchWebhookOptions options, ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = client.Request(BuildFetchRequest(options, client)); + return FromJson(response.Content); + } + + #if !NET35 + /// + /// fetch + /// + /// Fetch Webhook parameters + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task FetchAsync(FetchWebhookOptions options, + ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = await client.RequestAsync(BuildFetchRequest(options, client)); + return FromJson(response.Content); + } + #endif + + /// + /// fetch + /// + /// The service_sid + /// The channel_sid + /// The sid + /// Client to make requests to Twilio + /// A single instance of Webhook + public static WebhookResource Fetch(string pathServiceSid, + string pathChannelSid, + string pathSid, + ITwilioRestClient client = null) + { + var options = new FetchWebhookOptions(pathServiceSid, pathChannelSid, pathSid); + return Fetch(options, client); + } + + #if !NET35 + /// + /// fetch + /// + /// The service_sid + /// The channel_sid + /// The sid + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task FetchAsync(string pathServiceSid, + string pathChannelSid, + string pathSid, + ITwilioRestClient client = null) + { + var options = new FetchWebhookOptions(pathServiceSid, pathChannelSid, pathSid); + return await FetchAsync(options, client); + } + #endif + + private static Request BuildCreateRequest(CreateWebhookOptions options, ITwilioRestClient client) + { + return new Request( + HttpMethod.Post, + Rest.Domain.Chat, + "/v2/Services/" + options.PathServiceSid + "/Channels/" + options.PathChannelSid + "/Webhooks", + client.Region, + postParams: options.GetParams() + ); + } + + /// + /// create + /// + /// Create Webhook parameters + /// Client to make requests to Twilio + /// A single instance of Webhook + public static WebhookResource Create(CreateWebhookOptions options, ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = client.Request(BuildCreateRequest(options, client)); + return FromJson(response.Content); + } + + #if !NET35 + /// + /// create + /// + /// Create Webhook parameters + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task CreateAsync(CreateWebhookOptions options, + ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = await client.RequestAsync(BuildCreateRequest(options, client)); + return FromJson(response.Content); + } + #endif + + /// + /// create + /// + /// The service_sid + /// The channel_sid + /// The type + /// The configuration.url + /// The configuration.method + /// The configuration.filters + /// The configuration.triggers + /// The configuration.flow_sid + /// The configuration.retry_count + /// Client to make requests to Twilio + /// A single instance of Webhook + public static WebhookResource Create(string pathServiceSid, + string pathChannelSid, + WebhookResource.TypeEnum type, + string configurationUrl = null, + WebhookResource.MethodEnum configurationMethod = null, + List configurationFilters = null, + List configurationTriggers = null, + string configurationFlowSid = null, + int? configurationRetryCount = null, + ITwilioRestClient client = null) + { + var options = new CreateWebhookOptions(pathServiceSid, pathChannelSid, type){ConfigurationUrl = configurationUrl, ConfigurationMethod = configurationMethod, ConfigurationFilters = configurationFilters, ConfigurationTriggers = configurationTriggers, ConfigurationFlowSid = configurationFlowSid, ConfigurationRetryCount = configurationRetryCount}; + return Create(options, client); + } + + #if !NET35 + /// + /// create + /// + /// The service_sid + /// The channel_sid + /// The type + /// The configuration.url + /// The configuration.method + /// The configuration.filters + /// The configuration.triggers + /// The configuration.flow_sid + /// The configuration.retry_count + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, + string pathChannelSid, + WebhookResource.TypeEnum type, + string configurationUrl = null, + WebhookResource.MethodEnum configurationMethod = null, + List configurationFilters = null, + List configurationTriggers = null, + string configurationFlowSid = null, + int? configurationRetryCount = null, + ITwilioRestClient client = null) + { + var options = new CreateWebhookOptions(pathServiceSid, pathChannelSid, type){ConfigurationUrl = configurationUrl, ConfigurationMethod = configurationMethod, ConfigurationFilters = configurationFilters, ConfigurationTriggers = configurationTriggers, ConfigurationFlowSid = configurationFlowSid, ConfigurationRetryCount = configurationRetryCount}; + return await CreateAsync(options, client); + } + #endif + + private static Request BuildUpdateRequest(UpdateWebhookOptions options, ITwilioRestClient client) + { + return new Request( + HttpMethod.Post, + Rest.Domain.Chat, + "/v2/Services/" + options.PathServiceSid + "/Channels/" + options.PathChannelSid + "/Webhooks/" + options.PathSid + "", + client.Region, + postParams: options.GetParams() + ); + } + + /// + /// update + /// + /// Update Webhook parameters + /// Client to make requests to Twilio + /// A single instance of Webhook + public static WebhookResource Update(UpdateWebhookOptions options, ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = client.Request(BuildUpdateRequest(options, client)); + return FromJson(response.Content); + } + + #if !NET35 + /// + /// update + /// + /// Update Webhook parameters + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task UpdateAsync(UpdateWebhookOptions options, + ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = await client.RequestAsync(BuildUpdateRequest(options, client)); + return FromJson(response.Content); + } + #endif + + /// + /// update + /// + /// The service_sid + /// The channel_sid + /// The sid + /// The configuration.url + /// The configuration.method + /// The configuration.filters + /// The configuration.triggers + /// The configuration.flow_sid + /// The configuration.retry_count + /// Client to make requests to Twilio + /// A single instance of Webhook + public static WebhookResource Update(string pathServiceSid, + string pathChannelSid, + string pathSid, + string configurationUrl = null, + WebhookResource.MethodEnum configurationMethod = null, + List configurationFilters = null, + List configurationTriggers = null, + string configurationFlowSid = null, + int? configurationRetryCount = null, + ITwilioRestClient client = null) + { + var options = new UpdateWebhookOptions(pathServiceSid, pathChannelSid, pathSid){ConfigurationUrl = configurationUrl, ConfigurationMethod = configurationMethod, ConfigurationFilters = configurationFilters, ConfigurationTriggers = configurationTriggers, ConfigurationFlowSid = configurationFlowSid, ConfigurationRetryCount = configurationRetryCount}; + return Update(options, client); + } + + #if !NET35 + /// + /// update + /// + /// The service_sid + /// The channel_sid + /// The sid + /// The configuration.url + /// The configuration.method + /// The configuration.filters + /// The configuration.triggers + /// The configuration.flow_sid + /// The configuration.retry_count + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, + string pathChannelSid, + string pathSid, + string configurationUrl = null, + WebhookResource.MethodEnum configurationMethod = null, + List configurationFilters = null, + List configurationTriggers = null, + string configurationFlowSid = null, + int? configurationRetryCount = null, + ITwilioRestClient client = null) + { + var options = new UpdateWebhookOptions(pathServiceSid, pathChannelSid, pathSid){ConfigurationUrl = configurationUrl, ConfigurationMethod = configurationMethod, ConfigurationFilters = configurationFilters, ConfigurationTriggers = configurationTriggers, ConfigurationFlowSid = configurationFlowSid, ConfigurationRetryCount = configurationRetryCount}; + return await UpdateAsync(options, client); + } + #endif + + private static Request BuildDeleteRequest(DeleteWebhookOptions options, ITwilioRestClient client) + { + return new Request( + HttpMethod.Delete, + Rest.Domain.Chat, + "/v2/Services/" + options.PathServiceSid + "/Channels/" + options.PathChannelSid + "/Webhooks/" + options.PathSid + "", + client.Region, + queryParams: options.GetParams() + ); + } + + /// + /// delete + /// + /// Delete Webhook parameters + /// Client to make requests to Twilio + /// A single instance of Webhook + public static bool Delete(DeleteWebhookOptions 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 Webhook parameters + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task DeleteAsync(DeleteWebhookOptions 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 + /// + /// The service_sid + /// The channel_sid + /// The sid + /// Client to make requests to Twilio + /// A single instance of Webhook + public static bool Delete(string pathServiceSid, + string pathChannelSid, + string pathSid, + ITwilioRestClient client = null) + { + var options = new DeleteWebhookOptions(pathServiceSid, pathChannelSid, pathSid); + return Delete(options, client); + } + + #if !NET35 + /// + /// delete + /// + /// The service_sid + /// The channel_sid + /// The sid + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task DeleteAsync(string pathServiceSid, + string pathChannelSid, + string pathSid, + ITwilioRestClient client = null) + { + var options = new DeleteWebhookOptions(pathServiceSid, pathChannelSid, pathSid); + return await DeleteAsync(options, client); + } + #endif + + /// + /// Converts a JSON string into a WebhookResource object + /// + /// Raw JSON string + /// WebhookResource object represented by the provided JSON + public static WebhookResource FromJson(string json) + { + // Convert all checked exceptions to Runtime + try + { + return JsonConvert.DeserializeObject(json); + } + catch (JsonException e) + { + throw new ApiException(e.Message, e); + } + } + + /// + /// The sid + /// + [JsonProperty("sid")] + public string Sid { get; private set; } + /// + /// The account_sid + /// + [JsonProperty("account_sid")] + public string AccountSid { get; private set; } + /// + /// The service_sid + /// + [JsonProperty("service_sid")] + public string ServiceSid { get; private set; } + /// + /// The channel_sid + /// + [JsonProperty("channel_sid")] + public string ChannelSid { get; private set; } + /// + /// The type + /// + [JsonProperty("type")] + public string Type { get; private set; } + /// + /// The url + /// + [JsonProperty("url")] + public Uri Url { get; private set; } + /// + /// The configuration + /// + [JsonProperty("configuration")] + public object Configuration { get; private set; } + /// + /// The date_created + /// + [JsonProperty("date_created")] + public DateTime? DateCreated { get; private set; } + /// + /// The date_updated + /// + [JsonProperty("date_updated")] + public DateTime? DateUpdated { get; private set; } + + private WebhookResource() + { + + } + } + +} \ No newline at end of file diff --git a/src/Twilio/Rest/Chat/V2/Service/ChannelOptions.cs b/src/Twilio/Rest/Chat/V2/Service/ChannelOptions.cs index 95fabd183..43c76f885 100644 --- a/src/Twilio/Rest/Chat/V2/Service/ChannelOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/ChannelOptions.cs @@ -92,31 +92,31 @@ public class CreateChannelOptions : IOptions /// public string PathServiceSid { get; } /// - /// The friendly_name + /// A human-readable name for the Channel. /// public string FriendlyName { get; set; } /// - /// The unique_name + /// A unique, addressable name for the Channel. /// public string UniqueName { get; set; } /// - /// The attributes + /// An optional metadata field you can use to store any data you wish. /// public string Attributes { get; set; } /// - /// The type + /// The visibility of the channel - public or private. /// public ChannelResource.ChannelTypeEnum Type { get; set; } /// - /// The date_created + /// The optional ISO8601 time specifying the datetime the Channel should be set as being created. /// public DateTime? DateCreated { get; set; } /// - /// The date_updated + /// The optional ISO8601 time specifying the datetime the Channel should be set as having been last updated. /// public DateTime? DateUpdated { get; set; } /// - /// The created_by + /// Optional field to specify the Identity of the User that created the Channel. /// public string CreatedBy { get; set; } @@ -232,27 +232,27 @@ public class UpdateChannelOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// A human-readable name for the Channel. /// public string FriendlyName { get; set; } /// - /// The unique_name + /// A unique, addressable name for the Channel. /// public string UniqueName { get; set; } /// - /// The attributes + /// An optional metadata field you can use to store any data you wish. /// public string Attributes { get; set; } /// - /// The date_created + /// The optional ISO8601 time specifying the datetime the Channel should be set as being created. /// public DateTime? DateCreated { get; set; } /// - /// The date_updated + /// The optional ISO8601 time specifying the datetime the Channel should be set as having been last updated. /// public DateTime? DateUpdated { get; set; } /// - /// The created_by + /// Optional field to specify the Identity of the User that created the Channel. /// public string CreatedBy { get; set; } diff --git a/src/Twilio/Rest/Chat/V2/Service/ChannelResource.cs b/src/Twilio/Rest/Chat/V2/Service/ChannelResource.cs index 819f2028c..75fec6c86 100644 --- a/src/Twilio/Rest/Chat/V2/Service/ChannelResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/ChannelResource.cs @@ -218,13 +218,15 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre /// create /// /// The service_sid - /// The friendly_name - /// The unique_name - /// The attributes - /// The type - /// The date_created - /// The date_updated - /// The created_by + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. + /// The visibility of the channel - public or private. + /// The optional ISO8601 time specifying the datetime the Channel should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Channel should be set as having + /// been last updated. + /// Optional field to specify the Identity of the User that created the Channel. /// Client to make requests to Twilio /// A single instance of Channel public static ChannelResource Create(string pathServiceSid, @@ -246,13 +248,15 @@ public static ChannelResource Create(string pathServiceSid, /// create /// /// The service_sid - /// The friendly_name - /// The unique_name - /// The attributes - /// The type - /// The date_created - /// The date_updated - /// The created_by + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. + /// The visibility of the channel - public or private. + /// The optional ISO8601 time specifying the datetime the Channel should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Channel should be set as having + /// been last updated. + /// Optional field to specify the Identity of the User that created the Channel. /// Client to make requests to Twilio /// Task that resolves to A single instance of Channel public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -458,12 +462,14 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// /// The service_sid /// The sid - /// The friendly_name - /// The unique_name - /// The attributes - /// The date_created - /// The date_updated - /// The created_by + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. + /// The optional ISO8601 time specifying the datetime the Channel should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Channel should be set as having + /// been last updated. + /// Optional field to specify the Identity of the User that created the Channel. /// Client to make requests to Twilio /// A single instance of Channel public static ChannelResource Update(string pathServiceSid, @@ -486,12 +492,14 @@ public static ChannelResource Update(string pathServiceSid, /// /// The service_sid /// The sid - /// The friendly_name - /// The unique_name - /// The attributes - /// The date_created - /// The date_updated - /// The created_by + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. + /// The optional ISO8601 time specifying the datetime the Channel should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Channel should be set as having + /// been last updated. + /// Optional field to specify the Identity of the User that created the Channel. /// Client to make requests to Twilio /// Task that resolves to A single instance of Channel public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -528,73 +536,73 @@ public static ChannelResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this channel. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this channel belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this channel. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The unique_name + /// The unique, addressable name of this channel. /// [JsonProperty("unique_name")] public string UniqueName { get; private set; } /// - /// The attributes + /// An optional string metadata field you can use to store any data you wish. /// [JsonProperty("attributes")] public string Attributes { get; private set; } /// - /// The type + /// The visibility of this channel - either public or private /// [JsonProperty("type")] [JsonConverter(typeof(StringEnumConverter))] public ChannelResource.ChannelTypeEnum Type { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The created_by + /// Identity of the channel's creator. /// [JsonProperty("created_by")] public string CreatedBy { get; private set; } /// - /// The members_count + /// The number of Members in the Channel /// [JsonProperty("members_count")] public int? MembersCount { get; private set; } /// - /// The messages_count + /// The number of Messages in the Channel /// [JsonProperty("messages_count")] public int? MessagesCount { get; private set; } /// - /// The url + /// An absolute URL for this channel. /// [JsonProperty("url")] public Uri Url { get; private set; } /// - /// The links + /// Absolute URLs to access the Members, Messages , Invites and, if it exists the last Message for this Channel. /// [JsonProperty("links")] public Dictionary Links { get; private set; } diff --git a/src/Twilio/Rest/Chat/V2/Service/RoleOptions.cs b/src/Twilio/Rest/Chat/V2/Service/RoleOptions.cs index d2e55a262..e9e1071a7 100644 --- a/src/Twilio/Rest/Chat/V2/Service/RoleOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/RoleOptions.cs @@ -92,15 +92,15 @@ public class CreateRoleOptions : IOptions /// public string PathServiceSid { get; } /// - /// The friendly_name + /// The human-readable name of this role. /// public string FriendlyName { get; } /// - /// The type + /// What kind of role this is. /// public RoleResource.RoleTypeEnum Type { get; } /// - /// The permission + /// A permission this role should have. /// public List Permission { get; } @@ -108,9 +108,9 @@ public class CreateRoleOptions : IOptions /// Construct a new CreateRoleOptions /// /// The service_sid - /// The friendly_name - /// The type - /// The permission + /// The human-readable name of this role. + /// What kind of role this is. + /// A permission this role should have. public CreateRoleOptions(string pathServiceSid, string friendlyName, RoleResource.RoleTypeEnum type, @@ -195,7 +195,7 @@ public class UpdateRoleOptions : IOptions /// public string PathSid { get; } /// - /// The permission + /// A permission this role should have. /// public List Permission { get; } @@ -204,7 +204,7 @@ public class UpdateRoleOptions : IOptions /// /// The service_sid /// The sid - /// The permission + /// A permission this role should have. public UpdateRoleOptions(string pathServiceSid, string pathSid, List permission) { PathServiceSid = pathServiceSid; diff --git a/src/Twilio/Rest/Chat/V2/Service/RoleResource.cs b/src/Twilio/Rest/Chat/V2/Service/RoleResource.cs index ae70adb2f..3da831619 100644 --- a/src/Twilio/Rest/Chat/V2/Service/RoleResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/RoleResource.cs @@ -218,9 +218,9 @@ public static async System.Threading.Tasks.Task CreateAsync(Create /// create /// /// The service_sid - /// The friendly_name - /// The type - /// The permission + /// The human-readable name of this role. + /// What kind of role this is. + /// A permission this role should have. /// Client to make requests to Twilio /// A single instance of Role public static RoleResource Create(string pathServiceSid, @@ -238,9 +238,9 @@ public static RoleResource Create(string pathServiceSid, /// create /// /// The service_sid - /// The friendly_name - /// The type - /// The permission + /// The human-readable name of this role. + /// What kind of role this is. + /// A permission this role should have. /// Client to make requests to Twilio /// Task that resolves to A single instance of Role public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -438,7 +438,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(Update /// /// The service_sid /// The sid - /// The permission + /// A permission this role should have. /// Client to make requests to Twilio /// A single instance of Role public static RoleResource Update(string pathServiceSid, @@ -456,7 +456,7 @@ public static RoleResource Update(string pathServiceSid, /// /// The service_sid /// The sid - /// The permission + /// A permission this role should have. /// Client to make requests to Twilio /// Task that resolves to A single instance of Role public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -488,48 +488,48 @@ public static RoleResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this role. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this role belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this role. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The type + /// What kind of role this is. /// [JsonProperty("type")] [JsonConverter(typeof(StringEnumConverter))] public RoleResource.RoleTypeEnum Type { get; private set; } /// - /// The permissions + /// A JSON array of the permissions this role has. /// [JsonProperty("permissions")] public List Permissions { get; private set; } /// - /// The date_created + /// The date that this resource was created in ISO 8601 format. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated in ISO 8601 format. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The url + /// An absolute URL for this role. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/Chat/V2/Service/UserOptions.cs b/src/Twilio/Rest/Chat/V2/Service/UserOptions.cs index 8fffb852c..0488ff596 100644 --- a/src/Twilio/Rest/Chat/V2/Service/UserOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/UserOptions.cs @@ -91,19 +91,19 @@ public class CreateUserOptions : IOptions /// public string PathServiceSid { get; } /// - /// The identity + /// A unique string that identifies the user within this service - often a username or email address. /// public string Identity { get; } /// - /// The role_sid + /// The unique id of the Role assigned to this user. /// public string RoleSid { get; set; } /// - /// The attributes + /// An optional string used to contain any metadata or other information for the User. /// public string Attributes { get; set; } /// - /// The friendly_name + /// An optional human readable string representing the user. /// public string FriendlyName { get; set; } @@ -111,7 +111,8 @@ public class CreateUserOptions : IOptions /// Construct a new CreateUserOptions /// /// The service_sid - /// The identity + /// A unique string that identifies the user within this service - often a username or email + /// address. public CreateUserOptions(string pathServiceSid, string identity) { PathServiceSid = pathServiceSid; @@ -196,15 +197,15 @@ public class UpdateUserOptions : IOptions /// public string PathSid { get; } /// - /// The role_sid + /// The unique id of the [Role][role] assigned to this user. /// public string RoleSid { get; set; } /// - /// The attributes + /// An optional string used to contain any metadata or other information for the User. /// public string Attributes { get; set; } /// - /// The friendly_name + /// An optional human readable string representing the user. /// public string FriendlyName { get; set; } diff --git a/src/Twilio/Rest/Chat/V2/Service/UserResource.cs b/src/Twilio/Rest/Chat/V2/Service/UserResource.cs index 6cf9c005f..0a655e3f4 100644 --- a/src/Twilio/Rest/Chat/V2/Service/UserResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/UserResource.cs @@ -204,10 +204,12 @@ public static async System.Threading.Tasks.Task CreateAsync(Create /// create /// /// The service_sid - /// The identity - /// The role_sid - /// The attributes - /// The friendly_name + /// A unique string that identifies the user within this service - often a username or email + /// address. + /// The unique id of the Role assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// A single instance of User public static UserResource Create(string pathServiceSid, @@ -226,10 +228,12 @@ public static UserResource Create(string pathServiceSid, /// create /// /// The service_sid - /// The identity - /// The role_sid - /// The attributes - /// The friendly_name + /// A unique string that identifies the user within this service - often a username or email + /// address. + /// The unique id of the Role assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// Task that resolves to A single instance of User public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -428,9 +432,10 @@ public static async System.Threading.Tasks.Task UpdateAsync(Update /// /// The service_sid /// The sid - /// The role_sid - /// The attributes - /// The friendly_name + /// The unique id of the [Role][role] assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// A single instance of User public static UserResource Update(string pathServiceSid, @@ -450,9 +455,10 @@ public static UserResource Update(string pathServiceSid, /// /// The service_sid /// The sid - /// The role_sid - /// The attributes - /// The friendly_name + /// The unique id of the [Role][role] assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// Task that resolves to A single instance of User public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -486,62 +492,62 @@ public static UserResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this user. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this user belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The attributes + /// An optional string metadata field you can use to store any data you wish. /// [JsonProperty("attributes")] public string Attributes { get; private set; } /// - /// The friendly_name + /// The human-readable name of this user. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The role_sid + /// The unique id of the [Role][role] assigned to this user. /// [JsonProperty("role_sid")] public string RoleSid { get; private set; } /// - /// The identity + /// A unique string that identifies the user within this service - often a username or email address. /// [JsonProperty("identity")] public string Identity { get; private set; } /// - /// The is_online + /// Indicates whether the User is actively connected to the Service instance and online. /// [JsonProperty("is_online")] public bool? IsOnline { get; private set; } /// - /// The is_notifiable + /// Indicates whether the User has a potentially valid Push Notification registration for the Service instance. /// [JsonProperty("is_notifiable")] public bool? IsNotifiable { get; private set; } /// - /// The date_created + /// The date that this resource was created in ISO 8601 format. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated in ISO 8601 format. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The joined_channels_count + /// The number of Channels this User is a Member of. /// [JsonProperty("joined_channels_count")] public int? JoinedChannelsCount { get; private set; } @@ -551,7 +557,7 @@ public static UserResource FromJson(string json) [JsonProperty("links")] public Dictionary Links { get; private set; } /// - /// The url + /// An absolute URL for this user. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/Chat/V2/ServiceOptions.cs b/src/Twilio/Rest/Chat/V2/ServiceOptions.cs index e386e3ad9..aed8f6997 100644 --- a/src/Twilio/Rest/Chat/V2/ServiceOptions.cs +++ b/src/Twilio/Rest/Chat/V2/ServiceOptions.cs @@ -76,14 +76,14 @@ public List> GetParams() public class CreateServiceOptions : IOptions { /// - /// The friendly_name + /// Human-readable name for this service instance /// public string FriendlyName { get; } /// /// Construct a new CreateServiceOptions /// - /// The friendly_name + /// Human-readable name for this service instance public CreateServiceOptions(string friendlyName) { FriendlyName = friendlyName; @@ -134,7 +134,7 @@ public class UpdateServiceOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// Human-readable name for this service instance /// public string FriendlyName { get; set; } /// @@ -142,23 +142,23 @@ public class UpdateServiceOptions : IOptions /// public string DefaultServiceRoleSid { get; set; } /// - /// The default_channel_role_sid + /// Channel role assigned on channel join /// public string DefaultChannelRoleSid { get; set; } /// - /// The default_channel_creator_role_sid + /// Channel role assigned to creator of channel when joining for first time /// public string DefaultChannelCreatorRoleSid { get; set; } /// - /// The read_status_enabled + /// true if the member read status feature is enabled, false if not. /// public bool? ReadStatusEnabled { get; set; } /// - /// The reachability_enabled + /// true if the reachability feature should be enabled. /// public bool? ReachabilityEnabled { get; set; } /// - /// The typing_indicator_timeout + /// The duration in seconds indicating the timeout after "started typing" event when client should assume that user is not typing anymore even if no "ended typing" message received /// public int? TypingIndicatorTimeout { get; set; } /// @@ -218,27 +218,27 @@ public class UpdateServiceOptions : IOptions /// public string NotificationsInvitedToChannelSound { get; set; } /// - /// The pre_webhook_url + /// The webhook URL for PRE-Event webhooks. /// public Uri PreWebhookUrl { get; set; } /// - /// The post_webhook_url + /// The webhook URL for POST-Event webhooks. /// public Uri PostWebhookUrl { get; set; } /// - /// The webhook_method + /// The webhook request format to use. /// public Twilio.Http.HttpMethod WebhookMethod { get; set; } /// - /// The webhook_filters + /// The list of WebHook events that are enabled for this Service instance. /// public List WebhookFilters { get; set; } /// - /// The limits.channel_members + /// The maximum number of Members that can be added to Channels within this Service. /// public int? LimitsChannelMembers { get; set; } /// - /// The limits.user_channels + /// The maximum number of Channels Users can be a Member of within this Service. /// public int? LimitsUserChannels { get; set; } /// @@ -246,11 +246,11 @@ public class UpdateServiceOptions : IOptions /// public string MediaCompatibilityMessage { get; set; } /// - /// The pre_webhook_retry_count + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses. /// public int? PreWebhookRetryCount { get; set; } /// - /// The post_webhook_retry_count + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses. /// public int? PostWebhookRetryCount { get; set; } /// diff --git a/src/Twilio/Rest/Chat/V2/ServiceResource.cs b/src/Twilio/Rest/Chat/V2/ServiceResource.cs index cfe287f8e..501f87bf3 100644 --- a/src/Twilio/Rest/Chat/V2/ServiceResource.cs +++ b/src/Twilio/Rest/Chat/V2/ServiceResource.cs @@ -196,7 +196,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre /// /// create /// - /// The friendly_name + /// Human-readable name for this service instance /// Client to make requests to Twilio /// A single instance of Service public static ServiceResource Create(string friendlyName, ITwilioRestClient client = null) @@ -209,7 +209,7 @@ public static ServiceResource Create(string friendlyName, ITwilioRestClient clie /// /// create /// - /// The friendly_name + /// Human-readable name for this service instance /// Client to make requests to Twilio /// Task that resolves to A single instance of Service public static async System.Threading.Tasks.Task CreateAsync(string friendlyName, @@ -399,13 +399,16 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// update /// /// The sid - /// The friendly_name + /// Human-readable name for this service instance /// The default_service_role_sid - /// The default_channel_role_sid - /// The default_channel_creator_role_sid - /// The read_status_enabled - /// The reachability_enabled - /// The typing_indicator_timeout + /// Channel role assigned on channel join + /// Channel role assigned to creator of channel when joining for first time + /// + /// true if the member read status feature is enabled, false if not. + /// true if the reachability feature should be enabled. + /// The duration in seconds indicating the timeout after "started typing" event + /// when client should assume that user is not typing anymore even if no "ended typing" + /// message received /// The consumption_report_interval /// The notifications.new_message.enabled /// The notifications.new_message.template @@ -420,15 +423,19 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// The notifications.invited_to_channel.enabled /// The notifications.invited_to_channel.template /// The notifications.invited_to_channel.sound - /// The pre_webhook_url - /// The post_webhook_url - /// The webhook_method - /// The webhook_filters - /// The limits.channel_members - /// The limits.user_channels + /// The webhook URL for PRE-Event webhooks. + /// The webhook URL for POST-Event webhooks. + /// The webhook request format to use. + /// The list of WebHook events that are enabled for this Service instance. + /// The maximum number of Members that can be added to Channels within this + /// Service. + /// The maximum number of Channels Users can be a Member of within this Service. + /// /// The media.compatibility_message - /// The pre_webhook_retry_count - /// The post_webhook_retry_count + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP + /// responses. + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP + /// responses. /// The notifications.log_enabled /// Client to make requests to Twilio /// A single instance of Service @@ -475,13 +482,16 @@ public static ServiceResource Update(string pathSid, /// update /// /// The sid - /// The friendly_name + /// Human-readable name for this service instance /// The default_service_role_sid - /// The default_channel_role_sid - /// The default_channel_creator_role_sid - /// The read_status_enabled - /// The reachability_enabled - /// The typing_indicator_timeout + /// Channel role assigned on channel join + /// Channel role assigned to creator of channel when joining for first time + /// + /// true if the member read status feature is enabled, false if not. + /// true if the reachability feature should be enabled. + /// The duration in seconds indicating the timeout after "started typing" event + /// when client should assume that user is not typing anymore even if no "ended typing" + /// message received /// The consumption_report_interval /// The notifications.new_message.enabled /// The notifications.new_message.template @@ -496,15 +506,19 @@ public static ServiceResource Update(string pathSid, /// The notifications.invited_to_channel.enabled /// The notifications.invited_to_channel.template /// The notifications.invited_to_channel.sound - /// The pre_webhook_url - /// The post_webhook_url - /// The webhook_method - /// The webhook_filters - /// The limits.channel_members - /// The limits.user_channels + /// The webhook URL for PRE-Event webhooks. + /// The webhook URL for POST-Event webhooks. + /// The webhook request format to use. + /// The list of WebHook events that are enabled for this Service instance. + /// The maximum number of Members that can be added to Channels within this + /// Service. + /// The maximum number of Channels Users can be a Member of within this Service. + /// /// The media.compatibility_message - /// The pre_webhook_retry_count - /// The post_webhook_retry_count + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP + /// responses. + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP + /// responses. /// The notifications.log_enabled /// Client to make requests to Twilio /// Task that resolves to A single instance of Service @@ -566,102 +580,102 @@ public static ServiceResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this service. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this service. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The date_created + /// The date that this resource was created /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The default_service_role_sid + /// The service role assigned to users when they are added to the service. /// [JsonProperty("default_service_role_sid")] public string DefaultServiceRoleSid { get; private set; } /// - /// The default_channel_role_sid + /// The channel role assigned to users when they are added to a channel. /// [JsonProperty("default_channel_role_sid")] public string DefaultChannelRoleSid { get; private set; } /// - /// The default_channel_creator_role_sid + /// The channel role assigned to a channel creator when joining a new channel. /// [JsonProperty("default_channel_creator_role_sid")] public string DefaultChannelCreatorRoleSid { get; private set; } /// - /// The read_status_enabled + /// Enable the Message Constumption Horizon feature. /// [JsonProperty("read_status_enabled")] public bool? ReadStatusEnabled { get; private set; } /// - /// The reachability_enabled + /// Indicates whether the the Reachability feature is enabled for this Service instance. /// [JsonProperty("reachability_enabled")] public bool? ReachabilityEnabled { get; private set; } /// - /// The typing_indicator_timeout + /// The amount of time in seconds after a "started typing" event when clients should assume that user is no longer typing, even if no "ended typing" message was received. /// [JsonProperty("typing_indicator_timeout")] public int? TypingIndicatorTimeout { get; private set; } /// - /// The consumption_report_interval + /// DEPRECATED. /// [JsonProperty("consumption_report_interval")] public int? ConsumptionReportInterval { get; private set; } /// - /// The limits + /// Configuration for service instance level limits. /// [JsonProperty("limits")] public object Limits { get; private set; } /// - /// The pre_webhook_url + /// The webhook URL for PRE-Event webhooks. /// [JsonProperty("pre_webhook_url")] public string PreWebhookUrl { get; private set; } /// - /// The post_webhook_url + /// The webhook URL for POST-Event webhooks. /// [JsonProperty("post_webhook_url")] public string PostWebhookUrl { get; private set; } /// - /// The webhook_method + /// The webhook request format to use for both PRE and POST webhooks. /// [JsonProperty("webhook_method")] public string WebhookMethod { get; private set; } /// - /// The webhook_filters + /// The list of WebHook events that are enabled for this Service instance. /// [JsonProperty("webhook_filters")] public List WebhookFilters { get; private set; } /// - /// The pre_webhook_retry_count + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses. /// [JsonProperty("pre_webhook_retry_count")] public int? PreWebhookRetryCount { get; private set; } /// - /// The post_webhook_retry_count + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses. /// [JsonProperty("post_webhook_retry_count")] public int? PostWebhookRetryCount { get; private set; } /// - /// The notifications + /// Notification configuration for the Service instance. /// [JsonProperty("notifications")] public object Notifications { get; private set; } @@ -671,12 +685,12 @@ public static ServiceResource FromJson(string json) [JsonProperty("media")] public object Media { get; private set; } /// - /// The url + /// An absolute URL for this service. /// [JsonProperty("url")] public Uri Url { get; private set; } /// - /// The links + /// URLs to access the Channels, Roles, and Users for this service. /// [JsonProperty("links")] public Dictionary Links { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V1/CredentialOptions.cs b/src/Twilio/Rest/IpMessaging/V1/CredentialOptions.cs index 371ed3db3..f14aad640 100644 --- a/src/Twilio/Rest/IpMessaging/V1/CredentialOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/CredentialOptions.cs @@ -37,27 +37,27 @@ public override List> GetParams() public class CreateCredentialOptions : IOptions { /// - /// The type + /// Credential type, one of "gcm" or "apn" /// public CredentialResource.PushServiceEnum Type { get; } /// - /// The friendly_name + /// Friendly name for stored credential /// public string FriendlyName { get; set; } /// - /// The certificate + /// [APN only] URL encoded representation of the certificate, e. /// public string Certificate { get; set; } /// - /// The private_key + /// [APN only] URL encoded representation of the private key, e. /// public string PrivateKey { get; set; } /// - /// The sandbox + /// [APN only] use this credential for sending to production or sandbox APNs /// public bool? Sandbox { get; set; } /// - /// The api_key + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM Service application credential /// public string ApiKey { get; set; } /// @@ -68,7 +68,7 @@ public class CreateCredentialOptions : IOptions /// /// Construct a new CreateCredentialOptions /// - /// The type + /// Credential type, one of "gcm" or "apn" public CreateCredentialOptions(CredentialResource.PushServiceEnum type) { Type = type; @@ -158,23 +158,23 @@ public class UpdateCredentialOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// Friendly name for stored credential /// public string FriendlyName { get; set; } /// - /// The certificate + /// [APN only] URL encoded representation of the certificate, e. /// public string Certificate { get; set; } /// - /// The private_key + /// [APN only] URL encoded representation of the private key, e. /// public string PrivateKey { get; set; } /// - /// The sandbox + /// [APN only] use this credential for sending to production or sandbox APNs /// public bool? Sandbox { get; set; } /// - /// The api_key + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM Service application credential /// public string ApiKey { get; set; } /// diff --git a/src/Twilio/Rest/IpMessaging/V1/CredentialResource.cs b/src/Twilio/Rest/IpMessaging/V1/CredentialResource.cs index 135462635..f0cb312b5 100644 --- a/src/Twilio/Rest/IpMessaging/V1/CredentialResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/CredentialResource.cs @@ -213,12 +213,13 @@ public static async System.Threading.Tasks.Task CreateAsync( /// /// create /// - /// The type - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key + /// Credential type, one of "gcm" or "apn" + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential /// The secret /// Client to make requests to Twilio /// A single instance of Credential @@ -239,12 +240,13 @@ public static CredentialResource Create(CredentialResource.PushServiceEnum type, /// /// create /// - /// The type - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key + /// Credential type, one of "gcm" or "apn" + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential /// The secret /// Client to make requests to Twilio /// Task that resolves to A single instance of Credential @@ -373,11 +375,12 @@ public static async System.Threading.Tasks.Task UpdateAsync( /// update /// /// The sid - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential /// The secret /// Client to make requests to Twilio /// A single instance of Credential @@ -399,11 +402,12 @@ public static CredentialResource Update(string pathSid, /// update /// /// The sid - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential /// The secret /// Client to make requests to Twilio /// Task that resolves to A single instance of Credential @@ -506,43 +510,43 @@ public static CredentialResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account[/console] responsible for this resource. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this resource. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The type + /// Indicates which push notifications service this credential is for - either gcm or apn /// [JsonProperty("type")] [JsonConverter(typeof(StringEnumConverter))] public CredentialResource.PushServiceEnum Type { get; private set; } /// - /// The sandbox + /// [APN only] true when this resource should use the sandbox APN service. /// [JsonProperty("sandbox")] public string Sandbox { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The url + /// An absolute URL for this credential resource. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteOptions.cs b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteOptions.cs index 7bee669f9..ade096e59 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteOptions.cs @@ -67,11 +67,11 @@ public class CreateInviteOptions : IOptions /// public string PathChannelSid { get; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// public string Identity { get; } /// - /// The role_sid + /// The Role assigned to this member. /// public string RoleSid { get; set; } @@ -80,7 +80,7 @@ public class CreateInviteOptions : IOptions /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. public CreateInviteOptions(string pathServiceSid, string pathChannelSid, string identity) { PathServiceSid = pathServiceSid; @@ -122,7 +122,7 @@ public class ReadInviteOptions : ReadOptions /// public string PathChannelSid { get; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// public List Identity { get; set; } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteResource.cs b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteResource.cs index e53400eee..43f0a8ede 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteResource.cs @@ -141,8 +141,8 @@ public static async System.Threading.Tasks.Task CreateAsync(Crea /// /// The service_sid /// The channel_sid - /// The identity - /// The role_sid + /// A unique string identifier for this User in this Service. + /// The Role assigned to this member. /// Client to make requests to Twilio /// A single instance of Invite public static InviteResource Create(string pathServiceSid, @@ -161,8 +161,8 @@ public static InviteResource Create(string pathServiceSid, /// /// The service_sid /// The channel_sid - /// The identity - /// The role_sid + /// A unique string identifier for this User in this Service. + /// The Role assigned to this member. /// Client to make requests to Twilio /// Task that resolves to A single instance of Invite public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -225,7 +225,7 @@ public static async System.Threading.Tasks.Task> Rea /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. /// Page size /// Record limit /// Client to make requests to Twilio @@ -247,7 +247,7 @@ public static ResourceSet Read(string pathServiceSid, /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. /// Page size /// Record limit /// Client to make requests to Twilio @@ -418,42 +418,42 @@ public static InviteResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account[/console] responsible for this member. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The channel_sid + /// The unique id of the Channel for this member. /// [JsonProperty("channel_sid")] public string ChannelSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this member belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// [JsonProperty("identity")] public string Identity { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The role_sid + /// The Role assigned to this member. /// [JsonProperty("role_sid")] public string RoleSid { get; private set; } @@ -463,7 +463,7 @@ public static InviteResource FromJson(string json) [JsonProperty("created_by")] public string CreatedBy { get; private set; } /// - /// The url + /// An absolute URL for this member. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberOptions.cs b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberOptions.cs index fae91669a..f8caca3d3 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberOptions.cs @@ -67,11 +67,11 @@ public class CreateMemberOptions : IOptions /// public string PathChannelSid { get; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// public string Identity { get; } /// - /// The role_sid + /// The Role assigned to this member. /// public string RoleSid { get; set; } @@ -80,7 +80,7 @@ public class CreateMemberOptions : IOptions /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. public CreateMemberOptions(string pathServiceSid, string pathChannelSid, string identity) { PathServiceSid = pathServiceSid; @@ -122,7 +122,7 @@ public class ReadMemberOptions : ReadOptions /// public string PathChannelSid { get; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// public List Identity { get; set; } @@ -217,11 +217,11 @@ public class UpdateMemberOptions : IOptions /// public string PathSid { get; } /// - /// The role_sid + /// The Role assigned to this member. /// public string RoleSid { get; set; } /// - /// The last_consumed_message_index + /// An Integer representing index of the last Message this Member has read within this Channel /// public int? LastConsumedMessageIndex { get; set; } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberResource.cs b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberResource.cs index a400ff311..9f22cd991 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberResource.cs @@ -141,8 +141,8 @@ public static async System.Threading.Tasks.Task CreateAsync(Crea /// /// The service_sid /// The channel_sid - /// The identity - /// The role_sid + /// A unique string identifier for this User in this Service. + /// The Role assigned to this member. /// Client to make requests to Twilio /// A single instance of Member public static MemberResource Create(string pathServiceSid, @@ -161,8 +161,8 @@ public static MemberResource Create(string pathServiceSid, /// /// The service_sid /// The channel_sid - /// The identity - /// The role_sid + /// A unique string identifier for this User in this Service. + /// The Role assigned to this member. /// Client to make requests to Twilio /// Task that resolves to A single instance of Member public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -225,7 +225,7 @@ public static async System.Threading.Tasks.Task> Rea /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. /// Page size /// Record limit /// Client to make requests to Twilio @@ -247,7 +247,7 @@ public static ResourceSet Read(string pathServiceSid, /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. /// Page size /// Record limit /// Client to make requests to Twilio @@ -445,8 +445,9 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upda /// The service_sid /// The channel_sid /// The sid - /// The role_sid - /// The last_consumed_message_index + /// The Role assigned to this member. + /// An Integer representing index of the last Message this Member has read + /// within this Channel /// Client to make requests to Twilio /// A single instance of Member public static MemberResource Update(string pathServiceSid, @@ -467,8 +468,9 @@ public static MemberResource Update(string pathServiceSid, /// The service_sid /// The channel_sid /// The sid - /// The role_sid - /// The last_consumed_message_index + /// The Role assigned to this member. + /// An Integer representing index of the last Message this Member has read + /// within this Channel /// Client to make requests to Twilio /// Task that resolves to A single instance of Member public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -502,57 +504,57 @@ public static MemberResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this member. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The channel_sid + /// The unique id of the Channel for this member. /// [JsonProperty("channel_sid")] public string ChannelSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this member belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// [JsonProperty("identity")] public string Identity { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The role_sid + /// The Role assigned to this member. /// [JsonProperty("role_sid")] public string RoleSid { get; private set; } /// - /// The last_consumed_message_index + /// An Integer representing index of the last Message this Member has read within this Channel /// [JsonProperty("last_consumed_message_index")] public int? LastConsumedMessageIndex { get; private set; } /// - /// The last_consumption_timestamp + /// An ISO8601 based timestamp string representing the datetime of the last Message read event for this Member within this Channel /// [JsonProperty("last_consumption_timestamp")] public DateTime? LastConsumptionTimestamp { get; private set; } /// - /// The url + /// An absolute URL for this member. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageOptions.cs b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageOptions.cs index 0dd147b82..261d233a7 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageOptions.cs @@ -224,11 +224,11 @@ public class UpdateMessageOptions : IOptions /// public string PathSid { get; } /// - /// The body + /// The new message body string. /// public string Body { get; set; } /// - /// The attributes + /// The new attributes metadata field you can use to store any data you wish. /// public string Attributes { get; set; } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageResource.cs b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageResource.cs index 1a1ee96d5..8d16429c1 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageResource.cs @@ -463,8 +463,8 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// The service_sid /// The channel_sid /// The sid - /// The body - /// The attributes + /// The new message body string. + /// The new attributes metadata field you can use to store any data you wish. /// Client to make requests to Twilio /// A single instance of Message public static MessageResource Update(string pathServiceSid, @@ -485,8 +485,8 @@ public static MessageResource Update(string pathServiceSid, /// The service_sid /// The channel_sid /// The sid - /// The body - /// The attributes + /// The new message body string. + /// The new attributes metadata field you can use to store any data you wish. /// Client to make requests to Twilio /// Task that resolves to A single instance of Message public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -520,27 +520,27 @@ public static MessageResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this message. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The attributes + /// An optional string metadata field you can use to store any data you wish. /// [JsonProperty("attributes")] public string Attributes { get; private set; } /// - /// The service_sid + /// The unique id of the Service this message belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The to + /// The unique id of the Channel this message was sent to. /// [JsonProperty("to")] public string To { get; private set; } @@ -550,37 +550,37 @@ public static MessageResource FromJson(string json) [JsonProperty("channel_sid")] public string ChannelSid { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The was_edited + /// true if the message has been updated since it was created. /// [JsonProperty("was_edited")] public bool? WasEdited { get; private set; } /// - /// The from + /// The identity of the message's author. /// [JsonProperty("from")] public string From { get; private set; } /// - /// The body + /// The contents of the message. /// [JsonProperty("body")] public string Body { get; private set; } /// - /// The index + /// The index of the message within the Channel /// [JsonProperty("index")] public int? Index { get; private set; } /// - /// The url + /// An absolute URL for this message. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/ChannelOptions.cs b/src/Twilio/Rest/IpMessaging/V1/Service/ChannelOptions.cs index 3c8ade711..704142b6c 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/ChannelOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/ChannelOptions.cs @@ -92,19 +92,19 @@ public class CreateChannelOptions : IOptions /// public string PathServiceSid { get; } /// - /// The friendly_name + /// A human-readable name for the Channel. /// public string FriendlyName { get; set; } /// - /// The unique_name + /// A unique, addressable name for the Channel. /// public string UniqueName { get; set; } /// - /// The attributes + /// An optional metadata field you can use to store any data you wish. /// public string Attributes { get; set; } /// - /// The type + /// The visibility of the channel - public or private. /// public ChannelResource.ChannelTypeEnum Type { get; set; } @@ -205,15 +205,15 @@ public class UpdateChannelOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// A human-readable name for the Channel. /// public string FriendlyName { get; set; } /// - /// The unique_name + /// A unique, addressable name for the Channel. /// public string UniqueName { get; set; } /// - /// The attributes + /// An optional metadata field you can use to store any data you wish. /// public string Attributes { get; set; } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/ChannelResource.cs b/src/Twilio/Rest/IpMessaging/V1/Service/ChannelResource.cs index 8962c4411..953df398c 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/ChannelResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/ChannelResource.cs @@ -218,10 +218,10 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre /// create /// /// The service_sid - /// The friendly_name - /// The unique_name - /// The attributes - /// The type + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. + /// The visibility of the channel - public or private. /// Client to make requests to Twilio /// A single instance of Channel public static ChannelResource Create(string pathServiceSid, @@ -240,10 +240,10 @@ public static ChannelResource Create(string pathServiceSid, /// create /// /// The service_sid - /// The friendly_name - /// The unique_name - /// The attributes - /// The type + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. + /// The visibility of the channel - public or private. /// Client to make requests to Twilio /// Task that resolves to A single instance of Channel public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -446,9 +446,9 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// /// The service_sid /// The sid - /// The friendly_name - /// The unique_name - /// The attributes + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. /// Client to make requests to Twilio /// A single instance of Channel public static ChannelResource Update(string pathServiceSid, @@ -468,9 +468,9 @@ public static ChannelResource Update(string pathServiceSid, /// /// The service_sid /// The sid - /// The friendly_name - /// The unique_name - /// The attributes + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. /// Client to make requests to Twilio /// Task that resolves to A single instance of Channel public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -504,53 +504,53 @@ public static ChannelResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the [Account][/console] responsible for this channel. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The service_sid + /// The unique id of the [Service][service] this channel belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this channel. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The unique_name + /// The unique, addressable name of this channel. /// [JsonProperty("unique_name")] public string UniqueName { get; private set; } /// - /// The attributes + /// An optional string metadata field you can use to store any data you wish. /// [JsonProperty("attributes")] public string Attributes { get; private set; } /// - /// The type + /// The visibility of this channel - either public or private /// [JsonProperty("type")] [JsonConverter(typeof(StringEnumConverter))] public ChannelResource.ChannelTypeEnum Type { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The created_by + /// Identity of the channel's creator. /// [JsonProperty("created_by")] public string CreatedBy { get; private set; } @@ -565,12 +565,12 @@ public static ChannelResource FromJson(string json) [JsonProperty("messages_count")] public int? MessagesCount { get; private set; } /// - /// The url + /// An absolute URL for this channel. /// [JsonProperty("url")] public Uri Url { get; private set; } /// - /// The links + /// Absolute URLs to access the [Members][members] and [Messages][messages] for this channel. /// [JsonProperty("links")] public Dictionary Links { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/RoleOptions.cs b/src/Twilio/Rest/IpMessaging/V1/Service/RoleOptions.cs index 998e76b06..0ec8bbdf3 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/RoleOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/RoleOptions.cs @@ -92,15 +92,15 @@ public class CreateRoleOptions : IOptions /// public string PathServiceSid { get; } /// - /// The friendly_name + /// The human-readable name of this role. /// public string FriendlyName { get; } /// - /// The type + /// What kind of role this is. /// public RoleResource.RoleTypeEnum Type { get; } /// - /// The permission + /// A permission this role should have. /// public List Permission { get; } @@ -108,9 +108,9 @@ public class CreateRoleOptions : IOptions /// Construct a new CreateRoleOptions /// /// The service_sid - /// The friendly_name - /// The type - /// The permission + /// The human-readable name of this role. + /// What kind of role this is. + /// A permission this role should have. public CreateRoleOptions(string pathServiceSid, string friendlyName, RoleResource.RoleTypeEnum type, @@ -195,7 +195,7 @@ public class UpdateRoleOptions : IOptions /// public string PathSid { get; } /// - /// The permission + /// A permission this role should have. /// public List Permission { get; } @@ -204,7 +204,7 @@ public class UpdateRoleOptions : IOptions /// /// The service_sid /// The sid - /// The permission + /// A permission this role should have. public UpdateRoleOptions(string pathServiceSid, string pathSid, List permission) { PathServiceSid = pathServiceSid; diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/RoleResource.cs b/src/Twilio/Rest/IpMessaging/V1/Service/RoleResource.cs index ec60ecd6e..52d44856c 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/RoleResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/RoleResource.cs @@ -218,9 +218,9 @@ public static async System.Threading.Tasks.Task CreateAsync(Create /// create /// /// The service_sid - /// The friendly_name - /// The type - /// The permission + /// The human-readable name of this role. + /// What kind of role this is. + /// A permission this role should have. /// Client to make requests to Twilio /// A single instance of Role public static RoleResource Create(string pathServiceSid, @@ -238,9 +238,9 @@ public static RoleResource Create(string pathServiceSid, /// create /// /// The service_sid - /// The friendly_name - /// The type - /// The permission + /// The human-readable name of this role. + /// What kind of role this is. + /// A permission this role should have. /// Client to make requests to Twilio /// Task that resolves to A single instance of Role public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -438,7 +438,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(Update /// /// The service_sid /// The sid - /// The permission + /// A permission this role should have. /// Client to make requests to Twilio /// A single instance of Role public static RoleResource Update(string pathServiceSid, @@ -456,7 +456,7 @@ public static RoleResource Update(string pathServiceSid, /// /// The service_sid /// The sid - /// The permission + /// A permission this role should have. /// Client to make requests to Twilio /// Task that resolves to A single instance of Role public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -488,48 +488,48 @@ public static RoleResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this role. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this role belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this role. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The type + /// What kind of role this is. /// [JsonProperty("type")] [JsonConverter(typeof(StringEnumConverter))] public RoleResource.RoleTypeEnum Type { get; private set; } /// - /// The permissions + /// A JSON array of the permissions this role has. /// [JsonProperty("permissions")] public List Permissions { get; private set; } /// - /// The date_created + /// The date that this resource was created in ISO 8601 format. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated in ISO 8601 format. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The url + /// An absolute URL for this role. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/UserOptions.cs b/src/Twilio/Rest/IpMessaging/V1/Service/UserOptions.cs index f79f79478..a28df530c 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/UserOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/UserOptions.cs @@ -91,19 +91,19 @@ public class CreateUserOptions : IOptions /// public string PathServiceSid { get; } /// - /// The identity + /// A unique string that identifies the user within this service - often a username or email address. /// public string Identity { get; } /// - /// The role_sid + /// The unique id of the Role assigned to this user. /// public string RoleSid { get; set; } /// - /// The attributes + /// An optional string used to contain any metadata or other information for the User. /// public string Attributes { get; set; } /// - /// The friendly_name + /// An optional human readable string representing the user. /// public string FriendlyName { get; set; } @@ -111,7 +111,8 @@ public class CreateUserOptions : IOptions /// Construct a new CreateUserOptions /// /// The service_sid - /// The identity + /// A unique string that identifies the user within this service - often a username or email + /// address. public CreateUserOptions(string pathServiceSid, string identity) { PathServiceSid = pathServiceSid; @@ -196,15 +197,15 @@ public class UpdateUserOptions : IOptions /// public string PathSid { get; } /// - /// The role_sid + /// The unique id of the [Role][role] assigned to this user. /// public string RoleSid { get; set; } /// - /// The attributes + /// An optional string used to contain any metadata or other information for the User. /// public string Attributes { get; set; } /// - /// The friendly_name + /// An optional human readable string representing the user. /// public string FriendlyName { get; set; } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/UserResource.cs b/src/Twilio/Rest/IpMessaging/V1/Service/UserResource.cs index 2dabd39db..be761db6c 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/UserResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/UserResource.cs @@ -204,10 +204,12 @@ public static async System.Threading.Tasks.Task CreateAsync(Create /// create /// /// The service_sid - /// The identity - /// The role_sid - /// The attributes - /// The friendly_name + /// A unique string that identifies the user within this service - often a username or email + /// address. + /// The unique id of the Role assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// A single instance of User public static UserResource Create(string pathServiceSid, @@ -226,10 +228,12 @@ public static UserResource Create(string pathServiceSid, /// create /// /// The service_sid - /// The identity - /// The role_sid - /// The attributes - /// The friendly_name + /// A unique string that identifies the user within this service - often a username or email + /// address. + /// The unique id of the Role assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// Task that resolves to A single instance of User public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -428,9 +432,10 @@ public static async System.Threading.Tasks.Task UpdateAsync(Update /// /// The service_sid /// The sid - /// The role_sid - /// The attributes - /// The friendly_name + /// The unique id of the [Role][role] assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// A single instance of User public static UserResource Update(string pathServiceSid, @@ -450,9 +455,10 @@ public static UserResource Update(string pathServiceSid, /// /// The service_sid /// The sid - /// The role_sid - /// The attributes - /// The friendly_name + /// The unique id of the [Role][role] assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// Task that resolves to A single instance of User public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -486,57 +492,57 @@ public static UserResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this user. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this user belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The attributes + /// An optional string metadata field you can use to store any data you wish. /// [JsonProperty("attributes")] public string Attributes { get; private set; } /// - /// The friendly_name + /// The human-readable name of this user. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The role_sid + /// The unique id of the [Role][role] assigned to this user. /// [JsonProperty("role_sid")] public string RoleSid { get; private set; } /// - /// The identity + /// A unique string that identifies the user within this service - often a username or email address. /// [JsonProperty("identity")] public string Identity { get; private set; } /// - /// The is_online + /// Indicates whether the User is actively connected to the Service instance and online. /// [JsonProperty("is_online")] public bool? IsOnline { get; private set; } /// - /// The is_notifiable + /// Indicates whether the User has a potentially valid Push Notification registration for the Service instance. /// [JsonProperty("is_notifiable")] public bool? IsNotifiable { get; private set; } /// - /// The date_created + /// The date that this resource was created in ISO 8601 format. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated in ISO 8601 format. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } @@ -551,7 +557,7 @@ public static UserResource FromJson(string json) [JsonProperty("links")] public Dictionary Links { get; private set; } /// - /// The url + /// An absolute URL for this user. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V1/ServiceOptions.cs b/src/Twilio/Rest/IpMessaging/V1/ServiceOptions.cs index 7d16dc504..bada858a7 100644 --- a/src/Twilio/Rest/IpMessaging/V1/ServiceOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/ServiceOptions.cs @@ -76,14 +76,14 @@ public List> GetParams() public class CreateServiceOptions : IOptions { /// - /// The friendly_name + /// Human-readable name for this service instance /// public string FriendlyName { get; } /// /// Construct a new CreateServiceOptions /// - /// The friendly_name + /// Human-readable name for this service instance public CreateServiceOptions(string friendlyName) { FriendlyName = friendlyName; @@ -134,7 +134,7 @@ public class UpdateServiceOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// Human-readable name for this service instance /// public string FriendlyName { get; set; } /// @@ -142,27 +142,27 @@ public class UpdateServiceOptions : IOptions /// public string DefaultServiceRoleSid { get; set; } /// - /// The default_channel_role_sid + /// Channel role assigned on channel join /// public string DefaultChannelRoleSid { get; set; } /// - /// The default_channel_creator_role_sid + /// Channel role assigned to creator of channel when joining for first time /// public string DefaultChannelCreatorRoleSid { get; set; } /// - /// The read_status_enabled + /// true if the member read status feature is enabled, false if not. /// public bool? ReadStatusEnabled { get; set; } /// - /// The reachability_enabled + /// true if the reachability feature should be enabled. /// public bool? ReachabilityEnabled { get; set; } /// - /// The typing_indicator_timeout + /// ISO 8601 duration indicating the timeout after "started typing" event when client should assume that user is not typing anymore even if no "ended typing" message received /// public int? TypingIndicatorTimeout { get; set; } /// - /// The consumption_report_interval + /// ISO 8601 duration indicating the interval between consumption reports sent from client endpoints. /// public int? ConsumptionReportInterval { get; set; } /// @@ -198,19 +198,19 @@ public class UpdateServiceOptions : IOptions /// public string NotificationsInvitedToChannelTemplate { get; set; } /// - /// The pre_webhook_url + /// The webhook URL for PRE-Event webhooks. /// public Uri PreWebhookUrl { get; set; } /// - /// The post_webhook_url + /// The webhook URL for POST-Event webhooks. /// public Uri PostWebhookUrl { get; set; } /// - /// The webhook_method + /// The webhook request format to use. /// public Twilio.Http.HttpMethod WebhookMethod { get; set; } /// - /// The webhook_filters + /// The list of WebHook events that are enabled for this Service instance. /// public List WebhookFilters { get; set; } /// diff --git a/src/Twilio/Rest/IpMessaging/V1/ServiceResource.cs b/src/Twilio/Rest/IpMessaging/V1/ServiceResource.cs index 15e88f9a0..56e5776e6 100644 --- a/src/Twilio/Rest/IpMessaging/V1/ServiceResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/ServiceResource.cs @@ -196,7 +196,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre /// /// create /// - /// The friendly_name + /// Human-readable name for this service instance /// Client to make requests to Twilio /// A single instance of Service public static ServiceResource Create(string friendlyName, ITwilioRestClient client = null) @@ -209,7 +209,7 @@ public static ServiceResource Create(string friendlyName, ITwilioRestClient clie /// /// create /// - /// The friendly_name + /// Human-readable name for this service instance /// Client to make requests to Twilio /// Task that resolves to A single instance of Service public static async System.Threading.Tasks.Task CreateAsync(string friendlyName, @@ -399,14 +399,18 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// update /// /// The sid - /// The friendly_name + /// Human-readable name for this service instance /// The default_service_role_sid - /// The default_channel_role_sid - /// The default_channel_creator_role_sid - /// The read_status_enabled - /// The reachability_enabled - /// The typing_indicator_timeout - /// The consumption_report_interval + /// Channel role assigned on channel join + /// Channel role assigned to creator of channel when joining for first time + /// + /// true if the member read status feature is enabled, false if not. + /// true if the reachability feature should be enabled. + /// ISO 8601 duration indicating the timeout after "started typing" event when + /// client should assume that user is not typing anymore even if no "ended typing" message + /// received + /// ISO 8601 duration indicating the interval between consumption reports sent + /// from client endpoints. /// The notifications.new_message.enabled /// The notifications.new_message.template /// The notifications.added_to_channel.enabled @@ -415,10 +419,10 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// The notifications.removed_from_channel.template /// The notifications.invited_to_channel.enabled /// The notifications.invited_to_channel.template - /// The pre_webhook_url - /// The post_webhook_url - /// The webhook_method - /// The webhook_filters + /// The webhook URL for PRE-Event webhooks. + /// The webhook URL for POST-Event webhooks. + /// The webhook request format to use. + /// The list of WebHook events that are enabled for this Service instance. /// The webhooks.on_message_send.url /// The webhooks.on_message_send.method /// The webhooks.on_message_send.format @@ -553,14 +557,18 @@ public static ServiceResource Update(string pathSid, /// update /// /// The sid - /// The friendly_name + /// Human-readable name for this service instance /// The default_service_role_sid - /// The default_channel_role_sid - /// The default_channel_creator_role_sid - /// The read_status_enabled - /// The reachability_enabled - /// The typing_indicator_timeout - /// The consumption_report_interval + /// Channel role assigned on channel join + /// Channel role assigned to creator of channel when joining for first time + /// + /// true if the member read status feature is enabled, false if not. + /// true if the reachability feature should be enabled. + /// ISO 8601 duration indicating the timeout after "started typing" event when + /// client should assume that user is not typing anymore even if no "ended typing" message + /// received + /// ISO 8601 duration indicating the interval between consumption reports sent + /// from client endpoints. /// The notifications.new_message.enabled /// The notifications.new_message.template /// The notifications.added_to_channel.enabled @@ -569,10 +577,10 @@ public static ServiceResource Update(string pathSid, /// The notifications.removed_from_channel.template /// The notifications.invited_to_channel.enabled /// The notifications.invited_to_channel.template - /// The pre_webhook_url - /// The post_webhook_url - /// The webhook_method - /// The webhook_filters + /// The webhook URL for PRE-Event webhooks. + /// The webhook URL for POST-Event webhooks. + /// The webhook request format to use. + /// The list of WebHook events that are enabled for this Service instance. /// The webhooks.on_message_send.url /// The webhooks.on_message_send.method /// The webhooks.on_message_send.format @@ -722,62 +730,62 @@ public static ServiceResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this service. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this service. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The date_created + /// The date that this resource was created /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The default_service_role_sid + /// The service role assigned to users when they are added to the service. /// [JsonProperty("default_service_role_sid")] public string DefaultServiceRoleSid { get; private set; } /// - /// The default_channel_role_sid + /// The channel role assigned to users when they are added to a channel. /// [JsonProperty("default_channel_role_sid")] public string DefaultChannelRoleSid { get; private set; } /// - /// The default_channel_creator_role_sid + /// The channel role assigned to a channel creator when joining a new channel. /// [JsonProperty("default_channel_creator_role_sid")] public string DefaultChannelCreatorRoleSid { get; private set; } /// - /// The read_status_enabled + /// Enable the Message Constumption Horizon feature. /// [JsonProperty("read_status_enabled")] public bool? ReadStatusEnabled { get; private set; } /// - /// The reachability_enabled + /// Indicates whether the the Reachability feature is enabled for this Service instance. /// [JsonProperty("reachability_enabled")] public bool? ReachabilityEnabled { get; private set; } /// - /// The typing_indicator_timeout + /// The amount of time after a "started typing" event when clients should assume that user is no longer typing, even if no "ended typing" message was received. /// [JsonProperty("typing_indicator_timeout")] public int? TypingIndicatorTimeout { get; private set; } /// - /// The consumption_report_interval + /// The interval between consumption reports submission batches from client endpoints. /// [JsonProperty("consumption_report_interval")] public int? ConsumptionReportInterval { get; private set; } @@ -792,37 +800,37 @@ public static ServiceResource FromJson(string json) [JsonProperty("webhooks")] public object Webhooks { get; private set; } /// - /// The pre_webhook_url + /// The webhook URL for PRE-Event webhooks. /// [JsonProperty("pre_webhook_url")] public string PreWebhookUrl { get; private set; } /// - /// The post_webhook_url + /// The webhook URL for POST-Event webhooks. /// [JsonProperty("post_webhook_url")] public string PostWebhookUrl { get; private set; } /// - /// The webhook_method + /// The webhook request format to use. /// [JsonProperty("webhook_method")] public string WebhookMethod { get; private set; } /// - /// The webhook_filters + /// The list of WebHook events that are enabled for this Service instance. /// [JsonProperty("webhook_filters")] public List WebhookFilters { get; private set; } /// - /// The notifications + /// Notification configuration for the Service instance. /// [JsonProperty("notifications")] public object Notifications { get; private set; } /// - /// The url + /// An absolute URL for this service. /// [JsonProperty("url")] public Uri Url { get; private set; } /// - /// The links + /// URLs to access the Channels, Roles, and Users for this service. /// [JsonProperty("links")] public Dictionary Links { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V2/CredentialOptions.cs b/src/Twilio/Rest/IpMessaging/V2/CredentialOptions.cs index 68993308a..aa891650e 100644 --- a/src/Twilio/Rest/IpMessaging/V2/CredentialOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/CredentialOptions.cs @@ -37,38 +37,38 @@ public override List> GetParams() public class CreateCredentialOptions : IOptions { /// - /// The type + /// Credential type, one of "gcm", "fcm", or "apn" /// public CredentialResource.PushServiceEnum Type { get; } /// - /// The friendly_name + /// Friendly name for stored credential /// public string FriendlyName { get; set; } /// - /// The certificate + /// [APN only] URL encoded representation of the certificate, e. /// public string Certificate { get; set; } /// - /// The private_key + /// [APN only] URL encoded representation of the private key, e. /// public string PrivateKey { get; set; } /// - /// The sandbox + /// [APN only] use this credential for sending to production or sandbox APNs /// public bool? Sandbox { get; set; } /// - /// The api_key + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM Service application credential /// public string ApiKey { get; set; } /// - /// The secret + /// [FCM only] This is the "Server key" of your project from Firebase console under Settings / Cloud messaging. /// public string Secret { get; set; } /// /// Construct a new CreateCredentialOptions /// - /// The type + /// Credential type, one of "gcm", "fcm", or "apn" public CreateCredentialOptions(CredentialResource.PushServiceEnum type) { Type = type; @@ -158,27 +158,27 @@ public class UpdateCredentialOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// Friendly name for stored credential /// public string FriendlyName { get; set; } /// - /// The certificate + /// [APN only] URL encoded representation of the certificate, e. /// public string Certificate { get; set; } /// - /// The private_key + /// [APN only] URL encoded representation of the private key, e. /// public string PrivateKey { get; set; } /// - /// The sandbox + /// [APN only] use this credential for sending to production or sandbox APNs /// public bool? Sandbox { get; set; } /// - /// The api_key + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM Service application credential /// public string ApiKey { get; set; } /// - /// The secret + /// [FCM only] This is the "Server key" of your project from Firebase console under Settings / Cloud messaging. /// public string Secret { get; set; } diff --git a/src/Twilio/Rest/IpMessaging/V2/CredentialResource.cs b/src/Twilio/Rest/IpMessaging/V2/CredentialResource.cs index 8da6c2125..f8d62afaa 100644 --- a/src/Twilio/Rest/IpMessaging/V2/CredentialResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/CredentialResource.cs @@ -213,13 +213,15 @@ public static async System.Threading.Tasks.Task CreateAsync( /// /// create /// - /// The type - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key - /// The secret + /// Credential type, one of "gcm", "fcm", or "apn" + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential + /// [FCM only] This is the "Server key" of your project from Firebase console under Settings / + /// Cloud messaging. /// Client to make requests to Twilio /// A single instance of Credential public static CredentialResource Create(CredentialResource.PushServiceEnum type, @@ -239,13 +241,15 @@ public static CredentialResource Create(CredentialResource.PushServiceEnum type, /// /// create /// - /// The type - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key - /// The secret + /// Credential type, one of "gcm", "fcm", or "apn" + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential + /// [FCM only] This is the "Server key" of your project from Firebase console under Settings / + /// Cloud messaging. /// Client to make requests to Twilio /// Task that resolves to A single instance of Credential public static async System.Threading.Tasks.Task CreateAsync(CredentialResource.PushServiceEnum type, @@ -373,12 +377,14 @@ public static async System.Threading.Tasks.Task UpdateAsync( /// update /// /// The sid - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key - /// The secret + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential + /// [FCM only] This is the "Server key" of your project from Firebase console under Settings / + /// Cloud messaging. /// Client to make requests to Twilio /// A single instance of Credential public static CredentialResource Update(string pathSid, @@ -399,12 +405,14 @@ public static CredentialResource Update(string pathSid, /// update /// /// The sid - /// The friendly_name - /// The certificate - /// The private_key - /// The sandbox - /// The api_key - /// The secret + /// Friendly name for stored credential + /// [APN only] URL encoded representation of the certificate, e. + /// [APN only] URL encoded representation of the private key, e. + /// [APN only] use this credential for sending to production or sandbox APNs + /// [GCM only] This is the "API key" for project from Google Developer console for your GCM + /// Service application credential + /// [FCM only] This is the "Server key" of your project from Firebase console under Settings / + /// Cloud messaging. /// Client to make requests to Twilio /// Task that resolves to A single instance of Credential public static async System.Threading.Tasks.Task UpdateAsync(string pathSid, @@ -506,43 +514,43 @@ public static CredentialResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this resource. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this resource. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The type + /// Indicates which push notifications service this credential is for - either gcm, fcm, or apn /// [JsonProperty("type")] [JsonConverter(typeof(StringEnumConverter))] public CredentialResource.PushServiceEnum Type { get; private set; } /// - /// The sandbox + /// [APN only] true when this resource should use the sandbox APN service. /// [JsonProperty("sandbox")] public string Sandbox { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The url + /// An absolute URL for this credential resource. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteOptions.cs index c4cc43705..571bd3ad3 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteOptions.cs @@ -67,11 +67,11 @@ public class CreateInviteOptions : IOptions /// public string PathChannelSid { get; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// public string Identity { get; } /// - /// The role_sid + /// The Role assigned to this member. /// public string RoleSid { get; set; } @@ -80,7 +80,7 @@ public class CreateInviteOptions : IOptions /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. public CreateInviteOptions(string pathServiceSid, string pathChannelSid, string identity) { PathServiceSid = pathServiceSid; @@ -122,7 +122,7 @@ public class ReadInviteOptions : ReadOptions /// public string PathChannelSid { get; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// public List Identity { get; set; } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteResource.cs index e53bcb55f..bf67a5086 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteResource.cs @@ -141,8 +141,8 @@ public static async System.Threading.Tasks.Task CreateAsync(Crea /// /// The service_sid /// The channel_sid - /// The identity - /// The role_sid + /// A unique string identifier for this User in this Service. + /// The Role assigned to this member. /// Client to make requests to Twilio /// A single instance of Invite public static InviteResource Create(string pathServiceSid, @@ -161,8 +161,8 @@ public static InviteResource Create(string pathServiceSid, /// /// The service_sid /// The channel_sid - /// The identity - /// The role_sid + /// A unique string identifier for this User in this Service. + /// The Role assigned to this member. /// Client to make requests to Twilio /// Task that resolves to A single instance of Invite public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -225,7 +225,7 @@ public static async System.Threading.Tasks.Task> Rea /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. /// Page size /// Record limit /// Client to make requests to Twilio @@ -247,7 +247,7 @@ public static ResourceSet Read(string pathServiceSid, /// /// The service_sid /// The channel_sid - /// The identity + /// A unique string identifier for this User in this Service. /// Page size /// Record limit /// Client to make requests to Twilio @@ -418,42 +418,42 @@ public static InviteResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this member. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The channel_sid + /// The unique id of the Channel for this member. /// [JsonProperty("channel_sid")] public string ChannelSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this member belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// [JsonProperty("identity")] public string Identity { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The role_sid + /// The Role assigned to this member. /// [JsonProperty("role_sid")] public string RoleSid { get; private set; } @@ -463,7 +463,7 @@ public static InviteResource FromJson(string json) [JsonProperty("created_by")] public string CreatedBy { get; private set; } /// - /// The url + /// An absolute URL for this member. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberOptions.cs index 3a676b8f5..2f3339fe9 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberOptions.cs @@ -253,23 +253,23 @@ public class UpdateMemberOptions : IOptions /// public string PathSid { get; } /// - /// The role_sid + /// The role to be assigned to this member. /// public string RoleSid { get; set; } /// - /// The last_consumed_message_index + /// Optional field used to specify the last consumed Message index for the Channel for this Member. /// public int? LastConsumedMessageIndex { get; set; } /// - /// The last_consumption_timestamp + /// Optional ISO8601 time indicating the last datetime the Member consumed a Message in the Channel. /// public DateTime? LastConsumptionTimestamp { get; set; } /// - /// The date_created + /// The optional ISO8601 time specifying the datetime the Members should be set as being created. /// public DateTime? DateCreated { get; set; } /// - /// The date_updated + /// The optional ISO8601 time specifying the datetime the Member should be set as having been last updated. /// public DateTime? DateUpdated { get; set; } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberResource.cs index add2808f9..eb18f0286 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberResource.cs @@ -461,11 +461,15 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upda /// The service_sid /// The channel_sid /// The sid - /// The role_sid - /// The last_consumed_message_index - /// The last_consumption_timestamp - /// The date_created - /// The date_updated + /// The role to be assigned to this member. + /// Optional field used to specify the last consumed Message index for the + /// Channel for this Member. + /// Optional ISO8601 time indicating the last datetime the Member consumed a + /// Message in the Channel. + /// The optional ISO8601 time specifying the datetime the Members should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Member should be set as having + /// been last updated. /// Client to make requests to Twilio /// A single instance of Member public static MemberResource Update(string pathServiceSid, @@ -489,11 +493,15 @@ public static MemberResource Update(string pathServiceSid, /// The service_sid /// The channel_sid /// The sid - /// The role_sid - /// The last_consumed_message_index - /// The last_consumption_timestamp - /// The date_created - /// The date_updated + /// The role to be assigned to this member. + /// Optional field used to specify the last consumed Message index for the + /// Channel for this Member. + /// Optional ISO8601 time indicating the last datetime the Member consumed a + /// Message in the Channel. + /// The optional ISO8601 time specifying the datetime the Members should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Member should be set as having + /// been last updated. /// Client to make requests to Twilio /// Task that resolves to A single instance of Member public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -530,57 +538,57 @@ public static MemberResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this member. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The channel_sid + /// The unique id of the Channel for this member. /// [JsonProperty("channel_sid")] public string ChannelSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this member belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The identity + /// A unique string identifier for this User in this Service. /// [JsonProperty("identity")] public string Identity { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The role_sid + /// The Role assigned to this member. /// [JsonProperty("role_sid")] public string RoleSid { get; private set; } /// - /// The last_consumed_message_index + /// An Integer representing index of the last Message this Member has read within this Channel /// [JsonProperty("last_consumed_message_index")] public int? LastConsumedMessageIndex { get; private set; } /// - /// The last_consumption_timestamp + /// An ISO8601 based timestamp string representing the datetime of the last Message read event for this Member within this Channel /// [JsonProperty("last_consumption_timestamp")] public DateTime? LastConsumptionTimestamp { get; private set; } /// - /// The url + /// An absolute URL for this member. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageOptions.cs index b04fdb04f..8dd14004f 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageOptions.cs @@ -164,7 +164,7 @@ public class ReadMessageOptions : ReadOptions /// public string PathChannelSid { get; } /// - /// The order + /// Optional. /// public MessageResource.OrderTypeEnum Order { get; set; } @@ -258,23 +258,23 @@ public class UpdateMessageOptions : IOptions /// public string PathSid { get; } /// - /// The body + /// The optional message body string. /// public string Body { get; set; } /// - /// The attributes + /// The optional attributes metadata field you can use to store any data you wish. /// public string Attributes { get; set; } /// - /// The date_created + /// The optional ISO8601 time specifying the datetime the Message should be set as being created. /// public DateTime? DateCreated { get; set; } /// - /// The date_updated + /// The optional ISO8601 time specifying the datetime the Message should be set as having been last updated. /// public DateTime? DateUpdated { get; set; } /// - /// The last_updated_by + /// Optional field to specify the Identity of the User that last updated the Message /// public string LastUpdatedBy { get; set; } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageResource.cs index 08f73ee28..2a5e60a12 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageResource.cs @@ -259,7 +259,7 @@ public static async System.Threading.Tasks.Task> Re /// /// The service_sid /// The channel_sid - /// The order + /// Optional. /// Page size /// Record limit /// Client to make requests to Twilio @@ -281,7 +281,7 @@ public static ResourceSet Read(string pathServiceSid, /// /// The service_sid /// The channel_sid - /// The order + /// Optional. /// Page size /// Record limit /// Client to make requests to Twilio @@ -479,11 +479,14 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// The service_sid /// The channel_sid /// The sid - /// The body - /// The attributes - /// The date_created - /// The date_updated - /// The last_updated_by + /// The optional message body string. + /// The optional attributes metadata field you can use to store any data you wish. + /// The optional ISO8601 time specifying the datetime the Message should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Message should be set as having + /// been last updated. + /// Optional field to specify the Identity of the User that last updated the Message + /// /// Client to make requests to Twilio /// A single instance of Message public static MessageResource Update(string pathServiceSid, @@ -507,11 +510,14 @@ public static MessageResource Update(string pathServiceSid, /// The service_sid /// The channel_sid /// The sid - /// The body - /// The attributes - /// The date_created - /// The date_updated - /// The last_updated_by + /// The optional message body string. + /// The optional attributes metadata field you can use to store any data you wish. + /// The optional ISO8601 time specifying the datetime the Message should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Message should be set as having + /// been last updated. + /// Optional field to specify the Identity of the User that last updated the Message + /// /// Client to make requests to Twilio /// Task that resolves to A single instance of Message public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -548,27 +554,27 @@ public static MessageResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this message. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The attributes + /// An optional string metadata field you can use to store any data you wish. /// [JsonProperty("attributes")] public string Attributes { get; private set; } /// - /// The service_sid + /// The unique id of the Service this message belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The to + /// The unique id of the Channel this message was sent to. /// [JsonProperty("to")] public string To { get; private set; } @@ -578,52 +584,52 @@ public static MessageResource FromJson(string json) [JsonProperty("channel_sid")] public string ChannelSid { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The last_updated_by + /// Optional field to specify the Identity of the User that last updated the Message /// [JsonProperty("last_updated_by")] public string LastUpdatedBy { get; private set; } /// - /// The was_edited + /// true if the message has been updated since it was created. /// [JsonProperty("was_edited")] public bool? WasEdited { get; private set; } /// - /// The from + /// The identity of the message's author. /// [JsonProperty("from")] public string From { get; private set; } /// - /// The body + /// Optional — the contents of the message. /// [JsonProperty("body")] public string Body { get; private set; } /// - /// The index + /// The index of the message within the Channel /// [JsonProperty("index")] public int? Index { get; private set; } /// - /// The type + /// Message type. /// [JsonProperty("type")] public string Type { get; private set; } /// - /// The media + /// Optional — if a Media resource instance is attached to the Message, this will contain the Media object for the attached Media. /// [JsonProperty("media")] public object Media { get; private set; } /// - /// The url + /// An absolute URL for this message. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookOptions.cs new file mode 100644 index 000000000..4c100b748 --- /dev/null +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookOptions.cs @@ -0,0 +1,336 @@ +/// This code was generated by +/// \ / _ _ _| _ _ +/// | (_)\/(_)(_|\/| |(/_ v1.0.0 +/// / / + +using System; +using System.Collections.Generic; +using System.Linq; +using Twilio.Base; +using Twilio.Converters; + +namespace Twilio.Rest.IpMessaging.V2.Service.Channel +{ + + /// + /// ReadWebhookOptions + /// + public class ReadWebhookOptions : ReadOptions + { + /// + /// The service_sid + /// + public string PathServiceSid { get; } + /// + /// The channel_sid + /// + public string PathChannelSid { get; } + + /// + /// Construct a new ReadWebhookOptions + /// + /// The service_sid + /// The channel_sid + public ReadWebhookOptions(string pathServiceSid, string pathChannelSid) + { + PathServiceSid = pathServiceSid; + PathChannelSid = pathChannelSid; + } + + /// + /// Generate the necessary parameters + /// + public override List> GetParams() + { + var p = new List>(); + if (PageSize != null) + { + p.Add(new KeyValuePair("PageSize", PageSize.ToString())); + } + + return p; + } + } + + /// + /// FetchWebhookOptions + /// + public class FetchWebhookOptions : IOptions + { + /// + /// The service_sid + /// + public string PathServiceSid { get; } + /// + /// The channel_sid + /// + public string PathChannelSid { get; } + /// + /// The sid + /// + public string PathSid { get; } + + /// + /// Construct a new FetchWebhookOptions + /// + /// The service_sid + /// The channel_sid + /// The sid + public FetchWebhookOptions(string pathServiceSid, string pathChannelSid, string pathSid) + { + PathServiceSid = pathServiceSid; + PathChannelSid = pathChannelSid; + PathSid = pathSid; + } + + /// + /// Generate the necessary parameters + /// + public List> GetParams() + { + var p = new List>(); + return p; + } + } + + /// + /// CreateWebhookOptions + /// + public class CreateWebhookOptions : IOptions + { + /// + /// The service_sid + /// + public string PathServiceSid { get; } + /// + /// The channel_sid + /// + public string PathChannelSid { get; } + /// + /// The type + /// + public WebhookResource.TypeEnum Type { get; } + /// + /// The configuration.url + /// + public string ConfigurationUrl { get; set; } + /// + /// The configuration.method + /// + public WebhookResource.MethodEnum ConfigurationMethod { get; set; } + /// + /// The configuration.filters + /// + public List ConfigurationFilters { get; set; } + /// + /// The configuration.triggers + /// + public List ConfigurationTriggers { get; set; } + /// + /// The configuration.flow_sid + /// + public string ConfigurationFlowSid { get; set; } + /// + /// The configuration.retry_count + /// + public int? ConfigurationRetryCount { get; set; } + + /// + /// Construct a new CreateWebhookOptions + /// + /// The service_sid + /// The channel_sid + /// The type + public CreateWebhookOptions(string pathServiceSid, string pathChannelSid, WebhookResource.TypeEnum type) + { + PathServiceSid = pathServiceSid; + PathChannelSid = pathChannelSid; + Type = type; + ConfigurationFilters = new List(); + ConfigurationTriggers = new List(); + } + + /// + /// Generate the necessary parameters + /// + public List> GetParams() + { + var p = new List>(); + if (Type != null) + { + p.Add(new KeyValuePair("Type", Type.ToString())); + } + + if (ConfigurationUrl != null) + { + p.Add(new KeyValuePair("Configuration.Url", ConfigurationUrl)); + } + + if (ConfigurationMethod != null) + { + p.Add(new KeyValuePair("Configuration.Method", ConfigurationMethod.ToString())); + } + + if (ConfigurationFilters != null) + { + p.AddRange(ConfigurationFilters.Select(prop => new KeyValuePair("Configuration.Filters", prop))); + } + + if (ConfigurationTriggers != null) + { + p.AddRange(ConfigurationTriggers.Select(prop => new KeyValuePair("Configuration.Triggers", prop))); + } + + if (ConfigurationFlowSid != null) + { + p.Add(new KeyValuePair("Configuration.FlowSid", ConfigurationFlowSid.ToString())); + } + + if (ConfigurationRetryCount != null) + { + p.Add(new KeyValuePair("Configuration.RetryCount", ConfigurationRetryCount.Value.ToString())); + } + + return p; + } + } + + /// + /// UpdateWebhookOptions + /// + public class UpdateWebhookOptions : IOptions + { + /// + /// The service_sid + /// + public string PathServiceSid { get; } + /// + /// The channel_sid + /// + public string PathChannelSid { get; } + /// + /// The sid + /// + public string PathSid { get; } + /// + /// The configuration.url + /// + public string ConfigurationUrl { get; set; } + /// + /// The configuration.method + /// + public WebhookResource.MethodEnum ConfigurationMethod { get; set; } + /// + /// The configuration.filters + /// + public List ConfigurationFilters { get; set; } + /// + /// The configuration.triggers + /// + public List ConfigurationTriggers { get; set; } + /// + /// The configuration.flow_sid + /// + public string ConfigurationFlowSid { get; set; } + /// + /// The configuration.retry_count + /// + public int? ConfigurationRetryCount { get; set; } + + /// + /// Construct a new UpdateWebhookOptions + /// + /// The service_sid + /// The channel_sid + /// The sid + public UpdateWebhookOptions(string pathServiceSid, string pathChannelSid, string pathSid) + { + PathServiceSid = pathServiceSid; + PathChannelSid = pathChannelSid; + PathSid = pathSid; + ConfigurationFilters = new List(); + ConfigurationTriggers = new List(); + } + + /// + /// Generate the necessary parameters + /// + public List> GetParams() + { + var p = new List>(); + if (ConfigurationUrl != null) + { + p.Add(new KeyValuePair("Configuration.Url", ConfigurationUrl)); + } + + if (ConfigurationMethod != null) + { + p.Add(new KeyValuePair("Configuration.Method", ConfigurationMethod.ToString())); + } + + if (ConfigurationFilters != null) + { + p.AddRange(ConfigurationFilters.Select(prop => new KeyValuePair("Configuration.Filters", prop))); + } + + if (ConfigurationTriggers != null) + { + p.AddRange(ConfigurationTriggers.Select(prop => new KeyValuePair("Configuration.Triggers", prop))); + } + + if (ConfigurationFlowSid != null) + { + p.Add(new KeyValuePair("Configuration.FlowSid", ConfigurationFlowSid.ToString())); + } + + if (ConfigurationRetryCount != null) + { + p.Add(new KeyValuePair("Configuration.RetryCount", ConfigurationRetryCount.Value.ToString())); + } + + return p; + } + } + + /// + /// DeleteWebhookOptions + /// + public class DeleteWebhookOptions : IOptions + { + /// + /// The service_sid + /// + public string PathServiceSid { get; } + /// + /// The channel_sid + /// + public string PathChannelSid { get; } + /// + /// The sid + /// + public string PathSid { get; } + + /// + /// Construct a new DeleteWebhookOptions + /// + /// The service_sid + /// The channel_sid + /// The sid + public DeleteWebhookOptions(string pathServiceSid, string pathChannelSid, string pathSid) + { + PathServiceSid = pathServiceSid; + PathChannelSid = pathChannelSid; + PathSid = pathSid; + } + + /// + /// Generate the necessary parameters + /// + public List> GetParams() + { + var p = new List>(); + return p; + } + } + +} \ No newline at end of file diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookResource.cs new file mode 100644 index 000000000..ad8f7d210 --- /dev/null +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookResource.cs @@ -0,0 +1,616 @@ +/// This code was generated by +/// \ / _ _ _| _ _ +/// | (_)\/(_)(_|\/| |(/_ v1.0.0 +/// / / +/// +/// WebhookResource +/// + +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using Twilio.Base; +using Twilio.Clients; +using Twilio.Converters; +using Twilio.Exceptions; +using Twilio.Http; +using Twilio.Types; + +namespace Twilio.Rest.IpMessaging.V2.Service.Channel +{ + + public class WebhookResource : Resource + { + public sealed class TypeEnum : StringEnum + { + private TypeEnum(string value) : base(value) {} + public TypeEnum() {} + public static implicit operator TypeEnum(string value) + { + return new TypeEnum(value); + } + + public static readonly TypeEnum Webhook = new TypeEnum("webhook"); + public static readonly TypeEnum Trigger = new TypeEnum("trigger"); + public static readonly TypeEnum Studio = new TypeEnum("studio"); + } + + public sealed class MethodEnum : StringEnum + { + private MethodEnum(string value) : base(value) {} + public MethodEnum() {} + public static implicit operator MethodEnum(string value) + { + return new MethodEnum(value); + } + + public static readonly MethodEnum Get = new MethodEnum("GET"); + public static readonly MethodEnum Post = new MethodEnum("POST"); + } + + private static Request BuildReadRequest(ReadWebhookOptions options, ITwilioRestClient client) + { + return new Request( + HttpMethod.Get, + Rest.Domain.IpMessaging, + "/v2/Services/" + options.PathServiceSid + "/Channels/" + options.PathChannelSid + "/Webhooks", + client.Region, + queryParams: options.GetParams() + ); + } + + /// + /// read + /// + /// Read Webhook parameters + /// Client to make requests to Twilio + /// A single instance of Webhook + public static ResourceSet Read(ReadWebhookOptions options, ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = client.Request(BuildReadRequest(options, client)); + + var page = Page.FromJson("webhooks", response.Content); + return new ResourceSet(page, options, client); + } + + #if !NET35 + /// + /// read + /// + /// Read Webhook parameters + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task> ReadAsync(ReadWebhookOptions options, + ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = await client.RequestAsync(BuildReadRequest(options, client)); + + var page = Page.FromJson("webhooks", response.Content); + return new ResourceSet(page, options, client); + } + #endif + + /// + /// read + /// + /// The service_sid + /// The channel_sid + /// Page size + /// Record limit + /// Client to make requests to Twilio + /// A single instance of Webhook + public static ResourceSet Read(string pathServiceSid, + string pathChannelSid, + int? pageSize = null, + long? limit = null, + ITwilioRestClient client = null) + { + var options = new ReadWebhookOptions(pathServiceSid, pathChannelSid){PageSize = pageSize, Limit = limit}; + return Read(options, client); + } + + #if !NET35 + /// + /// read + /// + /// The service_sid + /// The channel_sid + /// Page size + /// Record limit + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task> ReadAsync(string pathServiceSid, + string pathChannelSid, + int? pageSize = null, + long? limit = null, + ITwilioRestClient client = null) + { + var options = new ReadWebhookOptions(pathServiceSid, pathChannelSid){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("webhooks", 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.IpMessaging, + client.Region + ) + ); + + var response = client.Request(request); + return Page.FromJson("webhooks", 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.IpMessaging, + client.Region + ) + ); + + var response = client.Request(request); + return Page.FromJson("webhooks", response.Content); + } + + private static Request BuildFetchRequest(FetchWebhookOptions options, ITwilioRestClient client) + { + return new Request( + HttpMethod.Get, + Rest.Domain.IpMessaging, + "/v2/Services/" + options.PathServiceSid + "/Channels/" + options.PathChannelSid + "/Webhooks/" + options.PathSid + "", + client.Region, + queryParams: options.GetParams() + ); + } + + /// + /// fetch + /// + /// Fetch Webhook parameters + /// Client to make requests to Twilio + /// A single instance of Webhook + public static WebhookResource Fetch(FetchWebhookOptions options, ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = client.Request(BuildFetchRequest(options, client)); + return FromJson(response.Content); + } + + #if !NET35 + /// + /// fetch + /// + /// Fetch Webhook parameters + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task FetchAsync(FetchWebhookOptions options, + ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = await client.RequestAsync(BuildFetchRequest(options, client)); + return FromJson(response.Content); + } + #endif + + /// + /// fetch + /// + /// The service_sid + /// The channel_sid + /// The sid + /// Client to make requests to Twilio + /// A single instance of Webhook + public static WebhookResource Fetch(string pathServiceSid, + string pathChannelSid, + string pathSid, + ITwilioRestClient client = null) + { + var options = new FetchWebhookOptions(pathServiceSid, pathChannelSid, pathSid); + return Fetch(options, client); + } + + #if !NET35 + /// + /// fetch + /// + /// The service_sid + /// The channel_sid + /// The sid + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task FetchAsync(string pathServiceSid, + string pathChannelSid, + string pathSid, + ITwilioRestClient client = null) + { + var options = new FetchWebhookOptions(pathServiceSid, pathChannelSid, pathSid); + return await FetchAsync(options, client); + } + #endif + + private static Request BuildCreateRequest(CreateWebhookOptions options, ITwilioRestClient client) + { + return new Request( + HttpMethod.Post, + Rest.Domain.IpMessaging, + "/v2/Services/" + options.PathServiceSid + "/Channels/" + options.PathChannelSid + "/Webhooks", + client.Region, + postParams: options.GetParams() + ); + } + + /// + /// create + /// + /// Create Webhook parameters + /// Client to make requests to Twilio + /// A single instance of Webhook + public static WebhookResource Create(CreateWebhookOptions options, ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = client.Request(BuildCreateRequest(options, client)); + return FromJson(response.Content); + } + + #if !NET35 + /// + /// create + /// + /// Create Webhook parameters + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task CreateAsync(CreateWebhookOptions options, + ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = await client.RequestAsync(BuildCreateRequest(options, client)); + return FromJson(response.Content); + } + #endif + + /// + /// create + /// + /// The service_sid + /// The channel_sid + /// The type + /// The configuration.url + /// The configuration.method + /// The configuration.filters + /// The configuration.triggers + /// The configuration.flow_sid + /// The configuration.retry_count + /// Client to make requests to Twilio + /// A single instance of Webhook + public static WebhookResource Create(string pathServiceSid, + string pathChannelSid, + WebhookResource.TypeEnum type, + string configurationUrl = null, + WebhookResource.MethodEnum configurationMethod = null, + List configurationFilters = null, + List configurationTriggers = null, + string configurationFlowSid = null, + int? configurationRetryCount = null, + ITwilioRestClient client = null) + { + var options = new CreateWebhookOptions(pathServiceSid, pathChannelSid, type){ConfigurationUrl = configurationUrl, ConfigurationMethod = configurationMethod, ConfigurationFilters = configurationFilters, ConfigurationTriggers = configurationTriggers, ConfigurationFlowSid = configurationFlowSid, ConfigurationRetryCount = configurationRetryCount}; + return Create(options, client); + } + + #if !NET35 + /// + /// create + /// + /// The service_sid + /// The channel_sid + /// The type + /// The configuration.url + /// The configuration.method + /// The configuration.filters + /// The configuration.triggers + /// The configuration.flow_sid + /// The configuration.retry_count + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, + string pathChannelSid, + WebhookResource.TypeEnum type, + string configurationUrl = null, + WebhookResource.MethodEnum configurationMethod = null, + List configurationFilters = null, + List configurationTriggers = null, + string configurationFlowSid = null, + int? configurationRetryCount = null, + ITwilioRestClient client = null) + { + var options = new CreateWebhookOptions(pathServiceSid, pathChannelSid, type){ConfigurationUrl = configurationUrl, ConfigurationMethod = configurationMethod, ConfigurationFilters = configurationFilters, ConfigurationTriggers = configurationTriggers, ConfigurationFlowSid = configurationFlowSid, ConfigurationRetryCount = configurationRetryCount}; + return await CreateAsync(options, client); + } + #endif + + private static Request BuildUpdateRequest(UpdateWebhookOptions options, ITwilioRestClient client) + { + return new Request( + HttpMethod.Post, + Rest.Domain.IpMessaging, + "/v2/Services/" + options.PathServiceSid + "/Channels/" + options.PathChannelSid + "/Webhooks/" + options.PathSid + "", + client.Region, + postParams: options.GetParams() + ); + } + + /// + /// update + /// + /// Update Webhook parameters + /// Client to make requests to Twilio + /// A single instance of Webhook + public static WebhookResource Update(UpdateWebhookOptions options, ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = client.Request(BuildUpdateRequest(options, client)); + return FromJson(response.Content); + } + + #if !NET35 + /// + /// update + /// + /// Update Webhook parameters + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task UpdateAsync(UpdateWebhookOptions options, + ITwilioRestClient client = null) + { + client = client ?? TwilioClient.GetRestClient(); + var response = await client.RequestAsync(BuildUpdateRequest(options, client)); + return FromJson(response.Content); + } + #endif + + /// + /// update + /// + /// The service_sid + /// The channel_sid + /// The sid + /// The configuration.url + /// The configuration.method + /// The configuration.filters + /// The configuration.triggers + /// The configuration.flow_sid + /// The configuration.retry_count + /// Client to make requests to Twilio + /// A single instance of Webhook + public static WebhookResource Update(string pathServiceSid, + string pathChannelSid, + string pathSid, + string configurationUrl = null, + WebhookResource.MethodEnum configurationMethod = null, + List configurationFilters = null, + List configurationTriggers = null, + string configurationFlowSid = null, + int? configurationRetryCount = null, + ITwilioRestClient client = null) + { + var options = new UpdateWebhookOptions(pathServiceSid, pathChannelSid, pathSid){ConfigurationUrl = configurationUrl, ConfigurationMethod = configurationMethod, ConfigurationFilters = configurationFilters, ConfigurationTriggers = configurationTriggers, ConfigurationFlowSid = configurationFlowSid, ConfigurationRetryCount = configurationRetryCount}; + return Update(options, client); + } + + #if !NET35 + /// + /// update + /// + /// The service_sid + /// The channel_sid + /// The sid + /// The configuration.url + /// The configuration.method + /// The configuration.filters + /// The configuration.triggers + /// The configuration.flow_sid + /// The configuration.retry_count + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, + string pathChannelSid, + string pathSid, + string configurationUrl = null, + WebhookResource.MethodEnum configurationMethod = null, + List configurationFilters = null, + List configurationTriggers = null, + string configurationFlowSid = null, + int? configurationRetryCount = null, + ITwilioRestClient client = null) + { + var options = new UpdateWebhookOptions(pathServiceSid, pathChannelSid, pathSid){ConfigurationUrl = configurationUrl, ConfigurationMethod = configurationMethod, ConfigurationFilters = configurationFilters, ConfigurationTriggers = configurationTriggers, ConfigurationFlowSid = configurationFlowSid, ConfigurationRetryCount = configurationRetryCount}; + return await UpdateAsync(options, client); + } + #endif + + private static Request BuildDeleteRequest(DeleteWebhookOptions options, ITwilioRestClient client) + { + return new Request( + HttpMethod.Delete, + Rest.Domain.IpMessaging, + "/v2/Services/" + options.PathServiceSid + "/Channels/" + options.PathChannelSid + "/Webhooks/" + options.PathSid + "", + client.Region, + queryParams: options.GetParams() + ); + } + + /// + /// delete + /// + /// Delete Webhook parameters + /// Client to make requests to Twilio + /// A single instance of Webhook + public static bool Delete(DeleteWebhookOptions 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 Webhook parameters + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task DeleteAsync(DeleteWebhookOptions 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 + /// + /// The service_sid + /// The channel_sid + /// The sid + /// Client to make requests to Twilio + /// A single instance of Webhook + public static bool Delete(string pathServiceSid, + string pathChannelSid, + string pathSid, + ITwilioRestClient client = null) + { + var options = new DeleteWebhookOptions(pathServiceSid, pathChannelSid, pathSid); + return Delete(options, client); + } + + #if !NET35 + /// + /// delete + /// + /// The service_sid + /// The channel_sid + /// The sid + /// Client to make requests to Twilio + /// Task that resolves to A single instance of Webhook + public static async System.Threading.Tasks.Task DeleteAsync(string pathServiceSid, + string pathChannelSid, + string pathSid, + ITwilioRestClient client = null) + { + var options = new DeleteWebhookOptions(pathServiceSid, pathChannelSid, pathSid); + return await DeleteAsync(options, client); + } + #endif + + /// + /// Converts a JSON string into a WebhookResource object + /// + /// Raw JSON string + /// WebhookResource object represented by the provided JSON + public static WebhookResource FromJson(string json) + { + // Convert all checked exceptions to Runtime + try + { + return JsonConvert.DeserializeObject(json); + } + catch (JsonException e) + { + throw new ApiException(e.Message, e); + } + } + + /// + /// The sid + /// + [JsonProperty("sid")] + public string Sid { get; private set; } + /// + /// The account_sid + /// + [JsonProperty("account_sid")] + public string AccountSid { get; private set; } + /// + /// The service_sid + /// + [JsonProperty("service_sid")] + public string ServiceSid { get; private set; } + /// + /// The channel_sid + /// + [JsonProperty("channel_sid")] + public string ChannelSid { get; private set; } + /// + /// The type + /// + [JsonProperty("type")] + public string Type { get; private set; } + /// + /// The url + /// + [JsonProperty("url")] + public Uri Url { get; private set; } + /// + /// The configuration + /// + [JsonProperty("configuration")] + public object Configuration { get; private set; } + /// + /// The date_created + /// + [JsonProperty("date_created")] + public DateTime? DateCreated { get; private set; } + /// + /// The date_updated + /// + [JsonProperty("date_updated")] + public DateTime? DateUpdated { get; private set; } + + private WebhookResource() + { + + } + } + +} \ No newline at end of file diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/ChannelOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/ChannelOptions.cs index 6702eeb59..7c7b43d66 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/ChannelOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/ChannelOptions.cs @@ -92,31 +92,31 @@ public class CreateChannelOptions : IOptions /// public string PathServiceSid { get; } /// - /// The friendly_name + /// A human-readable name for the Channel. /// public string FriendlyName { get; set; } /// - /// The unique_name + /// A unique, addressable name for the Channel. /// public string UniqueName { get; set; } /// - /// The attributes + /// An optional metadata field you can use to store any data you wish. /// public string Attributes { get; set; } /// - /// The type + /// The visibility of the channel - public or private. /// public ChannelResource.ChannelTypeEnum Type { get; set; } /// - /// The date_created + /// The optional ISO8601 time specifying the datetime the Channel should be set as being created. /// public DateTime? DateCreated { get; set; } /// - /// The date_updated + /// The optional ISO8601 time specifying the datetime the Channel should be set as having been last updated. /// public DateTime? DateUpdated { get; set; } /// - /// The created_by + /// Optional field to specify the Identity of the User that created the Channel. /// public string CreatedBy { get; set; } @@ -232,27 +232,27 @@ public class UpdateChannelOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// A human-readable name for the Channel. /// public string FriendlyName { get; set; } /// - /// The unique_name + /// A unique, addressable name for the Channel. /// public string UniqueName { get; set; } /// - /// The attributes + /// An optional metadata field you can use to store any data you wish. /// public string Attributes { get; set; } /// - /// The date_created + /// The optional ISO8601 time specifying the datetime the Channel should be set as being created. /// public DateTime? DateCreated { get; set; } /// - /// The date_updated + /// The optional ISO8601 time specifying the datetime the Channel should be set as having been last updated. /// public DateTime? DateUpdated { get; set; } /// - /// The created_by + /// Optional field to specify the Identity of the User that created the Channel. /// public string CreatedBy { get; set; } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/ChannelResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/ChannelResource.cs index cdd9466d5..587e23764 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/ChannelResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/ChannelResource.cs @@ -218,13 +218,15 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre /// create /// /// The service_sid - /// The friendly_name - /// The unique_name - /// The attributes - /// The type - /// The date_created - /// The date_updated - /// The created_by + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. + /// The visibility of the channel - public or private. + /// The optional ISO8601 time specifying the datetime the Channel should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Channel should be set as having + /// been last updated. + /// Optional field to specify the Identity of the User that created the Channel. /// Client to make requests to Twilio /// A single instance of Channel public static ChannelResource Create(string pathServiceSid, @@ -246,13 +248,15 @@ public static ChannelResource Create(string pathServiceSid, /// create /// /// The service_sid - /// The friendly_name - /// The unique_name - /// The attributes - /// The type - /// The date_created - /// The date_updated - /// The created_by + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. + /// The visibility of the channel - public or private. + /// The optional ISO8601 time specifying the datetime the Channel should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Channel should be set as having + /// been last updated. + /// Optional field to specify the Identity of the User that created the Channel. /// Client to make requests to Twilio /// Task that resolves to A single instance of Channel public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -458,12 +462,14 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// /// The service_sid /// The sid - /// The friendly_name - /// The unique_name - /// The attributes - /// The date_created - /// The date_updated - /// The created_by + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. + /// The optional ISO8601 time specifying the datetime the Channel should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Channel should be set as having + /// been last updated. + /// Optional field to specify the Identity of the User that created the Channel. /// Client to make requests to Twilio /// A single instance of Channel public static ChannelResource Update(string pathServiceSid, @@ -486,12 +492,14 @@ public static ChannelResource Update(string pathServiceSid, /// /// The service_sid /// The sid - /// The friendly_name - /// The unique_name - /// The attributes - /// The date_created - /// The date_updated - /// The created_by + /// A human-readable name for the Channel. + /// A unique, addressable name for the Channel. + /// An optional metadata field you can use to store any data you wish. + /// The optional ISO8601 time specifying the datetime the Channel should be set as being + /// created. + /// The optional ISO8601 time specifying the datetime the Channel should be set as having + /// been last updated. + /// Optional field to specify the Identity of the User that created the Channel. /// Client to make requests to Twilio /// Task that resolves to A single instance of Channel public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -528,73 +536,73 @@ public static ChannelResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this channel. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this channel belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this channel. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The unique_name + /// The unique, addressable name of this channel. /// [JsonProperty("unique_name")] public string UniqueName { get; private set; } /// - /// The attributes + /// An optional string metadata field you can use to store any data you wish. /// [JsonProperty("attributes")] public string Attributes { get; private set; } /// - /// The type + /// The visibility of this channel - either public or private /// [JsonProperty("type")] [JsonConverter(typeof(StringEnumConverter))] public ChannelResource.ChannelTypeEnum Type { get; private set; } /// - /// The date_created + /// The date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The created_by + /// Identity of the channel's creator. /// [JsonProperty("created_by")] public string CreatedBy { get; private set; } /// - /// The members_count + /// The number of Members in the Channel /// [JsonProperty("members_count")] public int? MembersCount { get; private set; } /// - /// The messages_count + /// The number of Messages in the Channel /// [JsonProperty("messages_count")] public int? MessagesCount { get; private set; } /// - /// The url + /// An absolute URL for this channel. /// [JsonProperty("url")] public Uri Url { get; private set; } /// - /// The links + /// Absolute URLs to access the Members, Messages , Invites and, if it exists the last Message for this Channel. /// [JsonProperty("links")] public Dictionary Links { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/RoleOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/RoleOptions.cs index 027f994a6..019e0b816 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/RoleOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/RoleOptions.cs @@ -92,15 +92,15 @@ public class CreateRoleOptions : IOptions /// public string PathServiceSid { get; } /// - /// The friendly_name + /// The human-readable name of this role. /// public string FriendlyName { get; } /// - /// The type + /// What kind of role this is. /// public RoleResource.RoleTypeEnum Type { get; } /// - /// The permission + /// A permission this role should have. /// public List Permission { get; } @@ -108,9 +108,9 @@ public class CreateRoleOptions : IOptions /// Construct a new CreateRoleOptions /// /// The service_sid - /// The friendly_name - /// The type - /// The permission + /// The human-readable name of this role. + /// What kind of role this is. + /// A permission this role should have. public CreateRoleOptions(string pathServiceSid, string friendlyName, RoleResource.RoleTypeEnum type, @@ -195,7 +195,7 @@ public class UpdateRoleOptions : IOptions /// public string PathSid { get; } /// - /// The permission + /// A permission this role should have. /// public List Permission { get; } @@ -204,7 +204,7 @@ public class UpdateRoleOptions : IOptions /// /// The service_sid /// The sid - /// The permission + /// A permission this role should have. public UpdateRoleOptions(string pathServiceSid, string pathSid, List permission) { PathServiceSid = pathServiceSid; diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/RoleResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/RoleResource.cs index daf324ab0..975d8fd65 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/RoleResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/RoleResource.cs @@ -218,9 +218,9 @@ public static async System.Threading.Tasks.Task CreateAsync(Create /// create /// /// The service_sid - /// The friendly_name - /// The type - /// The permission + /// The human-readable name of this role. + /// What kind of role this is. + /// A permission this role should have. /// Client to make requests to Twilio /// A single instance of Role public static RoleResource Create(string pathServiceSid, @@ -238,9 +238,9 @@ public static RoleResource Create(string pathServiceSid, /// create /// /// The service_sid - /// The friendly_name - /// The type - /// The permission + /// The human-readable name of this role. + /// What kind of role this is. + /// A permission this role should have. /// Client to make requests to Twilio /// Task that resolves to A single instance of Role public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -438,7 +438,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(Update /// /// The service_sid /// The sid - /// The permission + /// A permission this role should have. /// Client to make requests to Twilio /// A single instance of Role public static RoleResource Update(string pathServiceSid, @@ -456,7 +456,7 @@ public static RoleResource Update(string pathServiceSid, /// /// The service_sid /// The sid - /// The permission + /// A permission this role should have. /// Client to make requests to Twilio /// Task that resolves to A single instance of Role public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -488,48 +488,48 @@ public static RoleResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this role. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this role belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this role. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The type + /// What kind of role this is. /// [JsonProperty("type")] [JsonConverter(typeof(StringEnumConverter))] public RoleResource.RoleTypeEnum Type { get; private set; } /// - /// The permissions + /// A JSON array of the permissions this role has. /// [JsonProperty("permissions")] public List Permissions { get; private set; } /// - /// The date_created + /// The date that this resource was created in ISO 8601 format. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated in ISO 8601 format. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The url + /// An absolute URL for this role. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/UserOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/UserOptions.cs index 1677c80e0..7da837bd3 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/UserOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/UserOptions.cs @@ -91,19 +91,19 @@ public class CreateUserOptions : IOptions /// public string PathServiceSid { get; } /// - /// The identity + /// A unique string that identifies the user within this service - often a username or email address. /// public string Identity { get; } /// - /// The role_sid + /// The unique id of the Role assigned to this user. /// public string RoleSid { get; set; } /// - /// The attributes + /// An optional string used to contain any metadata or other information for the User. /// public string Attributes { get; set; } /// - /// The friendly_name + /// An optional human readable string representing the user. /// public string FriendlyName { get; set; } @@ -111,7 +111,8 @@ public class CreateUserOptions : IOptions /// Construct a new CreateUserOptions /// /// The service_sid - /// The identity + /// A unique string that identifies the user within this service - often a username or email + /// address. public CreateUserOptions(string pathServiceSid, string identity) { PathServiceSid = pathServiceSid; @@ -196,15 +197,15 @@ public class UpdateUserOptions : IOptions /// public string PathSid { get; } /// - /// The role_sid + /// The unique id of the [Role][role] assigned to this user. /// public string RoleSid { get; set; } /// - /// The attributes + /// An optional string used to contain any metadata or other information for the User. /// public string Attributes { get; set; } /// - /// The friendly_name + /// An optional human readable string representing the user. /// public string FriendlyName { get; set; } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/UserResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/UserResource.cs index 482295ae3..27d17f003 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/UserResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/UserResource.cs @@ -204,10 +204,12 @@ public static async System.Threading.Tasks.Task CreateAsync(Create /// create /// /// The service_sid - /// The identity - /// The role_sid - /// The attributes - /// The friendly_name + /// A unique string that identifies the user within this service - often a username or email + /// address. + /// The unique id of the Role assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// A single instance of User public static UserResource Create(string pathServiceSid, @@ -226,10 +228,12 @@ public static UserResource Create(string pathServiceSid, /// create /// /// The service_sid - /// The identity - /// The role_sid - /// The attributes - /// The friendly_name + /// A unique string that identifies the user within this service - often a username or email + /// address. + /// The unique id of the Role assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// Task that resolves to A single instance of User public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -428,9 +432,10 @@ public static async System.Threading.Tasks.Task UpdateAsync(Update /// /// The service_sid /// The sid - /// The role_sid - /// The attributes - /// The friendly_name + /// The unique id of the [Role][role] assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// A single instance of User public static UserResource Update(string pathServiceSid, @@ -450,9 +455,10 @@ public static UserResource Update(string pathServiceSid, /// /// The service_sid /// The sid - /// The role_sid - /// The attributes - /// The friendly_name + /// The unique id of the [Role][role] assigned to this user. + /// An optional string used to contain any metadata or other information for the User. + /// + /// An optional human readable string representing the user. /// Client to make requests to Twilio /// Task that resolves to A single instance of User public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, @@ -486,62 +492,62 @@ public static UserResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this user. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The service_sid + /// The unique id of the Service this user belongs to. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The attributes + /// An optional string metadata field you can use to store any data you wish. /// [JsonProperty("attributes")] public string Attributes { get; private set; } /// - /// The friendly_name + /// The human-readable name of this user. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The role_sid + /// The unique id of the [Role][role] assigned to this user. /// [JsonProperty("role_sid")] public string RoleSid { get; private set; } /// - /// The identity + /// A unique string that identifies the user within this service - often a username or email address. /// [JsonProperty("identity")] public string Identity { get; private set; } /// - /// The is_online + /// Indicates whether the User is actively connected to the Service instance and online. /// [JsonProperty("is_online")] public bool? IsOnline { get; private set; } /// - /// The is_notifiable + /// Indicates whether the User has a potentially valid Push Notification registration for the Service instance. /// [JsonProperty("is_notifiable")] public bool? IsNotifiable { get; private set; } /// - /// The date_created + /// The date that this resource was created in ISO 8601 format. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated in ISO 8601 format. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The joined_channels_count + /// The number of Channels this User is a Member of. /// [JsonProperty("joined_channels_count")] public int? JoinedChannelsCount { get; private set; } @@ -551,7 +557,7 @@ public static UserResource FromJson(string json) [JsonProperty("links")] public Dictionary Links { get; private set; } /// - /// The url + /// An absolute URL for this user. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/IpMessaging/V2/ServiceOptions.cs b/src/Twilio/Rest/IpMessaging/V2/ServiceOptions.cs index e19af0c33..dbf28e187 100644 --- a/src/Twilio/Rest/IpMessaging/V2/ServiceOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/ServiceOptions.cs @@ -76,14 +76,14 @@ public List> GetParams() public class CreateServiceOptions : IOptions { /// - /// The friendly_name + /// Human-readable name for this service instance /// public string FriendlyName { get; } /// /// Construct a new CreateServiceOptions /// - /// The friendly_name + /// Human-readable name for this service instance public CreateServiceOptions(string friendlyName) { FriendlyName = friendlyName; @@ -134,7 +134,7 @@ public class UpdateServiceOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// Human-readable name for this service instance /// public string FriendlyName { get; set; } /// @@ -142,23 +142,23 @@ public class UpdateServiceOptions : IOptions /// public string DefaultServiceRoleSid { get; set; } /// - /// The default_channel_role_sid + /// Channel role assigned on channel join /// public string DefaultChannelRoleSid { get; set; } /// - /// The default_channel_creator_role_sid + /// Channel role assigned to creator of channel when joining for first time /// public string DefaultChannelCreatorRoleSid { get; set; } /// - /// The read_status_enabled + /// true if the member read status feature is enabled, false if not. /// public bool? ReadStatusEnabled { get; set; } /// - /// The reachability_enabled + /// true if the reachability feature should be enabled. /// public bool? ReachabilityEnabled { get; set; } /// - /// The typing_indicator_timeout + /// The duration in seconds indicating the timeout after "started typing" event when client should assume that user is not typing anymore even if no "ended typing" message received /// public int? TypingIndicatorTimeout { get; set; } /// @@ -218,27 +218,27 @@ public class UpdateServiceOptions : IOptions /// public string NotificationsInvitedToChannelSound { get; set; } /// - /// The pre_webhook_url + /// The webhook URL for PRE-Event webhooks. /// public Uri PreWebhookUrl { get; set; } /// - /// The post_webhook_url + /// The webhook URL for POST-Event webhooks. /// public Uri PostWebhookUrl { get; set; } /// - /// The webhook_method + /// The webhook request format to use. /// public Twilio.Http.HttpMethod WebhookMethod { get; set; } /// - /// The webhook_filters + /// The list of WebHook events that are enabled for this Service instance. /// public List WebhookFilters { get; set; } /// - /// The limits.channel_members + /// The maximum number of Members that can be added to Channels within this Service. /// public int? LimitsChannelMembers { get; set; } /// - /// The limits.user_channels + /// The maximum number of Channels Users can be a Member of within this Service. /// public int? LimitsUserChannels { get; set; } /// @@ -246,11 +246,11 @@ public class UpdateServiceOptions : IOptions /// public string MediaCompatibilityMessage { get; set; } /// - /// The pre_webhook_retry_count + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses. /// public int? PreWebhookRetryCount { get; set; } /// - /// The post_webhook_retry_count + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses. /// public int? PostWebhookRetryCount { get; set; } /// diff --git a/src/Twilio/Rest/IpMessaging/V2/ServiceResource.cs b/src/Twilio/Rest/IpMessaging/V2/ServiceResource.cs index f428a3a1e..637a60bfd 100644 --- a/src/Twilio/Rest/IpMessaging/V2/ServiceResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/ServiceResource.cs @@ -196,7 +196,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre /// /// create /// - /// The friendly_name + /// Human-readable name for this service instance /// Client to make requests to Twilio /// A single instance of Service public static ServiceResource Create(string friendlyName, ITwilioRestClient client = null) @@ -209,7 +209,7 @@ public static ServiceResource Create(string friendlyName, ITwilioRestClient clie /// /// create /// - /// The friendly_name + /// Human-readable name for this service instance /// Client to make requests to Twilio /// Task that resolves to A single instance of Service public static async System.Threading.Tasks.Task CreateAsync(string friendlyName, @@ -399,13 +399,16 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// update /// /// The sid - /// The friendly_name + /// Human-readable name for this service instance /// The default_service_role_sid - /// The default_channel_role_sid - /// The default_channel_creator_role_sid - /// The read_status_enabled - /// The reachability_enabled - /// The typing_indicator_timeout + /// Channel role assigned on channel join + /// Channel role assigned to creator of channel when joining for first time + /// + /// true if the member read status feature is enabled, false if not. + /// true if the reachability feature should be enabled. + /// The duration in seconds indicating the timeout after "started typing" event + /// when client should assume that user is not typing anymore even if no "ended typing" + /// message received /// The consumption_report_interval /// The notifications.new_message.enabled /// The notifications.new_message.template @@ -420,15 +423,19 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// The notifications.invited_to_channel.enabled /// The notifications.invited_to_channel.template /// The notifications.invited_to_channel.sound - /// The pre_webhook_url - /// The post_webhook_url - /// The webhook_method - /// The webhook_filters - /// The limits.channel_members - /// The limits.user_channels + /// The webhook URL for PRE-Event webhooks. + /// The webhook URL for POST-Event webhooks. + /// The webhook request format to use. + /// The list of WebHook events that are enabled for this Service instance. + /// The maximum number of Members that can be added to Channels within this + /// Service. + /// The maximum number of Channels Users can be a Member of within this Service. + /// /// The media.compatibility_message - /// The pre_webhook_retry_count - /// The post_webhook_retry_count + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP + /// responses. + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP + /// responses. /// The notifications.log_enabled /// Client to make requests to Twilio /// A single instance of Service @@ -475,13 +482,16 @@ public static ServiceResource Update(string pathSid, /// update /// /// The sid - /// The friendly_name + /// Human-readable name for this service instance /// The default_service_role_sid - /// The default_channel_role_sid - /// The default_channel_creator_role_sid - /// The read_status_enabled - /// The reachability_enabled - /// The typing_indicator_timeout + /// Channel role assigned on channel join + /// Channel role assigned to creator of channel when joining for first time + /// + /// true if the member read status feature is enabled, false if not. + /// true if the reachability feature should be enabled. + /// The duration in seconds indicating the timeout after "started typing" event + /// when client should assume that user is not typing anymore even if no "ended typing" + /// message received /// The consumption_report_interval /// The notifications.new_message.enabled /// The notifications.new_message.template @@ -496,15 +506,19 @@ public static ServiceResource Update(string pathSid, /// The notifications.invited_to_channel.enabled /// The notifications.invited_to_channel.template /// The notifications.invited_to_channel.sound - /// The pre_webhook_url - /// The post_webhook_url - /// The webhook_method - /// The webhook_filters - /// The limits.channel_members - /// The limits.user_channels + /// The webhook URL for PRE-Event webhooks. + /// The webhook URL for POST-Event webhooks. + /// The webhook request format to use. + /// The list of WebHook events that are enabled for this Service instance. + /// The maximum number of Members that can be added to Channels within this + /// Service. + /// The maximum number of Channels Users can be a Member of within this Service. + /// /// The media.compatibility_message - /// The pre_webhook_retry_count - /// The post_webhook_retry_count + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP + /// responses. + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP + /// responses. /// The notifications.log_enabled /// Client to make requests to Twilio /// Task that resolves to A single instance of Service @@ -566,102 +580,102 @@ public static ServiceResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account responsible for this service. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The friendly_name + /// The human-readable name of this service. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The date_created + /// The date that this resource was created /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The default_service_role_sid + /// The service role assigned to users when they are added to the service. /// [JsonProperty("default_service_role_sid")] public string DefaultServiceRoleSid { get; private set; } /// - /// The default_channel_role_sid + /// The channel role assigned to users when they are added to a channel. /// [JsonProperty("default_channel_role_sid")] public string DefaultChannelRoleSid { get; private set; } /// - /// The default_channel_creator_role_sid + /// The channel role assigned to a channel creator when joining a new channel. /// [JsonProperty("default_channel_creator_role_sid")] public string DefaultChannelCreatorRoleSid { get; private set; } /// - /// The read_status_enabled + /// Enable the Message Constumption Horizon feature. /// [JsonProperty("read_status_enabled")] public bool? ReadStatusEnabled { get; private set; } /// - /// The reachability_enabled + /// Indicates whether the the Reachability feature is enabled for this Service instance. /// [JsonProperty("reachability_enabled")] public bool? ReachabilityEnabled { get; private set; } /// - /// The typing_indicator_timeout + /// The amount of time in seconds after a "started typing" event when clients should assume that user is no longer typing, even if no "ended typing" message was received. /// [JsonProperty("typing_indicator_timeout")] public int? TypingIndicatorTimeout { get; private set; } /// - /// The consumption_report_interval + /// DEPRECATED. /// [JsonProperty("consumption_report_interval")] public int? ConsumptionReportInterval { get; private set; } /// - /// The limits + /// Configuration for service instance level limits. /// [JsonProperty("limits")] public object Limits { get; private set; } /// - /// The pre_webhook_url + /// The webhook URL for PRE-Event webhooks. /// [JsonProperty("pre_webhook_url")] public string PreWebhookUrl { get; private set; } /// - /// The post_webhook_url + /// The webhook URL for POST-Event webhooks. /// [JsonProperty("post_webhook_url")] public string PostWebhookUrl { get; private set; } /// - /// The webhook_method + /// The webhook request format to use for both PRE and POST webhooks. /// [JsonProperty("webhook_method")] public string WebhookMethod { get; private set; } /// - /// The webhook_filters + /// The list of WebHook events that are enabled for this Service instance. /// [JsonProperty("webhook_filters")] public List WebhookFilters { get; private set; } /// - /// The pre_webhook_retry_count + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses. /// [JsonProperty("pre_webhook_retry_count")] public int? PreWebhookRetryCount { get; private set; } /// - /// The post_webhook_retry_count + /// Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses. /// [JsonProperty("post_webhook_retry_count")] public int? PostWebhookRetryCount { get; private set; } /// - /// The notifications + /// Notification configuration for the Service instance. /// [JsonProperty("notifications")] public object Notifications { get; private set; } @@ -671,12 +685,12 @@ public static ServiceResource FromJson(string json) [JsonProperty("media")] public object Media { get; private set; } /// - /// The url + /// An absolute URL for this service. /// [JsonProperty("url")] public Uri Url { get; private set; } /// - /// The links + /// URLs to access the Channels, Roles, and Users for this service. /// [JsonProperty("links")] public Dictionary Links { get; private set; } diff --git a/src/Twilio/Rest/Messaging/V1/Service/ShortCodeOptions.cs b/src/Twilio/Rest/Messaging/V1/Service/ShortCodeOptions.cs index a8e5e4ebe..f9f2b8921 100644 --- a/src/Twilio/Rest/Messaging/V1/Service/ShortCodeOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/Service/ShortCodeOptions.cs @@ -23,7 +23,7 @@ public class CreateShortCodeOptions : IOptions /// public string PathServiceSid { get; } /// - /// The short_code_sid + /// ShortCodeSid for the Shortcode being added to the Service. /// public string ShortCodeSid { get; } @@ -31,7 +31,7 @@ public class CreateShortCodeOptions : IOptions /// Construct a new CreateShortCodeOptions /// /// The service_sid - /// The short_code_sid + /// ShortCodeSid for the Shortcode being added to the Service. public CreateShortCodeOptions(string pathServiceSid, string shortCodeSid) { PathServiceSid = pathServiceSid; diff --git a/src/Twilio/Rest/Messaging/V1/Service/ShortCodeResource.cs b/src/Twilio/Rest/Messaging/V1/Service/ShortCodeResource.cs index 840475f23..ea94b34a1 100644 --- a/src/Twilio/Rest/Messaging/V1/Service/ShortCodeResource.cs +++ b/src/Twilio/Rest/Messaging/V1/Service/ShortCodeResource.cs @@ -66,7 +66,7 @@ public static async System.Threading.Tasks.Task CreateAsync(C /// create /// /// The service_sid - /// The short_code_sid + /// ShortCodeSid for the Shortcode being added to the Service. /// Client to make requests to Twilio /// A single instance of ShortCode public static ShortCodeResource Create(string pathServiceSid, string shortCodeSid, ITwilioRestClient client = null) @@ -80,7 +80,7 @@ public static ShortCodeResource Create(string pathServiceSid, string shortCodeSi /// create /// /// The service_sid - /// The short_code_sid + /// ShortCodeSid for the Shortcode being added to the Service. /// Client to make requests to Twilio /// Task that resolves to A single instance of ShortCode public static async System.Threading.Tasks.Task CreateAsync(string pathServiceSid, @@ -390,42 +390,42 @@ public static ShortCodeResource FromJson(string json) } /// - /// The sid + /// The 34 character unique sid of the Short Code /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The 34 character unique sid of the Account. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The service_sid + /// The 34 character unique sid of the Service. /// [JsonProperty("service_sid")] public string ServiceSid { get; private set; } /// - /// The date_created + /// he date that this resource was created. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The short_code + /// The E.164 format of the short code. /// [JsonProperty("short_code")] public string ShortCode { get; private set; } /// - /// The country_code + /// The 2 character ISO Country Code of the number. /// [JsonProperty("country_code")] public string CountryCode { get; private set; } /// - /// The capabilities + /// Any array of values that indicate whether the number can receive calls or messages. /// [JsonProperty("capabilities")] public List Capabilities { get; private set; } diff --git a/src/Twilio/Rest/Monitor/V1/EventOptions.cs b/src/Twilio/Rest/Monitor/V1/EventOptions.cs index 58ab09c12..d4e28e372 100644 --- a/src/Twilio/Rest/Monitor/V1/EventOptions.cs +++ b/src/Twilio/Rest/Monitor/V1/EventOptions.cs @@ -98,12 +98,12 @@ public override List> GetParams() if (StartDate != null) { - p.Add(new KeyValuePair("StartDate", StartDate.Value.ToString("yyyy-MM-dd"))); + p.Add(new KeyValuePair("StartDate", Serializers.DateTimeIso8601(StartDate))); } if (EndDate != null) { - p.Add(new KeyValuePair("EndDate", EndDate.Value.ToString("yyyy-MM-dd"))); + p.Add(new KeyValuePair("EndDate", Serializers.DateTimeIso8601(EndDate))); } if (PageSize != null) diff --git a/src/Twilio/Rest/Monitor/V1/EventResource.cs b/src/Twilio/Rest/Monitor/V1/EventResource.cs index 14afcd81f..7aa92513c 100644 --- a/src/Twilio/Rest/Monitor/V1/EventResource.cs +++ b/src/Twilio/Rest/Monitor/V1/EventResource.cs @@ -280,7 +280,7 @@ public static EventResource FromJson(string json) [JsonProperty("actor_type")] public string ActorType { get; private set; } /// - /// The description + /// A human-readable description of the event. May be null. /// [JsonProperty("description")] public string Description { get; private set; } @@ -310,12 +310,12 @@ public static EventResource FromJson(string json) [JsonProperty("resource_type")] public string ResourceType { get; private set; } /// - /// The sid + /// A 34 character string that uniquely identifies this event. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The source + /// The originating system or interface that caused the event. web for events caused by user action in the Twilio Console. api for events caused through a request to the REST API. twilio for events caused by an automated or internal Twilio system. /// [JsonProperty("source")] public string Source { get; private set; } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.cs index 0dac50bd1..393c36433 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.cs @@ -72,7 +72,7 @@ public class ReadFieldValueOptions : ReadOptions /// public string PathFieldTypeSid { get; } /// - /// The language + /// An ISO language-country string of the value. For example: en-US /// public string Language { get; set; } @@ -124,11 +124,11 @@ public class CreateFieldValueOptions : IOptions /// public string PathFieldTypeSid { get; } /// - /// The language + /// An ISO language-country string of the value. /// public string Language { get; } /// - /// The value + /// 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; } /// @@ -141,8 +141,9 @@ public class CreateFieldValueOptions : IOptions /// /// The assistant_sid /// The field_type_sid - /// The language - /// The value + /// 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; diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueResource.cs index fbbabd0bd..811ccc169 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueResource.cs @@ -148,7 +148,7 @@ public static async System.Threading.Tasks.Task> /// /// The assistant_sid /// The field_type_sid - /// The language + /// An ISO language-country string of the value. For example: en-US /// Page size /// Record limit /// Client to make requests to Twilio @@ -170,7 +170,7 @@ public static ResourceSet Read(string pathAssistantSid, /// /// The assistant_sid /// The field_type_sid - /// The language + /// An ISO language-country string of the value. For example: en-US /// Page size /// Record limit /// Client to make requests to Twilio @@ -291,8 +291,9 @@ public static async System.Threading.Tasks.Task CreateAsync( /// /// The assistant_sid /// The field_type_sid - /// The language - /// The value + /// 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. /// The synonym_of /// Client to make requests to Twilio /// A single instance of FieldValue @@ -313,8 +314,9 @@ public static FieldValueResource Create(string pathAssistantSid, /// /// The assistant_sid /// The field_type_sid - /// The language - /// The value + /// 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. /// The synonym_of /// Client to make requests to Twilio /// Task that resolves to A single instance of FieldValue @@ -425,37 +427,37 @@ public static FieldValueResource FromJson(string json) } /// - /// The account_sid + /// The unique ID of the Account that created this Field Value. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The date_created + /// The date that this resource was created /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The field_type_sid + /// The unique ID of the Field Type associated with this Field Value. /// [JsonProperty("field_type_sid")] public string FieldTypeSid { get; private set; } /// - /// The language + /// An ISO language-country string of the value. /// [JsonProperty("language")] public string Language { get; private set; } /// - /// The assistant_sid + /// The unique ID of the Assistant. /// [JsonProperty("assistant_sid")] public string AssistantSid { get; private set; } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeOptions.cs index 32e5f9fa7..a6ca33fc8 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeOptions.cs @@ -99,11 +99,11 @@ public class CreateFieldTypeOptions : IOptions /// public string PathAssistantSid { get; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. /// public string UniqueName { get; } /// - /// The friendly_name + /// A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. /// public string FriendlyName { get; set; } @@ -111,7 +111,8 @@ public class CreateFieldTypeOptions : IOptions /// Construct a new CreateFieldTypeOptions /// /// The assistant_sid - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. public CreateFieldTypeOptions(string pathAssistantSid, string uniqueName) { PathAssistantSid = pathAssistantSid; @@ -155,11 +156,11 @@ public class UpdateFieldTypeOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. /// public string FriendlyName { get; set; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. /// public string UniqueName { get; set; } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeResource.cs index 82b9c910c..6446f8dd3 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeResource.cs @@ -276,8 +276,10 @@ public static async System.Threading.Tasks.Task CreateAsync(C /// create /// /// The assistant_sid - /// The unique_name - /// The friendly_name + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. + /// A user-provided string that identifies this resource. It is non-unique and can up to + /// 255 characters long. /// Client to make requests to Twilio /// A single instance of FieldType public static FieldTypeResource Create(string pathAssistantSid, @@ -294,8 +296,10 @@ public static FieldTypeResource Create(string pathAssistantSid, /// create /// /// The assistant_sid - /// The unique_name - /// The friendly_name + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. + /// A user-provided string that identifies this resource. It is non-unique and can up to + /// 255 characters long. /// Client to make requests to Twilio /// Task that resolves to A single instance of FieldType public static async System.Threading.Tasks.Task CreateAsync(string pathAssistantSid, @@ -353,8 +357,10 @@ public static async System.Threading.Tasks.Task UpdateAsync(U /// /// The assistant_sid /// The sid - /// The friendly_name - /// The unique_name + /// A user-provided string that identifies this resource. It is non-unique and can up to + /// 255 characters long. + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. /// Client to make requests to Twilio /// A single instance of FieldType public static FieldTypeResource Update(string pathAssistantSid, @@ -373,8 +379,10 @@ public static FieldTypeResource Update(string pathAssistantSid, /// /// The assistant_sid /// The sid - /// The friendly_name - /// The unique_name + /// A user-provided string that identifies this resource. It is non-unique and can up to + /// 255 characters long. + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. /// Client to make requests to Twilio /// Task that resolves to A single instance of FieldType public static async System.Threading.Tasks.Task UpdateAsync(string pathAssistantSid, @@ -477,22 +485,22 @@ public static FieldTypeResource FromJson(string json) } /// - /// The account_sid + /// The unique ID of the Account that created this Field Type. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The date_created + /// The date that this resource was created /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The friendly_name + /// A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } @@ -502,17 +510,17 @@ public static FieldTypeResource FromJson(string json) [JsonProperty("links")] public Dictionary Links { get; private set; } /// - /// The assistant_sid + /// The unique ID of the Assistant. /// [JsonProperty("assistant_sid")] public string AssistantSid { get; private set; } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. /// [JsonProperty("unique_name")] public string UniqueName { get; private set; } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldOptions.cs index 5be74ce51..5bcb1e793 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldOptions.cs @@ -115,11 +115,11 @@ public class CreateFieldOptions : IOptions /// public string PathIntentSid { get; } /// - /// The field_type + /// The unique name or sid of the FieldType /// public string FieldType { get; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. /// public string UniqueName { get; } @@ -128,8 +128,9 @@ public class CreateFieldOptions : IOptions /// /// The assistant_sid /// The intent_sid - /// The field_type - /// The unique_name + /// The unique name or sid of the FieldType + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. public CreateFieldOptions(string pathAssistantSid, string pathIntentSid, string fieldType, string uniqueName) { PathAssistantSid = pathAssistantSid; diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldResource.cs index c52a1458e..76a2c1751 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldResource.cs @@ -287,8 +287,9 @@ public static async System.Threading.Tasks.Task CreateAsync(Creat /// /// The assistant_sid /// The intent_sid - /// The field_type - /// The unique_name + /// The unique name or sid of the FieldType + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. /// Client to make requests to Twilio /// A single instance of Field public static FieldResource Create(string pathAssistantSid, @@ -307,8 +308,9 @@ public static FieldResource Create(string pathAssistantSid, /// /// The assistant_sid /// The intent_sid - /// The field_type - /// The unique_name + /// The unique name or sid of the FieldType + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. /// Client to make requests to Twilio /// Task that resolves to A single instance of Field public static async System.Threading.Tasks.Task CreateAsync(string pathAssistantSid, @@ -417,42 +419,42 @@ public static FieldResource FromJson(string json) } /// - /// The account_sid + /// The unique ID of the Account that created this Field. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The date_created + /// The date that this resource was created /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The field_type + /// The Field Type of this field. Can be the Field Type unique_name or the Field Type sid. /// [JsonProperty("field_type")] public string FieldType { get; private set; } /// - /// The intent_sid + /// The unique ID of the Intent associated with this Field. /// [JsonProperty("intent_sid")] public string IntentSid { get; private set; } /// - /// The assistant_sid + /// The unique ID of the parent Assistant. /// [JsonProperty("assistant_sid")] public string AssistantSid { get; private set; } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. /// [JsonProperty("unique_name")] public string UniqueName { get; private set; } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleOptions.cs index c5d4020d8..6c9296a49 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleOptions.cs @@ -72,7 +72,7 @@ public class ReadSampleOptions : ReadOptions /// public string PathIntentSid { get; } /// - /// The language + /// An ISO language-country string of the sample. /// public string Language { get; set; } @@ -124,15 +124,15 @@ public class CreateSampleOptions : IOptions /// public string PathIntentSid { get; } /// - /// The language + /// An ISO language-country string of the sample. /// public string Language { get; } /// - /// The tagged_text + /// The text example of how end-users may express this intent. The sample may contain Field tag blocks. /// public string TaggedText { get; } /// - /// The source_channel + /// The communication channel the sample was captured. It can be: voice, sms, chat, alexa, google-assistant, or slack. If not included the value will be null /// public string SourceChannel { get; set; } @@ -141,8 +141,9 @@ public class CreateSampleOptions : IOptions /// /// The assistant_sid /// The intent_sid - /// The language - /// The tagged_text + /// An ISO language-country string of the sample. + /// The text example of how end-users may express this intent. The sample may contain Field + /// tag blocks. public CreateSampleOptions(string pathAssistantSid, string pathIntentSid, string language, string taggedText) { PathAssistantSid = pathAssistantSid; @@ -197,15 +198,15 @@ public class UpdateSampleOptions : IOptions /// public string PathSid { get; } /// - /// The language + /// An ISO language-country string of the sample. /// public string Language { get; set; } /// - /// The tagged_text + /// The text example of how end-users may express this intent. The sample may contain Field tag blocks. /// public string TaggedText { get; set; } /// - /// The source_channel + /// The communication channel the sample was captured. It can be: voice, sms, chat, alexa, google-assistant, or slack. If not included the value will be null /// public string SourceChannel { get; set; } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleResource.cs index 4e9162519..0a452ff83 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleResource.cs @@ -148,7 +148,7 @@ public static async System.Threading.Tasks.Task> Rea /// /// The assistant_sid /// The intent_sid - /// The language + /// An ISO language-country string of the sample. /// Page size /// Record limit /// Client to make requests to Twilio @@ -170,7 +170,7 @@ public static ResourceSet Read(string pathAssistantSid, /// /// The assistant_sid /// The intent_sid - /// The language + /// An ISO language-country string of the sample. /// Page size /// Record limit /// Client to make requests to Twilio @@ -291,9 +291,11 @@ public static async System.Threading.Tasks.Task CreateAsync(Crea /// /// The assistant_sid /// The intent_sid - /// The language - /// The tagged_text - /// The source_channel + /// An ISO language-country string of the sample. + /// The text example of how end-users may express this intent. The sample may contain Field + /// tag blocks. + /// The communication channel the sample was captured. It can be: voice, sms, chat, alexa, + /// google-assistant, or slack. If not included the value will be null /// Client to make requests to Twilio /// A single instance of Sample public static SampleResource Create(string pathAssistantSid, @@ -313,9 +315,11 @@ public static SampleResource Create(string pathAssistantSid, /// /// The assistant_sid /// The intent_sid - /// The language - /// The tagged_text - /// The source_channel + /// An ISO language-country string of the sample. + /// The text example of how end-users may express this intent. The sample may contain Field + /// tag blocks. + /// The communication channel the sample was captured. It can be: voice, sms, chat, alexa, + /// google-assistant, or slack. If not included the value will be null /// Client to make requests to Twilio /// Task that resolves to A single instance of Sample public static async System.Threading.Tasks.Task CreateAsync(string pathAssistantSid, @@ -376,9 +380,11 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upda /// The assistant_sid /// The intent_sid /// The sid - /// The language - /// The tagged_text - /// The source_channel + /// An ISO language-country string of the sample. + /// The text example of how end-users may express this intent. The sample may contain Field + /// tag blocks. + /// The communication channel the sample was captured. It can be: voice, sms, chat, alexa, + /// google-assistant, or slack. If not included the value will be null /// Client to make requests to Twilio /// A single instance of Sample public static SampleResource Update(string pathAssistantSid, @@ -400,9 +406,11 @@ public static SampleResource Update(string pathAssistantSid, /// The assistant_sid /// The intent_sid /// The sid - /// The language - /// The tagged_text - /// The source_channel + /// An ISO language-country string of the sample. + /// The text example of how end-users may express this intent. The sample may contain Field + /// tag blocks. + /// The communication channel the sample was captured. It can be: voice, sms, chat, alexa, + /// google-assistant, or slack. If not included the value will be null /// Client to make requests to Twilio /// Task that resolves to A single instance of Sample public static async System.Threading.Tasks.Task UpdateAsync(string pathAssistantSid, @@ -513,42 +521,42 @@ public static SampleResource FromJson(string json) } /// - /// The account_sid + /// The unique ID of the Account that created this Sample. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The date_created + /// The date that this resource was created /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The intent_sid + /// The unique ID of the Intent associated with this Sample. /// [JsonProperty("intent_sid")] public string IntentSid { get; private set; } /// - /// The language + /// An ISO language-country string of the sample. /// [JsonProperty("language")] public string Language { get; private set; } /// - /// The assistant_sid + /// The unique ID of the Assistant. /// [JsonProperty("assistant_sid")] public string AssistantSid { get; private set; } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The tagged_text + /// The text example of how end-users may express this intent. The sample may contain Field tag blocks. /// [JsonProperty("tagged_text")] public string TaggedText { get; private set; } @@ -558,7 +566,7 @@ public static SampleResource FromJson(string json) [JsonProperty("url")] public Uri Url { get; private set; } /// - /// The source_channel + /// The communication channel the sample was captured. It can be: voice, sms, chat, alexa, google-assistant, or slack. If not included the value will be null /// [JsonProperty("source_channel")] public string SourceChannel { get; private set; } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/IntentOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/IntentOptions.cs index 7aa91f415..c605f369b 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/IntentOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/IntentOptions.cs @@ -99,11 +99,11 @@ public class CreateIntentOptions : IOptions /// public string PathAssistantSid { get; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. /// public string UniqueName { get; } /// - /// The friendly_name + /// A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. /// public string FriendlyName { get; set; } @@ -111,7 +111,8 @@ public class CreateIntentOptions : IOptions /// Construct a new CreateIntentOptions /// /// The assistant_sid - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. public CreateIntentOptions(string pathAssistantSid, string uniqueName) { PathAssistantSid = pathAssistantSid; @@ -155,11 +156,11 @@ public class UpdateIntentOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. /// public string FriendlyName { get; set; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. /// public string UniqueName { get; set; } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/IntentResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/IntentResource.cs index 7bfa0b29d..bca080ad9 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/IntentResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/IntentResource.cs @@ -276,8 +276,10 @@ public static async System.Threading.Tasks.Task CreateAsync(Crea /// create /// /// The assistant_sid - /// The unique_name - /// The friendly_name + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. + /// A user-provided string that identifies this resource. It is non-unique and can up to + /// 255 characters long. /// Client to make requests to Twilio /// A single instance of Intent public static IntentResource Create(string pathAssistantSid, @@ -294,8 +296,10 @@ public static IntentResource Create(string pathAssistantSid, /// create /// /// The assistant_sid - /// The unique_name - /// The friendly_name + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. + /// A user-provided string that identifies this resource. It is non-unique and can up to + /// 255 characters long. /// Client to make requests to Twilio /// Task that resolves to A single instance of Intent public static async System.Threading.Tasks.Task CreateAsync(string pathAssistantSid, @@ -353,8 +357,10 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upda /// /// The assistant_sid /// The sid - /// The friendly_name - /// The unique_name + /// A user-provided string that identifies this resource. It is non-unique and can up to + /// 255 characters long. + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. /// Client to make requests to Twilio /// A single instance of Intent public static IntentResource Update(string pathAssistantSid, @@ -373,8 +379,10 @@ public static IntentResource Update(string pathAssistantSid, /// /// The assistant_sid /// The sid - /// The friendly_name - /// The unique_name + /// A user-provided string that identifies this resource. It is non-unique and can up to + /// 255 characters long. + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. /// Client to make requests to Twilio /// Task that resolves to A single instance of Intent public static async System.Threading.Tasks.Task UpdateAsync(string pathAssistantSid, @@ -477,22 +485,22 @@ public static IntentResource FromJson(string json) } /// - /// The account_sid + /// The unique ID of the Account that created this Intent. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The date_created + /// The date that this resource was created /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The friendly_name + /// A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } @@ -502,17 +510,17 @@ public static IntentResource FromJson(string json) [JsonProperty("links")] public Dictionary Links { get; private set; } /// - /// The assistant_sid + /// The unique ID of the Assistant. /// [JsonProperty("assistant_sid")] public string AssistantSid { get; private set; } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. /// [JsonProperty("unique_name")] public string UniqueName { get; private set; } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildOptions.cs index 002f65353..c4daef743 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildOptions.cs @@ -103,7 +103,7 @@ public class CreateModelBuildOptions : IOptions /// public Uri StatusCallback { get; set; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1 /// public string UniqueName { get; set; } @@ -153,7 +153,7 @@ public class UpdateModelBuildOptions : IOptions /// public string PathSid { get; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1 /// public string UniqueName { get; set; } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildResource.cs index 1480fa409..a76b6f9b7 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildResource.cs @@ -294,7 +294,8 @@ public static async System.Threading.Tasks.Task CreateAsync( /// /// The assistant_sid /// The status_callback - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. For example: v0.1 /// Client to make requests to Twilio /// A single instance of ModelBuild public static ModelBuildResource Create(string pathAssistantSid, @@ -312,7 +313,8 @@ public static ModelBuildResource Create(string pathAssistantSid, /// /// The assistant_sid /// The status_callback - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. For example: v0.1 /// Client to make requests to Twilio /// Task that resolves to A single instance of ModelBuild public static async System.Threading.Tasks.Task CreateAsync(string pathAssistantSid, @@ -370,7 +372,8 @@ public static async System.Threading.Tasks.Task UpdateAsync( /// /// The assistant_sid /// The sid - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. For example: v0.1 /// Client to make requests to Twilio /// A single instance of ModelBuild public static ModelBuildResource Update(string pathAssistantSid, @@ -388,7 +391,8 @@ public static ModelBuildResource Update(string pathAssistantSid, /// /// The assistant_sid /// The sid - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. For example: v0.1 /// Client to make requests to Twilio /// Task that resolves to A single instance of ModelBuild public static async System.Threading.Tasks.Task UpdateAsync(string pathAssistantSid, @@ -490,38 +494,38 @@ public static ModelBuildResource FromJson(string json) } /// - /// The account_sid + /// The unique ID of the Account that created this Model Build. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The date_created + /// The date that this resource was created /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The assistant_sid + /// The unique ID of the parent Assistant. /// [JsonProperty("assistant_sid")] public string AssistantSid { get; private set; } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The status + /// A string that described the model build status. The values can be: enqueued, building, completed, failed /// [JsonProperty("status")] [JsonConverter(typeof(StringEnumConverter))] public ModelBuildResource.StatusEnum Status { get; private set; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. /// [JsonProperty("unique_name")] public string UniqueName { get; private set; } @@ -531,7 +535,7 @@ public static ModelBuildResource FromJson(string json) [JsonProperty("url")] public Uri Url { get; private set; } /// - /// The build_duration + /// The time in seconds it took to build the model. /// [JsonProperty("build_duration")] public int? BuildDuration { get; private set; } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/QueryOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/QueryOptions.cs index d1cab597c..d38f08b47 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/QueryOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/QueryOptions.cs @@ -62,15 +62,15 @@ public class ReadQueryOptions : ReadOptions /// public string PathAssistantSid { get; } /// - /// The language + /// An ISO language-country string of the sample. /// public string Language { get; set; } /// - /// The model_build + /// The Model Build Sid or unique name of the Model Build to be queried. /// public string ModelBuild { get; set; } /// - /// The status + /// A string that described the query status. The values can be: to_review, reviewed, discarded /// public string Status { get; set; } @@ -126,23 +126,23 @@ public class CreateQueryOptions : IOptions /// public string PathAssistantSid { get; } /// - /// The language + /// An ISO language-country string of the sample. /// public string Language { get; } /// - /// The query + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. It can be up to 2048 characters long. /// public string Query { get; } /// - /// The intents + /// Constraints the query to a set of intents. Useful when you need to constrain the paths the user can take. Intents should be comma separated intent-unique-name-1, intent-unique-name-2 /// public string Intents { get; set; } /// - /// The model_build + /// The Model Build Sid or unique name of the Model Build to be queried. /// public string ModelBuild { get; set; } /// - /// The field + /// Constraints the query to a given Field with an intent. Useful when you know the Field you are expecting. It accepts one field in the format intent-unique-name-1:field-unique-name /// public string Field { get; set; } @@ -150,8 +150,9 @@ public class CreateQueryOptions : IOptions /// Construct a new CreateQueryOptions /// /// The assistant_sid - /// The language - /// The query + /// An ISO language-country string of the sample. + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. It + /// can be up to 2048 characters long. public CreateQueryOptions(string pathAssistantSid, string language, string query) { PathAssistantSid = pathAssistantSid; @@ -215,7 +216,7 @@ public class UpdateQueryOptions : IOptions /// public string SampleSid { get; set; } /// - /// The status + /// A string that described the query status. The values can be: to_review, reviewed, discarded /// public string Status { get; set; } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/QueryResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/QueryResource.cs index 33d0d692b..cfcded02f 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/QueryResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/QueryResource.cs @@ -141,9 +141,10 @@ public static async System.Threading.Tasks.Task> Read /// read /// /// The assistant_sid - /// The language - /// The model_build - /// The status + /// An ISO language-country string of the sample. + /// The Model Build Sid or unique name of the Model Build to be queried. + /// A string that described the query status. The values can be: to_review, reviewed, discarded + /// /// Page size /// Record limit /// Client to make requests to Twilio @@ -165,9 +166,10 @@ public static ResourceSet Read(string pathAssistantSid, /// read /// /// The assistant_sid - /// The language - /// The model_build - /// The status + /// An ISO language-country string of the sample. + /// The Model Build Sid or unique name of the Model Build to be queried. + /// A string that described the query status. The values can be: to_review, reviewed, discarded + /// /// Page size /// Record limit /// Client to make requests to Twilio @@ -288,11 +290,14 @@ public static async System.Threading.Tasks.Task CreateAsync(Creat /// create /// /// The assistant_sid - /// The language - /// The query - /// The intents - /// The model_build - /// The field + /// An ISO language-country string of the sample. + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. It + /// can be up to 2048 characters long. + /// Constraints the query to a set of intents. Useful when you need to constrain the paths the + /// user can take. Intents should be comma separated intent-unique-name-1, intent-unique-name-2 + /// The Model Build Sid or unique name of the Model Build to be queried. + /// Constraints the query to a given Field with an intent. Useful when you know the Field you are + /// expecting. It accepts one field in the format intent-unique-name-1:field-unique-name /// Client to make requests to Twilio /// A single instance of Query public static QueryResource Create(string pathAssistantSid, @@ -312,11 +317,14 @@ public static QueryResource Create(string pathAssistantSid, /// create /// /// The assistant_sid - /// The language - /// The query - /// The intents - /// The model_build - /// The field + /// An ISO language-country string of the sample. + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. It + /// can be up to 2048 characters long. + /// Constraints the query to a set of intents. Useful when you need to constrain the paths the + /// user can take. Intents should be comma separated intent-unique-name-1, intent-unique-name-2 + /// The Model Build Sid or unique name of the Model Build to be queried. + /// Constraints the query to a given Field with an intent. Useful when you know the Field you are + /// expecting. It accepts one field in the format intent-unique-name-1:field-unique-name /// Client to make requests to Twilio /// Task that resolves to A single instance of Query public static async System.Threading.Tasks.Task CreateAsync(string pathAssistantSid, @@ -378,7 +386,8 @@ public static async System.Threading.Tasks.Task UpdateAsync(Updat /// The assistant_sid /// The sid /// The sample_sid - /// The status + /// A string that described the query status. The values can be: to_review, reviewed, discarded + /// /// Client to make requests to Twilio /// A single instance of Query public static QueryResource Update(string pathAssistantSid, @@ -398,7 +407,8 @@ public static QueryResource Update(string pathAssistantSid, /// The assistant_sid /// The sid /// The sample_sid - /// The status + /// A string that described the query status. The values can be: to_review, reviewed, discarded + /// /// Client to make requests to Twilio /// Task that resolves to A single instance of Query public static async System.Threading.Tasks.Task UpdateAsync(string pathAssistantSid, @@ -501,32 +511,32 @@ public static QueryResource FromJson(string json) } /// - /// The account_sid + /// The unique ID of the Account that created this Query. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The date_created + /// The date that this resource was created /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The results + /// The natural language analysis results which include the Intent recognized, the confidence score and a list of identified Fields. /// [JsonProperty("results")] public object Results { get; private set; } /// - /// The language + /// An ISO language-country string of the sample. /// [JsonProperty("language")] public string Language { get; private set; } /// - /// The model_build_sid + /// The unique ID of the Model Build queried. /// [JsonProperty("model_build_sid")] public string ModelBuildSid { get; private set; } @@ -536,22 +546,22 @@ public static QueryResource FromJson(string json) [JsonProperty("query")] public string Query { get; private set; } /// - /// The sample_sid + /// An optional reference to the Sample created from this query. /// [JsonProperty("sample_sid")] public string SampleSid { get; private set; } /// - /// The assistant_sid + /// The unique ID of the parent Assistant. /// [JsonProperty("assistant_sid")] public string AssistantSid { get; private set; } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The status + /// A string that described the query status. The values can be: to_review, reviewed, discarded /// [JsonProperty("status")] public string Status { get; private set; } diff --git a/src/Twilio/Rest/Preview/Understand/AssistantOptions.cs b/src/Twilio/Rest/Preview/Understand/AssistantOptions.cs index 07931a68a..b88a59c44 100644 --- a/src/Twilio/Rest/Preview/Understand/AssistantOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/AssistantOptions.cs @@ -75,11 +75,11 @@ public override List> GetParams() public class CreateAssistantOptions : IOptions { /// - /// The friendly_name + /// A text description for the Assistant. It is non-unique and can up to 255 characters long. /// public string FriendlyName { get; set; } /// - /// The log_queries + /// A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided. /// public bool? LogQueries { get; set; } /// @@ -87,11 +87,11 @@ public class CreateAssistantOptions : IOptions /// public int? Ttl { get; set; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. /// public string UniqueName { get; set; } /// - /// The response_url + /// The webhook URL called to fetch the response to an incoming communication expressed in Assistant TwiML. /// public Uri ResponseUrl { get; set; } /// @@ -161,11 +161,11 @@ public class UpdateAssistantOptions : IOptions /// public string PathSid { get; } /// - /// The friendly_name + /// A text description for the Assistant. It is non-unique and can up to 255 characters long. /// public string FriendlyName { get; set; } /// - /// The log_queries + /// A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided. /// public bool? LogQueries { get; set; } /// @@ -173,11 +173,11 @@ public class UpdateAssistantOptions : IOptions /// public int? Ttl { get; set; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. /// public string UniqueName { get; set; } /// - /// The response_url + /// The webhook URL called to fetch the response to an incoming communication expressed in Assistant TwiML. /// public Uri ResponseUrl { get; set; } /// diff --git a/src/Twilio/Rest/Preview/Understand/AssistantResource.cs b/src/Twilio/Rest/Preview/Understand/AssistantResource.cs index 4481c5778..c812ea5dd 100644 --- a/src/Twilio/Rest/Preview/Understand/AssistantResource.cs +++ b/src/Twilio/Rest/Preview/Understand/AssistantResource.cs @@ -268,11 +268,16 @@ public static async System.Threading.Tasks.Task CreateAsync(C /// /// create /// - /// The friendly_name - /// The log_queries + /// A text description for the Assistant. It is non-unique and can up to 255 characters + /// long. + /// A boolean that specifies whether queries should be logged for 30 days further training. + /// If false, no queries will be stored, if true, queries will be stored for 30 days and deleted + /// thereafter. Defaults to true if no value is provided. /// The ttl - /// The unique_name - /// The response_url + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. + /// The webhook URL called to fetch the response to an incoming communication expressed in + /// Assistant TwiML. /// The callback_url /// The callback_events /// Client to make requests to Twilio @@ -294,11 +299,16 @@ public static AssistantResource Create(string friendlyName = null, /// /// create /// - /// The friendly_name - /// The log_queries + /// A text description for the Assistant. It is non-unique and can up to 255 characters + /// long. + /// A boolean that specifies whether queries should be logged for 30 days further training. + /// If false, no queries will be stored, if true, queries will be stored for 30 days and deleted + /// thereafter. Defaults to true if no value is provided. /// The ttl - /// The unique_name - /// The response_url + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. + /// The webhook URL called to fetch the response to an incoming communication expressed in + /// Assistant TwiML. /// The callback_url /// The callback_events /// Client to make requests to Twilio @@ -361,11 +371,16 @@ public static async System.Threading.Tasks.Task UpdateAsync(U /// update /// /// The sid - /// The friendly_name - /// The log_queries + /// A text description for the Assistant. It is non-unique and can up to 255 characters + /// long. + /// A boolean that specifies whether queries should be logged for 30 days further training. + /// If false, no queries will be stored, if true, queries will be stored for 30 days and deleted + /// thereafter. Defaults to true if no value is provided. /// The ttl - /// The unique_name - /// The response_url + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. + /// The webhook URL called to fetch the response to an incoming communication expressed in + /// Assistant TwiML. /// The callback_url /// The callback_events /// Client to make requests to Twilio @@ -389,11 +404,16 @@ public static AssistantResource Update(string pathSid, /// update /// /// The sid - /// The friendly_name - /// The log_queries + /// A text description for the Assistant. It is non-unique and can up to 255 characters + /// long. + /// A boolean that specifies whether queries should be logged for 30 days further training. + /// If false, no queries will be stored, if true, queries will be stored for 30 days and deleted + /// thereafter. Defaults to true if no value is provided. /// The ttl - /// The unique_name - /// The response_url + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// sid. Unique up to 64 characters long. + /// The webhook URL called to fetch the response to an incoming communication expressed in + /// Assistant TwiML. /// The callback_url /// The callback_events /// Client to make requests to Twilio @@ -498,27 +518,27 @@ public static AssistantResource FromJson(string json) } /// - /// The account_sid + /// The unique ID of the Account that created this Assistant. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The date_created + /// The date that this resource was created /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The friendly_name + /// A text description for the Assistant. It is non-unique and can up to 255 characters long. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The latest_model_build_sid + /// The unique ID (Sid) of the latest model build. Null if no model has been built. /// [JsonProperty("latest_model_build_sid")] public string LatestModelBuildSid { get; private set; } @@ -528,12 +548,12 @@ public static AssistantResource FromJson(string json) [JsonProperty("links")] public Dictionary Links { get; private set; } /// - /// The log_queries + /// A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. /// [JsonProperty("log_queries")] public bool? LogQueries { get; private set; } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } @@ -543,7 +563,7 @@ public static AssistantResource FromJson(string json) [JsonProperty("ttl")] public int? Ttl { get; private set; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. You can use the unique name in the URL path. Unique up to 64 characters long. /// [JsonProperty("unique_name")] public string UniqueName { get; private set; } @@ -553,7 +573,7 @@ public static AssistantResource FromJson(string json) [JsonProperty("url")] public Uri Url { get; private set; } /// - /// The response_url + /// The webhook URL called to fetch the response to an incoming communication expressed in Assistant TwiML. /// [JsonProperty("response_url")] public Uri ResponseUrl { get; private set; } diff --git a/src/Twilio/Rest/Pricing/V1/Messaging/CountryResource.cs b/src/Twilio/Rest/Pricing/V1/Messaging/CountryResource.cs index 31dcc4be1..7a4de1e1e 100644 --- a/src/Twilio/Rest/Pricing/V1/Messaging/CountryResource.cs +++ b/src/Twilio/Rest/Pricing/V1/Messaging/CountryResource.cs @@ -242,27 +242,27 @@ public static CountryResource FromJson(string json) } /// - /// The country + /// Name of the country /// [JsonProperty("country")] public string Country { get; private set; } /// - /// The iso_country + /// The ISO country code /// [JsonProperty("iso_country")] public string IsoCountry { get; private set; } /// - /// The outbound_sms_prices + /// List of OutboundSMSPrice records /// [JsonProperty("outbound_sms_prices")] public List OutboundSmsPrices { get; private set; } /// - /// The inbound_sms_prices + /// List of InboundPrice records /// [JsonProperty("inbound_sms_prices")] public List InboundSmsPrices { get; private set; } /// - /// The price_unit + /// The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy). /// [JsonProperty("price_unit")] public string PriceUnit { get; private set; } diff --git a/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryResource.cs b/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryResource.cs index f96e26b74..59592926d 100644 --- a/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryResource.cs +++ b/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryResource.cs @@ -242,22 +242,22 @@ public static CountryResource FromJson(string json) } /// - /// The country + /// Name of the country /// [JsonProperty("country")] public string Country { get; private set; } /// - /// The iso_country + /// The ISO country code of this number /// [JsonProperty("iso_country")] public string IsoCountry { get; private set; } /// - /// The phone_number_prices + /// List of PhoneNumberPrices records /// [JsonProperty("phone_number_prices")] public List PhoneNumberPrices { get; private set; } /// - /// The price_unit + /// The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy). /// [JsonProperty("price_unit")] public string PriceUnit { get; private set; } diff --git a/src/Twilio/Rest/Pricing/V1/Voice/CountryResource.cs b/src/Twilio/Rest/Pricing/V1/Voice/CountryResource.cs index 1ad4ddf93..f57545cf6 100644 --- a/src/Twilio/Rest/Pricing/V1/Voice/CountryResource.cs +++ b/src/Twilio/Rest/Pricing/V1/Voice/CountryResource.cs @@ -242,12 +242,12 @@ public static CountryResource FromJson(string json) } /// - /// The country + /// Name of the country /// [JsonProperty("country")] public string Country { get; private set; } /// - /// The iso_country + /// The ISO country code /// [JsonProperty("iso_country")] public string IsoCountry { get; private set; } @@ -262,7 +262,7 @@ public static CountryResource FromJson(string json) [JsonProperty("inbound_call_prices")] public List InboundCallPrices { get; private set; } /// - /// The price_unit + /// The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy). /// [JsonProperty("price_unit")] public string PriceUnit { get; private set; } diff --git a/src/Twilio/Rest/Pricing/V1/Voice/NumberResource.cs b/src/Twilio/Rest/Pricing/V1/Voice/NumberResource.cs index 66f430bfb..e51a539c1 100644 --- a/src/Twilio/Rest/Pricing/V1/Voice/NumberResource.cs +++ b/src/Twilio/Rest/Pricing/V1/Voice/NumberResource.cs @@ -113,27 +113,27 @@ public static NumberResource FromJson(string json) [JsonConverter(typeof(PhoneNumberConverter))] public Types.PhoneNumber Number { get; private set; } /// - /// The country + /// Name of the country /// [JsonProperty("country")] public string Country { get; private set; } /// - /// The iso_country + /// The ISO country code /// [JsonProperty("iso_country")] public string IsoCountry { get; private set; } /// - /// The outbound_call_price + /// See OutboundCallPrice record /// [JsonProperty("outbound_call_price")] public OutboundCallPrice OutboundCallPrice { get; private set; } /// - /// The inbound_call_price + /// See InboundCallPrice record (returned as null if the Phone Number provided is not a Twilio number owned by this account) /// [JsonProperty("inbound_call_price")] public InboundCallPrice InboundCallPrice { get; private set; } /// - /// The price_unit + /// The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy). /// [JsonProperty("price_unit")] public string PriceUnit { get; private set; } diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.cs b/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.cs index 7b5ba807c..ebaa396d7 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.cs @@ -113,7 +113,7 @@ public class CreateSyncListItemOptions : IOptions /// public string PathListSid { get; } /// - /// The data + /// Contains arbitrary user-defined, schema-less data that this List Item stores, represented by a JSON object, up to 16KB. /// public object Data { get; } /// @@ -126,7 +126,8 @@ public class CreateSyncListItemOptions : IOptions /// /// The service_sid /// The list_sid - /// The data + /// Contains arbitrary user-defined, schema-less data that this List Item stores, represented by a + /// JSON object, up to 16KB. public CreateSyncListItemOptions(string pathServiceSid, string pathListSid, object data) { PathServiceSid = pathServiceSid; @@ -243,11 +244,11 @@ public class UpdateSyncListItemOptions : IOptions /// public int? PathIndex { get; } /// - /// The data + /// Contains arbitrary user-defined, schema-less data that this List Item stores, represented by a JSON object, up to 16KB. /// public object Data { get; set; } /// - /// The ttl + /// Time-to-live of this item in seconds, defaults to no expiration. /// public int? Ttl { get; set; } diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemResource.cs b/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemResource.cs index 5ee33d1cb..ec38fc094 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemResource.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemResource.cs @@ -243,7 +243,8 @@ public static async System.Threading.Tasks.Task CreateAsyn /// /// The service_sid /// The list_sid - /// The data + /// Contains arbitrary user-defined, schema-less data that this List Item stores, represented by a + /// JSON object, up to 16KB. /// Time-to-live of this item in seconds, defaults to no expiration. /// Client to make requests to Twilio /// A single instance of SyncListItem @@ -263,7 +264,8 @@ public static SyncListItemResource Create(string pathServiceSid, /// /// The service_sid /// The list_sid - /// The data + /// Contains arbitrary user-defined, schema-less data that this List Item stores, represented by a + /// JSON object, up to 16KB. /// Time-to-live of this item in seconds, defaults to no expiration. /// Client to make requests to Twilio /// Task that resolves to A single instance of SyncListItem @@ -480,8 +482,9 @@ public static async System.Threading.Tasks.Task UpdateAsyn /// The service_sid /// The list_sid /// The index - /// The data - /// The ttl + /// Contains arbitrary user-defined, schema-less data that this List Item stores, represented by a + /// JSON object, up to 16KB. + /// Time-to-live of this item in seconds, defaults to no expiration. /// Client to make requests to Twilio /// A single instance of SyncListItem public static SyncListItemResource Update(string pathServiceSid, @@ -502,8 +505,9 @@ public static SyncListItemResource Update(string pathServiceSid, /// The service_sid /// The list_sid /// The index - /// The data - /// The ttl + /// Contains arbitrary user-defined, schema-less data that this List Item stores, represented by a + /// JSON object, up to 16KB. + /// Time-to-live of this item in seconds, defaults to no expiration. /// Client to make requests to Twilio /// Task that resolves to A single instance of SyncListItem public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncListOptions.cs b/src/Twilio/Rest/Sync/V1/Service/SyncListOptions.cs index 8e9bdf96d..5cbd7f76d 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncListOptions.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncListOptions.cs @@ -150,7 +150,7 @@ public class UpdateSyncListOptions : IOptions /// public string PathSid { get; } /// - /// The ttl + /// Time-to-live of this List in seconds, defaults to no expiration. /// public int? Ttl { get; set; } diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncListResource.cs b/src/Twilio/Rest/Sync/V1/Service/SyncListResource.cs index 9ee2a96fb..b9f2c1806 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncListResource.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncListResource.cs @@ -283,7 +283,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(Up /// /// The service_sid /// The sid - /// The ttl + /// Time-to-live of this List in seconds, defaults to no expiration. /// Client to make requests to Twilio /// A single instance of SyncList public static SyncListResource Update(string pathServiceSid, @@ -301,7 +301,7 @@ public static SyncListResource Update(string pathServiceSid, /// /// The service_sid /// The sid - /// The ttl + /// Time-to-live of this List in seconds, defaults to no expiration. /// Client to make requests to Twilio /// Task that resolves to A single instance of SyncList public static async System.Threading.Tasks.Task UpdateAsync(string pathServiceSid, diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.cs b/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.cs index 368fa119e..c5366285d 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.cs @@ -113,11 +113,11 @@ public class CreateSyncMapItemOptions : IOptions /// public string PathMapSid { get; } /// - /// The key + /// The unique user-defined key of this Map Item. /// public string Key { get; } /// - /// The data + /// Contains arbitrary user-defined, schema-less data that this Map Item stores, represented by a JSON object, up to 16KB. /// public object Data { get; } /// @@ -130,8 +130,9 @@ public class CreateSyncMapItemOptions : IOptions /// /// The service_sid /// The map_sid - /// The key - /// The data + /// The unique user-defined key of this Map Item. + /// Contains arbitrary user-defined, schema-less data that this Map Item stores, represented by a + /// JSON object, up to 16KB. public CreateSyncMapItemOptions(string pathServiceSid, string pathMapSid, string key, object data) { PathServiceSid = pathServiceSid; @@ -181,11 +182,11 @@ public class ReadSyncMapItemOptions : ReadOptions /// public string PathMapSid { get; } /// - /// The order + /// A string; asc or desc. Map Items are ordered lexicographically by Item key. /// public SyncMapItemResource.QueryResultOrderEnum Order { get; set; } /// - /// The from + /// The Item key offset (including the specified key). /// public string From { get; set; } /// diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemResource.cs b/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemResource.cs index c5c36c4be..59c917f97 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemResource.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemResource.cs @@ -243,8 +243,9 @@ public static async System.Threading.Tasks.Task CreateAsync /// /// The service_sid /// The map_sid - /// The key - /// The data + /// The unique user-defined key of this Map Item. + /// Contains arbitrary user-defined, schema-less data that this Map Item stores, represented by a + /// JSON object, up to 16KB. /// Time-to-live of this Map in seconds, defaults to no expiration. /// Client to make requests to Twilio /// A single instance of SyncMapItem @@ -265,8 +266,9 @@ public static SyncMapItemResource Create(string pathServiceSid, /// /// The service_sid /// The map_sid - /// The key - /// The data + /// The unique user-defined key of this Map Item. + /// Contains arbitrary user-defined, schema-less data that this Map Item stores, represented by a + /// JSON object, up to 16KB. /// Time-to-live of this Map in seconds, defaults to no expiration. /// Client to make requests to Twilio /// Task that resolves to A single instance of SyncMapItem @@ -331,8 +333,8 @@ public static async System.Threading.Tasks.Task /// /// The service_sid /// The map_sid - /// The order - /// The from + /// A string; asc or desc. Map Items are ordered lexicographically by Item key. + /// The Item key offset (including the specified key). /// The bounds /// Page size /// Record limit @@ -357,8 +359,8 @@ public static ResourceSet Read(string pathServiceSid, /// /// The service_sid /// The map_sid - /// The order - /// The from + /// A string; asc or desc. Map Items are ordered lexicographically by Item key. + /// The Item key offset (including the specified key). /// The bounds /// Page size /// Record limit diff --git a/src/Twilio/Rest/Video/V1/RecordingOptions.cs b/src/Twilio/Rest/Video/V1/RecordingOptions.cs index b45b33101..8235e8471 100644 --- a/src/Twilio/Rest/Video/V1/RecordingOptions.cs +++ b/src/Twilio/Rest/Video/V1/RecordingOptions.cs @@ -13,19 +13,19 @@ namespace Twilio.Rest.Video.V1 { /// - /// FetchRecordingOptions + /// Returns a single Recording Instance resource identified by a RecordingSid. /// public class FetchRecordingOptions : IOptions { /// - /// The sid + /// The Recording Sid that uniquely identifies the Recording to fetch. /// public string PathSid { get; } /// /// Construct a new FetchRecordingOptions /// - /// The sid + /// The Recording Sid that uniquely identifies the Recording to fetch. public FetchRecordingOptions(string pathSid) { PathSid = pathSid; @@ -42,28 +42,28 @@ public List> GetParams() } /// - /// ReadRecordingOptions + /// List of all Track Recordings. /// public class ReadRecordingOptions : ReadOptions { /// - /// The status + /// Only show Recordings with the given status. /// public RecordingResource.StatusEnum Status { get; set; } /// - /// The source_sid + /// Only show the Recordings with the given source Sid. /// public string SourceSid { get; set; } /// - /// The grouping_sid + /// Only show Recordings that have this GroupingSid. /// public List GroupingSid { get; set; } /// - /// The date_created_after + /// Only show Recordings that started on or after this ISO8601 date-time. /// public DateTime? DateCreatedAfter { get; set; } /// - /// The date_created_before + /// Only show Recordings that started before this this ISO8601 date-time. /// public DateTime? DateCreatedBefore { get; set; } @@ -116,19 +116,19 @@ public override List> GetParams() } /// - /// DeleteRecordingOptions + /// Delete a Recording Instance resource identified by a RecordingSid. /// public class DeleteRecordingOptions : IOptions { /// - /// The sid + /// The Recording Sid that uniquely identifies the Recording to delete. /// public string PathSid { get; } /// /// Construct a new DeleteRecordingOptions /// - /// The sid + /// The Recording Sid that uniquely identifies the Recording to delete. public DeleteRecordingOptions(string pathSid) { PathSid = pathSid; diff --git a/src/Twilio/Rest/Video/V1/RecordingResource.cs b/src/Twilio/Rest/Video/V1/RecordingResource.cs index ac845bb4f..fffa4056b 100644 --- a/src/Twilio/Rest/Video/V1/RecordingResource.cs +++ b/src/Twilio/Rest/Video/V1/RecordingResource.cs @@ -90,7 +90,7 @@ private static Request BuildFetchRequest(FetchRecordingOptions options, ITwilioR } /// - /// fetch + /// Returns a single Recording Instance resource identified by a RecordingSid. /// /// Fetch Recording parameters /// Client to make requests to Twilio @@ -104,7 +104,7 @@ public static RecordingResource Fetch(FetchRecordingOptions options, ITwilioRest #if !NET35 /// - /// fetch + /// Returns a single Recording Instance resource identified by a RecordingSid. /// /// Fetch Recording parameters /// Client to make requests to Twilio @@ -119,9 +119,9 @@ public static async System.Threading.Tasks.Task FetchAsync(Fe #endif /// - /// fetch + /// Returns a single Recording Instance resource identified by a RecordingSid. /// - /// The sid + /// The Recording Sid that uniquely identifies the Recording to fetch. /// Client to make requests to Twilio /// A single instance of Recording public static RecordingResource Fetch(string pathSid, ITwilioRestClient client = null) @@ -132,9 +132,9 @@ public static RecordingResource Fetch(string pathSid, ITwilioRestClient client = #if !NET35 /// - /// fetch + /// Returns a single Recording Instance resource identified by a RecordingSid. /// - /// The sid + /// The Recording Sid that uniquely identifies the Recording to fetch. /// Client to make requests to Twilio /// Task that resolves to A single instance of Recording public static async System.Threading.Tasks.Task FetchAsync(string pathSid, @@ -157,7 +157,7 @@ private static Request BuildReadRequest(ReadRecordingOptions options, ITwilioRes } /// - /// read + /// List of all Track Recordings. /// /// Read Recording parameters /// Client to make requests to Twilio @@ -173,7 +173,7 @@ public static ResourceSet Read(ReadRecordingOptions options, #if !NET35 /// - /// read + /// List of all Track Recordings. /// /// Read Recording parameters /// Client to make requests to Twilio @@ -190,13 +190,13 @@ public static async System.Threading.Tasks.Task> #endif /// - /// read + /// List of all Track Recordings. /// - /// The status - /// The source_sid - /// The grouping_sid - /// The date_created_after - /// The date_created_before + /// Only show Recordings with the given status. + /// Only show the Recordings with the given source Sid. + /// Only show Recordings that have this GroupingSid. + /// Only show Recordings that started on or after this ISO8601 date-time. + /// Only show Recordings that started before this this ISO8601 date-time. /// Page size /// Record limit /// Client to make requests to Twilio @@ -216,13 +216,13 @@ public static ResourceSet Read(RecordingResource.StatusEnum s #if !NET35 /// - /// read + /// List of all Track Recordings. /// - /// The status - /// The source_sid - /// The grouping_sid - /// The date_created_after - /// The date_created_before + /// Only show Recordings with the given status. + /// Only show the Recordings with the given source Sid. + /// Only show Recordings that have this GroupingSid. + /// Only show Recordings that started on or after this ISO8601 date-time. + /// Only show Recordings that started before this this ISO8601 date-time. /// Page size /// Record limit /// Client to make requests to Twilio @@ -312,7 +312,7 @@ private static Request BuildDeleteRequest(DeleteRecordingOptions options, ITwili } /// - /// delete + /// Delete a Recording Instance resource identified by a RecordingSid. /// /// Delete Recording parameters /// Client to make requests to Twilio @@ -326,7 +326,7 @@ public static bool Delete(DeleteRecordingOptions options, ITwilioRestClient clie #if !NET35 /// - /// delete + /// Delete a Recording Instance resource identified by a RecordingSid. /// /// Delete Recording parameters /// Client to make requests to Twilio @@ -341,9 +341,9 @@ public static async System.Threading.Tasks.Task DeleteAsync(DeleteRecordin #endif /// - /// delete + /// Delete a Recording Instance resource identified by a RecordingSid. /// - /// The sid + /// The Recording Sid that uniquely identifies the Recording to delete. /// Client to make requests to Twilio /// A single instance of Recording public static bool Delete(string pathSid, ITwilioRestClient client = null) @@ -354,9 +354,9 @@ public static bool Delete(string pathSid, ITwilioRestClient client = null) #if !NET35 /// - /// delete + /// Delete a Recording Instance resource identified by a RecordingSid. /// - /// The sid + /// The Recording Sid that uniquely identifies the Recording to delete. /// Client to make requests to Twilio /// Task that resolves to A single instance of Recording public static async System.Threading.Tasks.Task DeleteAsync(string pathSid, ITwilioRestClient client = null) @@ -385,71 +385,71 @@ public static RecordingResource FromJson(string json) } /// - /// The account_sid + /// Twilio Account SID. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The status + /// The status of the Recording. /// [JsonProperty("status")] [JsonConverter(typeof(StringEnumConverter))] public RecordingResource.StatusEnum Status { get; private set; } /// - /// The date_created + /// Date when the media recording began writing. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The sid + /// A 34-character string that uniquely identifies this Recording. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The source_sid + /// A 34-character string that uniquely identifies the source of this Recording. /// [JsonProperty("source_sid")] public string SourceSid { get; private set; } /// - /// The size + /// Size of the recorded track, in bytes. /// [JsonProperty("size")] public long? Size { get; private set; } /// - /// The url + /// The absolute URL for this resource. /// [JsonProperty("url")] public Uri Url { get; private set; } /// - /// The type + /// Indicates the media type for this recording. /// [JsonProperty("type")] [JsonConverter(typeof(StringEnumConverter))] public RecordingResource.TypeEnum Type { get; private set; } /// - /// The duration + /// Duration of the Recording in seconds. /// [JsonProperty("duration")] public int? Duration { get; private set; } /// - /// The container_format + /// The file format for this Recording. /// [JsonProperty("container_format")] [JsonConverter(typeof(StringEnumConverter))] public RecordingResource.FormatEnum ContainerFormat { get; private set; } /// - /// The codec + /// The codec used to encode the track. /// [JsonProperty("codec")] [JsonConverter(typeof(StringEnumConverter))] public RecordingResource.CodecEnum Codec { get; private set; } /// - /// The grouping_sids + /// A list of Sids related to this Recording. /// [JsonProperty("grouping_sids")] public object GroupingSids { get; private set; } /// - /// The track_name + /// The name that was given to the source track of this recording. /// [JsonProperty("track_name")] public string TrackName { get; private set; } diff --git a/src/Twilio/Rest/Wireless/V1/CommandOptions.cs b/src/Twilio/Rest/Wireless/V1/CommandOptions.cs index 18c5f777a..da3a6fc85 100644 --- a/src/Twilio/Rest/Wireless/V1/CommandOptions.cs +++ b/src/Twilio/Rest/Wireless/V1/CommandOptions.cs @@ -46,15 +46,15 @@ public List> GetParams() public class ReadCommandOptions : ReadOptions { /// - /// The sim + /// Only return Commands to or from this SIM. /// public string Sim { get; set; } /// - /// The status + /// Only return Commands with this status value. /// public CommandResource.StatusEnum Status { get; set; } /// - /// The direction + /// Only return Commands with this direction value. /// public CommandResource.DirectionEnum Direction { get; set; } @@ -94,34 +94,34 @@ public override List> GetParams() public class CreateCommandOptions : IOptions { /// - /// The command + /// The message body of the Command or a Base64 encoded byte string in binary mode. /// public string Command { get; } /// - /// The sim + /// The Sid or UniqueName of the SIM to send the Command to. /// public string Sim { get; set; } /// - /// The callback_method + /// The HTTP method Twilio will use when making a request to the callback URL. /// public Twilio.Http.HttpMethod CallbackMethod { get; set; } /// - /// The callback_url + /// Twilio will make a request to this URL when the Command has finished sending. /// public Uri CallbackUrl { get; set; } /// - /// The command_mode + /// A string representing which mode to send the SMS message using. /// public CommandResource.CommandModeEnum CommandMode { get; set; } /// - /// The include_sid + /// When sending a Command to a SIM in text mode, Twilio can automatically include the Sid of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once. /// public string IncludeSid { get; set; } /// /// Construct a new CreateCommandOptions /// - /// The command + /// The message body of the Command or a Base64 encoded byte string in binary mode. public CreateCommandOptions(string command) { Command = command; diff --git a/src/Twilio/Rest/Wireless/V1/CommandResource.cs b/src/Twilio/Rest/Wireless/V1/CommandResource.cs index 557bc1fdc..aefc102cb 100644 --- a/src/Twilio/Rest/Wireless/V1/CommandResource.cs +++ b/src/Twilio/Rest/Wireless/V1/CommandResource.cs @@ -177,9 +177,9 @@ public static async System.Threading.Tasks.Task> Re /// /// read /// - /// The sim - /// The status - /// The direction + /// Only return Commands to or from this SIM. + /// Only return Commands with this status value. + /// Only return Commands with this direction value. /// Page size /// Record limit /// Client to make requests to Twilio @@ -199,9 +199,9 @@ public static ResourceSet Read(string sim = null, /// /// read /// - /// The sim - /// The status - /// The direction + /// Only return Commands to or from this SIM. + /// Only return Commands with this status value. + /// Only return Commands with this direction value. /// Page size /// Record limit /// Client to make requests to Twilio @@ -320,12 +320,14 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre /// /// create /// - /// The command - /// The sim - /// The callback_method - /// The callback_url - /// The command_mode - /// The include_sid + /// The message body of the Command or a Base64 encoded byte string in binary mode. + /// The Sid or UniqueName of the SIM to send the Command to. + /// The HTTP method Twilio will use when making a request to the callback URL. + /// Twilio will make a request to this URL when the Command has finished sending. + /// A string representing which mode to send the SMS message using. + /// When sending a Command to a SIM in text mode, Twilio can automatically include the Sid of + /// the Command in the message body, which could be used to ensure that the device does not process the + /// same Command more than once. /// Client to make requests to Twilio /// A single instance of Command public static CommandResource Create(string command, @@ -344,12 +346,14 @@ public static CommandResource Create(string command, /// /// create /// - /// The command - /// The sim - /// The callback_method - /// The callback_url - /// The command_mode - /// The include_sid + /// The message body of the Command or a Base64 encoded byte string in binary mode. + /// The Sid or UniqueName of the SIM to send the Command to. + /// The HTTP method Twilio will use when making a request to the callback URL. + /// Twilio will make a request to this URL when the Command has finished sending. + /// A string representing which mode to send the SMS message using. + /// When sending a Command to a SIM in text mode, Twilio can automatically include the Sid of + /// the Command in the message body, which could be used to ensure that the device does not process the + /// same Command more than once. /// Client to make requests to Twilio /// Task that resolves to A single instance of Command public static async System.Threading.Tasks.Task CreateAsync(string command, @@ -384,55 +388,55 @@ public static CommandResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The account_sid + /// The unique id of the Account that this Command belongs to. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The sim_sid + /// The unique ID of the SIM that this Command was sent to or from. /// [JsonProperty("sim_sid")] public string SimSid { get; private set; } /// - /// The command + /// The message being sent to or from the SIM. /// [JsonProperty("command")] public string Command { get; private set; } /// - /// The command_mode + /// A string representing which mode the SMS was sent or received using. /// [JsonProperty("command_mode")] [JsonConverter(typeof(StringEnumConverter))] public CommandResource.CommandModeEnum CommandMode { get; private set; } /// - /// The status + /// A string representing the status of the Command. /// [JsonProperty("status")] [JsonConverter(typeof(StringEnumConverter))] public CommandResource.StatusEnum Status { get; private set; } /// - /// The direction + /// The direction of the Command. /// [JsonProperty("direction")] [JsonConverter(typeof(StringEnumConverter))] public CommandResource.DirectionEnum Direction { get; private set; } /// - /// The date_created + /// The date that this resource was created, given as GMT in ISO 8601 format. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated, given as GMT in ISO 8601 format. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The url + /// The URL for this resource. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/Wireless/V1/RatePlanOptions.cs b/src/Twilio/Rest/Wireless/V1/RatePlanOptions.cs index b1f6f5dd5..b14d3dfec 100644 --- a/src/Twilio/Rest/Wireless/V1/RatePlanOptions.cs +++ b/src/Twilio/Rest/Wireless/V1/RatePlanOptions.cs @@ -67,35 +67,35 @@ public List> GetParams() public class CreateRatePlanOptions : IOptions { /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the Sid. /// public string UniqueName { get; set; } /// - /// The friendly_name + /// A user-provided string that identifies this resource. /// public string FriendlyName { get; set; } /// - /// The data_enabled + /// Defines whether SIMs are capable of using GPRS/3G/LTE data connectivity. /// public bool? DataEnabled { get; set; } /// - /// The data_limit + /// Network-enforced limit specifying the total Megabytes of data usage allowed during one month on the home network. /// public int? DataLimit { get; set; } /// - /// The data_metering + /// The model by which to meter data usage, in accordance with the two available data metering models. /// public string DataMetering { get; set; } /// - /// The messaging_enabled + /// Defines whether SIMs are capable of making and sending and receiving SMS messages via either Commands or Programmable SMS APIs. /// public bool? MessagingEnabled { get; set; } /// - /// The voice_enabled + /// Defines whether SIMs are capable of making and receiving voice calls. /// public bool? VoiceEnabled { get; set; } /// - /// The national_roaming_enabled + /// Defines whether SIMs can roam onto other networks in the SIM's home country. /// public bool? NationalRoamingEnabled { get; set; } /// @@ -103,7 +103,7 @@ public class CreateRatePlanOptions : IOptions /// public List InternationalRoaming { get; set; } /// - /// The national_roaming_data_limit + /// Network-enforced limit specifying the total Megabytes of national roaming data usage allowed during one month. /// public int? NationalRoamingDataLimit { get; set; } /// @@ -194,11 +194,11 @@ public class UpdateRatePlanOptions : IOptions /// public string PathSid { get; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the Sid. /// public string UniqueName { get; set; } /// - /// The friendly_name + /// A user-provided string that identifies this resource. /// public string FriendlyName { get; set; } diff --git a/src/Twilio/Rest/Wireless/V1/RatePlanResource.cs b/src/Twilio/Rest/Wireless/V1/RatePlanResource.cs index 93380b310..ab024e5fb 100644 --- a/src/Twilio/Rest/Wireless/V1/RatePlanResource.cs +++ b/src/Twilio/Rest/Wireless/V1/RatePlanResource.cs @@ -265,16 +265,22 @@ public static async System.Threading.Tasks.Task CreateAsync(Cr /// /// create /// - /// The unique_name - /// The friendly_name - /// The data_enabled - /// The data_limit - /// The data_metering - /// The messaging_enabled - /// The voice_enabled - /// The national_roaming_enabled + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// Sid. + /// A user-provided string that identifies this resource. + /// Defines whether SIMs are capable of using GPRS/3G/LTE data connectivity. + /// Network-enforced limit specifying the total Megabytes of data usage allowed during one + /// month on the home network. + /// The model by which to meter data usage, in accordance with the two available data + /// metering models. + /// Defines whether SIMs are capable of making and sending and receiving SMS messages + /// via either Commands or Programmable SMS APIs. + /// Defines whether SIMs are capable of making and receiving voice calls. + /// Defines whether SIMs can roam onto other networks in the SIM's home country. + /// /// The international_roaming - /// The national_roaming_data_limit + /// Network-enforced limit specifying the total Megabytes of national roaming + /// data usage allowed during one month. /// The international_roaming_data_limit /// Client to make requests to Twilio /// A single instance of RatePlan @@ -299,16 +305,22 @@ public static RatePlanResource Create(string uniqueName = null, /// /// create /// - /// The unique_name - /// The friendly_name - /// The data_enabled - /// The data_limit - /// The data_metering - /// The messaging_enabled - /// The voice_enabled - /// The national_roaming_enabled + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// Sid. + /// A user-provided string that identifies this resource. + /// Defines whether SIMs are capable of using GPRS/3G/LTE data connectivity. + /// Network-enforced limit specifying the total Megabytes of data usage allowed during one + /// month on the home network. + /// The model by which to meter data usage, in accordance with the two available data + /// metering models. + /// Defines whether SIMs are capable of making and sending and receiving SMS messages + /// via either Commands or Programmable SMS APIs. + /// Defines whether SIMs are capable of making and receiving voice calls. + /// Defines whether SIMs can roam onto other networks in the SIM's home country. + /// /// The international_roaming - /// The national_roaming_data_limit + /// Network-enforced limit specifying the total Megabytes of national roaming + /// data usage allowed during one month. /// The international_roaming_data_limit /// Client to make requests to Twilio /// Task that resolves to A single instance of RatePlan @@ -374,8 +386,9 @@ public static async System.Threading.Tasks.Task UpdateAsync(Up /// update /// /// The sid - /// The unique_name - /// The friendly_name + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// Sid. + /// A user-provided string that identifies this resource. /// Client to make requests to Twilio /// A single instance of RatePlan public static RatePlanResource Update(string pathSid, @@ -392,8 +405,9 @@ public static RatePlanResource Update(string pathSid, /// update /// /// The sid - /// The unique_name - /// The friendly_name + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// Sid. + /// A user-provided string that identifies this resource. /// Client to make requests to Twilio /// Task that resolves to A single instance of RatePlan public static async System.Threading.Tasks.Task UpdateAsync(string pathSid, @@ -491,57 +505,57 @@ public static RatePlanResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. /// [JsonProperty("unique_name")] public string UniqueName { get; private set; } /// - /// The account_sid + /// The unique id of the Account that this Rate Plan belongs to. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The friendly_name + /// A user-provided string that identifies this resource. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The data_enabled + /// Defines whether SIMs are capable of using GPRS/3G/4G/LTE data connectivity. /// [JsonProperty("data_enabled")] public bool? DataEnabled { get; private set; } /// - /// The data_metering + /// The model by which to meter data usage, in accordance with the two available data metering models. /// [JsonProperty("data_metering")] public string DataMetering { get; private set; } /// - /// The data_limit + /// Network-enforced limit specifying the total Megabytes of data usage allowed during one month on the home network. /// [JsonProperty("data_limit")] public int? DataLimit { get; private set; } /// - /// The messaging_enabled + /// Defines whether SIMs are capable of making and sending and receiving SMS via Commands. /// [JsonProperty("messaging_enabled")] public bool? MessagingEnabled { get; private set; } /// - /// The voice_enabled + /// Defines whether SIMs are capable of making and receiving voice calls. /// [JsonProperty("voice_enabled")] public bool? VoiceEnabled { get; private set; } /// - /// The national_roaming_enabled + /// Defines whether SIMs can roam onto other networks in the SIM's home country. /// [JsonProperty("national_roaming_enabled")] public bool? NationalRoamingEnabled { get; private set; } /// - /// The national_roaming_data_limit + /// Network-enforced limit specifying the total Megabytes of national roaming data usage allowed during one month. /// [JsonProperty("national_roaming_data_limit")] public int? NationalRoamingDataLimit { get; private set; } @@ -556,17 +570,17 @@ public static RatePlanResource FromJson(string json) [JsonProperty("international_roaming_data_limit")] public int? InternationalRoamingDataLimit { get; private set; } /// - /// The date_created + /// The date that this resource was created, given as GMT in ISO 8601 format. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated, given as GMT in ISO 8601 format. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The url + /// The URL for this resource. /// [JsonProperty("url")] public Uri Url { get; private set; } diff --git a/src/Twilio/Rest/Wireless/V1/Sim/DataSessionResource.cs b/src/Twilio/Rest/Wireless/V1/Sim/DataSessionResource.cs index 3a8dd8aed..9edbd62a5 100644 --- a/src/Twilio/Rest/Wireless/V1/Sim/DataSessionResource.cs +++ b/src/Twilio/Rest/Wireless/V1/Sim/DataSessionResource.cs @@ -186,77 +186,77 @@ public static DataSessionResource FromJson(string json) } /// - /// The sid + /// The unique id of the Data Session resource that this Data Record is for. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The sim_sid + /// The unique id of the SIM resource that this Data Session is for. /// [JsonProperty("sim_sid")] public string SimSid { get; private set; } /// - /// The account_sid + /// The unique id of the Account that the SIM belongs to. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The radio_link + /// The generation of wireless technology that the device was attached to the cellular tower using. /// [JsonProperty("radio_link")] public string RadioLink { get; private set; } /// - /// The operator_mcc + /// The 'mobile country code' is the unique id of the home country where the Data Session took place. /// [JsonProperty("operator_mcc")] public string OperatorMcc { get; private set; } /// - /// The operator_mnc + /// The 'mobile network code' is the unique id specific to the mobile operator network where the Data Session took place. /// [JsonProperty("operator_mnc")] public string OperatorMnc { get; private set; } /// - /// The operator_country + /// The three letter country code representing where the device's Data Session took place. /// [JsonProperty("operator_country")] public string OperatorCountry { get; private set; } /// - /// The operator_name + /// The friendly name of the mobile operator network that the SIM-connected device is attached to. /// [JsonProperty("operator_name")] public string OperatorName { get; private set; } /// - /// The cell_id + /// The unique id of the cellular tower that the device was attached to at the moment when the Data Session was last updated. /// [JsonProperty("cell_id")] public string CellId { get; private set; } /// - /// The cell_location_estimate + /// An object representing the estimated location where the device's Data Session took place. /// [JsonProperty("cell_location_estimate")] public object CellLocationEstimate { get; private set; } /// - /// The packets_uploaded + /// The number of packets uploaded by the device between the start time and when the Data Session was last updated. /// [JsonProperty("packets_uploaded")] public int? PacketsUploaded { get; private set; } /// - /// The packets_downloaded + /// The number of packets downloaded by the device between the start time and when the Data Session was last updated. /// [JsonProperty("packets_downloaded")] public int? PacketsDownloaded { get; private set; } /// - /// The last_updated + /// The date that this resource was last updated, given as GMT in ISO 8601 format. /// [JsonProperty("last_updated")] public DateTime? LastUpdated { get; private set; } /// - /// The start + /// The date that this Data Session started, given as GMT in ISO 8601 format. /// [JsonProperty("start")] public DateTime? Start { get; private set; } /// - /// The end + /// The date that this record ended, given as GMT in ISO 8601 format. /// [JsonProperty("end")] public DateTime? End { get; private set; } diff --git a/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.cs b/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.cs index f13015871..20c3778e1 100644 --- a/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.cs +++ b/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.cs @@ -21,15 +21,15 @@ public class ReadUsageRecordOptions : ReadOptions /// public string PathSimSid { get; } /// - /// The end + /// Only include usage that has occurred on or before this date. /// public DateTime? End { get; set; } /// - /// The start + /// Only include usage that has occurred on or after this date. /// public DateTime? Start { get; set; } /// - /// The granularity + /// The time-based grouping that results are aggregated by. /// public UsageRecordResource.GranularityEnum Granularity { get; set; } diff --git a/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordResource.cs b/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordResource.cs index 7e68d6c7d..8f3330b91 100644 --- a/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordResource.cs +++ b/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordResource.cs @@ -83,9 +83,9 @@ public static async System.Threading.Tasks.Task /// read /// /// The sim_sid - /// The end - /// The start - /// The granularity + /// Only include usage that has occurred on or before this date. + /// Only include usage that has occurred on or after this date. + /// The time-based grouping that results are aggregated by. /// Page size /// Record limit /// Client to make requests to Twilio @@ -107,9 +107,9 @@ public static ResourceSet Read(string pathSimSid, /// read /// /// The sim_sid - /// The end - /// The start - /// The granularity + /// Only include usage that has occurred on or before this date. + /// Only include usage that has occurred on or after this date. + /// The time-based grouping that results are aggregated by. /// Page size /// Record limit /// Client to make requests to Twilio @@ -205,27 +205,27 @@ public static UsageRecordResource FromJson(string json) } /// - /// The sim_sid + /// The unique id of the SIM resource that this Usage Record is for. /// [JsonProperty("sim_sid")] public string SimSid { get; private set; } /// - /// The account_sid + /// The unique id of the Account that the SIM belongs to. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The period + /// The time period for which usage is reported. /// [JsonProperty("period")] public object Period { get; private set; } /// - /// The commands + /// An object representing the Commands usage for the SIM over the period. /// [JsonProperty("commands")] public object Commands { get; private set; } /// - /// The data + /// An object representing the Data usage for the SIM over the period. /// [JsonProperty("data")] public object Data { get; private set; } diff --git a/src/Twilio/Rest/Wireless/V1/SimOptions.cs b/src/Twilio/Rest/Wireless/V1/SimOptions.cs index 5e7d569c4..7fce3f566 100644 --- a/src/Twilio/Rest/Wireless/V1/SimOptions.cs +++ b/src/Twilio/Rest/Wireless/V1/SimOptions.cs @@ -46,15 +46,15 @@ public List> GetParams() public class ReadSimOptions : ReadOptions { /// - /// The status + /// Only return Sims with this status. /// public SimResource.StatusEnum Status { get; set; } /// - /// The iccid + /// Return Sims with this Iccid. /// public string Iccid { get; set; } /// - /// The rate_plan + /// Only return Sims with this Rate Plan. /// public string RatePlan { get; set; } /// @@ -116,67 +116,67 @@ public class UpdateSimOptions : IOptions /// public string PathSid { get; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the Sid. /// public string UniqueName { get; set; } /// - /// The callback_method + /// The HTTP method Twilio will use when making a request to the callback URL. /// public Twilio.Http.HttpMethod CallbackMethod { get; set; } /// - /// The callback_url + /// Twilio will make a request to this URL when the Sim has finished updating. /// public Uri CallbackUrl { get; set; } /// - /// The friendly_name + /// A user-provided string that identifies this resource. /// public string FriendlyName { get; set; } /// - /// The rate_plan + /// The Sid or UniqueName of the RatePlan that this Sim should use. /// public string RatePlan { get; set; } /// - /// The status + /// A string representing the status of the Sim. /// public SimResource.StatusEnum Status { get; set; } /// - /// The commands_callback_method + /// A string representing the HTTP method to use when making a request to CommandsCallbackUrl. /// public Twilio.Http.HttpMethod CommandsCallbackMethod { get; set; } /// - /// The commands_callback_url + /// The URL that will receive a webhook when this Sim originates a Command. /// public Uri CommandsCallbackUrl { get; set; } /// - /// The sms_fallback_method + /// The HTTP method Twilio will use when requesting the sms_fallback_url. /// public Twilio.Http.HttpMethod SmsFallbackMethod { get; set; } /// - /// The sms_fallback_url + /// The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by sms_url. /// public Uri SmsFallbackUrl { get; set; } /// - /// The sms_method + /// The HTTP method Twilio will use when requesting the above Url. /// public Twilio.Http.HttpMethod SmsMethod { get; set; } /// - /// The sms_url + /// The URL Twilio will request when the SIM-connected device sends an SMS message that is not a Command. /// public Uri SmsUrl { get; set; } /// - /// The voice_fallback_method + /// The HTTP method Twilio will use when requesting the voice_fallback_url. /// public Twilio.Http.HttpMethod VoiceFallbackMethod { get; set; } /// - /// The voice_fallback_url + /// The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by voice_url. /// public Uri VoiceFallbackUrl { get; set; } /// - /// The voice_method + /// The HTTP method Twilio will use when requesting the above Url. /// public Twilio.Http.HttpMethod VoiceMethod { get; set; } /// - /// The voice_url + /// The URL Twilio will request when the SIM-connected device makes a call. /// public Uri VoiceUrl { get; set; } diff --git a/src/Twilio/Rest/Wireless/V1/SimResource.cs b/src/Twilio/Rest/Wireless/V1/SimResource.cs index 087002304..42272d3f8 100644 --- a/src/Twilio/Rest/Wireless/V1/SimResource.cs +++ b/src/Twilio/Rest/Wireless/V1/SimResource.cs @@ -154,9 +154,9 @@ public static async System.Threading.Tasks.Task> ReadAs /// /// read /// - /// The status - /// The iccid - /// The rate_plan + /// Only return Sims with this status. + /// Return Sims with this Iccid. + /// Only return Sims with this Rate Plan. /// The e_id /// The sim_registration_code /// Page size @@ -180,9 +180,9 @@ public static ResourceSet Read(SimResource.StatusEnum status = null /// /// read /// - /// The status - /// The iccid - /// The rate_plan + /// Only return Sims with this status. + /// Return Sims with this Iccid. + /// Only return Sims with this Rate Plan. /// The e_id /// The sim_registration_code /// Page size @@ -306,22 +306,27 @@ public static async System.Threading.Tasks.Task UpdateAsync(UpdateS /// update /// /// The sid - /// The unique_name - /// The callback_method - /// The callback_url - /// The friendly_name - /// The rate_plan - /// The status - /// The commands_callback_method - /// The commands_callback_url - /// The sms_fallback_method - /// The sms_fallback_url - /// The sms_method - /// The sms_url - /// The voice_fallback_method - /// The voice_fallback_url - /// The voice_method - /// The voice_url + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// Sid. + /// The HTTP method Twilio will use when making a request to the callback URL. + /// Twilio will make a request to this URL when the Sim has finished updating. + /// A user-provided string that identifies this resource. + /// The Sid or UniqueName of the RatePlan that this Sim should use. + /// A string representing the status of the Sim. + /// A string representing the HTTP method to use when making a request to + /// CommandsCallbackUrl. + /// The URL that will receive a webhook when this Sim originates a Command. + /// The HTTP method Twilio will use when requesting the sms_fallback_url. + /// The URL that Twilio will request if an error occurs retrieving or executing the TwiML + /// requested by sms_url. + /// The HTTP method Twilio will use when requesting the above Url. + /// The URL Twilio will request when the SIM-connected device sends an SMS message that is not a + /// Command. + /// The HTTP method Twilio will use when requesting the voice_fallback_url. + /// The URL that Twilio will request if an error occurs retrieving or executing the + /// TwiML requested by voice_url. + /// The HTTP method Twilio will use when requesting the above Url. + /// The URL Twilio will request when the SIM-connected device makes a call. /// Client to make requests to Twilio /// A single instance of Sim public static SimResource Update(string pathSid, @@ -352,22 +357,27 @@ public static SimResource Update(string pathSid, /// update /// /// The sid - /// The unique_name - /// The callback_method - /// The callback_url - /// The friendly_name - /// The rate_plan - /// The status - /// The commands_callback_method - /// The commands_callback_url - /// The sms_fallback_method - /// The sms_fallback_url - /// The sms_method - /// The sms_url - /// The voice_fallback_method - /// The voice_fallback_url - /// The voice_method - /// The voice_url + /// A user-provided string that uniquely identifies this resource as an alternative to the + /// Sid. + /// The HTTP method Twilio will use when making a request to the callback URL. + /// Twilio will make a request to this URL when the Sim has finished updating. + /// A user-provided string that identifies this resource. + /// The Sid or UniqueName of the RatePlan that this Sim should use. + /// A string representing the status of the Sim. + /// A string representing the HTTP method to use when making a request to + /// CommandsCallbackUrl. + /// The URL that will receive a webhook when this Sim originates a Command. + /// The HTTP method Twilio will use when requesting the sms_fallback_url. + /// The URL that Twilio will request if an error occurs retrieving or executing the TwiML + /// requested by sms_url. + /// The HTTP method Twilio will use when requesting the above Url. + /// The URL Twilio will request when the SIM-connected device sends an SMS message that is not a + /// Command. + /// The HTTP method Twilio will use when requesting the voice_fallback_url. + /// The URL that Twilio will request if an error occurs retrieving or executing the + /// TwiML requested by voice_url. + /// The HTTP method Twilio will use when requesting the above Url. + /// The URL Twilio will request when the SIM-connected device makes a call. /// Client to make requests to Twilio /// Task that resolves to A single instance of Sim public static async System.Threading.Tasks.Task UpdateAsync(string pathSid, @@ -413,32 +423,32 @@ public static SimResource FromJson(string json) } /// - /// The sid + /// A 34 character string that uniquely identifies this resource. /// [JsonProperty("sid")] public string Sid { get; private set; } /// - /// The unique_name + /// A user-provided string that uniquely identifies this resource as an alternative to the sid. /// [JsonProperty("unique_name")] public string UniqueName { get; private set; } /// - /// The account_sid + /// The unique id of the Account that this Sim belongs to. /// [JsonProperty("account_sid")] public string AccountSid { get; private set; } /// - /// The rate_plan_sid + /// The unique ID of the Rate Plan configured for this Sim. /// [JsonProperty("rate_plan_sid")] public string RatePlanSid { get; private set; } /// - /// The friendly_name + /// A user-provided string that identifies this resource. /// [JsonProperty("friendly_name")] public string FriendlyName { get; private set; } /// - /// The iccid + /// The ICCID associated with the SIM. /// [JsonProperty("iccid")] public string Iccid { get; private set; } @@ -448,83 +458,83 @@ public static SimResource FromJson(string json) [JsonProperty("e_id")] public string EId { get; private set; } /// - /// The status + /// A string representing the status of the Sim. /// [JsonProperty("status")] [JsonConverter(typeof(StringEnumConverter))] public SimResource.StatusEnum Status { get; private set; } /// - /// The commands_callback_url + /// The URL that will receive a webhook when this Sim originates a machine-to-machine Command. /// [JsonProperty("commands_callback_url")] public Uri CommandsCallbackUrl { get; private set; } /// - /// The commands_callback_method + /// A string representing the HTTP method to use when making a request to commands_callback_url. /// [JsonProperty("commands_callback_method")] [JsonConverter(typeof(HttpMethodConverter))] public Twilio.Http.HttpMethod CommandsCallbackMethod { get; private set; } /// - /// The sms_fallback_method + /// The HTTP method Twilio will use when requesting the sms_fallback_url. /// [JsonProperty("sms_fallback_method")] [JsonConverter(typeof(HttpMethodConverter))] public Twilio.Http.HttpMethod SmsFallbackMethod { get; private set; } /// - /// The sms_fallback_url + /// The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by sms_url. /// [JsonProperty("sms_fallback_url")] public Uri SmsFallbackUrl { get; private set; } /// - /// The sms_method + /// The HTTP method Twilio will use when requesting the above Url. /// [JsonProperty("sms_method")] [JsonConverter(typeof(HttpMethodConverter))] public Twilio.Http.HttpMethod SmsMethod { get; private set; } /// - /// The sms_url + /// The URL Twilio will request when the SIM-connected device send an SMS that is not a Command. /// [JsonProperty("sms_url")] public Uri SmsUrl { get; private set; } /// - /// The voice_fallback_method + /// The HTTP method Twilio will use when requesting the voice_fallback_url. /// [JsonProperty("voice_fallback_method")] [JsonConverter(typeof(HttpMethodConverter))] public Twilio.Http.HttpMethod VoiceFallbackMethod { get; private set; } /// - /// The voice_fallback_url + /// The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by voice_url. /// [JsonProperty("voice_fallback_url")] public Uri VoiceFallbackUrl { get; private set; } /// - /// The voice_method + /// The HTTP method Twilio will use when requesting the above Url. /// [JsonProperty("voice_method")] [JsonConverter(typeof(HttpMethodConverter))] public Twilio.Http.HttpMethod VoiceMethod { get; private set; } /// - /// The voice_url + /// The URL Twilio will request when the SIM-connected device makes a call. /// [JsonProperty("voice_url")] public Uri VoiceUrl { get; private set; } /// - /// The date_created + /// The date that this resource was created, given as GMT in ISO 8601 format. /// [JsonProperty("date_created")] public DateTime? DateCreated { get; private set; } /// - /// The date_updated + /// The date that this resource was last updated, given as GMT in ISO 8601 format. /// [JsonProperty("date_updated")] public DateTime? DateUpdated { get; private set; } /// - /// The url + /// The URL for this resource. /// [JsonProperty("url")] public Uri Url { get; private set; } /// - /// The links + /// Each Sim instance resource supports a few subresources, listed here for convenience. /// [JsonProperty("links")] public Dictionary Links { get; private set; } diff --git a/test/Twilio.Test/Rest/Chat/V2/Service/Channel/WebhookResourceTest.cs b/test/Twilio.Test/Rest/Chat/V2/Service/Channel/WebhookResourceTest.cs new file mode 100644 index 000000000..42dce8abd --- /dev/null +++ b/test/Twilio.Test/Rest/Chat/V2/Service/Channel/WebhookResourceTest.cs @@ -0,0 +1,220 @@ +/// This code was generated by +/// \ / _ _ _| _ _ +/// | (_)\/(_)(_|\/| |(/_ v1.0.0 +/// / / + +using NSubstitute; +using NSubstitute.ExceptionExtensions; +using NUnit.Framework; +using System; +using System.Collections.Generic; +using Twilio.Clients; +using Twilio.Converters; +using Twilio.Exceptions; +using Twilio.Http; +using Twilio.Rest.Chat.V2.Service.Channel; + +namespace Twilio.Tests.Rest.Chat.V2.Service.Channel +{ + + [TestFixture] + public class WebhookTest : TwilioTest + { + [Test] + public void TestReadRequest() + { + var twilioRestClient = Substitute.For(); + var request = new Request( + HttpMethod.Get, + Twilio.Rest.Domain.Chat, + "/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Webhooks", + "" + ); + twilioRestClient.Request(request).Throws(new ApiException("Server Error, no content")); + + try + { + WebhookResource.Read("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.Fail("Expected TwilioException to be thrown for 500"); + } + catch (ApiException) {} + twilioRestClient.Received().Request(request); + } + + [Test] + public void TestReadFullResponse() + { + var twilioRestClient = Substitute.For(); + twilioRestClient.AccountSid.Returns("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + twilioRestClient.Request(Arg.Any()) + .Returns(new Response( + System.Net.HttpStatusCode.OK, + "{\"meta\": {\"page\": 0,\"page_size\": 5,\"first_page_url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks?PageSize=5&Page=0\",\"previous_page_url\": null,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks?PageSize=5&Page=0\",\"next_page_url\": null,\"key\": \"webhooks\"},\"webhooks\": [{\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"channel_sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"sid\": \"WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"type\": \"webhook\",\"configuration\": {\"url\": \"dummy\",\"method\": \"GET\",\"filters\": [\"onMessageSent\",\"onChannelDestroyed\"],\"retry_count\": 2},\"date_created\": \"2016-03-24T21:05:50Z\",\"date_updated\": \"2016-03-24T21:05:50Z\",\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"},{\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"channel_sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"sid\": \"WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"type\": \"trigger\",\"configuration\": {\"url\": \"dummy\",\"method\": \"POST\",\"filters\": [\"keyword1\",\"keyword2\"],\"retry_count\": 3},\"date_created\": \"2016-03-24T21:05:50Z\",\"date_updated\": \"2016-03-24T21:05:50Z\",\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"},{\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"channel_sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"sid\": \"WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"type\": \"studio\",\"configuration\": {\"flow_sid\": \"FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"},\"date_created\": \"2016-03-24T21:05:50Z\",\"date_updated\": \"2016-03-24T21:05:50Z\",\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}]}" + )); + + var response = WebhookResource.Read("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.NotNull(response); + } + + [Test] + public void TestReadEmptyResponse() + { + var twilioRestClient = Substitute.For(); + twilioRestClient.AccountSid.Returns("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + twilioRestClient.Request(Arg.Any()) + .Returns(new Response( + System.Net.HttpStatusCode.OK, + "{\"meta\": {\"page\": 0,\"page_size\": 5,\"first_page_url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks?PageSize=5&Page=0\",\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks?PageSize=5&Page=0\",\"previous_page_url\": null,\"next_page_url\": null,\"key\": \"webhooks\"},\"webhooks\": []}" + )); + + var response = WebhookResource.Read("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.NotNull(response); + } + + [Test] + public void TestFetchRequest() + { + var twilioRestClient = Substitute.For(); + var request = new Request( + HttpMethod.Get, + Twilio.Rest.Domain.Chat, + "/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Webhooks/WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "" + ); + twilioRestClient.Request(request).Throws(new ApiException("Server Error, no content")); + + try + { + WebhookResource.Fetch("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.Fail("Expected TwilioException to be thrown for 500"); + } + catch (ApiException) {} + twilioRestClient.Received().Request(request); + } + + [Test] + public void TestFetchResponse() + { + var twilioRestClient = Substitute.For(); + twilioRestClient.AccountSid.Returns("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + twilioRestClient.Request(Arg.Any()) + .Returns(new Response( + System.Net.HttpStatusCode.OK, + "{\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"channel_sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"sid\": \"WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"type\": \"studio\",\"configuration\": {\"flow_sid\": \"FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"},\"date_created\": \"2016-03-24T21:05:50Z\",\"date_updated\": \"2016-03-24T21:05:50Z\",\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}" + )); + + var response = WebhookResource.Fetch("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.NotNull(response); + } + + [Test] + public void TestCreateRequest() + { + var twilioRestClient = Substitute.For(); + var request = new Request( + HttpMethod.Post, + Twilio.Rest.Domain.Chat, + "/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Webhooks", + "" + ); + request.AddPostParam("Type", Serialize(WebhookResource.TypeEnum.Webhook)); + twilioRestClient.Request(request).Throws(new ApiException("Server Error, no content")); + + try + { + WebhookResource.Create("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", WebhookResource.TypeEnum.Webhook, client: twilioRestClient); + Assert.Fail("Expected TwilioException to be thrown for 500"); + } + catch (ApiException) {} + twilioRestClient.Received().Request(request); + } + + [Test] + public void TestCreateResponse() + { + var twilioRestClient = Substitute.For(); + twilioRestClient.AccountSid.Returns("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + twilioRestClient.Request(Arg.Any()) + .Returns(new Response( + System.Net.HttpStatusCode.Created, + "{\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"channel_sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"sid\": \"WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"type\": \"webhook\",\"configuration\": {\"url\": \"dummy\",\"method\": \"GET\",\"filters\": [\"onMessageSent\",\"onChannelDestroyed\"],\"retry_count\": 2},\"date_created\": \"2016-03-24T21:05:50Z\",\"date_updated\": \"2016-03-24T21:05:50Z\",\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}" + )); + + var response = WebhookResource.Create("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", WebhookResource.TypeEnum.Webhook, client: twilioRestClient); + Assert.NotNull(response); + } + + [Test] + public void TestUpdateRequest() + { + var twilioRestClient = Substitute.For(); + var request = new Request( + HttpMethod.Post, + Twilio.Rest.Domain.Chat, + "/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Webhooks/WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "" + ); + twilioRestClient.Request(request).Throws(new ApiException("Server Error, no content")); + + try + { + WebhookResource.Update("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.Fail("Expected TwilioException to be thrown for 500"); + } + catch (ApiException) {} + twilioRestClient.Received().Request(request); + } + + [Test] + public void TestUpdateResponse() + { + var twilioRestClient = Substitute.For(); + twilioRestClient.AccountSid.Returns("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + twilioRestClient.Request(Arg.Any()) + .Returns(new Response( + System.Net.HttpStatusCode.OK, + "{\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"channel_sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"sid\": \"WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"type\": \"trigger\",\"configuration\": {\"url\": \"dummy\",\"method\": \"POST\",\"filters\": [\"keyword1\",\"keyword2\"],\"retry_count\": 3},\"date_created\": \"2016-03-24T21:05:50Z\",\"date_updated\": \"2016-03-24T21:05:51Z\",\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}" + )); + + var response = WebhookResource.Update("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.NotNull(response); + } + + [Test] + public void TestDeleteRequest() + { + var twilioRestClient = Substitute.For(); + var request = new Request( + HttpMethod.Delete, + Twilio.Rest.Domain.Chat, + "/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Webhooks/WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "" + ); + twilioRestClient.Request(request).Throws(new ApiException("Server Error, no content")); + + try + { + WebhookResource.Delete("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.Fail("Expected TwilioException to be thrown for 500"); + } + catch (ApiException) {} + twilioRestClient.Received().Request(request); + } + + [Test] + public void TestDeleteResponse() + { + var twilioRestClient = Substitute.For(); + twilioRestClient.AccountSid.Returns("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + twilioRestClient.Request(Arg.Any()) + .Returns(new Response( + System.Net.HttpStatusCode.NoContent, + "null" + )); + + var response = WebhookResource.Delete("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.NotNull(response); + } + } + +} \ No newline at end of file diff --git a/test/Twilio.Test/Rest/Chat/V2/Service/ChannelResourceTest.cs b/test/Twilio.Test/Rest/Chat/V2/Service/ChannelResourceTest.cs index f4997e0df..dbedbc3ea 100644 --- a/test/Twilio.Test/Rest/Chat/V2/Service/ChannelResourceTest.cs +++ b/test/Twilio.Test/Rest/Chat/V2/Service/ChannelResourceTest.cs @@ -49,7 +49,7 @@ public void TestFetchResponse() twilioRestClient.Request(Arg.Any()) .Returns(new Response( System.Net.HttpStatusCode.OK, - "{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:37Z\",\"created_by\": \"system\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"last_message\": null}}" + "{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:37Z\",\"created_by\": \"system\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"webhooks\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks\",\"last_message\": null}}" )); var response = ChannelResource.Fetch("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); @@ -121,7 +121,7 @@ public void TestCreateResponse() twilioRestClient.Request(Arg.Any()) .Returns(new Response( System.Net.HttpStatusCode.Created, - "{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:38Z\",\"created_by\": \"username\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"last_message\": null}}" + "{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:38Z\",\"created_by\": \"username\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"webhooks\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks\",\"last_message\": null}}" )); var response = ChannelResource.Create("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); @@ -157,7 +157,7 @@ public void TestReadFullResponse() twilioRestClient.Request(Arg.Any()) .Returns(new Response( System.Net.HttpStatusCode.OK, - "{\"channels\": [{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:37Z\",\"created_by\": \"system\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"last_message\": null}}],\"meta\": {\"page\": 0,\"page_size\": 50,\"first_page_url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels?PageSize=50&Page=0\",\"previous_page_url\": null,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels?PageSize=50&Page=0\",\"next_page_url\": null,\"key\": \"channels\"}}" + "{\"channels\": [{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:37Z\",\"created_by\": \"system\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"webhooks\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks\",\"last_message\": null}}],\"meta\": {\"page\": 0,\"page_size\": 50,\"first_page_url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels?PageSize=50&Page=0\",\"previous_page_url\": null,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels?PageSize=50&Page=0\",\"next_page_url\": null,\"key\": \"channels\"}}" )); var response = ChannelResource.Read("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); @@ -208,7 +208,7 @@ public void TestUpdateResponse() twilioRestClient.Request(Arg.Any()) .Returns(new Response( System.Net.HttpStatusCode.OK, - "{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:38Z\",\"created_by\": \"username\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"last_message\": null}}" + "{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:38Z\",\"created_by\": \"username\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"webhooks\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks\",\"last_message\": null}}" )); var response = ChannelResource.Update("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); diff --git a/test/Twilio.Test/Rest/IpMessaging/V2/Service/Channel/WebhookResourceTest.cs b/test/Twilio.Test/Rest/IpMessaging/V2/Service/Channel/WebhookResourceTest.cs new file mode 100644 index 000000000..1769c861c --- /dev/null +++ b/test/Twilio.Test/Rest/IpMessaging/V2/Service/Channel/WebhookResourceTest.cs @@ -0,0 +1,220 @@ +/// This code was generated by +/// \ / _ _ _| _ _ +/// | (_)\/(_)(_|\/| |(/_ v1.0.0 +/// / / + +using NSubstitute; +using NSubstitute.ExceptionExtensions; +using NUnit.Framework; +using System; +using System.Collections.Generic; +using Twilio.Clients; +using Twilio.Converters; +using Twilio.Exceptions; +using Twilio.Http; +using Twilio.Rest.IpMessaging.V2.Service.Channel; + +namespace Twilio.Tests.Rest.IpMessaging.V2.Service.Channel +{ + + [TestFixture] + public class WebhookTest : TwilioTest + { + [Test] + public void TestReadRequest() + { + var twilioRestClient = Substitute.For(); + var request = new Request( + HttpMethod.Get, + Twilio.Rest.Domain.IpMessaging, + "/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Webhooks", + "" + ); + twilioRestClient.Request(request).Throws(new ApiException("Server Error, no content")); + + try + { + WebhookResource.Read("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.Fail("Expected TwilioException to be thrown for 500"); + } + catch (ApiException) {} + twilioRestClient.Received().Request(request); + } + + [Test] + public void TestReadFullResponse() + { + var twilioRestClient = Substitute.For(); + twilioRestClient.AccountSid.Returns("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + twilioRestClient.Request(Arg.Any()) + .Returns(new Response( + System.Net.HttpStatusCode.OK, + "{\"meta\": {\"page\": 0,\"page_size\": 5,\"first_page_url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks?PageSize=5&Page=0\",\"previous_page_url\": null,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks?PageSize=5&Page=0\",\"next_page_url\": null,\"key\": \"webhooks\"},\"webhooks\": [{\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"channel_sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"sid\": \"WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"type\": \"webhook\",\"configuration\": {\"url\": \"dummy\",\"method\": \"GET\",\"filters\": [\"onMessageSent\",\"onChannelDestroyed\"],\"retry_count\": 2},\"date_created\": \"2016-03-24T21:05:50Z\",\"date_updated\": \"2016-03-24T21:05:50Z\",\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"},{\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"channel_sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"sid\": \"WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"type\": \"trigger\",\"configuration\": {\"url\": \"dummy\",\"method\": \"POST\",\"filters\": [\"keyword1\",\"keyword2\"],\"retry_count\": 3},\"date_created\": \"2016-03-24T21:05:50Z\",\"date_updated\": \"2016-03-24T21:05:50Z\",\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"},{\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"channel_sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"sid\": \"WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"type\": \"studio\",\"configuration\": {\"flow_sid\": \"FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"},\"date_created\": \"2016-03-24T21:05:50Z\",\"date_updated\": \"2016-03-24T21:05:50Z\",\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}]}" + )); + + var response = WebhookResource.Read("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.NotNull(response); + } + + [Test] + public void TestReadEmptyResponse() + { + var twilioRestClient = Substitute.For(); + twilioRestClient.AccountSid.Returns("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + twilioRestClient.Request(Arg.Any()) + .Returns(new Response( + System.Net.HttpStatusCode.OK, + "{\"meta\": {\"page\": 0,\"page_size\": 5,\"first_page_url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks?PageSize=5&Page=0\",\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks?PageSize=5&Page=0\",\"previous_page_url\": null,\"next_page_url\": null,\"key\": \"webhooks\"},\"webhooks\": []}" + )); + + var response = WebhookResource.Read("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.NotNull(response); + } + + [Test] + public void TestFetchRequest() + { + var twilioRestClient = Substitute.For(); + var request = new Request( + HttpMethod.Get, + Twilio.Rest.Domain.IpMessaging, + "/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Webhooks/WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "" + ); + twilioRestClient.Request(request).Throws(new ApiException("Server Error, no content")); + + try + { + WebhookResource.Fetch("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.Fail("Expected TwilioException to be thrown for 500"); + } + catch (ApiException) {} + twilioRestClient.Received().Request(request); + } + + [Test] + public void TestFetchResponse() + { + var twilioRestClient = Substitute.For(); + twilioRestClient.AccountSid.Returns("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + twilioRestClient.Request(Arg.Any()) + .Returns(new Response( + System.Net.HttpStatusCode.OK, + "{\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"channel_sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"sid\": \"WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"type\": \"studio\",\"configuration\": {\"flow_sid\": \"FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"},\"date_created\": \"2016-03-24T21:05:50Z\",\"date_updated\": \"2016-03-24T21:05:50Z\",\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}" + )); + + var response = WebhookResource.Fetch("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.NotNull(response); + } + + [Test] + public void TestCreateRequest() + { + var twilioRestClient = Substitute.For(); + var request = new Request( + HttpMethod.Post, + Twilio.Rest.Domain.IpMessaging, + "/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Webhooks", + "" + ); + request.AddPostParam("Type", Serialize(WebhookResource.TypeEnum.Webhook)); + twilioRestClient.Request(request).Throws(new ApiException("Server Error, no content")); + + try + { + WebhookResource.Create("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", WebhookResource.TypeEnum.Webhook, client: twilioRestClient); + Assert.Fail("Expected TwilioException to be thrown for 500"); + } + catch (ApiException) {} + twilioRestClient.Received().Request(request); + } + + [Test] + public void TestCreateResponse() + { + var twilioRestClient = Substitute.For(); + twilioRestClient.AccountSid.Returns("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + twilioRestClient.Request(Arg.Any()) + .Returns(new Response( + System.Net.HttpStatusCode.Created, + "{\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"channel_sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"sid\": \"WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"type\": \"webhook\",\"configuration\": {\"url\": \"dummy\",\"method\": \"GET\",\"filters\": [\"onMessageSent\",\"onChannelDestroyed\"],\"retry_count\": 2},\"date_created\": \"2016-03-24T21:05:50Z\",\"date_updated\": \"2016-03-24T21:05:50Z\",\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}" + )); + + var response = WebhookResource.Create("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", WebhookResource.TypeEnum.Webhook, client: twilioRestClient); + Assert.NotNull(response); + } + + [Test] + public void TestUpdateRequest() + { + var twilioRestClient = Substitute.For(); + var request = new Request( + HttpMethod.Post, + Twilio.Rest.Domain.IpMessaging, + "/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Webhooks/WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "" + ); + twilioRestClient.Request(request).Throws(new ApiException("Server Error, no content")); + + try + { + WebhookResource.Update("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.Fail("Expected TwilioException to be thrown for 500"); + } + catch (ApiException) {} + twilioRestClient.Received().Request(request); + } + + [Test] + public void TestUpdateResponse() + { + var twilioRestClient = Substitute.For(); + twilioRestClient.AccountSid.Returns("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + twilioRestClient.Request(Arg.Any()) + .Returns(new Response( + System.Net.HttpStatusCode.OK, + "{\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"channel_sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"sid\": \"WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"type\": \"trigger\",\"configuration\": {\"url\": \"dummy\",\"method\": \"POST\",\"filters\": [\"keyword1\",\"keyword2\"],\"retry_count\": 3},\"date_created\": \"2016-03-24T21:05:50Z\",\"date_updated\": \"2016-03-24T21:05:51Z\",\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}" + )); + + var response = WebhookResource.Update("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.NotNull(response); + } + + [Test] + public void TestDeleteRequest() + { + var twilioRestClient = Substitute.For(); + var request = new Request( + HttpMethod.Delete, + Twilio.Rest.Domain.IpMessaging, + "/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Webhooks/WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "" + ); + twilioRestClient.Request(request).Throws(new ApiException("Server Error, no content")); + + try + { + WebhookResource.Delete("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.Fail("Expected TwilioException to be thrown for 500"); + } + catch (ApiException) {} + twilioRestClient.Received().Request(request); + } + + [Test] + public void TestDeleteResponse() + { + var twilioRestClient = Substitute.For(); + twilioRestClient.AccountSid.Returns("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + twilioRestClient.Request(Arg.Any()) + .Returns(new Response( + System.Net.HttpStatusCode.NoContent, + "null" + )); + + var response = WebhookResource.Delete("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); + Assert.NotNull(response); + } + } + +} \ No newline at end of file diff --git a/test/Twilio.Test/Rest/IpMessaging/V2/Service/ChannelResourceTest.cs b/test/Twilio.Test/Rest/IpMessaging/V2/Service/ChannelResourceTest.cs index eabd2c7fb..621274362 100644 --- a/test/Twilio.Test/Rest/IpMessaging/V2/Service/ChannelResourceTest.cs +++ b/test/Twilio.Test/Rest/IpMessaging/V2/Service/ChannelResourceTest.cs @@ -49,7 +49,7 @@ public void TestFetchResponse() twilioRestClient.Request(Arg.Any()) .Returns(new Response( System.Net.HttpStatusCode.OK, - "{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:37Z\",\"created_by\": \"system\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"last_message\": null}}" + "{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:37Z\",\"created_by\": \"system\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"webhooks\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks\",\"last_message\": null}}" )); var response = ChannelResource.Fetch("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); @@ -121,7 +121,7 @@ public void TestCreateResponse() twilioRestClient.Request(Arg.Any()) .Returns(new Response( System.Net.HttpStatusCode.Created, - "{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:38Z\",\"created_by\": \"username\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"last_message\": null}}" + "{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:38Z\",\"created_by\": \"username\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"webhooks\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks\",\"last_message\": null}}" )); var response = ChannelResource.Create("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); @@ -157,7 +157,7 @@ public void TestReadFullResponse() twilioRestClient.Request(Arg.Any()) .Returns(new Response( System.Net.HttpStatusCode.OK, - "{\"channels\": [{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:37Z\",\"created_by\": \"system\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"last_message\": null}}],\"meta\": {\"page\": 0,\"page_size\": 50,\"first_page_url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels?PageSize=50&Page=0\",\"previous_page_url\": null,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels?PageSize=50&Page=0\",\"next_page_url\": null,\"key\": \"channels\"}}" + "{\"channels\": [{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:37Z\",\"created_by\": \"system\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"webhooks\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks\",\"last_message\": null}}],\"meta\": {\"page\": 0,\"page_size\": 50,\"first_page_url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels?PageSize=50&Page=0\",\"previous_page_url\": null,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels?PageSize=50&Page=0\",\"next_page_url\": null,\"key\": \"channels\"}}" )); var response = ChannelResource.Read("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient); @@ -208,7 +208,7 @@ public void TestUpdateResponse() twilioRestClient.Request(Arg.Any()) .Returns(new Response( System.Net.HttpStatusCode.OK, - "{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:38Z\",\"created_by\": \"username\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"last_message\": null}}" + "{\"sid\": \"CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"account_sid\": \"ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"service_sid\": \"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"friendly_name\": \"friendly_name\",\"unique_name\": \"unique_name\",\"attributes\": \"{ \\\"foo\\\": \\\"bar\\\" }\",\"type\": \"public\",\"date_created\": \"2015-12-16T22:18:37Z\",\"date_updated\": \"2015-12-16T22:18:38Z\",\"created_by\": \"username\",\"members_count\": 0,\"messages_count\": 0,\"url\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"links\": {\"members\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members\",\"messages\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages\",\"invites\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites\",\"webhooks\": \"https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks\",\"last_message\": null}}" )); var response = ChannelResource.Update("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client: twilioRestClient);