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
- .delete_catalog(user = nil, reason = nil, comment = nil, options = {}) ⇒ Object
- .get_catalog_phase(subscription_id, requested_date, options = {}) ⇒ Object
- .get_catalog_plan(subscription_id, requested_date, options = {}) ⇒ Object
- .get_catalog_price_list(subscription_id, requested_date, options = {}) ⇒ Object
- .get_catalog_product(subscription_id, requested_date, options = {}) ⇒ Object
- .get_tenant_catalog_json(requested_date = nil, options = {}) ⇒ Object
- .get_tenant_catalog_versions(options = {}) ⇒ Object
- .get_tenant_catalog_xml(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
146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/killbill_client/models/catalog.rb', line 146 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 |
.delete_catalog(user = nil, reason = nil, comment = nil, options = {}) ⇒ Object
161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/killbill_client/models/catalog.rb', line 161 def delete_catalog(user = nil, reason = nil, comment = nil, = {}) delete "#{KILLBILL_API_CATALOG_PREFIX}", {}, {}, { :user => user, :reason => reason, :comment => comment, }.merge() end |
.get_catalog_phase(subscription_id, requested_date, options = {}) ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/killbill_client/models/catalog.rb', line 75 def get_catalog_phase(subscription_id, requested_date, = {}) (, "Retrieving catalog phase is only supported in multi-tenant mode") params = {} params[:subscriptionId] = subscription_id if subscription_id params[:requestedDate] = requested_date if requested_date get "#{KILLBILL_API_CATALOG_PREFIX}/phase", params, end |
.get_catalog_plan(subscription_id, requested_date, options = {}) ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/killbill_client/models/catalog.rb', line 88 def get_catalog_plan(subscription_id, requested_date, = {}) (, "Retrieving catalog plan is only supported in multi-tenant mode") params = {} params[:subscriptionId] = subscription_id if subscription_id params[:requestedDate] = requested_date if requested_date get "#{KILLBILL_API_CATALOG_PREFIX}/plan", params, end |
.get_catalog_price_list(subscription_id, requested_date, options = {}) ⇒ Object
101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/killbill_client/models/catalog.rb', line 101 def get_catalog_price_list(subscription_id, requested_date, = {}) (, "Retrieving catalog price list is only supported in multi-tenant mode") params = {} params[:subscriptionId] = subscription_id if subscription_id params[:requestedDate] = requested_date if requested_date get "#{KILLBILL_API_CATALOG_PREFIX}/priceList", params, end |
.get_catalog_product(subscription_id, requested_date, options = {}) ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/killbill_client/models/catalog.rb', line 114 def get_catalog_product(subscription_id, requested_date, = {}) (, "Retrieving catalog product list is only supported in multi-tenant mode") params = {} params[:subscriptionId] = subscription_id if subscription_id params[:requestedDate] = requested_date if requested_date get "#{KILLBILL_API_CATALOG_PREFIX}/product", params, end |
.get_tenant_catalog_json(requested_date = nil, options = {}) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/killbill_client/models/catalog.rb', line 58 def get_tenant_catalog_json(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/json"}, :content_type => "application/json", }.merge() end |
.get_tenant_catalog_versions(options = {}) ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/killbill_client/models/catalog.rb', line 32 def get_tenant_catalog_versions( = {}) (, "Retrieving catalog versions is only supported in multi-tenant mode") get "#{KILLBILL_API_CATALOG_PREFIX}/versions", {}, end |
.get_tenant_catalog_xml(requested_date = nil, options = {}) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/killbill_client/models/catalog.rb', line 41 def get_tenant_catalog_xml(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}/xml", params, { :head => {'Accept' => "text/xml"}, :content_type => "text/xml", }.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
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/killbill_client/models/catalog.rb', line 127 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}/xml", catalog_xml, { }, { :head => {'Accept' => 'application/json'}, :content_type => 'text/xml', :user => user, :reason => reason, :comment => comment, }.merge() get_tenant_catalog_json(nil, ) end |