Class: Katello::Resources::Candlepin::CPUser

Inherits:
CandlepinResource show all
Defined in:
app/lib/katello/resources/candlepin.rb

Instance Attribute Summary

Attributes inherited from HttpResource

#json

Class Method Summary collapse

Methods inherited from CandlepinResource

default_headers, logger, name_to_key

Methods inherited from HttpResource

#[], #[]=, create_thing, delete, get, hash_to_query, #initialize, join_path, logger, post, print_debug_info, process_response, put, raise_rest_client_exception, rest_client, url_encode

Constructor Details

This class inherits a constructor from Katello::HttpResource

Class Method Details

.create(attrs) ⇒ Object



490
491
492
# File 'app/lib/katello/resources/candlepin.rb', line 490

def create(attrs)
  JSON.parse(self.post(path, JSON.generate(attrs), self.default_headers).body).with_indifferent_access
end

.path(id = nil) ⇒ Object



494
495
496
# File 'app/lib/katello/resources/candlepin.rb', line 494

def path(id = nil)
  "/candlepin/users/#{id}"
end