Sha256: 13a302d2fc061ab31e09c85860887332e947eddead0922ecdbf322304f741d69
Contents?: true
Size: 540 Bytes
Versions: 2
Compression:
Stored size: 540 Bytes
Contents
module ChartMogul module API module Actions module Update def update! resp = handling_errors do connection.patch("#{resource_path.apply(self.instance_attributes)}/#{uuid}") do |req| req.headers['Content-Type'] = 'application/json' req.body = JSON.dump(self.serialize_for_write) end end json = ChartMogul::Utils::JSONParser.parse(resp.body) assign_all_attributes(json) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
chartmogul-ruby-1.1.4 | lib/chartmogul/api/actions/update.rb |
chartmogul-ruby-1.1.2 | lib/chartmogul/api/actions/update.rb |