lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb in twilio-ruby-5.22.3 vs lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb in twilio-ruby-5.23.0
- old
+ new
@@ -13,12 +13,13 @@
class ServiceContext < InstanceContext
class ChannelList < ListResource
##
# Initialize the ChannelList
# @param [Version] version Version that contains the resource
- # @param [String] service_sid The unique id of the [Service][service] this channel
- # belongs to.
+ # @param [String] service_sid The SID of the
+ # [Service](https://www.twilio.com/docs/api/chat/rest/services) the resource is
+ # associated with.
# @return [ChannelList] ChannelList
def initialize(version, service_sid: nil)
super(version)
# Path Solution
@@ -27,17 +28,20 @@
end
##
# Retrieve a single page of ChannelInstance records from the API.
# Request is executed immediately.
- # @param [String] friendly_name A human-readable name for the Channel. Optional.
- # @param [String] unique_name A unique, addressable name for the Channel.
- # Optional.
- # @param [String] attributes An optional metadata field you can use to store any
- # data you wish. No processing or validation is done on this field.
- # @param [channel.ChannelType] type The visibility of the channel - `public` or
- # `private`. Defaults to `public`.
+ # @param [String] friendly_name A descriptive string that you create to describe
+ # the new resource. It can be up to 64 characters long.
+ # @param [String] unique_name An application-defined string that uniquely
+ # identifies the resource. It can be used to address the resource in place of the
+ # resource's `sid` in the URL. This value must be 64 characters or less in length
+ # and be unique within the Service.
+ # @param [String] attributes A valid JSON string that contains
+ # application-specific data.
+ # @param [channel.ChannelType] type The visibility of the channel. Can be:
+ # `public` or `private` and defaults to `public`.
# @return [ChannelInstance] Newly created ChannelInstance
def create(friendly_name: :unset, unique_name: :unset, attributes: :unset, type: :unset)
data = Twilio::Values.of({
'FriendlyName' => friendly_name,
'UniqueName' => unique_name,
@@ -56,11 +60,12 @@
##
# Lists ChannelInstance records from the API as a list.
# Unlike stream(), this operation is eager and will load `limit` records into
# memory before returning.
- # @param [channel.ChannelType] type The type
+ # @param [channel.ChannelType] type The visibility of the Channels to read. Can
+ # be: `public` or `private` and defaults to `public`.
# @param [Integer] limit Upper limit for the number of records to return. stream()
# guarantees to never return more than limit. Default is no limit
# @param [Integer] page_size Number of records to fetch per request, when
# not set will use the default value of 50 records. If no page_size is defined
# but a limit is defined, stream() will attempt to read the limit with the most
@@ -72,11 +77,12 @@
##
# Streams ChannelInstance records from the API as an Enumerable.
# This operation lazily loads records as efficiently as possible until the limit
# is reached.
- # @param [channel.ChannelType] type The type
+ # @param [channel.ChannelType] type The visibility of the Channels to read. Can
+ # be: `public` or `private` and defaults to `public`.
# @param [Integer] limit Upper limit for the number of records to return. stream()
# guarantees to never return more than limit. Default is no limit.
# @param [Integer] page_size Number of records to fetch per request, when
# not set will use the default value of 50 records. If no page_size is defined
# but a limit is defined, stream() will attempt to read the limit with the most
@@ -105,11 +111,12 @@
end
##
# Retrieve a single page of ChannelInstance records from the API.
# Request is executed immediately.
- # @param [channel.ChannelType] type The type
+ # @param [channel.ChannelType] type The visibility of the Channels to read. Can
+ # be: `public` or `private` and defaults to `public`.
# @param [String] page_token PageToken provided by the API
# @param [Integer] page_number Page Number, this value is simply for client state
# @param [Integer] page_size Number of records to return, defaults to 50
# @return [Page] Page of ChannelInstance
def page(type: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
@@ -178,12 +185,15 @@
class ChannelContext < InstanceContext
##
# Initialize the ChannelContext
# @param [Version] version Version that contains the resource
- # @param [String] service_sid The service_sid
- # @param [String] sid The sid
+ # @param [String] service_sid The SID of the
+ # [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the
+ # resource from.
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
+ # Channel resource to fetch.
# @return [ChannelContext] ChannelContext
def initialize(version, service_sid, sid)
super(version)
# Path Solution
@@ -218,15 +228,18 @@
@version.delete('delete', @uri)
end
##
# Update the ChannelInstance
- # @param [String] friendly_name A human-readable name for the Channel. Optional.
- # @param [String] unique_name A unique, addressable name for the Channel.
- # Optional.
- # @param [String] attributes An optional metadata field you can use to store any
- # data you wish. No processing or validation is done on this field.
+ # @param [String] friendly_name A descriptive string that you create to describe
+ # the resource. It can be up to 64 characters long.
+ # @param [String] unique_name An application-defined string that uniquely
+ # identifies the resource. It can be used to address the resource in place of the
+ # resource's `sid` in the URL. This value must be 64 characters or less in length
+ # and be unique within the Service.
+ # @param [String] attributes A valid JSON string that contains
+ # application-specific data.
# @return [ChannelInstance] Updated ChannelInstance
def update(friendly_name: :unset, unique_name: :unset, attributes: :unset)
data = Twilio::Values.of({
'FriendlyName' => friendly_name,
'UniqueName' => unique_name,
@@ -326,13 +339,15 @@
class ChannelInstance < InstanceResource
##
# Initialize the ChannelInstance
# @param [Version] version Version that contains the resource
# @param [Hash] payload payload that contains response from Twilio
- # @param [String] service_sid The unique id of the [Service][service] this channel
- # belongs to.
- # @param [String] sid The sid
+ # @param [String] service_sid The SID of the
+ # [Service](https://www.twilio.com/docs/api/chat/rest/services) the resource is
+ # associated with.
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
+ # Channel resource to fetch.
# @return [ChannelInstance] ChannelInstance
def initialize(version, payload, service_sid: nil, sid: nil)
super(version)
# Marshaled Properties
@@ -368,89 +383,89 @@
end
@instance_context
end
##
- # @return [String] A 34 character string that uniquely identifies this resource.
+ # @return [String] The unique string that identifies the resource
def sid
@properties['sid']
end
##
- # @return [String] The unique id of the [Account][/console] responsible for this channel.
+ # @return [String] The SID of the Account that created the resource
def account_sid
@properties['account_sid']
end
##
- # @return [String] The unique id of the [Service][service] this channel belongs to.
+ # @return [String] The SID of the Service that the resource is associated with
def service_sid
@properties['service_sid']
end
##
- # @return [String] The human-readable name of this channel.
+ # @return [String] The string that you assigned to describe the resource
def friendly_name
@properties['friendly_name']
end
##
- # @return [String] The unique, addressable name of this channel.
+ # @return [String] An application-defined string that uniquely identifies the resource
def unique_name
@properties['unique_name']
end
##
- # @return [String] An optional string metadata field you can use to store any data you wish.
+ # @return [String] The JSON string that stores application-specific data
def attributes
@properties['attributes']
end
##
- # @return [channel.ChannelType] The visibility of this channel - either public or private
+ # @return [channel.ChannelType] The visibility of the channel. Can be: `public` or `private`
def type
@properties['type']
end
##
- # @return [Time] The date that this resource was created.
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was created
def date_created
@properties['date_created']
end
##
- # @return [Time] The date that this resource was last updated.
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
def date_updated
@properties['date_updated']
end
##
- # @return [String] Identity of the channel's creator.
+ # @return [String] The identity of the User that created the channel
def created_by
@properties['created_by']
end
##
- # @return [String] The members_count
+ # @return [String] The number of Members in the Channel
def members_count
@properties['members_count']
end
##
- # @return [String] The messages_count
+ # @return [String] The number of Messages in the Channel
def messages_count
@properties['messages_count']
end
##
- # @return [String] An absolute URL for this channel.
+ # @return [String] The absolute URL of the Channel resource
def url
@properties['url']
end
##
- # @return [String] Absolute URLs to access the [Members][members] and [Messages][messages] for this channel.
+ # @return [String] Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel
def links
@properties['links']
end
##
@@ -467,14 +482,17 @@
context.delete
end
##
# Update the ChannelInstance
- # @param [String] friendly_name A human-readable name for the Channel. Optional.
- # @param [String] unique_name A unique, addressable name for the Channel.
- # Optional.
- # @param [String] attributes An optional metadata field you can use to store any
- # data you wish. No processing or validation is done on this field.
+ # @param [String] friendly_name A descriptive string that you create to describe
+ # the resource. It can be up to 64 characters long.
+ # @param [String] unique_name An application-defined string that uniquely
+ # identifies the resource. It can be used to address the resource in place of the
+ # resource's `sid` in the URL. This value must be 64 characters or less in length
+ # and be unique within the Service.
+ # @param [String] attributes A valid JSON string that contains
+ # application-specific data.
# @return [ChannelInstance] Updated ChannelInstance
def update(friendly_name: :unset, unique_name: :unset, attributes: :unset)
context.update(friendly_name: friendly_name, unique_name: unique_name, attributes: attributes, )
end
\ No newline at end of file