lib/tickethub/collection.rb in tickethub-0.3.71 vs lib/tickethub/collection.rb in tickethub-0.3.72
- old
+ new
@@ -157,7 +157,15 @@
def create(attributes = {})
@klass.call endpoint, post(attributes), @options
rescue Tickethub::ResourceInvalid => err
@klass.call endpoint, Tickethub::Response.new(err.response).decoded, @options
end
+
+ def update(attributes)
+ self.patch attributes
+ return true
+ rescue Tickethub::ResourceInvalid => err
+ @klass.call endpoint, Tickethub::Response.new(err.response).decoded, @options
+ return false
+ end
end
end
\ No newline at end of file