Sha256: 0c8a5263ab29b7c895b2ec7810d367611fdb7f53ba295570ff391dcb718aef1b
Contents?: true
Size: 936 Bytes
Versions: 191
Compression:
Stored size: 936 Bytes
Contents
module Katello module Resources module Candlepin class Subscription < CandlepinResource class << self def destroy(subscription_id) fail ArgumentError, "subscription id has to be specified" unless subscription_id self.delete(path(subscription_id), self.default_headers).code.to_i end def get(id = nil) content_json = super(path(id), self.default_headers).body JSON.parse(content_json) end def get_for_owner(owner_key, included = []) content_json = Candlepin::CandlepinResource.get( "/candlepin/owners/#{owner_key}/subscriptions?#{included_list(included)}", self.default_headers ).body JSON.parse(content_json) end def path(id = nil) "/candlepin/subscriptions/#{id}" end end end end end end
Version data entries
191 entries across 191 versions & 1 rubygems