Skip to content

Commit

Permalink
[Librarian] Regenerated @ 08245333f4a8c9235d547b189cd9c422f73e0e7e 7b…
Browse files Browse the repository at this point in the history
…b98153c25ebfee95e6e85bd4c57969e6d02435
  • Loading branch information
twilio-dx committed Sep 25, 2024
1 parent 9519482 commit e0c37c4
Show file tree
Hide file tree
Showing 959 changed files with 9,846 additions and 5,485 deletions.
14 changes: 14 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
twilio-csharp Changelog
=======================

[2024-09-25] Version 7.4.0
--------------------------
**Library - Feature**
- [PR #759](https://github.com/twilio/twilio-csharp/pull/759): Adding helper libraries for organization api and support for bearer token auth and no auth rest calls. Thanks to [@AsabuHere](https://github.com/AsabuHere)!

**Accounts**
- Update docs and mounts.
- Change library visibility to public
- Enable consent and contact bulk upsert APIs in prod.

**Serverless**
- Add is_plugin parameter in deployments api to check if it is plugins deployment


[2024-09-18] Version 7.3.1
--------------------------
**Intelligence**
Expand Down
8 changes: 5 additions & 3 deletions src/Twilio/Rest/Accounts/V1/AuthTokenPromotionResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@





namespace Twilio.Rest.Accounts.V1
{
public class AuthTokenPromotionResource : Resource
Expand Down Expand Up @@ -67,7 +69,7 @@ public static AuthTokenPromotionResource Update(UpdateAuthTokenPromotionOptions
/// <returns> Task that resolves to A single instance of AuthTokenPromotion </returns>
#if !NET35
public static async System.Threading.Tasks.Task<AuthTokenPromotionResource> UpdateAsync(UpdateAuthTokenPromotionOptions options,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildUpdateRequest(options, client));
Expand All @@ -79,7 +81,7 @@ public static async System.Threading.Tasks.Task<AuthTokenPromotionResource> Upda
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of AuthTokenPromotion </returns>
public static AuthTokenPromotionResource Update(
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new UpdateAuthTokenPromotionOptions(){ };
return Update(options, client);
Expand All @@ -90,7 +92,7 @@ public static AuthTokenPromotionResource Update(
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of AuthTokenPromotion </returns>
public static async System.Threading.Tasks.Task<AuthTokenPromotionResource> UpdateAsync(
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new UpdateAuthTokenPromotionOptions(){ };
return await UpdateAsync(options, client);
Expand Down
59 changes: 59 additions & 0 deletions src/Twilio/Rest/Accounts/V1/BulkConsentsOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* This code was generated by
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio - Accounts
* This is the public Twilio REST API.
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/


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



namespace Twilio.Rest.Accounts.V1
{

/// <summary> create </summary>
public class CreateBulkConsentsOptions : IOptions<BulkConsentsResource>
{

///<summary> This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; and `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`]. </summary>
public List<object> Items { get; }


/// <summary> Construct a new CreateBulkConsentsOptions </summary>
/// <param name="items"> This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; and `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`]. </param>
public CreateBulkConsentsOptions(List<object> items)
{
Items = items;
}


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

if (Items != null)
{
p.AddRange(Items.Select(Items => new KeyValuePair<string, string>("Items", Serializers.JsonObject(Items))));
}
return p;
}



}
}

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


using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;





namespace Twilio.Rest.Accounts.V1
{
public class BulkConsentsResource : Resource
{





private static Request BuildCreateRequest(CreateBulkConsentsOptions options, ITwilioRestClient client)
{

string path = "/v1/Consents/Bulk";


return new Request(
HttpMethod.Post,
Rest.Domain.Accounts,
path,
contentType: EnumConstants.ContentTypeEnum.FORM_URLENCODED,
postParams: options.GetParams(),
headerParams: null
);
}

/// <summary> create </summary>
/// <param name="options"> Create BulkConsents parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of BulkConsents </returns>
public static BulkConsentsResource Create(CreateBulkConsentsOptions options, ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = client.Request(BuildCreateRequest(options, client));
return FromJson(response.Content);
}

#if !NET35
/// <summary> create </summary>
/// <param name="options"> Create BulkConsents parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of BulkConsents </returns>
public static async System.Threading.Tasks.Task<BulkConsentsResource> CreateAsync(CreateBulkConsentsOptions options, ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildCreateRequest(options, client));
return FromJson(response.Content);
}
#endif

/// <summary> create </summary>
/// <param name="items"> This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; and `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`]. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of BulkConsents </returns>
public static BulkConsentsResource Create(
List<object> items,
ITwilioRestClient client = null)
{
var options = new CreateBulkConsentsOptions(items){ };
return Create(options, client);
}

#if !NET35
/// <summary> create </summary>
/// <param name="items"> This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; and `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`]. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of BulkConsents </returns>
public static async System.Threading.Tasks.Task<BulkConsentsResource> CreateAsync(
List<object> items,
ITwilioRestClient client = null)
{
var options = new CreateBulkConsentsOptions(items){ };
return await CreateAsync(options, client);
}
#endif

/// <summary>
/// Converts a JSON string into a BulkConsentsResource object
/// </summary>
/// <param name="json"> Raw JSON string </param>
/// <returns> BulkConsentsResource object represented by the provided JSON </returns>
public static BulkConsentsResource FromJson(string json)
{
try
{
return JsonConvert.DeserializeObject<BulkConsentsResource>(json);
}
catch (JsonException e)
{
throw new ApiException(e.Message, e);
}
}
/// <summary>
/// Converts an object into a json string
/// </summary>
/// <param name="model"> C# model </param>
/// <returns> JSON string </returns>
public static string ToJson(object model)
{
try
{
return JsonConvert.SerializeObject(model);
}
catch (JsonException e)
{
throw new ApiException(e.Message, e);
}
}


///<summary> A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty. </summary>
[JsonProperty("items")]
public object Items { get; private set; }



private BulkConsentsResource() {

}
}
}

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


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



namespace Twilio.Rest.Accounts.V1
{

/// <summary> create </summary>
public class CreateBulkContactsOptions : IOptions<BulkContactsResource>
{

///<summary> A list of objects where each object represents a contact's details. Each object includes the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID that maps the response to the original request; `country_iso_code`, a string representing the country using the ISO format (e.g., US for the United States); and `zip_code`, a string representing the postal code. </summary>
public List<object> Items { get; }


/// <summary> Construct a new CreateBulkContactsOptions </summary>
/// <param name="items"> A list of objects where each object represents a contact's details. Each object includes the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID that maps the response to the original request; `country_iso_code`, a string representing the country using the ISO format (e.g., US for the United States); and `zip_code`, a string representing the postal code. </param>
public CreateBulkContactsOptions(List<object> items)
{
Items = items;
}


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

if (Items != null)
{
p.AddRange(Items.Select(Items => new KeyValuePair<string, string>("Items", Serializers.JsonObject(Items))));
}
return p;
}



}
}

Loading

0 comments on commit e0c37c4

Please sign in to comment.