Skip to content

Commit 221ce7d

Browse files
committed
[Librarian] Regenerated @ 021bab52f93b55d7a5786bd27716bf3a0be2d7b9 aa81ca7c51512c448626fafb32aeb46838510334
1 parent 8a52e87 commit 221ce7d

File tree

9 files changed

+48
-4
lines changed

9 files changed

+48
-4
lines changed

CHANGES.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
twilio-go changelog
22
====================
3+
[2024-10-03] Version 1.23.3
4+
---------------------------
5+
**Messaging**
6+
- Add A2P external campaign CnpMigration flag
7+
8+
**Numbers**
9+
- Add address sid to portability API
10+
11+
**Verify**
12+
- Add `SnaClientToken` optional parameter on Verification check.
13+
- Add `EnableSnaClientToken` optional parameter for Verification creation.
14+
15+
316
[2024-09-25] Version 1.23.2
417
---------------------------
518
**Accounts**

rest/numbers/v1/docs/PortingPortabilityPhoneNumberApi.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Other parameters are passed through a pointer to a FetchPortingPortabilityParams
3232
Name | Type | Description
3333
------------- | ------------- | -------------
3434
**TargetAccountSid** | **string** | Account Sid to which the number will be ported. This can be used to determine if a sub account already has the number in its inventory or a different sub account. If this is not provided, the authenticated account will be assumed to be the target account.
35+
**AddressSid** | **string** | Address Sid of customer to which the number will be ported.
3536

3637
### Return type
3738

rest/numbers/v1/porting_portability_phone_number.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,18 @@ import (
2424
type FetchPortingPortabilityParams struct {
2525
// Account Sid to which the number will be ported. This can be used to determine if a sub account already has the number in its inventory or a different sub account. If this is not provided, the authenticated account will be assumed to be the target account.
2626
TargetAccountSid *string `json:"TargetAccountSid,omitempty"`
27+
// Address Sid of customer to which the number will be ported.
28+
AddressSid *string `json:"AddressSid,omitempty"`
2729
}
2830

2931
func (params *FetchPortingPortabilityParams) SetTargetAccountSid(TargetAccountSid string) *FetchPortingPortabilityParams {
3032
params.TargetAccountSid = &TargetAccountSid
3133
return params
3234
}
35+
func (params *FetchPortingPortabilityParams) SetAddressSid(AddressSid string) *FetchPortingPortabilityParams {
36+
params.AddressSid = &AddressSid
37+
return params
38+
}
3339

3440
// Check if a single phone number can be ported to Twilio
3541
func (c *ApiService) FetchPortingPortability(PhoneNumber string, params *FetchPortingPortabilityParams) (*NumbersV1PortingPortability, error) {
@@ -44,6 +50,9 @@ func (c *ApiService) FetchPortingPortability(PhoneNumber string, params *FetchPo
4450
if params != nil && params.TargetAccountSid != nil {
4551
data.Set("TargetAccountSid", *params.TargetAccountSid)
4652
}
53+
if params != nil && params.AddressSid != nil {
54+
data.Set("AddressSid", *params.AddressSid)
55+
}
4756

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

rest/taskrouter/v1/docs/WorkspacesTasksApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Name | Type | Description
4040
**TaskChannel** | **string** | When MultiTasking is enabled, specify the TaskChannel by passing either its `unique_name` or `sid`. Default value is `default`.
4141
**WorkflowSid** | **string** | The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional.
4242
**Attributes** | **string** | A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \\\"task_type\\\": \\\"call\\\", \\\"twilio_call_sid\\\": \\\"CAxxx\\\", \\\"customer_ticket_number\\\": \\\"12345\\\" }`.
43-
**VirtualStartTime** | **time.Time** | The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can't be in the future.
43+
**VirtualStartTime** | **time.Time** | The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can't be in the future or before the year of 1900.
4444
**RoutingTarget** | **string** | A SID of a Worker, Queue, or Workflow to route a Task to
4545
**IgnoreCapacity** | **string** | A boolean that indicates if the Task should respect a Worker's capacity and availability during assignment. This field can only be used when the `RoutingTarget` field is set to a Worker SID. By setting `IgnoreCapacity` to a value of `true`, `1`, or `yes`, the Task will be routed to the Worker without respecting their capacity and availability. Any other value will enforce the Worker's capacity and availability. The default value of `IgnoreCapacity` is `true` when the `RoutingTarget` is set to a Worker SID.
4646
**TaskQueueSid** | **string** | The SID of the TaskQueue in which the Task belongs
@@ -234,7 +234,7 @@ Name | Type | Description
234234
**Reason** | **string** | The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason.
235235
**Priority** | **int** | The Task's new priority value. When supplied, the Task takes on the specified priority unless it matches a Workflow Target with a Priority set. Value can be 0 to 2^31^ (2,147,483,647).
236236
**TaskChannel** | **string** | When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
237-
**VirtualStartTime** | **time.Time** | The task's new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can't be in the future.
237+
**VirtualStartTime** | **time.Time** | The task's new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can't be in the future or before the year of 1900.
238238

239239
### Return type
240240

rest/taskrouter/v1/workspaces_tasks.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type CreateTaskParams struct {
3636
WorkflowSid *string `json:"WorkflowSid,omitempty"`
3737
// A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \\\"task_type\\\": \\\"call\\\", \\\"twilio_call_sid\\\": \\\"CAxxx\\\", \\\"customer_ticket_number\\\": \\\"12345\\\" }`.
3838
Attributes *string `json:"Attributes,omitempty"`
39-
// The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can't be in the future.
39+
// The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can't be in the future or before the year of 1900.
4040
VirtualStartTime *time.Time `json:"VirtualStartTime,omitempty"`
4141
// A SID of a Worker, Queue, or Workflow to route a Task to
4242
RoutingTarget *string `json:"RoutingTarget,omitempty"`
@@ -443,7 +443,7 @@ type UpdateTaskParams struct {
443443
Priority *int `json:"Priority,omitempty"`
444444
// When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
445445
TaskChannel *string `json:"TaskChannel,omitempty"`
446-
// The task's new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can't be in the future.
446+
// The task's new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can't be in the future or before the year of 1900.
447447
VirtualStartTime *time.Time `json:"VirtualStartTime,omitempty"`
448448
}
449449

rest/verify/v2/docs/ServicesVerificationCheckApi.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Name | Type | Description
3636
**VerificationSid** | **string** | A SID that uniquely identifies the Verification Check. Either this parameter or the `to` phone number/[email](https://www.twilio.com/docs/verify/email) must be specified.
3737
**Amount** | **string** | The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
3838
**Payee** | **string** | The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
39+
**SnaClientToken** | **string** | A sna client token received in sna url invocation response needs to be passed in Verification Check request and should match to get successful response.
3940

4041
### Return type
4142

rest/verify/v2/docs/ServicesVerificationsApi.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Name | Type | Description
4848
**TemplateSid** | **string** | The message [template](https://www.twilio.com/docs/verify/api/templates). If provided, will override the default template for the Service. SMS and Voice channels only.
4949
**TemplateCustomSubstitutions** | **string** | A stringified JSON object in which the keys are the template's special variables and the values are the variables substitutions.
5050
**DeviceIp** | **string** | Strongly encouraged if using the auto channel. The IP address of the client's device. If provided, it has to be a valid IPv4 or IPv6 address.
51+
**EnableSnaClientToken** | **bool** | An optional Boolean value to indicate the requirement of sna client token in the SNA URL invocation response for added security. This token must match in the Verification Check request to confirm phone number verification.
5152
**RiskCheck** | **string** |
5253
**Tags** | **string** | A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length.
5354

rest/verify/v2/services_verification_check.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ type CreateVerificationCheckParams struct {
3232
Amount *string `json:"Amount,omitempty"`
3333
// The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
3434
Payee *string `json:"Payee,omitempty"`
35+
// A sna client token received in sna url invocation response needs to be passed in Verification Check request and should match to get successful response.
36+
SnaClientToken *string `json:"SnaClientToken,omitempty"`
3537
}
3638

3739
func (params *CreateVerificationCheckParams) SetCode(Code string) *CreateVerificationCheckParams {
@@ -54,6 +56,10 @@ func (params *CreateVerificationCheckParams) SetPayee(Payee string) *CreateVerif
5456
params.Payee = &Payee
5557
return params
5658
}
59+
func (params *CreateVerificationCheckParams) SetSnaClientToken(SnaClientToken string) *CreateVerificationCheckParams {
60+
params.SnaClientToken = &SnaClientToken
61+
return params
62+
}
5763

5864
// challenge a specific Verification Check.
5965
func (c *ApiService) CreateVerificationCheck(ServiceSid string, params *CreateVerificationCheckParams) (*VerifyV2VerificationCheck, error) {
@@ -80,6 +86,9 @@ func (c *ApiService) CreateVerificationCheck(ServiceSid string, params *CreateVe
8086
if params != nil && params.Payee != nil {
8187
data.Set("Payee", *params.Payee)
8288
}
89+
if params != nil && params.SnaClientToken != nil {
90+
data.Set("SnaClientToken", *params.SnaClientToken)
91+
}
8392

8493
resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
8594
if err != nil {

rest/verify/v2/services_verifications.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package openapi
1616

1717
import (
1818
"encoding/json"
19+
"fmt"
1920
"net/url"
2021
"strings"
2122
)
@@ -52,6 +53,8 @@ type CreateVerificationParams struct {
5253
TemplateCustomSubstitutions *string `json:"TemplateCustomSubstitutions,omitempty"`
5354
// Strongly encouraged if using the auto channel. The IP address of the client's device. If provided, it has to be a valid IPv4 or IPv6 address.
5455
DeviceIp *string `json:"DeviceIp,omitempty"`
56+
// An optional Boolean value to indicate the requirement of sna client token in the SNA URL invocation response for added security. This token must match in the Verification Check request to confirm phone number verification.
57+
EnableSnaClientToken *bool `json:"EnableSnaClientToken,omitempty"`
5558
//
5659
RiskCheck *string `json:"RiskCheck,omitempty"`
5760
// A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length.
@@ -118,6 +121,10 @@ func (params *CreateVerificationParams) SetDeviceIp(DeviceIp string) *CreateVeri
118121
params.DeviceIp = &DeviceIp
119122
return params
120123
}
124+
func (params *CreateVerificationParams) SetEnableSnaClientToken(EnableSnaClientToken bool) *CreateVerificationParams {
125+
params.EnableSnaClientToken = &EnableSnaClientToken
126+
return params
127+
}
121128
func (params *CreateVerificationParams) SetRiskCheck(RiskCheck string) *CreateVerificationParams {
122129
params.RiskCheck = &RiskCheck
123130
return params
@@ -194,6 +201,9 @@ func (c *ApiService) CreateVerification(ServiceSid string, params *CreateVerific
194201
if params != nil && params.DeviceIp != nil {
195202
data.Set("DeviceIp", *params.DeviceIp)
196203
}
204+
if params != nil && params.EnableSnaClientToken != nil {
205+
data.Set("EnableSnaClientToken", fmt.Sprint(*params.EnableSnaClientToken))
206+
}
197207
if params != nil && params.RiskCheck != nil {
198208
data.Set("RiskCheck", *params.RiskCheck)
199209
}

0 commit comments

Comments
 (0)