Class: KillBillClient::Model::Catalog
Constant Summary
collapse
- KILLBILL_API_CATALOG_PREFIX =
"#{KILLBILL_API_PREFIX}/catalog"
Constants inherited
from Resource
Resource::KILLBILL_API_PAGINATION_PREFIX, Resource::KILLBILL_API_PREFIX
Instance Attribute Summary
Attributes inherited from Resource
#clazz, #etag, #response, #session_id, #uri
Class Method Summary
collapse
Methods inherited from Resource
#==, #_to_hash, attribute, create_alias, delete, extract_session_id, from_json, from_response, get, has_many, has_one, #hash, head, #initialize, instantiate_record_from_json, post, put, #refresh, require_multi_tenant_options!, #to_hash, #to_json
Class Method Details
.available_addons(base_product_name, options = {}) ⇒ Object
16
17
18
19
20
21
22
23
|
# File 'lib/killbill_client/models/catalog.rb', line 16
def available_addons(base_product_name, options = {})
get "#{KILLBILL_API_CATALOG_PREFIX}/availableAddons",
{
:baseProductName => base_product_name
},
options,
PlanDetail
end
|
.available_base_plans(options = {}) ⇒ Object
25
26
27
28
29
30
|
# File 'lib/killbill_client/models/catalog.rb', line 25
def available_base_plans(options = {})
get "#{KILLBILL_API_CATALOG_PREFIX}/availableBasePlans",
{},
options,
PlanDetail
end
|
.get_tenant_catalog(options = {}) ⇒ Object
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/killbill_client/models/catalog.rb', line 32
def get_tenant_catalog(options = {})
require_multi_tenant_options!(options, "Retrieving a catalog is only supported in multi-tenant mode")
get KILLBILL_API_CATALOG_PREFIX,
{},
{
:head => {'Accept' => 'application/xml'},
}.merge(options)
end
|
.simple_catalog(options = {}) ⇒ Object
10
11
12
13
14
|
# File 'lib/killbill_client/models/catalog.rb', line 10
def simple_catalog(options = {})
get "#{KILLBILL_API_CATALOG_PREFIX}/simpleCatalog",
{},
options
end
|
.upload_tenant_catalog(catalog_xml, user = nil, reason = nil, comment = nil, options = {}) ⇒ Object
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/killbill_client/models/catalog.rb', line 43
def upload_tenant_catalog(catalog_xml, user = nil, reason = nil, = nil, options = {})
require_multi_tenant_options!(options, "Uploading a catalog is only supported in multi-tenant mode")
post KILLBILL_API_CATALOG_PREFIX,
catalog_xml,
{
},
{
:head => {'Accept' => 'application/xml'},
:content_type => 'application/xml',
:user => user,
:reason => reason,
:comment => ,
}.merge(options)
get_tenant_catalog(options)
end
|