Method: Orchestrate::Client#patch_merge
- Defined in:
- lib/orchestrate/client.rb
permalink #patch_merge(collection, key, body, condition = nil) ⇒ Object
Merge field/value pairs into existing key, without retrieving the key object. Patch. If a given field's value is nil, will remove field from existing key on merge.
201 202 203 204 205 206 207 |
# File 'lib/orchestrate/client.rb', line 201 def patch_merge(collection, key, body, condition=nil) headers = {'Content-Type' => 'application/merge-patch+json'} if condition.is_a?(String) headers['If-Match'] = API::Helpers.format_ref(condition) end send_request :patch, [collection, key], { body: body, headers: headers, response: API::ItemResponse } end |