diff --git a/CHANGES.md b/CHANGES.md index d050b1806..a65c4a40d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,17 @@ twilio-go changelog ==================== +[2024-04-18] Version 1.20.1 +--------------------------- +**Flex** +- Add header `ui_version` to `web_channels` API + +**Messaging** +- Redeploy after failed pipeline + +**Numbers** +- Add Delete Port In request phone number api and Add Delete Port In request api + + [2024-04-04] Version 1.20.0 --------------------------- **Library - Feature** diff --git a/rest/api/v2010/accounts_calls_streams.go b/rest/api/v2010/accounts_calls_streams.go index 4e85fe8bc..4cdece0ab 100644 --- a/rest/api/v2010/accounts_calls_streams.go +++ b/rest/api/v2010/accounts_calls_streams.go @@ -24,15 +24,15 @@ import ( type CreateStreamParams struct { // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Stream resource. PathAccountSid *string `json:"PathAccountSid,omitempty"` - // Relative or absolute url where WebSocket connection will be established. + // Relative or absolute URL where WebSocket connection will be established. Url *string `json:"Url,omitempty"` - // The user-specified name of this Stream, if one was given when the Stream was created. This may be used to stop the Stream. + // The user-specified name of this Stream, if one was given when the Stream was created. This can be used to stop the Stream. Name *string `json:"Name,omitempty"` // Track *string `json:"Track,omitempty"` - // Absolute URL of the status callback. + // Absolute URL to which Twilio sends status callback HTTP requests. StatusCallback *string `json:"StatusCallback,omitempty"` - // The http method for the status_callback (one of GET, POST). + // The HTTP method Twilio uses when sending `status_callback` requests. Possible values are `GET` and `POST`. Default is `POST`. StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` // Parameter name Parameter1Name *string `json:"Parameter1.Name,omitempty"` diff --git a/rest/api/v2010/docs/AccountsCallsStreamsApi.md b/rest/api/v2010/docs/AccountsCallsStreamsApi.md index de08b427f..5b8561dd6 100644 --- a/rest/api/v2010/docs/AccountsCallsStreamsApi.md +++ b/rest/api/v2010/docs/AccountsCallsStreamsApi.md @@ -33,11 +33,11 @@ Other parameters are passed through a pointer to a CreateStreamParams struct Name | Type | Description ------------- | ------------- | ------------- **PathAccountSid** | **string** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Stream resource. -**Url** | **string** | Relative or absolute url where WebSocket connection will be established. -**Name** | **string** | The user-specified name of this Stream, if one was given when the Stream was created. This may be used to stop the Stream. +**Url** | **string** | Relative or absolute URL where WebSocket connection will be established. +**Name** | **string** | The user-specified name of this Stream, if one was given when the Stream was created. This can be used to stop the Stream. **Track** | **string** | -**StatusCallback** | **string** | Absolute URL of the status callback. -**StatusCallbackMethod** | **string** | The http method for the status_callback (one of GET, POST). +**StatusCallback** | **string** | Absolute URL to which Twilio sends status callback HTTP requests. +**StatusCallbackMethod** | **string** | The HTTP method Twilio uses when sending `status_callback` requests. Possible values are `GET` and `POST`. Default is `POST`. **Parameter1Name** | **string** | Parameter name **Parameter1Value** | **string** | Parameter value **Parameter2Name** | **string** | Parameter name @@ -270,7 +270,7 @@ Name | Type | Description ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **CallSid** | **string** | The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Stream resource is associated with. -**Sid** | **string** | The SID of the Stream resource, or the `name` used when creating the resource +**Sid** | **string** | The SID or the `name` of the Stream resource to be stopped ### Other Parameters diff --git a/rest/api/v2010/docs/ApiV2010Stream.md b/rest/api/v2010/docs/ApiV2010Stream.md index bd2a51194..4405b7cba 100644 --- a/rest/api/v2010/docs/ApiV2010Stream.md +++ b/rest/api/v2010/docs/ApiV2010Stream.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Sid** | Pointer to **string** | The SID of the Stream resource. | **AccountSid** | Pointer to **string** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Stream resource. | **CallSid** | Pointer to **string** | The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Stream resource is associated with. | -**Name** | Pointer to **string** | The user-specified name of this Stream, if one was given when the Stream was created. This may be used to stop the Stream. | +**Name** | Pointer to **string** | The user-specified name of this Stream, if one was given when the Stream was created. This can be used to stop the Stream. | **Status** | Pointer to [**string**](StreamEnumStatus.md) | | **DateUpdated** | Pointer to **string** | The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. | **Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com`. | diff --git a/rest/api/v2010/model_api_v2010_stream.go b/rest/api/v2010/model_api_v2010_stream.go index 98713b293..5c4176329 100644 --- a/rest/api/v2010/model_api_v2010_stream.go +++ b/rest/api/v2010/model_api_v2010_stream.go @@ -22,7 +22,7 @@ type ApiV2010Stream struct { AccountSid *string `json:"account_sid,omitempty"` // The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Stream resource is associated with. CallSid *string `json:"call_sid,omitempty"` - // The user-specified name of this Stream, if one was given when the Stream was created. This may be used to stop the Stream. + // The user-specified name of this Stream, if one was given when the Stream was created. This can be used to stop the Stream. Name *string `json:"name,omitempty"` Status *string `json:"status,omitempty"` // The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. diff --git a/rest/flex/v2/README.md b/rest/flex/v2/README.md index 0499c7fe7..595dfa8a2 100644 --- a/rest/flex/v2/README.md +++ b/rest/flex/v2/README.md @@ -31,11 +31,13 @@ All URIs are relative to *https://flex-api.twilio.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*InstancesUsersApi* | [**FetchFlexUser**](docs/InstancesUsersApi.md#fetchflexuser) | **Get** /v2/Instances/{InstanceSid}/Users/{FlexUserSid} | *WebChatsApi* | [**CreateWebChannel**](docs/WebChatsApi.md#createwebchannel) | **Post** /v2/WebChats | ## Documentation For Models + - [FlexV2FlexUser](docs/FlexV2FlexUser.md) - [FlexV2WebChannel](docs/FlexV2WebChannel.md) diff --git a/rest/flex/v2/docs/FlexV2FlexUser.md b/rest/flex/v2/docs/FlexV2FlexUser.md new file mode 100644 index 000000000..3a342b1cf --- /dev/null +++ b/rest/flex/v2/docs/FlexV2FlexUser.md @@ -0,0 +1,26 @@ +# FlexV2FlexUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique SID of the account that created the resource. | +**InstanceSid** | Pointer to **string** | The unique ID created by Twilio to identify a Flex instance. | +**UserSid** | Pointer to **string** | The unique SID identifier of the Twilio Unified User. | +**FlexUserSid** | Pointer to **string** | The unique SID identifier of the Flex User. | +**WorkerSid** | Pointer to **string** | The unique SID identifier of the worker. | +**WorkspaceSid** | Pointer to **string** | The unique SID identifier of the workspace. | +**FlexTeamSid** | Pointer to **string** | The unique SID identifier of the Flex Team. | +**FirstName** | Pointer to **string** | First name of the User. | +**LastName** | Pointer to **string** | Last name of the User. | +**Username** | Pointer to **string** | Username of the User. | +**Email** | Pointer to **string** | Email of the User. | +**FriendlyName** | Pointer to **string** | Friendly name of the User. | +**CreatedDate** | Pointer to [**time.Time**](time.Time.md) | The date that this user was created, given in ISO 8601 format. | +**UpdatedDate** | Pointer to [**time.Time**](time.Time.md) | The date that this user was updated, given in ISO 8601 format. | +**Version** | Pointer to **int** | The current version of the user. | +**Url** | Pointer to **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) + + diff --git a/rest/flex/v2/docs/InstancesUsersApi.md b/rest/flex/v2/docs/InstancesUsersApi.md new file mode 100644 index 000000000..53a6d6184 --- /dev/null +++ b/rest/flex/v2/docs/InstancesUsersApi.md @@ -0,0 +1,52 @@ +# InstancesUsersApi + +All URIs are relative to *https://flex-api.twilio.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**FetchFlexUser**](InstancesUsersApi.md#FetchFlexUser) | **Get** /v2/Instances/{InstanceSid}/Users/{FlexUserSid} | + + + +## FetchFlexUser + +> FlexV2FlexUser FetchFlexUser(ctx, InstanceSidFlexUserSid) + + + +Fetch flex user for the given flex user sid + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**InstanceSid** | **string** | The unique ID created by Twilio to identify a Flex instance. +**FlexUserSid** | **string** | The unique id for the flex user to be retrieved. + +### Other Parameters + +Other parameters are passed through a pointer to a FetchFlexUserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**FlexV2FlexUser**](FlexV2FlexUser.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/flex/v2/docs/WebChatsApi.md b/rest/flex/v2/docs/WebChatsApi.md index 83a052857..1d2b920d7 100644 --- a/rest/flex/v2/docs/WebChatsApi.md +++ b/rest/flex/v2/docs/WebChatsApi.md @@ -27,6 +27,7 @@ Other parameters are passed through a pointer to a CreateWebChannelParams struct Name | Type | Description ------------- | ------------- | ------------- +**UiVersion** | **string** | The Ui-Version HTTP request header **AddressSid** | **string** | The SID of the Conversations Address. See [Address Configuration Resource](https://www.twilio.com/docs/conversations/api/address-configuration-resource) for configuration details. When a conversation is created on the Flex backend, the callback URL will be set to the corresponding Studio Flow SID or webhook URL in your address configuration. **ChatFriendlyName** | **string** | The Conversation's friendly name. See the [Conversation resource](https://www.twilio.com/docs/conversations/api/conversation-resource) for an example. **CustomerFriendlyName** | **string** | The Conversation participant's friendly name. See the [Conversation Participant Resource](https://www.twilio.com/docs/conversations/api/conversation-participant-resource) for an example. diff --git a/rest/flex/v2/instances_users.go b/rest/flex/v2/instances_users.go new file mode 100644 index 000000000..643ee84c8 --- /dev/null +++ b/rest/flex/v2/instances_users.go @@ -0,0 +1,45 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Flex + * 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 + +import ( + "encoding/json" + "net/url" + "strings" +) + +// Fetch flex user for the given flex user sid +func (c *ApiService) FetchFlexUser(InstanceSid string, FlexUserSid string) (*FlexV2FlexUser, error) { + path := "/v2/Instances/{InstanceSid}/Users/{FlexUserSid}" + path = strings.Replace(path, "{"+"InstanceSid"+"}", InstanceSid, -1) + path = strings.Replace(path, "{"+"FlexUserSid"+"}", FlexUserSid, -1) + + data := url.Values{} + headers := make(map[string]interface{}) + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FlexV2FlexUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/flex/v2/model_flex_v2_flex_user.go b/rest/flex/v2/model_flex_v2_flex_user.go new file mode 100644 index 000000000..1353eaae5 --- /dev/null +++ b/rest/flex/v2/model_flex_v2_flex_user.go @@ -0,0 +1,54 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Flex + * 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 + +import ( + "time" +) + +// FlexV2FlexUser struct for FlexV2FlexUser +type FlexV2FlexUser struct { + // The unique SID of the account that created the resource. + AccountSid *string `json:"account_sid,omitempty"` + // The unique ID created by Twilio to identify a Flex instance. + InstanceSid *string `json:"instance_sid,omitempty"` + // The unique SID identifier of the Twilio Unified User. + UserSid *string `json:"user_sid,omitempty"` + // The unique SID identifier of the Flex User. + FlexUserSid *string `json:"flex_user_sid,omitempty"` + // The unique SID identifier of the worker. + WorkerSid *string `json:"worker_sid,omitempty"` + // The unique SID identifier of the workspace. + WorkspaceSid *string `json:"workspace_sid,omitempty"` + // The unique SID identifier of the Flex Team. + FlexTeamSid *string `json:"flex_team_sid,omitempty"` + // First name of the User. + FirstName *string `json:"first_name,omitempty"` + // Last name of the User. + LastName *string `json:"last_name,omitempty"` + // Username of the User. + Username *string `json:"username,omitempty"` + // Email of the User. + Email *string `json:"email,omitempty"` + // Friendly name of the User. + FriendlyName *string `json:"friendly_name,omitempty"` + // The date that this user was created, given in ISO 8601 format. + CreatedDate *time.Time `json:"created_date,omitempty"` + // The date that this user was updated, given in ISO 8601 format. + UpdatedDate *time.Time `json:"updated_date,omitempty"` + // The current version of the user. + Version *int `json:"version,omitempty"` + Url *string `json:"url,omitempty"` +} diff --git a/rest/flex/v2/web_chats.go b/rest/flex/v2/web_chats.go index e54716669..75e327383 100644 --- a/rest/flex/v2/web_chats.go +++ b/rest/flex/v2/web_chats.go @@ -21,6 +21,8 @@ import ( // Optional parameters for the method 'CreateWebChannel' type CreateWebChannelParams struct { + // The Ui-Version HTTP request header + UiVersion *string `json:"Ui-Version,omitempty"` // The SID of the Conversations Address. See [Address Configuration Resource](https://www.twilio.com/docs/conversations/api/address-configuration-resource) for configuration details. When a conversation is created on the Flex backend, the callback URL will be set to the corresponding Studio Flow SID or webhook URL in your address configuration. AddressSid *string `json:"AddressSid,omitempty"` // The Conversation's friendly name. See the [Conversation resource](https://www.twilio.com/docs/conversations/api/conversation-resource) for an example. @@ -31,6 +33,10 @@ type CreateWebChannelParams struct { PreEngagementData *string `json:"PreEngagementData,omitempty"` } +func (params *CreateWebChannelParams) SetUiVersion(UiVersion string) *CreateWebChannelParams { + params.UiVersion = &UiVersion + return params +} func (params *CreateWebChannelParams) SetAddressSid(AddressSid string) *CreateWebChannelParams { params.AddressSid = &AddressSid return params @@ -68,6 +74,9 @@ func (c *ApiService) CreateWebChannel(params *CreateWebChannelParams) (*FlexV2We data.Set("PreEngagementData", *params.PreEngagementData) } + if params != nil && params.UiVersion != nil { + headers["Ui-Version"] = *params.UiVersion + } resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { return nil, err diff --git a/rest/numbers/v1/README.md b/rest/numbers/v1/README.md index e3855fabf..34fd0078d 100644 --- a/rest/numbers/v1/README.md +++ b/rest/numbers/v1/README.md @@ -35,7 +35,9 @@ Class | Method | HTTP request | Description *HostedNumberEligibilityBulkApi* | [**CreateBulkEligibility**](docs/HostedNumberEligibilityBulkApi.md#createbulkeligibility) | **Post** /v1/HostedNumber/Eligibility/Bulk | *HostedNumberEligibilityBulkApi* | [**FetchBulkEligibility**](docs/HostedNumberEligibilityBulkApi.md#fetchbulkeligibility) | **Get** /v1/HostedNumber/Eligibility/Bulk/{RequestId} | *PortingPortInApi* | [**CreatePortingPortIn**](docs/PortingPortInApi.md#createportingportin) | **Post** /v1/Porting/PortIn | +*PortingPortInApi* | [**DeletePortingPortIn**](docs/PortingPortInApi.md#deleteportingportin) | **Delete** /v1/Porting/PortIn/{PortInRequestSid} | *PortingPortInApi* | [**FetchPortingPortInFetch**](docs/PortingPortInApi.md#fetchportingportinfetch) | **Get** /v1/Porting/PortIn/{PortInRequestSid} | +*PortingPortInPhoneNumberApi* | [**DeletePortingPortInPhoneNumber**](docs/PortingPortInPhoneNumberApi.md#deleteportingportinphonenumber) | **Delete** /v1/Porting/PortIn/{PortInRequestSid}/PhoneNumber/{PhoneNumberSid} | *PortingPortabilityApi* | [**CreatePortingBulkPortability**](docs/PortingPortabilityApi.md#createportingbulkportability) | **Post** /v1/Porting/Portability | *PortingPortabilityApi* | [**FetchPortingBulkPortability**](docs/PortingPortabilityApi.md#fetchportingbulkportability) | **Get** /v1/Porting/Portability/{Sid} | *PortingPortabilityPhoneNumberApi* | [**FetchPortingPortability**](docs/PortingPortabilityPhoneNumberApi.md#fetchportingportability) | **Get** /v1/Porting/Portability/PhoneNumber/{PhoneNumber} | @@ -47,6 +49,7 @@ Class | Method | HTTP request | Description - [NumbersV1BulkEligibility](docs/NumbersV1BulkEligibility.md) - [NumbersV1PortingPortInFetch](docs/NumbersV1PortingPortInFetch.md) - [NumbersV1Eligibility](docs/NumbersV1Eligibility.md) + - [NumbersV1PortingPortInPhoneNumber](docs/NumbersV1PortingPortInPhoneNumber.md) - [NumbersV1PortingBulkPortability](docs/NumbersV1PortingBulkPortability.md) - [NumbersV1PortingPortIn](docs/NumbersV1PortingPortIn.md) diff --git a/rest/numbers/v1/docs/NumbersV1PortingPortInPhoneNumber.md b/rest/numbers/v1/docs/NumbersV1PortingPortInPhoneNumber.md new file mode 100644 index 000000000..af4c0b562 --- /dev/null +++ b/rest/numbers/v1/docs/NumbersV1PortingPortInPhoneNumber.md @@ -0,0 +1,13 @@ +# NumbersV1PortingPortInPhoneNumber + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PortInRequestSid** | Pointer to **string** | The SID of the Port In request. This is a unique identifier of the port in request. | +**PhoneNumberSid** | Pointer to **string** | The SID of the Port In request phone number. This is a unique identifier of the phone number. | +**Url** | Pointer to **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) + + diff --git a/rest/numbers/v1/docs/PortingPortInApi.md b/rest/numbers/v1/docs/PortingPortInApi.md index fdfb970df..03dc6d6ea 100644 --- a/rest/numbers/v1/docs/PortingPortInApi.md +++ b/rest/numbers/v1/docs/PortingPortInApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://numbers.twilio.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**CreatePortingPortIn**](PortingPortInApi.md#CreatePortingPortIn) | **Post** /v1/Porting/PortIn | +[**DeletePortingPortIn**](PortingPortInApi.md#DeletePortingPortIn) | **Delete** /v1/Porting/PortIn/{PortInRequestSid} | [**FetchPortingPortInFetch**](PortingPortInApi.md#FetchPortingPortInFetch) | **Get** /v1/Porting/PortIn/{PortInRequestSid} | @@ -48,6 +49,48 @@ Name | Type | Description [[Back to README]](../README.md) +## DeletePortingPortIn + +> DeletePortingPortIn(ctx, PortInRequestSid) + + + +Allows to cancel a port in request by SID + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**PortInRequestSid** | **string** | The SID of the Port In request. This is a unique identifier of the port in request. + +### Other Parameters + +Other parameters are passed through a pointer to a DeletePortingPortInParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## FetchPortingPortInFetch > NumbersV1PortingPortInFetch FetchPortingPortInFetch(ctx, PortInRequestSid) diff --git a/rest/numbers/v1/docs/PortingPortInPhoneNumberApi.md b/rest/numbers/v1/docs/PortingPortInPhoneNumberApi.md new file mode 100644 index 000000000..de569de40 --- /dev/null +++ b/rest/numbers/v1/docs/PortingPortInPhoneNumberApi.md @@ -0,0 +1,52 @@ +# PortingPortInPhoneNumberApi + +All URIs are relative to *https://numbers.twilio.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeletePortingPortInPhoneNumber**](PortingPortInPhoneNumberApi.md#DeletePortingPortInPhoneNumber) | **Delete** /v1/Porting/PortIn/{PortInRequestSid}/PhoneNumber/{PhoneNumberSid} | + + + +## DeletePortingPortInPhoneNumber + +> DeletePortingPortInPhoneNumber(ctx, PortInRequestSidPhoneNumberSid) + + + +Allows to cancel a port in request phone number by SID + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**PortInRequestSid** | **string** | The SID of the Port In request. This is a unique identifier of the port in request. +**PhoneNumberSid** | **string** | The SID of the Port In request phone number. This is a unique identifier of the phone number. + +### Other Parameters + +Other parameters are passed through a pointer to a DeletePortingPortInPhoneNumberParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/numbers/v1/model_numbers_v1_porting_port_in_phone_number.go b/rest/numbers/v1/model_numbers_v1_porting_port_in_phone_number.go new file mode 100644 index 000000000..6b9f41990 --- /dev/null +++ b/rest/numbers/v1/model_numbers_v1_porting_port_in_phone_number.go @@ -0,0 +1,24 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Numbers + * 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 + +// NumbersV1PortingPortInPhoneNumber struct for NumbersV1PortingPortInPhoneNumber +type NumbersV1PortingPortInPhoneNumber struct { + // The SID of the Port In request. This is a unique identifier of the port in request. + PortInRequestSid *string `json:"port_in_request_sid,omitempty"` + // The SID of the Port In request phone number. This is a unique identifier of the phone number. + PhoneNumberSid *string `json:"phone_number_sid,omitempty"` + Url *string `json:"url,omitempty"` +} diff --git a/rest/numbers/v1/porting_port_in.go b/rest/numbers/v1/porting_port_in.go index f437eaaa8..e45400d7e 100644 --- a/rest/numbers/v1/porting_port_in.go +++ b/rest/numbers/v1/porting_port_in.go @@ -64,6 +64,24 @@ func (c *ApiService) CreatePortingPortIn(params *CreatePortingPortInParams) (*Nu return ps, err } +// Allows to cancel a port in request by SID +func (c *ApiService) DeletePortingPortIn(PortInRequestSid string) error { + path := "/v1/Porting/PortIn/{PortInRequestSid}" + path = strings.Replace(path, "{"+"PortInRequestSid"+"}", PortInRequestSid, -1) + + data := url.Values{} + headers := make(map[string]interface{}) + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + // Fetch a port in request by SID func (c *ApiService) FetchPortingPortInFetch(PortInRequestSid string) (*NumbersV1PortingPortInFetch, error) { path := "/v1/Porting/PortIn/{PortInRequestSid}" diff --git a/rest/numbers/v1/porting_port_in_phone_number.go b/rest/numbers/v1/porting_port_in_phone_number.go new file mode 100644 index 000000000..6be7b7e17 --- /dev/null +++ b/rest/numbers/v1/porting_port_in_phone_number.go @@ -0,0 +1,39 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Numbers + * 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 + +import ( + "net/url" + "strings" +) + +// Allows to cancel a port in request phone number by SID +func (c *ApiService) DeletePortingPortInPhoneNumber(PortInRequestSid string, PhoneNumberSid string) error { + path := "/v1/Porting/PortIn/{PortInRequestSid}/PhoneNumber/{PhoneNumberSid}" + path = strings.Replace(path, "{"+"PortInRequestSid"+"}", PortInRequestSid, -1) + path = strings.Replace(path, "{"+"PhoneNumberSid"+"}", PhoneNumberSid, -1) + + data := url.Values{} + headers := make(map[string]interface{}) + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +}