Class: KillBillClient::Model::Catalog
- Inherits:
-
CatalogAttributes
- Object
- Resource
- CatalogAttributes
- KillBillClient::Model::Catalog
- Defined in:
- lib/killbill_client/models/catalog.rb
Constant Summary collapse
- KILLBILL_API_CATALOG_PREFIX =
"#{KILLBILL_API_PREFIX}/catalog"
Class Method Summary collapse
- .add_tenant_catalog_simple_plan(simple_plan, user = nil, reason = nil, comment = nil, options = {}) ⇒ Object
- .available_addons(base_product_name, options = {}) ⇒ Object
- .available_base_plans(options = {}) ⇒ Object
- .get_tenant_catalog(format, requested_date = nil, options = {}) ⇒ Object
- .simple_catalog(options = {}) ⇒ Object
- .upload_tenant_catalog(catalog_xml, user = nil, reason = nil, comment = nil, options = {}) ⇒ Object
Class Method Details
.add_tenant_catalog_simple_plan(simple_plan, user = nil, reason = nil, comment = nil, options = {}) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/killbill_client/models/catalog.rb', line 68 def add_tenant_catalog_simple_plan(simple_plan, user = nil, reason = nil, comment = nil, = {}) (, "Uploading a catalog is only supported in multi-tenant mode") post "#{KILLBILL_API_CATALOG_PREFIX}/simplePlan", simple_plan.to_json, { }, { :user => user, :reason => reason, :comment => comment, }.merge() end |
.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, = {}) get "#{KILLBILL_API_CATALOG_PREFIX}/availableAddons", { :baseProductName => base_product_name }, , 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( = {}) get "#{KILLBILL_API_CATALOG_PREFIX}/availableBasePlans", {}, , PlanDetail end |
.get_tenant_catalog(format, requested_date = nil, options = {}) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/killbill_client/models/catalog.rb', line 32 def get_tenant_catalog(format, requested_date=nil, = {}) (, "Retrieving a catalog is only supported in multi-tenant mode") params = {} params[:requestedDate] = requested_date if requested_date get KILLBILL_API_CATALOG_PREFIX, params, { :head => {'Accept' => "application/#{format}"}, :content_type => "application/#{format}", }.merge() end |
.simple_catalog(options = {}) ⇒ Object
10 11 12 13 14 |
# File 'lib/killbill_client/models/catalog.rb', line 10 def simple_catalog( = {}) get "#{KILLBILL_API_CATALOG_PREFIX}", {}, end |
.upload_tenant_catalog(catalog_xml, user = nil, reason = nil, comment = nil, options = {}) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/killbill_client/models/catalog.rb', line 49 def upload_tenant_catalog(catalog_xml, user = nil, reason = nil, comment = nil, = {}) (, "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 => comment, }.merge() get_tenant_catalog('xml', nil, ) end |