Sha256: 4e665683edc2aac77c45e966ee64e4c5c0fb1bf413372a68191e6adc79b74fc4

Contents?: true

Size: 521 Bytes

Versions: 10

Compression:

Stored size: 521 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

10 entries across 10 versions & 1 rubygems

Version Path
chartmogul-ruby-1.1.3 lib/chartmogul/api/actions/update.rb
chartmogul-ruby-1.1.1 lib/chartmogul/api/actions/update.rb
chartmogul-ruby-1.1.0 lib/chartmogul/api/actions/update.rb
chartmogul-ruby-1.0.2 lib/chartmogul/api/actions/update.rb
chartmogul-ruby-1.0.1 lib/chartmogul/api/actions/update.rb
chartmogul-ruby-1.0.0 lib/chartmogul/api/actions/update.rb
chartmogul-ruby-0.1.4 lib/chartmogul/api/actions/update.rb
chartmogul-ruby-0.1.3 lib/chartmogul/api/actions/update.rb
chartmogul-ruby-0.1.2 lib/chartmogul/api/actions/update.rb
chartmogul-ruby-0.1.1 lib/chartmogul/api/actions/update.rb