Sha256: d35daccb2fbb9190effa582ddde5cecf0efb339ed14fb1cdb2b013b9734c636b
Contents?: true
Size: 685 Bytes
Versions: 3
Compression:
Stored size: 685 Bytes
Contents
module DockHealthApi module Crud module Update def update(**params) if params.key?(:organizationId) && params.key?(:userId) resource_url_fixed = "#{Organization.resource_url}/#{params[:organizationId]}/user" params[:id] = params[:userId] else resource_url_fixed = resource_url end id = params.delete(:id) response = execute_request(:patch, "#{resource_url_fixed}/#{id}", headers: headers, body_params: params) return response.parsed new(response.parsed) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dock_health_api-0.4.1 | lib/dock_health_api/crud/update.rb |
dock_health_api-0.4.0 | lib/dock_health_api/crud/update.rb |
dock_health_api-0.3.6 | lib/dock_health_api/crud/update.rb |