Skip to content

Commit 1a0880d

Browse files
committed
[Librarian] Regenerated @ 45fa5159053e1c1f62f6d613f3b67a9239b43a5f 2551818144b7f525e66740ded45831b930db82b8
1 parent ce3b392 commit 1a0880d

25 files changed

+1557
-40
lines changed

CHANGES.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
twilio-csharp Changelog
22
=======================
33

4+
[2024-12-05] Version 7.8.0
5+
--------------------------
6+
**Library - Fix**
7+
- [PR #770](https://github.com/twilio/twilio-csharp/pull/770): Update TwilioRestClient.cs to add overloaded method in rest client. Thanks to [@AsabuHere](https://github.com/AsabuHere)!
8+
9+
**Library - Feature**
10+
- [PR #767](https://github.com/twilio/twilio-csharp/pull/767): Adding test cases for public oauth uptake. Thanks to [@AsabuHere](https://github.com/AsabuHere)!
11+
12+
**Api**
13+
- Add optional parameter `intelligence_service` to `transcription`
14+
- Updated `phone_number_sid` to be populated for sip trunking terminating calls.
15+
16+
**Numbers**
17+
- Add Update Hosted Number Order V2 API endpoint
18+
- Update Port in docs
19+
20+
**Twiml**
21+
- Add optional parameter `intelligence_service` to `<Transcription>`
22+
- Add support for new `<ConversationRelay>` and `<Assistant>` noun
23+
- Add `events` attribute to `<Dial>` verb
24+
25+
426
[2024-11-15] Version 7.7.0
527
--------------------------
628
**Library - Feature**

src/Twilio/Rest/Api/V2010/Account/Call/TranscriptionOptions.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ public class CreateTranscriptionOptions : IOptions<TranscriptionResource>
7373
///<summary> The provider will add punctuation to recognition result </summary>
7474
public bool? EnableAutomaticPunctuation { get; set; }
7575

76+
///<summary> The SID or the unique name of the [IntelligentService](https://www.twilio.com/docs/voice/intelligence/api/service-resource) to process the transcription. </summary>
77+
public string IntelligenceService { get; set; }
78+
7679

7780
/// <summary> Construct a new CreateRealtimeTranscriptionOptions </summary>
7881
/// <param name="pathCallSid"> The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Transcription resource is associated with. </param>
@@ -139,6 +142,10 @@ public List<KeyValuePair<string, string>> GetParams()
139142
{
140143
p.Add(new KeyValuePair<string, string>("EnableAutomaticPunctuation", EnableAutomaticPunctuation.Value.ToString().ToLower()));
141144
}
145+
if (IntelligenceService != null)
146+
{
147+
p.Add(new KeyValuePair<string, string>("IntelligenceService", IntelligenceService));
148+
}
142149
return p;
143150
}
144151

src/Twilio/Rest/Api/V2010/Account/Call/TranscriptionResource.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public static async System.Threading.Tasks.Task<TranscriptionResource> CreateAsy
131131
/// <param name="speechModel"> Recognition model used by the transcription engine, among those supported by the provider </param>
132132
/// <param name="hints"> A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them. </param>
133133
/// <param name="enableAutomaticPunctuation"> The provider will add punctuation to recognition result </param>
134+
/// <param name="intelligenceService"> The SID or the unique name of the [IntelligentService](https://www.twilio.com/docs/voice/intelligence/api/service-resource) to process the transcription. </param>
134135
/// <param name="client"> Client to make requests to Twilio </param>
135136
/// <returns> A single instance of Transcription </returns>
136137
public static TranscriptionResource Create(
@@ -149,9 +150,10 @@ public static TranscriptionResource Create(
149150
string speechModel = null,
150151
string hints = null,
151152
bool? enableAutomaticPunctuation = null,
153+
string intelligenceService = null,
152154
ITwilioRestClient client = null)
153155
{
154-
var options = new CreateTranscriptionOptions(pathCallSid){ PathAccountSid = pathAccountSid, Name = name, Track = track, StatusCallbackUrl = statusCallbackUrl, StatusCallbackMethod = statusCallbackMethod, InboundTrackLabel = inboundTrackLabel, OutboundTrackLabel = outboundTrackLabel, PartialResults = partialResults, LanguageCode = languageCode, TranscriptionEngine = transcriptionEngine, ProfanityFilter = profanityFilter, SpeechModel = speechModel, Hints = hints, EnableAutomaticPunctuation = enableAutomaticPunctuation };
156+
var options = new CreateTranscriptionOptions(pathCallSid){ PathAccountSid = pathAccountSid, Name = name, Track = track, StatusCallbackUrl = statusCallbackUrl, StatusCallbackMethod = statusCallbackMethod, InboundTrackLabel = inboundTrackLabel, OutboundTrackLabel = outboundTrackLabel, PartialResults = partialResults, LanguageCode = languageCode, TranscriptionEngine = transcriptionEngine, ProfanityFilter = profanityFilter, SpeechModel = speechModel, Hints = hints, EnableAutomaticPunctuation = enableAutomaticPunctuation, IntelligenceService = intelligenceService };
155157
return Create(options, client);
156158
}
157159

@@ -172,6 +174,7 @@ public static TranscriptionResource Create(
172174
/// <param name="speechModel"> Recognition model used by the transcription engine, among those supported by the provider </param>
173175
/// <param name="hints"> A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them. </param>
174176
/// <param name="enableAutomaticPunctuation"> The provider will add punctuation to recognition result </param>
177+
/// <param name="intelligenceService"> The SID or the unique name of the [IntelligentService](https://www.twilio.com/docs/voice/intelligence/api/service-resource) to process the transcription. </param>
175178
/// <param name="client"> Client to make requests to Twilio </param>
176179
/// <returns> Task that resolves to A single instance of Transcription </returns>
177180
public static async System.Threading.Tasks.Task<TranscriptionResource> CreateAsync(
@@ -190,9 +193,10 @@ public static async System.Threading.Tasks.Task<TranscriptionResource> CreateAsy
190193
string speechModel = null,
191194
string hints = null,
192195
bool? enableAutomaticPunctuation = null,
196+
string intelligenceService = null,
193197
ITwilioRestClient client = null)
194198
{
195-
var options = new CreateTranscriptionOptions(pathCallSid){ PathAccountSid = pathAccountSid, Name = name, Track = track, StatusCallbackUrl = statusCallbackUrl, StatusCallbackMethod = statusCallbackMethod, InboundTrackLabel = inboundTrackLabel, OutboundTrackLabel = outboundTrackLabel, PartialResults = partialResults, LanguageCode = languageCode, TranscriptionEngine = transcriptionEngine, ProfanityFilter = profanityFilter, SpeechModel = speechModel, Hints = hints, EnableAutomaticPunctuation = enableAutomaticPunctuation };
199+
var options = new CreateTranscriptionOptions(pathCallSid){ PathAccountSid = pathAccountSid, Name = name, Track = track, StatusCallbackUrl = statusCallbackUrl, StatusCallbackMethod = statusCallbackMethod, InboundTrackLabel = inboundTrackLabel, OutboundTrackLabel = outboundTrackLabel, PartialResults = partialResults, LanguageCode = languageCode, TranscriptionEngine = transcriptionEngine, ProfanityFilter = profanityFilter, SpeechModel = speechModel, Hints = hints, EnableAutomaticPunctuation = enableAutomaticPunctuation, IntelligenceService = intelligenceService };
196200
return await CreateAsync(options, client);
197201
}
198202
#endif

src/Twilio/Rest/Numbers/V1/WebhookOptions.cs renamed to src/Twilio/Rest/Numbers/V1/PortingWebhookConfigurationFetchOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
namespace Twilio.Rest.Numbers.V1
2525
{
2626
/// <summary> Allows to fetch the webhook configuration </summary>
27-
public class FetchWebhookOptions : IOptions<WebhookResource>
27+
public class FetchPortingWebhookConfigurationFetchOptions : IOptions<PortingWebhookConfigurationFetchResource>
2828
{
2929

3030

src/Twilio/Rest/Numbers/V1/WebhookResource.cs renamed to src/Twilio/Rest/Numbers/V1/PortingWebhookConfigurationFetchResource.cs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727

2828
namespace Twilio.Rest.Numbers.V1
2929
{
30-
public class WebhookResource : Resource
30+
public class PortingWebhookConfigurationFetchResource : Resource
3131
{
3232

3333

3434

3535

3636

37-
private static Request BuildFetchRequest(FetchWebhookOptions options, ITwilioRestClient client)
37+
private static Request BuildFetchRequest(FetchPortingWebhookConfigurationFetchOptions options, ITwilioRestClient client)
3838
{
3939

4040
string path = "/v1/Porting/Configuration/Webhook";
@@ -50,10 +50,10 @@ private static Request BuildFetchRequest(FetchWebhookOptions options, ITwilioRes
5050
}
5151

5252
/// <summary> Allows to fetch the webhook configuration </summary>
53-
/// <param name="options"> Fetch Webhook parameters </param>
53+
/// <param name="options"> Fetch PortingWebhookConfigurationFetch parameters </param>
5454
/// <param name="client"> Client to make requests to Twilio </param>
55-
/// <returns> A single instance of Webhook </returns>
56-
public static WebhookResource Fetch(FetchWebhookOptions options, ITwilioRestClient client = null)
55+
/// <returns> A single instance of PortingWebhookConfigurationFetch </returns>
56+
public static PortingWebhookConfigurationFetchResource Fetch(FetchPortingWebhookConfigurationFetchOptions options, ITwilioRestClient client = null)
5757
{
5858
client = client ?? TwilioClient.GetRestClient();
5959
var response = client.Request(BuildFetchRequest(options, client));
@@ -62,10 +62,10 @@ public static WebhookResource Fetch(FetchWebhookOptions options, ITwilioRestClie
6262

6363
#if !NET35
6464
/// <summary> Allows to fetch the webhook configuration </summary>
65-
/// <param name="options"> Fetch Webhook parameters </param>
65+
/// <param name="options"> Fetch PortingWebhookConfigurationFetch parameters </param>
6666
/// <param name="client"> Client to make requests to Twilio </param>
67-
/// <returns> Task that resolves to A single instance of Webhook </returns>
68-
public static async System.Threading.Tasks.Task<WebhookResource> FetchAsync(FetchWebhookOptions options, ITwilioRestClient client = null)
67+
/// <returns> Task that resolves to A single instance of PortingWebhookConfigurationFetch </returns>
68+
public static async System.Threading.Tasks.Task<PortingWebhookConfigurationFetchResource> FetchAsync(FetchPortingWebhookConfigurationFetchOptions options, ITwilioRestClient client = null)
6969
{
7070
client = client ?? TwilioClient.GetRestClient();
7171
var response = await client.RequestAsync(BuildFetchRequest(options, client));
@@ -74,35 +74,35 @@ public static async System.Threading.Tasks.Task<WebhookResource> FetchAsync(Fetc
7474
#endif
7575
/// <summary> Allows to fetch the webhook configuration </summary>
7676
/// <param name="client"> Client to make requests to Twilio </param>
77-
/// <returns> A single instance of Webhook </returns>
78-
public static WebhookResource Fetch(
77+
/// <returns> A single instance of PortingWebhookConfigurationFetch </returns>
78+
public static PortingWebhookConfigurationFetchResource Fetch(
7979
ITwilioRestClient client = null)
8080
{
81-
var options = new FetchWebhookOptions(){ };
81+
var options = new FetchPortingWebhookConfigurationFetchOptions(){ };
8282
return Fetch(options, client);
8383
}
8484

8585
#if !NET35
8686
/// <summary> Allows to fetch the webhook configuration </summary>
8787
/// <param name="client"> Client to make requests to Twilio </param>
88-
/// <returns> Task that resolves to A single instance of Webhook </returns>
89-
public static async System.Threading.Tasks.Task<WebhookResource> FetchAsync(ITwilioRestClient client = null)
88+
/// <returns> Task that resolves to A single instance of PortingWebhookConfigurationFetch </returns>
89+
public static async System.Threading.Tasks.Task<PortingWebhookConfigurationFetchResource> FetchAsync(ITwilioRestClient client = null)
9090
{
91-
var options = new FetchWebhookOptions(){ };
91+
var options = new FetchPortingWebhookConfigurationFetchOptions(){ };
9292
return await FetchAsync(options, client);
9393
}
9494
#endif
9595

9696
/// <summary>
97-
/// Converts a JSON string into a WebhookResource object
97+
/// Converts a JSON string into a PortingWebhookConfigurationFetchResource object
9898
/// </summary>
9999
/// <param name="json"> Raw JSON string </param>
100-
/// <returns> WebhookResource object represented by the provided JSON </returns>
101-
public static WebhookResource FromJson(string json)
100+
/// <returns> PortingWebhookConfigurationFetchResource object represented by the provided JSON </returns>
101+
public static PortingWebhookConfigurationFetchResource FromJson(string json)
102102
{
103103
try
104104
{
105-
return JsonConvert.DeserializeObject<WebhookResource>(json);
105+
return JsonConvert.DeserializeObject<PortingWebhookConfigurationFetchResource>(json);
106106
}
107107
catch (JsonException e)
108108
{
@@ -153,7 +153,7 @@ public static string ToJson(object model)
153153

154154

155155

156-
private WebhookResource() {
156+
private PortingWebhookConfigurationFetchResource() {
157157

158158
}
159159
}

src/Twilio/Rest/Numbers/V2/HostedNumberOrderOptions.cs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,5 +286,58 @@ public List<KeyValuePair<string, string>> GetParams()
286286

287287
}
288288

289+
/// <summary> Updates a specific HostedNumberOrder. </summary>
290+
public class UpdateHostedNumberOrderOptions : IOptions<HostedNumberOrderResource>
291+
{
292+
293+
///<summary> The SID of the HostedNumberOrder resource to update. </summary>
294+
public string PathSid { get; }
295+
296+
297+
public HostedNumberOrderResource.StatusEnum Status { get; }
298+
299+
///<summary> The number of seconds to wait before initiating the ownership verification call. Can be a value between 0 and 60, inclusive. </summary>
300+
public int? VerificationCallDelay { get; set; }
301+
302+
///<summary> The numerical extension to dial when making the ownership verification call. </summary>
303+
public string VerificationCallExtension { get; set; }
304+
305+
306+
307+
/// <summary> Construct a new UpdateHostedNumberOrderOptions </summary>
308+
/// <param name="pathSid"> The SID of the HostedNumberOrder resource to update. </param>
309+
/// <param name="status"> </param>
310+
public UpdateHostedNumberOrderOptions(string pathSid, HostedNumberOrderResource.StatusEnum status)
311+
{
312+
PathSid = pathSid;
313+
Status = status;
314+
}
315+
316+
317+
/// <summary> Generate the necessary parameters </summary>
318+
public List<KeyValuePair<string, string>> GetParams()
319+
{
320+
var p = new List<KeyValuePair<string, string>>();
321+
322+
if (Status != null)
323+
{
324+
p.Add(new KeyValuePair<string, string>("Status", Status.ToString()));
325+
}
326+
if (VerificationCallDelay != null)
327+
{
328+
p.Add(new KeyValuePair<string, string>("VerificationCallDelay", VerificationCallDelay.ToString()));
329+
}
330+
if (VerificationCallExtension != null)
331+
{
332+
p.Add(new KeyValuePair<string, string>("VerificationCallExtension", VerificationCallExtension));
333+
}
334+
return p;
335+
}
336+
337+
338+
339+
}
340+
341+
289342
}
290343

0 commit comments

Comments
 (0)