class ActiveGenie::Clients::BaseClient

def put(endpoint, payload, headers: {}, config: {})

Returns:
  • (Hash, nil) - The parsed JSON response or nil if empty

Parameters:
  • config (Hash) -- Configuration options including timeout, retries, etc.
  • headers (Hash) -- Additional headers to include in the request
  • payload (Hash) -- The request body to send
  • endpoint (String) -- The API endpoint to call
def put(endpoint, payload, headers: {}, config: {})
  uri = build_uri(endpoint)
  request = Net::HTTP::Put.new(uri)
  request.body = payload.to_json
  execute_request(uri, request, headers, config)
end