Skip to content

Commit

Permalink
[Librarian] Regenerated @ a7caf52aaea6fe6c7b30170a468564bcea4f0362 13…
Browse files Browse the repository at this point in the history
…ec50967b82ae43900a263102daafb96aa61935
  • Loading branch information
twilio-dx committed Jan 28, 2025
1 parent 02e7c9b commit bcd8617
Show file tree
Hide file tree
Showing 12 changed files with 86 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
twilio-go changelog
====================
[2025-01-28] Version 1.23.11
----------------------------
**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


[2025-01-13] Version 1.23.10
----------------------------
**Messaging**
Expand Down
1 change: 1 addition & 0 deletions rest/content/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Class | Method | HTTP request | Description
- [CarouselActionType](docs/CarouselActionType.md)
- [QuickReplyAction](docs/QuickReplyAction.md)
- [CardActionType](docs/CardActionType.md)
- [TwilioSchedule](docs/TwilioSchedule.md)
- [ContentV1ContentAndApprovals](docs/ContentV1ContentAndApprovals.md)
- [TwilioLocation](docs/TwilioLocation.md)
- [FlowsPage](docs/FlowsPage.md)
Expand Down
13 changes: 13 additions & 0 deletions rest/content/v1/docs/TwilioSchedule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# TwilioSchedule

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | |
**Title** | **string** | |
**TimeSlots** | **string** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


1 change: 1 addition & 0 deletions rest/content/v1/docs/Types.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Name | Type | Description | Notes
**TwilioCatalog** | Pointer to [**TwilioCatalog**](TwilioCatalog.md) | |
**TwilioCarousel** | Pointer to [**TwilioCarousel**](TwilioCarousel.md) | |
**TwilioFlows** | Pointer to [**TwilioFlows**](TwilioFlows.md) | |
**TwilioSchedule** | Pointer to [**TwilioSchedule**](TwilioSchedule.md) | |
**WhatsappCard** | Pointer to [**WhatsappCard**](WhatsappCard.md) | |
**WhatsappAuthentication** | Pointer to [**WhatsappAuthentication**](WhatsappAuthentication.md) | |

Expand Down
22 changes: 22 additions & 0 deletions rest/content/v1/model_twilio_schedule.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* This code was generated by
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio - Content
* This is the public Twilio REST API.
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/

package openapi

// TwilioSchedule twilio/schedule templates allow us to send a message with a schedule with different time slots
type TwilioSchedule struct {
Id string `json:"id"`
Title string `json:"title"`
TimeSlots string `json:"timeSlots"`
}
1 change: 1 addition & 0 deletions rest/content/v1/model_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type Types struct {
TwilioCatalog *TwilioCatalog `json:"twilio/catalog,omitempty"`
TwilioCarousel *TwilioCarousel `json:"twilio/carousel,omitempty"`
TwilioFlows *TwilioFlows `json:"twilio/flows,omitempty"`
TwilioSchedule *TwilioSchedule `json:"twilio/schedule,omitempty"`
WhatsappCard *WhatsappCard `json:"whatsapp/card,omitempty"`
WhatsappAuthentication *WhatsappAuthentication `json:"whatsapp/authentication,omitempty"`
}
1 change: 1 addition & 0 deletions rest/events/v1/docs/EventsV1Subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**SinkSid** | Pointer to **string** | 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. |
**Url** | Pointer to **string** | The URL of this resource. |
**Links** | Pointer to **map[string]interface{}** | Contains a dictionary of URL links to nested resources of this Subscription. |
**ReceiveEventsFromSubaccounts** | Pointer to **bool** | Receive events from all children accounts in the parent account subscription. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 2 additions & 0 deletions rest/events/v1/docs/SubscriptionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Name | Type | Description
**Description** | **string** | A human readable description for the Subscription **This value should not contain PII.**
**SinkSid** | **string** | 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.
**Types** | **[]interface{}** | An array of objects containing the subscribed Event Types
**ReceiveEventsFromSubaccounts** | **bool** | Receive events from all children accounts in the parent account subscription.

### Return type

Expand Down Expand Up @@ -203,6 +204,7 @@ Name | Type | Description
------------- | ------------- | -------------
**Description** | **string** | A human readable description for the Subscription.
**SinkSid** | **string** | 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.
**ReceiveEventsFromSubaccounts** | **bool** | Receive events from all children accounts in the parent account subscription.

### Return type

Expand Down
2 changes: 2 additions & 0 deletions rest/events/v1/model_events_v1_subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ type EventsV1Subscription struct {
Url *string `json:"url,omitempty"`
// Contains a dictionary of URL links to nested resources of this Subscription.
Links *map[string]interface{} `json:"links,omitempty"`
// Receive events from all children accounts in the parent account subscription.
ReceiveEventsFromSubaccounts *bool `json:"receive_events_from_subaccounts,omitempty"`
}
18 changes: 18 additions & 0 deletions rest/events/v1/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ type CreateSubscriptionParams struct {
SinkSid *string `json:"SinkSid,omitempty"`
// An array of objects containing the subscribed Event Types
Types *[]interface{} `json:"Types,omitempty"`
// Receive events from all children accounts in the parent account subscription.
ReceiveEventsFromSubaccounts *bool `json:"ReceiveEventsFromSubaccounts,omitempty"`
}

func (params *CreateSubscriptionParams) SetDescription(Description string) *CreateSubscriptionParams {
Expand All @@ -45,6 +47,10 @@ func (params *CreateSubscriptionParams) SetTypes(Types []interface{}) *CreateSub
params.Types = &Types
return params
}
func (params *CreateSubscriptionParams) SetReceiveEventsFromSubaccounts(ReceiveEventsFromSubaccounts bool) *CreateSubscriptionParams {
params.ReceiveEventsFromSubaccounts = &ReceiveEventsFromSubaccounts
return params
}

// Create a new Subscription.
func (c *ApiService) CreateSubscription(params *CreateSubscriptionParams) (*EventsV1Subscription, error) {
Expand Down Expand Up @@ -72,6 +78,9 @@ func (c *ApiService) CreateSubscription(params *CreateSubscriptionParams) (*Even
data.Add("Types", string(v))
}
}
if params != nil && params.ReceiveEventsFromSubaccounts != nil {
data.Set("ReceiveEventsFromSubaccounts", fmt.Sprint(*params.ReceiveEventsFromSubaccounts))
}

resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
if err != nil {
Expand Down Expand Up @@ -286,6 +295,8 @@ type UpdateSubscriptionParams struct {
Description *string `json:"Description,omitempty"`
// 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.
SinkSid *string `json:"SinkSid,omitempty"`
// Receive events from all children accounts in the parent account subscription.
ReceiveEventsFromSubaccounts *bool `json:"ReceiveEventsFromSubaccounts,omitempty"`
}

func (params *UpdateSubscriptionParams) SetDescription(Description string) *UpdateSubscriptionParams {
Expand All @@ -296,6 +307,10 @@ func (params *UpdateSubscriptionParams) SetSinkSid(SinkSid string) *UpdateSubscr
params.SinkSid = &SinkSid
return params
}
func (params *UpdateSubscriptionParams) SetReceiveEventsFromSubaccounts(ReceiveEventsFromSubaccounts bool) *UpdateSubscriptionParams {
params.ReceiveEventsFromSubaccounts = &ReceiveEventsFromSubaccounts
return params
}

// Update a Subscription.
func (c *ApiService) UpdateSubscription(Sid string, params *UpdateSubscriptionParams) (*EventsV1Subscription, error) {
Expand All @@ -313,6 +328,9 @@ func (c *ApiService) UpdateSubscription(Sid string, params *UpdateSubscriptionPa
if params != nil && params.SinkSid != nil {
data.Set("SinkSid", *params.SinkSid)
}
if params != nil && params.ReceiveEventsFromSubaccounts != nil {
data.Set("ReceiveEventsFromSubaccounts", fmt.Sprint(*params.ReceiveEventsFromSubaccounts))
}

resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions rest/lookups/v2/docs/PhoneNumbersApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Name | Type | Description
**DateOfBirth** | **string** | User’s date of birth, in YYYYMMDD format. This query parameter is only used (optionally) for identity_match package requests.
**LastVerifiedDate** | **string** | The date you obtained consent to call or text the end-user of the phone number or a date on which you are reasonably certain that the end-user could still be reached at that number. This query parameter is only used (optionally) for reassigned_number package requests.
**VerificationSid** | **string** | The unique identifier associated with a verification process through verify API. This query parameter is only used (optionally) for pre_fill package requests.
**PartnerSubId** | **string** | The optional partnerSubId parameter to provide context for your sub-accounts, tenantIDs, sender IDs or other segmentation, enhancing the accuracy of the risk analysis.

### Return type

Expand Down
9 changes: 9 additions & 0 deletions rest/lookups/v2/phone_numbers.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ type FetchPhoneNumberParams struct {
LastVerifiedDate *string `json:"LastVerifiedDate,omitempty"`
// The unique identifier associated with a verification process through verify API. This query parameter is only used (optionally) for pre_fill package requests.
VerificationSid *string `json:"VerificationSid,omitempty"`
// The optional partnerSubId parameter to provide context for your sub-accounts, tenantIDs, sender IDs or other segmentation, enhancing the accuracy of the risk analysis.
PartnerSubId *string `json:"PartnerSubId,omitempty"`
}

func (params *FetchPhoneNumberParams) SetFields(Fields string) *FetchPhoneNumberParams {
Expand Down Expand Up @@ -108,6 +110,10 @@ func (params *FetchPhoneNumberParams) SetVerificationSid(VerificationSid string)
params.VerificationSid = &VerificationSid
return params
}
func (params *FetchPhoneNumberParams) SetPartnerSubId(PartnerSubId string) *FetchPhoneNumberParams {
params.PartnerSubId = &PartnerSubId
return params
}

//
func (c *ApiService) FetchPhoneNumber(PhoneNumber string, params *FetchPhoneNumberParams) (*LookupsV2PhoneNumber, error) {
Expand Down Expand Up @@ -161,6 +167,9 @@ func (c *ApiService) FetchPhoneNumber(PhoneNumber string, params *FetchPhoneNumb
if params != nil && params.VerificationSid != nil {
data.Set("VerificationSid", *params.VerificationSid)
}
if params != nil && params.PartnerSubId != nil {
data.Set("PartnerSubId", *params.PartnerSubId)
}

resp, err := c.requestHandler.Get(c.baseURL+path, data, headers)
if err != nil {
Expand Down

0 comments on commit bcd8617

Please sign in to comment.