Skip to content

Commit

Permalink
[Librarian] Regenerated @ 021bab52f93b55d7a5786bd27716bf3a0be2d7b9 aa…
Browse files Browse the repository at this point in the history
…81ca7c51512c448626fafb32aeb46838510334
  • Loading branch information
twilio-dx committed Oct 3, 2024
1 parent 198c114 commit cdc15cf
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 2,311 deletions.
13 changes: 13 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
twilio-ruby changelog
=====================

[2024-10-03] Version 7.3.3
--------------------------
**Messaging**
- Add A2P external campaign CnpMigration flag

**Numbers**
- Add address sid to portability API

**Verify**
- Add `SnaClientToken` optional parameter on Verification check.
- Add `EnableSnaClientToken` optional parameter for Verification creation.


[2024-09-25] Version 7.3.2
--------------------------
**Accounts**
Expand Down
8 changes: 4 additions & 4 deletions lib/twilio-ruby/rest/iam/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def initialize(domain)
@version = 'v1'
@api_key = nil
@get_api_keys = nil
@new_api_key = nil
@keys = nil
end

##
Expand All @@ -46,9 +46,9 @@ def get_api_keys
@get_api_keys ||= GetApiKeysList.new self
end
##
# @return [Twilio::REST::Iam::V1::NewApiKeyList]
def new_api_key
@new_api_key ||= NewApiKeyList.new self
# @return [Twilio::REST::Iam::V1::KeyList]
def keys
@keys ||= KeyList.new self
end
##
# Provide a user friendly representation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ module Twilio
module REST
class Iam < IamBase
class V1 < Version
class NewApiKeyList < ListResource
class KeyList < ListResource

##
# Initialize the NewApiKeyList
# Initialize the KeyList
# @param [Version] version Version that contains the resource
# @return [NewApiKeyList] NewApiKeyList
# @return [KeyList] KeyList
def initialize(version)
super(version)
# Path Solution
Expand All @@ -31,12 +31,12 @@ def initialize(version)

end
##
# Create the NewApiKeyInstance
# Create the KeyInstance
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
# @param [String] friendly_name A descriptive string that you create to describe the resource. It can be up to 64 characters long.
# @param [Keytype] key_type
# @param [Object] policy The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
# @return [NewApiKeyInstance] Created NewApiKeyInstance
# @return [KeyInstance] Created KeyInstance
def create(
account_sid: nil,
friendly_name: :unset,
Expand All @@ -54,7 +54,7 @@ def create(
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })

payload = @version.create('POST', @uri, data: data, headers: headers)
NewApiKeyInstance.new(
KeyInstance.new(
@version,
payload,
)
Expand All @@ -65,17 +65,17 @@ def create(

# Provide a user friendly representation
def to_s
'#<Twilio.Iam.V1.NewApiKeyList>'
'#<Twilio.Iam.V1.KeyList>'
end
end

class NewApiKeyPage < Page
class KeyPage < Page
##
# Initialize the NewApiKeyPage
# Initialize the KeyPage
# @param [Version] version Version that contains the resource
# @param [Response] response Response from the API
# @param [Hash] solution Path solution for the resource
# @return [NewApiKeyPage] NewApiKeyPage
# @return [KeyPage] KeyPage
def initialize(version, response, solution)
super(version, response)

Expand All @@ -84,29 +84,29 @@ def initialize(version, response, solution)
end

##
# Build an instance of NewApiKeyInstance
# Build an instance of KeyInstance
# @param [Hash] payload Payload response from the API
# @return [NewApiKeyInstance] NewApiKeyInstance
# @return [KeyInstance] KeyInstance
def get_instance(payload)
NewApiKeyInstance.new(@version, payload)
KeyInstance.new(@version, payload)
end

##
# Provide a user friendly representation
def to_s
'<Twilio.Iam.V1.NewApiKeyPage>'
'<Twilio.Iam.V1.KeyPage>'
end
end
class NewApiKeyInstance < InstanceResource
class KeyInstance < InstanceResource
##
# Initialize the NewApiKeyInstance
# Initialize the KeyInstance
# @param [Version] version Version that contains the resource
# @param [Hash] payload payload that contains response from Twilio
# @param [String] account_sid The SID of the
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this NewApiKey
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Key
# resource.
# @param [String] sid The SID of the Call resource to fetch.
# @return [NewApiKeyInstance] NewApiKeyInstance
# @return [KeyInstance] KeyInstance
def initialize(version, payload )
super(version)

Expand Down Expand Up @@ -161,13 +161,13 @@ def policy
##
# Provide a user friendly representation
def to_s
"<Twilio.Iam.V1.NewApiKeyInstance>"
"<Twilio.Iam.V1.KeyInstance>"
end

##
# Provide a detailed, user friendly representation
def inspect
"<Twilio.Iam.V1.NewApiKeyInstance>"
"<Twilio.Iam.V1.KeyInstance>"
end
end

Expand Down
10 changes: 8 additions & 2 deletions lib/twilio-ruby/rest/numbers/v1/porting_portability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,16 @@ def initialize(version, phone_number)
##
# Fetch the PortingPortabilityInstance
# @param [String] target_account_sid 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.
# @param [String] address_sid Address Sid of customer to which the number will be ported.
# @return [PortingPortabilityInstance] Fetched PortingPortabilityInstance
def fetch(
target_account_sid: :unset
target_account_sid: :unset,
address_sid: :unset
)

params = Twilio::Values.of({
'TargetAccountSid' => target_account_sid,
'AddressSid' => address_sid,
})
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })

Expand Down Expand Up @@ -219,13 +222,16 @@ def url
##
# Fetch the PortingPortabilityInstance
# @param [String] target_account_sid 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.
# @param [String] address_sid Address Sid of customer to which the number will be ported.
# @return [PortingPortabilityInstance] Fetched PortingPortabilityInstance
def fetch(
target_account_sid: :unset
target_account_sid: :unset,
address_sid: :unset
)

context.fetch(
target_account_sid: target_account_sid,
address_sid: address_sid,
)
end

Expand Down
49 changes: 0 additions & 49 deletions lib/twilio-ruby/rest/preview/deployed_devices.rb

This file was deleted.

Loading

0 comments on commit cdc15cf

Please sign in to comment.