lib/restful_resource/base.rb in restful_resource-2.4.0 vs lib/restful_resource/base.rb in restful_resource-2.5.0

- old
+ new

@@ -55,9 +55,19 @@ params_without_options, options = format_params(params) response = http.delete(member_url(id, params_without_options), **options) RestfulResource::OpenObject.new(parse_json(response.body)) end + def self.patch(id, data: {}, headers: {}, **params) + params_without_options, options = format_params(params) + options.delete(:headers) + + url = member_url(id, params_without_options) + + response = http.patch(url, data: data, headers: headers, **options) + new(parse_json(response.body)) + end + def self.put(id, data: {}, headers: {}, **params) params_without_options, options = format_params(params) options.delete(:headers) url = member_url(id, params_without_options)