Skip to content

Commit

Permalink
[Librarian] Regenerated @ 01f08ee7ea770beb526f655c6e616695f7eab4e0
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Oct 31, 2022
1 parent d3ad215 commit c2a3cdd
Show file tree
Hide file tree
Showing 19 changed files with 752 additions and 88 deletions.
20 changes: 20 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
twilio-ruby changelog
=====================

[2022-10-31] Version 5.73.1
---------------------------
**Api**
- Added `contentSid` and `contentVariables` to Message resource with public visibility as Beta
- Add `UserDefinedMessageSubscription` and `UserDefinedMessage` resource

**Proxy**
- Remove FailOnParticipantConflict param from Proxy Session create and update and Proxy Participant create

**Supersim**
- Update SettingsUpdates resource to remove PackageSid

**Taskrouter**
- Add `Ordering` query parameter to Workers and TaskQueues for sorting by
- Add `worker_sid` query param for list reservations endpoint

**Twiml**
- Add `url` and `method` attributes to `<Conversation>`


[2022-10-19] Version 5.73.0
---------------------------
**Library - Feature**
Expand Down
59 changes: 59 additions & 0 deletions lib/twilio-ruby/rest/api/v2010/account/call.rb
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ def initialize(version, account_sid, sid)
@payments = nil
@siprec = nil
@streams = nil
@user_defined_message_subscriptions = nil
@user_defined_messages = nil
end

##
Expand Down Expand Up @@ -636,6 +638,49 @@ def streams(sid=:unset)
@streams
end

##
# Access the user_defined_message_subscriptions
# @return [UserDefinedMessageSubscriptionList]
# @return [UserDefinedMessageSubscriptionContext] if sid was passed.
def user_defined_message_subscriptions(sid=:unset)
raise ArgumentError, 'sid cannot be nil' if sid.nil?

if sid != :unset
return UserDefinedMessageSubscriptionContext.new(
@version,
@solution[:account_sid],
@solution[:sid],
sid,
)
end

unless @user_defined_message_subscriptions
@user_defined_message_subscriptions = UserDefinedMessageSubscriptionList.new(
@version,
account_sid: @solution[:account_sid],
call_sid: @solution[:sid],
)
end

@user_defined_message_subscriptions
end

##
# Access the user_defined_messages
# @return [UserDefinedMessageList]
# @return [UserDefinedMessageContext]
def user_defined_messages
unless @user_defined_messages
@user_defined_messages = UserDefinedMessageList.new(
@version,
account_sid: @solution[:account_sid],
call_sid: @solution[:sid],
)
end

@user_defined_messages
end

##
# Provide a user friendly representation
def to_s
Expand Down Expand Up @@ -977,6 +1022,20 @@ def streams
context.streams
end

##
# Access the user_defined_message_subscriptions
# @return [user_defined_message_subscriptions] user_defined_message_subscriptions
def user_defined_message_subscriptions
context.user_defined_message_subscriptions
end

##
# Access the user_defined_messages
# @return [user_defined_messages] user_defined_messages
def user_defined_messages
context.user_defined_messages
end

##
# Provide a user friendly representation
def to_s
Expand Down
160 changes: 160 additions & 0 deletions lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
##
# This code was generated by
# \ / _ _ _| _ _
# | (_)\/(_)(_|\/| |(/_ v1.0.0
# / /
#
# frozen_string_literal: true

module Twilio
module REST
class Api < Domain
class V2010 < Version
class AccountContext < InstanceContext
class CallContext < InstanceContext
class UserDefinedMessageList < ListResource
##
# Initialize the UserDefinedMessageList
# @param [Version] version Version that contains the resource
# @param [String] account_sid The SID of the
# {Account}[https://www.twilio.com/docs/iam/api/account] that created User Defined
# Message.
# @param [String] call_sid The SID of the
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
# Message is associated with.
# @return [UserDefinedMessageList] UserDefinedMessageList
def initialize(version, account_sid: nil, call_sid: nil)
super(version)

# Path Solution
@solution = {account_sid: account_sid, call_sid: call_sid}
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/UserDefinedMessages.json"
end

##
# Create the UserDefinedMessageInstance
# @param [String] content A unique string value to identify API call. This should
# be a unique string value per API call and can be a randomly generated.
# @param [String] idempotency_key A unique string value to identify API call. This
# should be a unique string value per API call and can be a randomly generated.
# @return [UserDefinedMessageInstance] Created UserDefinedMessageInstance
def create(content: nil, idempotency_key: :unset)
data = Twilio::Values.of({'Content' => content, 'IdempotencyKey' => idempotency_key, })

payload = @version.create('POST', @uri, data: data)

UserDefinedMessageInstance.new(
@version,
payload,
account_sid: @solution[:account_sid],
call_sid: @solution[:call_sid],
)
end

##
# Provide a user friendly representation
def to_s
'#<Twilio.Api.V2010.UserDefinedMessageList>'
end
end

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

# Path Solution
@solution = solution
end

##
# Build an instance of UserDefinedMessageInstance
# @param [Hash] payload Payload response from the API
# @return [UserDefinedMessageInstance] UserDefinedMessageInstance
def get_instance(payload)
UserDefinedMessageInstance.new(
@version,
payload,
account_sid: @solution[:account_sid],
call_sid: @solution[:call_sid],
)
end

##
# Provide a user friendly representation
def to_s
'<Twilio.Api.V2010.UserDefinedMessagePage>'
end
end

class UserDefinedMessageInstance < InstanceResource
##
# Initialize the UserDefinedMessageInstance
# @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 User Defined
# Message.
# @param [String] call_sid The SID of the
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
# Message is associated with.
# @return [UserDefinedMessageInstance] UserDefinedMessageInstance
def initialize(version, payload, account_sid: nil, call_sid: nil)
super(version)

# Marshaled Properties
@properties = {
'account_sid' => payload['account_sid'],
'call_sid' => payload['call_sid'],
'sid' => payload['sid'],
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
}
end

##
# @return [String] Account Sid.
def account_sid
@properties['account_sid']
end

##
# @return [String] Call Sid.
def call_sid
@properties['call_sid']
end

##
# @return [String] A string that uniquely identifies this User Defined Message.
def sid
@properties['sid']
end

##
# @return [Time] The date this User Defined Message was created
def date_created
@properties['date_created']
end

##
# Provide a user friendly representation
def to_s
"<Twilio.Api.V2010.UserDefinedMessageInstance>"
end

##
# Provide a detailed, user friendly representation
def inspect
"<Twilio.Api.V2010.UserDefinedMessageInstance>"
end
end
end
end
end
end
end
end
Loading

0 comments on commit c2a3cdd

Please sign in to comment.