lib/twilio-ruby/rest/chat/v2/service/binding.rb in twilio-ruby-5.38.0 vs lib/twilio-ruby/rest/chat/v2/service/binding.rb in twilio-ruby-5.39.0
- old
+ new
@@ -120,15 +120,13 @@
'Identity' => Twilio.serialize_list(identity) { |e| e },
'PageToken' => page_token,
'Page' => page_number,
'PageSize' => page_size,
})
- response = @version.page(
- 'GET',
- @uri,
- params
- )
+
+ response = @version.page('GET', @uri, params)
+
BindingPage.new(@version, response, @solution)
end
##
# Retrieve a single page of BindingInstance records from the API.
@@ -195,29 +193,23 @@
@solution = {service_sid: service_sid, sid: sid, }
@uri = "/Services/#{@solution[:service_sid]}/Bindings/#{@solution[:sid]}"
end
##
- # Fetch a BindingInstance
+ # Fetch the BindingInstance
# @return [BindingInstance] Fetched BindingInstance
def fetch
- params = Twilio::Values.of({})
+ payload = @version.fetch('GET', @uri)
- payload = @version.fetch(
- 'GET',
- @uri,
- params,
- )
-
BindingInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], )
end
##
- # Deletes the BindingInstance
+ # Delete the BindingInstance
# @return [Boolean] true if delete succeeds, false otherwise
def delete
- @version.delete('delete', @uri)
+ @version.delete('DELETE', @uri)
end
##
# Provide a user friendly representation
def to_s
@@ -349,17 +341,17 @@
def links
@properties['links']
end
##
- # Fetch a BindingInstance
+ # Fetch the BindingInstance
# @return [BindingInstance] Fetched BindingInstance
def fetch
context.fetch
end
##
- # Deletes the BindingInstance
+ # Delete the BindingInstance
# @return [Boolean] true if delete succeeds, false otherwise
def delete
context.delete
end
\ No newline at end of file