Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: preview changes by twiml gather #775

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
twilio-csharp Changelog
=======================

[2025-01-31] Version 7.9.0
--------------------------
**Library - Chore**
- [PR #773](https://github.com/twilio/twilio-csharp/pull/773): added bug report issue template. Thanks to [@sbansla](https://github.com/sbansla)!

**Api**
- Add open-api file tag to `conference/call recordings` and `recording_transcriptions`.

**Events**
- Add support for subaccount subscriptions (beta)

**Insights**
- add new region to conference APIs

**Lookups**
- Add new `parnter_sub_id` query parameter to the lookup request

**Messaging**
- Adds validity period Default value in service resource documentation

**Twiml**
- Convert Twiml Attribute `speechModel` of type enum to string **(breaking change)**


[2025-01-28] Version 7.8.3
--------------------------
**Library - Chore**
Expand Down
43 changes: 0 additions & 43 deletions src/Twilio/Rest/Content/V1/ContentResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -809,42 +809,6 @@ public TwilioFlows Build()
}
}
}
public class TwilioSchedule
{
[JsonProperty("id")]
private string Id {get; set;}
[JsonProperty("title")]
private string Title {get; set;}
[JsonProperty("timeSlots")]
private string TimeSlots {get; set;}
public TwilioSchedule() { }
public class Builder
{
private TwilioSchedule _twilioSchedule = new TwilioSchedule();
public Builder()
{
}
public Builder WithId(string id)
{
_twilioSchedule.Id= id;
return this;
}
public Builder WithTitle(string title)
{
_twilioSchedule.Title= title;
return this;
}
public Builder WithTimeSlots(string timeSlots)
{
_twilioSchedule.TimeSlots= timeSlots;
return this;
}
public TwilioSchedule Build()
{
return _twilioSchedule;
}
}
}
public class WhatsappCard
{
[JsonProperty("body")]
Expand Down Expand Up @@ -983,8 +947,6 @@ public class Types
private TwilioCarousel TwilioCarousel {get; set;}
[JsonProperty("twilio/flows")]
private TwilioFlows TwilioFlows {get; set;}
[JsonProperty("twilio/schedule")]
private TwilioSchedule TwilioSchedule {get; set;}
[JsonProperty("whatsapp/card")]
private WhatsappCard WhatsappCard {get; set;}
[JsonProperty("whatsapp/authentication")]
Expand Down Expand Up @@ -1046,11 +1008,6 @@ public Builder WithTwilioFlows(TwilioFlows twilioFlows)
_types.TwilioFlows= twilioFlows;
return this;
}
public Builder WithTwilioSchedule(TwilioSchedule twilioSchedule)
{
_types.TwilioSchedule= twilioSchedule;
return this;
}
public Builder WithWhatsappCard(WhatsappCard whatsappCard)
{
_types.WhatsappCard= whatsappCard;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public static implicit operator TypeEnum(string value)
public static readonly TypeEnum Gbm = new TypeEnum("gbm");
public static readonly TypeEnum Email = new TypeEnum("email");
public static readonly TypeEnum Rcs = new TypeEnum("rcs");
public static readonly TypeEnum Apple = new TypeEnum("apple");

}
public sealed class AutoCreationTypeEnum : StringEnum
Expand Down
14 changes: 0 additions & 14 deletions src/Twilio/Rest/Events/V1/SubscriptionOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ public class CreateSubscriptionOptions : IOptions<SubscriptionResource>
///<summary> An array of objects containing the subscribed Event Types </summary>
public List<object> Types { get; }

///<summary> Receive events from all children accounts in the parent account subscription. </summary>
public bool? ReceiveEventsFromSubaccounts { get; set; }


/// <summary> Construct a new CreateSubscriptionOptions </summary>
/// <param name="description"> A human readable description for the Subscription **This value should not contain PII.** </param>
Expand Down Expand Up @@ -70,10 +67,6 @@ public List<KeyValuePair<string, string>> GetParams()
{
p.AddRange(Types.Select(Types => new KeyValuePair<string, string>("Types", Serializers.JsonObject(Types))));
}
if (ReceiveEventsFromSubaccounts != null)
{
p.Add(new KeyValuePair<string, string>("ReceiveEventsFromSubaccounts", ReceiveEventsFromSubaccounts.Value.ToString().ToLower()));
}
return p;
}

Expand Down Expand Up @@ -184,9 +177,6 @@ public class UpdateSubscriptionOptions : IOptions<SubscriptionResource>
///<summary> The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. </summary>
public string SinkSid { get; set; }

///<summary> Receive events from all children accounts in the parent account subscription. </summary>
public bool? ReceiveEventsFromSubaccounts { get; set; }



/// <summary> Construct a new UpdateSubscriptionOptions </summary>
Expand All @@ -210,10 +200,6 @@ public List<KeyValuePair<string, string>> GetParams()
{
p.Add(new KeyValuePair<string, string>("SinkSid", SinkSid));
}
if (ReceiveEventsFromSubaccounts != null)
{
p.Add(new KeyValuePair<string, string>("ReceiveEventsFromSubaccounts", ReceiveEventsFromSubaccounts.Value.ToString().ToLower()));
}
return p;
}

Expand Down
20 changes: 4 additions & 16 deletions src/Twilio/Rest/Events/V1/SubscriptionResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,15 @@ public static async System.Threading.Tasks.Task<SubscriptionResource> CreateAsyn
/// <param name="description"> A human readable description for the Subscription **This value should not contain PII.** </param>
/// <param name="sinkSid"> The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. </param>
/// <param name="types"> An array of objects containing the subscribed Event Types </param>
/// <param name="receiveEventsFromSubaccounts"> Receive events from all children accounts in the parent account subscription. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of Subscription </returns>
public static SubscriptionResource Create(
string description,
string sinkSid,
List<object> types,
bool? receiveEventsFromSubaccounts = null,
ITwilioRestClient client = null)
{
var options = new CreateSubscriptionOptions(description, sinkSid, types){ ReceiveEventsFromSubaccounts = receiveEventsFromSubaccounts };
var options = new CreateSubscriptionOptions(description, sinkSid, types){ };
return Create(options, client);
}

Expand All @@ -97,17 +95,15 @@ public static SubscriptionResource Create(
/// <param name="description"> A human readable description for the Subscription **This value should not contain PII.** </param>
/// <param name="sinkSid"> The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. </param>
/// <param name="types"> An array of objects containing the subscribed Event Types </param>
/// <param name="receiveEventsFromSubaccounts"> Receive events from all children accounts in the parent account subscription. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Subscription </returns>
public static async System.Threading.Tasks.Task<SubscriptionResource> CreateAsync(
string description,
string sinkSid,
List<object> types,
bool? receiveEventsFromSubaccounts = null,
ITwilioRestClient client = null)
{
var options = new CreateSubscriptionOptions(description, sinkSid, types){ ReceiveEventsFromSubaccounts = receiveEventsFromSubaccounts };
var options = new CreateSubscriptionOptions(description, sinkSid, types){ };
return await CreateAsync(options, client);
}
#endif
Expand Down Expand Up @@ -414,17 +410,15 @@ public static async System.Threading.Tasks.Task<SubscriptionResource> UpdateAsyn
/// <param name="pathSid"> A 34 character string that uniquely identifies this Subscription. </param>
/// <param name="description"> A human readable description for the Subscription. </param>
/// <param name="sinkSid"> The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. </param>
/// <param name="receiveEventsFromSubaccounts"> Receive events from all children accounts in the parent account subscription. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of Subscription </returns>
public static SubscriptionResource Update(
string pathSid,
string description = null,
string sinkSid = null,
bool? receiveEventsFromSubaccounts = null,
ITwilioRestClient client = null)
{
var options = new UpdateSubscriptionOptions(pathSid){ Description = description, SinkSid = sinkSid, ReceiveEventsFromSubaccounts = receiveEventsFromSubaccounts };
var options = new UpdateSubscriptionOptions(pathSid){ Description = description, SinkSid = sinkSid };
return Update(options, client);
}

Expand All @@ -433,17 +427,15 @@ public static SubscriptionResource Update(
/// <param name="pathSid"> A 34 character string that uniquely identifies this Subscription. </param>
/// <param name="description"> A human readable description for the Subscription. </param>
/// <param name="sinkSid"> The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. </param>
/// <param name="receiveEventsFromSubaccounts"> Receive events from all children accounts in the parent account subscription. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Subscription </returns>
public static async System.Threading.Tasks.Task<SubscriptionResource> UpdateAsync(
string pathSid,
string description = null,
string sinkSid = null,
bool? receiveEventsFromSubaccounts = null,
ITwilioRestClient client = null)
{
var options = new UpdateSubscriptionOptions(pathSid){ Description = description, SinkSid = sinkSid, ReceiveEventsFromSubaccounts = receiveEventsFromSubaccounts };
var options = new UpdateSubscriptionOptions(pathSid){ Description = description, SinkSid = sinkSid };
return await UpdateAsync(options, client);
}
#endif
Expand Down Expand Up @@ -514,10 +506,6 @@ public static string ToJson(object model)
[JsonProperty("links")]
public Dictionary<string, string> Links { get; private set; }

///<summary> Receive events from all children accounts in the parent account subscription. </summary>
[JsonProperty("receive_events_from_subaccounts")]
public bool? ReceiveEventsFromSubaccounts { get; private set; }



private SubscriptionResource() {
Expand Down
80 changes: 80 additions & 0 deletions src/Twilio/Rest/Iam/V1/KeyOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* This code was generated by
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio - Iam
* This is the public Twilio REST API.
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/


using System;
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Converters;




namespace Twilio.Rest.Iam.V1
{

/// <summary> Create a new Signing Key for the account making the request. </summary>
public class CreateKeyOptions : IOptions<KeyResource>
{

///<summary> The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. </summary>
public string AccountSid { get; }

///<summary> A descriptive string that you create to describe the resource. It can be up to 64 characters long. </summary>
public string FriendlyName { get; set; }


public KeyResource.KeytypeEnum KeyType { get; set; }

///<summary> The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys). </summary>
public object Policy { get; set; }


/// <summary> Construct a new CreateNewKeyOptions </summary>
/// <param name="accountSid"> The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. </param>
public CreateKeyOptions(string accountSid)
{
AccountSid = accountSid;
}


/// <summary> Generate the necessary parameters </summary>
public List<KeyValuePair<string, string>> GetParams()
{
var p = new List<KeyValuePair<string, string>>();

if (AccountSid != null)
{
p.Add(new KeyValuePair<string, string>("AccountSid", AccountSid));
}
if (FriendlyName != null)
{
p.Add(new KeyValuePair<string, string>("FriendlyName", FriendlyName));
}
if (KeyType != null)
{
p.Add(new KeyValuePair<string, string>("KeyType", KeyType.ToString()));
}
if (Policy != null)
{
p.Add(new KeyValuePair<string, string>("Policy", Serializers.JsonObject(Policy)));
}
return p;
}



}
}

Loading
Loading