lib/twilio-ruby/rest/ip_messaging/v2/service.rb in twilio-ruby-5.41.0 vs lib/twilio-ruby/rest/ip_messaging/v2/service.rb in twilio-ruby-5.42.0

- old
+ new

@@ -23,12 +23,11 @@ @uri = "/Services" end ## # Create the ServiceInstance - # @param [String] friendly_name A descriptive string that you create to describe - # the new resource. + # @param [String] friendly_name The friendly_name # @return [ServiceInstance] Created ServiceInstance def create(friendly_name: nil) data = Twilio::Values.of({'FriendlyName' => friendly_name, }) payload = @version.create('POST', @uri, data: data) @@ -154,11 +153,11 @@ class ServiceContext < InstanceContext ## # Initialize the ServiceContext # @param [Version] version Version that contains the resource - # @param [String] sid The SID of the Service resource to fetch. + # @param [String] sid The sid # @return [ServiceContext] ServiceContext def initialize(version, sid) super(version) # Path Solution @@ -188,99 +187,55 @@ @version.delete('DELETE', @uri) end ## # Update the ServiceInstance - # @param [String] friendly_name A descriptive string that you create to describe - # the resource. - # @param [String] default_service_role_sid The service role assigned to users when - # they are added to the service. See the {Role - # resource}[https://www.twilio.com/docs/chat/rest/role-resource] for more info - # about roles. - # @param [String] default_channel_role_sid The channel role assigned to users when - # they are added to a channel. See the {Role - # resource}[https://www.twilio.com/docs/chat/rest/role-resource] for more info - # about roles. - # @param [String] default_channel_creator_role_sid The channel role assigned to a - # channel creator when they join a new channel. See the {Role - # resource}[https://www.twilio.com/docs/chat/rest/role-resource] for more info - # about roles. - # @param [Boolean] read_status_enabled Whether to enable the {Message Consumption - # Horizon}[https://www.twilio.com/docs/chat/consumption-horizon] feature. The - # default is `true`. - # @param [Boolean] reachability_enabled Whether to enable the {Reachability - # Indicator}[https://www.twilio.com/docs/chat/reachability-indicator] for this - # Service instance. The default is `false`. - # @param [String] typing_indicator_timeout How long in seconds after a `started - # typing` event until clients should assume that user is no longer typing, even if - # no `ended typing` message was received. The default is 5 seconds. - # @param [String] consumption_report_interval DEPRECATED. The interval in seconds - # between consumption reports submission batches from client endpoints. - # @param [Boolean] notifications_new_message_enabled Whether to send a - # notification when a new message is added to a channel. The default is `false`. - # @param [String] notifications_new_message_template The template to use to create - # the notification text displayed when a new message is added to a channel and - # `notifications.new_message.enabled` is `true`. - # @param [String] notifications_new_message_sound The name of the sound to play - # when a new message is added to a channel and `notifications.new_message.enabled` - # is `true`. - # @param [Boolean] notifications_new_message_badge_count_enabled Whether the new - # message badge is enabled. The default is `false`. - # @param [Boolean] notifications_added_to_channel_enabled Whether to send a - # notification when a member is added to a channel. The default is `false`. - # @param [String] notifications_added_to_channel_template The template to use to - # create the notification text displayed when a member is added to a channel and - # `notifications.added_to_channel.enabled` is `true`. - # @param [String] notifications_added_to_channel_sound The name of the sound to - # play when a member is added to a channel and - # `notifications.added_to_channel.enabled` is `true`. - # @param [Boolean] notifications_removed_from_channel_enabled Whether to send a - # notification to a user when they are removed from a channel. The default is - # `false`. - # @param [String] notifications_removed_from_channel_template The template to use - # to create the notification text displayed to a user when they are removed from a - # channel and `notifications.removed_from_channel.enabled` is `true`. - # @param [String] notifications_removed_from_channel_sound The name of the sound - # to play to a user when they are removed from a channel and - # `notifications.removed_from_channel.enabled` is `true`. - # @param [Boolean] notifications_invited_to_channel_enabled Whether to send a - # notification when a user is invited to a channel. The default is `false`. - # @param [String] notifications_invited_to_channel_template The template to use to - # create the notification text displayed when a user is invited to a channel and - # `notifications.invited_to_channel.enabled` is `true`. - # @param [String] notifications_invited_to_channel_sound The name of the sound to - # play when a user is invited to a channel and - # `notifications.invited_to_channel.enabled` is `true`. - # @param [String] pre_webhook_url The URL for pre-event webhooks, which are called - # by using the `webhook_method`. See {Webhook - # Events}[https://www.twilio.com/docs/chat/webhook-events] for more details. - # @param [String] post_webhook_url The URL for post-event webhooks, which are - # called by using the `webhook_method`. See {Webhook - # Events}[https://www.twilio.com/docs/chat/webhook-events] for more details. - # @param [String] webhook_method The HTTP method to use for calls to the - # `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and - # the default is `POST`. See {Webhook - # Events}[https://www.twilio.com/docs/chat/webhook-events] for more details. - # @param [String] webhook_filters The list of webhook events that are enabled for - # this Service instance. See {Webhook - # Events}[https://www.twilio.com/docs/chat/webhook-events] for more details. - # @param [String] limits_channel_members The maximum number of Members that can be - # added to Channels within this Service. Can be up to 1,000. - # @param [String] limits_user_channels The maximum number of Channels Users can be - # a Member of within this Service. Can be up to 1,000. - # @param [String] media_compatibility_message The message to send when a media - # message has no text. Can be used as placeholder message. - # @param [String] pre_webhook_retry_count The number of times to retry a call to - # the `pre_webhook_url` if the request times out (after 5 seconds) or it receives - # a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means - # the call won't be retried. - # @param [String] post_webhook_retry_count The number of times to retry a call to - # the `post_webhook_url` if the request times out (after 5 seconds) or it receives - # a 429, 503, or 504 HTTP response. The default is 0, which means the call won't - # be retried. - # @param [Boolean] notifications_log_enabled Whether to log notifications. The - # default is `false`. + # @param [String] friendly_name The friendly_name + # @param [String] default_service_role_sid The default_service_role_sid + # @param [String] default_channel_role_sid The default_channel_role_sid + # @param [String] default_channel_creator_role_sid The + # default_channel_creator_role_sid + # @param [Boolean] read_status_enabled The read_status_enabled + # @param [Boolean] reachability_enabled The reachability_enabled + # @param [String] typing_indicator_timeout The typing_indicator_timeout + # @param [String] consumption_report_interval The consumption_report_interval + # @param [Boolean] notifications_new_message_enabled The + # notifications.new_message.enabled + # @param [String] notifications_new_message_template The + # notifications.new_message.template + # @param [String] notifications_new_message_sound The + # notifications.new_message.sound + # @param [Boolean] notifications_new_message_badge_count_enabled The + # notifications.new_message.badge_count_enabled + # @param [Boolean] notifications_added_to_channel_enabled The + # notifications.added_to_channel.enabled + # @param [String] notifications_added_to_channel_template The + # notifications.added_to_channel.template + # @param [String] notifications_added_to_channel_sound The + # notifications.added_to_channel.sound + # @param [Boolean] notifications_removed_from_channel_enabled The + # notifications.removed_from_channel.enabled + # @param [String] notifications_removed_from_channel_template The + # notifications.removed_from_channel.template + # @param [String] notifications_removed_from_channel_sound The + # notifications.removed_from_channel.sound + # @param [Boolean] notifications_invited_to_channel_enabled The + # notifications.invited_to_channel.enabled + # @param [String] notifications_invited_to_channel_template The + # notifications.invited_to_channel.template + # @param [String] notifications_invited_to_channel_sound The + # notifications.invited_to_channel.sound + # @param [String] pre_webhook_url The pre_webhook_url + # @param [String] post_webhook_url The post_webhook_url + # @param [String] webhook_method The webhook_method + # @param [String] webhook_filters The webhook_filters + # @param [String] limits_channel_members The limits.channel_members + # @param [String] limits_user_channels The limits.user_channels + # @param [String] media_compatibility_message The media.compatibility_message + # @param [String] pre_webhook_retry_count The pre_webhook_retry_count + # @param [String] post_webhook_retry_count The post_webhook_retry_count + # @param [Boolean] notifications_log_enabled The notifications.log_enabled # @return [ServiceInstance] Updated ServiceInstance def update(friendly_name: :unset, default_service_role_sid: :unset, default_channel_role_sid: :unset, default_channel_creator_role_sid: :unset, read_status_enabled: :unset, reachability_enabled: :unset, typing_indicator_timeout: :unset, consumption_report_interval: :unset, notifications_new_message_enabled: :unset, notifications_new_message_template: :unset, notifications_new_message_sound: :unset, notifications_new_message_badge_count_enabled: :unset, notifications_added_to_channel_enabled: :unset, notifications_added_to_channel_template: :unset, notifications_added_to_channel_sound: :unset, notifications_removed_from_channel_enabled: :unset, notifications_removed_from_channel_template: :unset, notifications_removed_from_channel_sound: :unset, notifications_invited_to_channel_enabled: :unset, notifications_invited_to_channel_template: :unset, notifications_invited_to_channel_sound: :unset, pre_webhook_url: :unset, post_webhook_url: :unset, webhook_method: :unset, webhook_filters: :unset, limits_channel_members: :unset, limits_user_channels: :unset, media_compatibility_message: :unset, pre_webhook_retry_count: :unset, post_webhook_retry_count: :unset, notifications_log_enabled: :unset) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'DefaultServiceRoleSid' => default_service_role_sid, @@ -410,11 +365,11 @@ class ServiceInstance < InstanceResource ## # Initialize the ServiceInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio - # @param [String] sid The SID of the Service resource to fetch. + # @param [String] sid The sid # @return [ServiceInstance] ServiceInstance def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @@ -459,143 +414,143 @@ end @instance_context end ## - # @return [String] The unique string that identifies the resource + # @return [String] The sid def sid @properties['sid'] end ## - # @return [String] The SID of the Account that created the resource + # @return [String] The account_sid def account_sid @properties['account_sid'] end ## - # @return [String] The string that you assigned to describe the resource + # @return [String] The friendly_name def friendly_name @properties['friendly_name'] end ## - # @return [Time] The RFC 2822 date and time in GMT when the resource was created + # @return [Time] The date_created def date_created @properties['date_created'] end ## - # @return [Time] The RFC 2822 date and time in GMT when the resource was last updated + # @return [Time] The date_updated def date_updated @properties['date_updated'] end ## - # @return [String] The service role assigned to users when they are added to the service + # @return [String] The default_service_role_sid def default_service_role_sid @properties['default_service_role_sid'] end ## - # @return [String] The channel role assigned to users when they are added to a channel + # @return [String] The default_channel_role_sid def default_channel_role_sid @properties['default_channel_role_sid'] end ## - # @return [String] The channel role assigned to a channel creator when they join a new channel + # @return [String] The default_channel_creator_role_sid def default_channel_creator_role_sid @properties['default_channel_creator_role_sid'] end ## - # @return [Boolean] Whether the Message Consumption Horizon feature is enabled + # @return [Boolean] The read_status_enabled def read_status_enabled @properties['read_status_enabled'] end ## - # @return [Boolean] Whether the Reachability Indicator feature is enabled for this Service instance + # @return [Boolean] The reachability_enabled def reachability_enabled @properties['reachability_enabled'] end ## - # @return [String] How long in seconds to wait before assuming the user is no longer typing + # @return [String] The typing_indicator_timeout def typing_indicator_timeout @properties['typing_indicator_timeout'] end ## - # @return [String] DEPRECATED + # @return [String] The consumption_report_interval def consumption_report_interval @properties['consumption_report_interval'] end ## - # @return [Hash] An object that describes the limits of the service instance + # @return [Hash] The limits def limits @properties['limits'] end ## - # @return [String] The webhook URL for pre-event webhooks + # @return [String] The pre_webhook_url def pre_webhook_url @properties['pre_webhook_url'] end ## - # @return [String] The URL for post-event webhooks + # @return [String] The post_webhook_url def post_webhook_url @properties['post_webhook_url'] end ## - # @return [String] The HTTP method to use for both PRE and POST webhooks + # @return [String] The webhook_method def webhook_method @properties['webhook_method'] end ## - # @return [String] The list of webhook events that are enabled for this Service instance + # @return [String] The webhook_filters def webhook_filters @properties['webhook_filters'] end ## - # @return [String] Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses + # @return [String] The pre_webhook_retry_count def pre_webhook_retry_count @properties['pre_webhook_retry_count'] end ## - # @return [String] The number of times calls to the `post_webhook_url` will be retried + # @return [String] The post_webhook_retry_count def post_webhook_retry_count @properties['post_webhook_retry_count'] end ## - # @return [Hash] The notification configuration for the Service instance + # @return [Hash] The notifications def notifications @properties['notifications'] end ## - # @return [Hash] The properties of the media that the service supports + # @return [Hash] The media def media @properties['media'] end ## - # @return [String] The absolute URL of the Service resource + # @return [String] The url def url @properties['url'] end ## - # @return [String] The absolute URLs of the Service's Channels, Roles, and Users + # @return [String] The links def links @properties['links'] end ## @@ -612,98 +567,54 @@ context.delete end ## # Update the ServiceInstance - # @param [String] friendly_name A descriptive string that you create to describe - # the resource. - # @param [String] default_service_role_sid The service role assigned to users when - # they are added to the service. See the {Role - # resource}[https://www.twilio.com/docs/chat/rest/role-resource] for more info - # about roles. - # @param [String] default_channel_role_sid The channel role assigned to users when - # they are added to a channel. See the {Role - # resource}[https://www.twilio.com/docs/chat/rest/role-resource] for more info - # about roles. - # @param [String] default_channel_creator_role_sid The channel role assigned to a - # channel creator when they join a new channel. See the {Role - # resource}[https://www.twilio.com/docs/chat/rest/role-resource] for more info - # about roles. - # @param [Boolean] read_status_enabled Whether to enable the {Message Consumption - # Horizon}[https://www.twilio.com/docs/chat/consumption-horizon] feature. The - # default is `true`. - # @param [Boolean] reachability_enabled Whether to enable the {Reachability - # Indicator}[https://www.twilio.com/docs/chat/reachability-indicator] for this - # Service instance. The default is `false`. - # @param [String] typing_indicator_timeout How long in seconds after a `started - # typing` event until clients should assume that user is no longer typing, even if - # no `ended typing` message was received. The default is 5 seconds. - # @param [String] consumption_report_interval DEPRECATED. The interval in seconds - # between consumption reports submission batches from client endpoints. - # @param [Boolean] notifications_new_message_enabled Whether to send a - # notification when a new message is added to a channel. The default is `false`. - # @param [String] notifications_new_message_template The template to use to create - # the notification text displayed when a new message is added to a channel and - # `notifications.new_message.enabled` is `true`. - # @param [String] notifications_new_message_sound The name of the sound to play - # when a new message is added to a channel and `notifications.new_message.enabled` - # is `true`. - # @param [Boolean] notifications_new_message_badge_count_enabled Whether the new - # message badge is enabled. The default is `false`. - # @param [Boolean] notifications_added_to_channel_enabled Whether to send a - # notification when a member is added to a channel. The default is `false`. - # @param [String] notifications_added_to_channel_template The template to use to - # create the notification text displayed when a member is added to a channel and - # `notifications.added_to_channel.enabled` is `true`. - # @param [String] notifications_added_to_channel_sound The name of the sound to - # play when a member is added to a channel and - # `notifications.added_to_channel.enabled` is `true`. - # @param [Boolean] notifications_removed_from_channel_enabled Whether to send a - # notification to a user when they are removed from a channel. The default is - # `false`. - # @param [String] notifications_removed_from_channel_template The template to use - # to create the notification text displayed to a user when they are removed from a - # channel and `notifications.removed_from_channel.enabled` is `true`. - # @param [String] notifications_removed_from_channel_sound The name of the sound - # to play to a user when they are removed from a channel and - # `notifications.removed_from_channel.enabled` is `true`. - # @param [Boolean] notifications_invited_to_channel_enabled Whether to send a - # notification when a user is invited to a channel. The default is `false`. - # @param [String] notifications_invited_to_channel_template The template to use to - # create the notification text displayed when a user is invited to a channel and - # `notifications.invited_to_channel.enabled` is `true`. - # @param [String] notifications_invited_to_channel_sound The name of the sound to - # play when a user is invited to a channel and - # `notifications.invited_to_channel.enabled` is `true`. - # @param [String] pre_webhook_url The URL for pre-event webhooks, which are called - # by using the `webhook_method`. See {Webhook - # Events}[https://www.twilio.com/docs/chat/webhook-events] for more details. - # @param [String] post_webhook_url The URL for post-event webhooks, which are - # called by using the `webhook_method`. See {Webhook - # Events}[https://www.twilio.com/docs/chat/webhook-events] for more details. - # @param [String] webhook_method The HTTP method to use for calls to the - # `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and - # the default is `POST`. See {Webhook - # Events}[https://www.twilio.com/docs/chat/webhook-events] for more details. - # @param [String] webhook_filters The list of webhook events that are enabled for - # this Service instance. See {Webhook - # Events}[https://www.twilio.com/docs/chat/webhook-events] for more details. - # @param [String] limits_channel_members The maximum number of Members that can be - # added to Channels within this Service. Can be up to 1,000. - # @param [String] limits_user_channels The maximum number of Channels Users can be - # a Member of within this Service. Can be up to 1,000. - # @param [String] media_compatibility_message The message to send when a media - # message has no text. Can be used as placeholder message. - # @param [String] pre_webhook_retry_count The number of times to retry a call to - # the `pre_webhook_url` if the request times out (after 5 seconds) or it receives - # a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means - # the call won't be retried. - # @param [String] post_webhook_retry_count The number of times to retry a call to - # the `post_webhook_url` if the request times out (after 5 seconds) or it receives - # a 429, 503, or 504 HTTP response. The default is 0, which means the call won't - # be retried. - # @param [Boolean] notifications_log_enabled Whether to log notifications. The - # default is `false`. + # @param [String] friendly_name The friendly_name + # @param [String] default_service_role_sid The default_service_role_sid + # @param [String] default_channel_role_sid The default_channel_role_sid + # @param [String] default_channel_creator_role_sid The + # default_channel_creator_role_sid + # @param [Boolean] read_status_enabled The read_status_enabled + # @param [Boolean] reachability_enabled The reachability_enabled + # @param [String] typing_indicator_timeout The typing_indicator_timeout + # @param [String] consumption_report_interval The consumption_report_interval + # @param [Boolean] notifications_new_message_enabled The + # notifications.new_message.enabled + # @param [String] notifications_new_message_template The + # notifications.new_message.template + # @param [String] notifications_new_message_sound The + # notifications.new_message.sound + # @param [Boolean] notifications_new_message_badge_count_enabled The + # notifications.new_message.badge_count_enabled + # @param [Boolean] notifications_added_to_channel_enabled The + # notifications.added_to_channel.enabled + # @param [String] notifications_added_to_channel_template The + # notifications.added_to_channel.template + # @param [String] notifications_added_to_channel_sound The + # notifications.added_to_channel.sound + # @param [Boolean] notifications_removed_from_channel_enabled The + # notifications.removed_from_channel.enabled + # @param [String] notifications_removed_from_channel_template The + # notifications.removed_from_channel.template + # @param [String] notifications_removed_from_channel_sound The + # notifications.removed_from_channel.sound + # @param [Boolean] notifications_invited_to_channel_enabled The + # notifications.invited_to_channel.enabled + # @param [String] notifications_invited_to_channel_template The + # notifications.invited_to_channel.template + # @param [String] notifications_invited_to_channel_sound The + # notifications.invited_to_channel.sound + # @param [String] pre_webhook_url The pre_webhook_url + # @param [String] post_webhook_url The post_webhook_url + # @param [String] webhook_method The webhook_method + # @param [String] webhook_filters The webhook_filters + # @param [String] limits_channel_members The limits.channel_members + # @param [String] limits_user_channels The limits.user_channels + # @param [String] media_compatibility_message The media.compatibility_message + # @param [String] pre_webhook_retry_count The pre_webhook_retry_count + # @param [String] post_webhook_retry_count The post_webhook_retry_count + # @param [Boolean] notifications_log_enabled The notifications.log_enabled # @return [ServiceInstance] Updated ServiceInstance def update(friendly_name: :unset, default_service_role_sid: :unset, default_channel_role_sid: :unset, default_channel_creator_role_sid: :unset, read_status_enabled: :unset, reachability_enabled: :unset, typing_indicator_timeout: :unset, consumption_report_interval: :unset, notifications_new_message_enabled: :unset, notifications_new_message_template: :unset, notifications_new_message_sound: :unset, notifications_new_message_badge_count_enabled: :unset, notifications_added_to_channel_enabled: :unset, notifications_added_to_channel_template: :unset, notifications_added_to_channel_sound: :unset, notifications_removed_from_channel_enabled: :unset, notifications_removed_from_channel_template: :unset, notifications_removed_from_channel_sound: :unset, notifications_invited_to_channel_enabled: :unset, notifications_invited_to_channel_template: :unset, notifications_invited_to_channel_sound: :unset, pre_webhook_url: :unset, post_webhook_url: :unset, webhook_method: :unset, webhook_filters: :unset, limits_channel_members: :unset, limits_user_channels: :unset, media_compatibility_message: :unset, pre_webhook_retry_count: :unset, post_webhook_retry_count: :unset, notifications_log_enabled: :unset) context.update( friendly_name: friendly_name, default_service_role_sid: default_service_role_sid, \ No newline at end of file