Module: Slack::Web::Api::Endpoints::ConversationsExternalinvitepermissions

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb

Instance Method Summary collapse

Instance Method Details

#conversations_externalInvitePermissions_set(options = {}) ⇒ Object

Upgrade or downgrade Slack Connect channel permissions between ‘can post only’ and ‘can post and invite’.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :action (enum)

    Type of action to be taken: upgrade or downgrade.

  • :channel (channel)

    The channel ID to change external invite permissions for.

  • :target_team (Object)

    The encoded team ID of the target team. Must be in the specified channel.

Raises:

  • (ArgumentError)

See Also:



20
21
22
23
24
25
26
# File 'lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb', line 20

def conversations_externalInvitePermissions_set(options = {})
  raise ArgumentError, 'Required arguments :action missing' if options[:action].nil?
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
  raise ArgumentError, 'Required arguments :target_team missing' if options[:target_team].nil?
  options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
  post('conversations.externalInvitePermissions.set', options)
end