Sha256: 6c97d3a00daa5b28101a0808f74f7c255a71420f332ea325f6c3e62a43aa4fb5

Contents?: true

Size: 542 Bytes

Versions: 1

Compression:

Stored size: 542 Bytes

Contents

# frozen_string_literal: true

module ChartMogul
  module API
    module Actions
      module Update
        def update!
          resp = handling_errors do
            connection.patch("#{resource_path.apply(instance_attributes)}/#{uuid}") do |req|
              req.headers['Content-Type'] = 'application/json'
              req.body = JSON.dump(serialize_for_write)
            end
          end
          json = ChartMogul::Utils::JSONParser.parse(resp.body)

          assign_all_attributes(json)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chartmogul-ruby-1.6.1 lib/chartmogul/api/actions/update.rb