Sha256: 1aadcad88a2790be15baee04e45802dff437271ed60c5a277eb1c2b85f0a6eb4
Contents?: true
Size: 653 Bytes
Versions: 6
Compression:
Stored size: 653 Bytes
Contents
require 'active_support' require File.dirname(__FILE__) + '/../../proxy' class LHS::Item < LHS::Proxy module Update extend ActiveSupport::Concern def update(params) update!(params) rescue LHC::Error => e self.errors = LHS::Errors.new(e.response) false end def update!(params) service = _data._root._service _data.merge_raw!(LHS::Data.new(params)) response_data = service.instance.request( method: :post, url: href, body: _data.to_json, headers: {'Content-Type' => 'application/json'} ) _data.merge_raw!(response_data) true end end end
Version data entries
6 entries across 6 versions & 1 rubygems