lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb in twilio-ruby-6.9.1 vs lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb in twilio-ruby-6.11.0

- old
+ new

@@ -19,10 +19,11 @@ class V2 < Version class ServiceContext < InstanceContext class ChannelContext < InstanceContext class InviteList < ListResource + ## # Initialize the InviteList # @param [Version] version Version that contains the resource # @return [InviteList] InviteList def initialize(version, service_sid: nil, channel_sid: nil) @@ -45,10 +46,11 @@ data = Twilio::Values.of({ 'Identity' => identity, 'RoleSid' => role_sid, }) + payload = @version.create('POST', @uri, data: data) InviteInstance.new( @version, payload, service_sid: @solution[:service_sid], @@ -177,17 +179,19 @@ ## # Delete the InviteInstance # @return [Boolean] True if delete succeeds, false otherwise def delete + @version.delete('DELETE', @uri) end ## # Fetch the InviteInstance # @return [InviteInstance] Fetched InviteInstance def fetch + payload = @version.fetch('GET', @uri) InviteInstance.new( @version, payload, service_sid: @solution[:service_sid],