Class: ArtikCloud::MonetizationApi
- Inherits:
-
Object
- Object
- ArtikCloud::MonetizationApi
- Defined in:
- lib/artikcloud/api/monetization_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_pricing_tiers(dtid, pricing_tier_info, opts = {}) ⇒ DeviceTypePricingTier
Define devicetype’s pricing tiers.
-
#create_pricing_tiers_with_http_info(dtid, pricing_tier_info, opts = {}) ⇒ Array<(DeviceTypePricingTier, Fixnum, Hash)>
Define devicetype's pricing tiers.
-
#get_pricing_tiers(did, opts = {}) ⇒ DevicePricingTiersEnvelope
Get a device’s pricing tiers Get a device’s pricing tiers.
-
#get_pricing_tiers_with_http_info(did, opts = {}) ⇒ Array<(DevicePricingTiersEnvelope, Fixnum, Hash)>
Get a device's pricing tiers Get a device's pricing tiers.
-
#get_the__pricing_tiers(dtid, version, opts = {}) ⇒ DeviceTypePricingTiersEnvelope
Get devicetype’s pricing tiers.
-
#get_the__pricing_tiers_with_http_info(dtid, version, opts = {}) ⇒ Array<(DeviceTypePricingTiersEnvelope, Fixnum, Hash)>
Get devicetype's pricing tiers.
-
#get_upgrade_path(did, action, opts = {}) ⇒ UpgradePathEnvelope
Get upgrade path Get upgrade path.
-
#get_upgrade_path_with_http_info(did, action, opts = {}) ⇒ Array<(UpgradePathEnvelope, Fixnum, Hash)>
Get upgrade path Get upgrade path.
-
#initialize(api_client = ApiClient.default) ⇒ MonetizationApi
constructor
A new instance of MonetizationApi.
-
#set_pricing_tier(did, pricing_tier, opts = {}) ⇒ DevicePricingTierEnvelope
Set a device’s pricing tier Set a device’s pricing tier.
-
#set_pricing_tier_with_http_info(did, pricing_tier, opts = {}) ⇒ Array<(DevicePricingTierEnvelope, Fixnum, Hash)>
Set a device's pricing tier Set a device's pricing tier.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ MonetizationApi
Returns a new instance of MonetizationApi.
18 19 20 |
# File 'lib/artikcloud/api/monetization_api.rb', line 18 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/artikcloud/api/monetization_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#create_pricing_tiers(dtid, pricing_tier_info, opts = {}) ⇒ DeviceTypePricingTier
Define devicetype’s pricing tiers. Define devicetype’s pricing tiers.
28 29 30 31 |
# File 'lib/artikcloud/api/monetization_api.rb', line 28 def create_pricing_tiers(dtid, pricing_tier_info, opts = {}) data, _status_code, _headers = create_pricing_tiers_with_http_info(dtid, pricing_tier_info, opts) return data end |
#create_pricing_tiers_with_http_info(dtid, pricing_tier_info, opts = {}) ⇒ Array<(DeviceTypePricingTier, Fixnum, Hash)>
Define devicetype's pricing tiers. Define devicetype's pricing tiers.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/artikcloud/api/monetization_api.rb', line 39 def create_pricing_tiers_with_http_info(dtid, pricing_tier_info, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MonetizationApi.create_pricing_tiers ..." end # verify the required parameter 'dtid' is set fail ArgumentError, "Missing the required parameter 'dtid' when calling MonetizationApi.create_pricing_tiers" if dtid.nil? # verify the required parameter 'pricing_tier_info' is set fail ArgumentError, "Missing the required parameter 'pricing_tier_info' when calling MonetizationApi.create_pricing_tiers" if pricing_tier_info.nil? # resource path local_var_path = "/pricing/devicetypes/{dtid}/pricingtiers".sub('{format}','json').sub('{' + 'dtid' + '}', dtid.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(pricing_tier_info) auth_names = ['artikcloud_oauth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DeviceTypePricingTier') if @api_client.config.debugging @api_client.config.logger.debug "API called: MonetizationApi#create_pricing_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_pricing_tiers(did, opts = {}) ⇒ DevicePricingTiersEnvelope
Get a device’s pricing tiers Get a device’s pricing tiers
83 84 85 86 |
# File 'lib/artikcloud/api/monetization_api.rb', line 83 def get_pricing_tiers(did, opts = {}) data, _status_code, _headers = get_pricing_tiers_with_http_info(did, opts) return data end |
#get_pricing_tiers_with_http_info(did, opts = {}) ⇒ Array<(DevicePricingTiersEnvelope, Fixnum, Hash)>
Get a device's pricing tiers Get a device's pricing tiers
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/artikcloud/api/monetization_api.rb', line 94 def get_pricing_tiers_with_http_info(did, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MonetizationApi.get_pricing_tiers ..." end # verify the required parameter 'did' is set fail ArgumentError, "Missing the required parameter 'did' when calling MonetizationApi.get_pricing_tiers" if did.nil? # resource path local_var_path = "/pricing/devices/{did}/pricingtiers".sub('{format}','json').sub('{' + 'did' + '}', did.to_s) # query parameters query_params = {} query_params[:'active'] = opts[:'active'] if !opts[:'active'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['artikcloud_oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DevicePricingTiersEnvelope') if @api_client.config.debugging @api_client.config.logger.debug "API called: MonetizationApi#get_pricing_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_the__pricing_tiers(dtid, version, opts = {}) ⇒ DeviceTypePricingTiersEnvelope
Get devicetype’s pricing tiers. Get devicetype’s pricing tiers.
137 138 139 140 |
# File 'lib/artikcloud/api/monetization_api.rb', line 137 def get_the__pricing_tiers(dtid, version, opts = {}) data, _status_code, _headers = get_the__pricing_tiers_with_http_info(dtid, version, opts) return data end |
#get_the__pricing_tiers_with_http_info(dtid, version, opts = {}) ⇒ Array<(DeviceTypePricingTiersEnvelope, Fixnum, Hash)>
Get devicetype's pricing tiers. Get devicetype's pricing tiers.
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/artikcloud/api/monetization_api.rb', line 148 def get_the__pricing_tiers_with_http_info(dtid, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MonetizationApi.get_the__pricing_tiers ..." end # verify the required parameter 'dtid' is set fail ArgumentError, "Missing the required parameter 'dtid' when calling MonetizationApi.get_the__pricing_tiers" if dtid.nil? # verify the required parameter 'version' is set fail ArgumentError, "Missing the required parameter 'version' when calling MonetizationApi.get_the__pricing_tiers" if version.nil? # resource path local_var_path = "/pricing/devicetypes/{dtid}/pricingtiers".sub('{format}','json').sub('{' + 'dtid' + '}', dtid.to_s).sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['artikcloud_oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DeviceTypePricingTiersEnvelope') if @api_client.config.debugging @api_client.config.logger.debug "API called: MonetizationApi#get_the__pricing_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_upgrade_path(did, action, opts = {}) ⇒ UpgradePathEnvelope
Get upgrade path Get upgrade path
192 193 194 195 |
# File 'lib/artikcloud/api/monetization_api.rb', line 192 def get_upgrade_path(did, action, opts = {}) data, _status_code, _headers = get_upgrade_path_with_http_info(did, action, opts) return data end |
#get_upgrade_path_with_http_info(did, action, opts = {}) ⇒ Array<(UpgradePathEnvelope, Fixnum, Hash)>
Get upgrade path Get upgrade path
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/artikcloud/api/monetization_api.rb', line 203 def get_upgrade_path_with_http_info(did, action, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MonetizationApi.get_upgrade_path ..." end # verify the required parameter 'did' is set fail ArgumentError, "Missing the required parameter 'did' when calling MonetizationApi.get_upgrade_path" if did.nil? # verify the required parameter 'action' is set fail ArgumentError, "Missing the required parameter 'action' when calling MonetizationApi.get_upgrade_path" if action.nil? # resource path local_var_path = "/pricing/devices/{did}/revenueshare/upgradepath".sub('{format}','json').sub('{' + 'did' + '}', did.to_s).sub('{' + 'action' + '}', action.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['artikcloud_oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UpgradePathEnvelope') if @api_client.config.debugging @api_client.config.logger.debug "API called: MonetizationApi#get_upgrade_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_pricing_tier(did, pricing_tier, opts = {}) ⇒ DevicePricingTierEnvelope
Set a device’s pricing tier Set a device’s pricing tier
247 248 249 250 |
# File 'lib/artikcloud/api/monetization_api.rb', line 247 def set_pricing_tier(did, pricing_tier, opts = {}) data, _status_code, _headers = set_pricing_tier_with_http_info(did, pricing_tier, opts) return data end |
#set_pricing_tier_with_http_info(did, pricing_tier, opts = {}) ⇒ Array<(DevicePricingTierEnvelope, Fixnum, Hash)>
Set a device's pricing tier Set a device's pricing tier
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/artikcloud/api/monetization_api.rb', line 258 def set_pricing_tier_with_http_info(did, pricing_tier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MonetizationApi.set_pricing_tier ..." end # verify the required parameter 'did' is set fail ArgumentError, "Missing the required parameter 'did' when calling MonetizationApi.set_pricing_tier" if did.nil? # verify the required parameter 'pricing_tier' is set fail ArgumentError, "Missing the required parameter 'pricing_tier' when calling MonetizationApi.set_pricing_tier" if pricing_tier.nil? # resource path local_var_path = "/pricing/devices/{did}/pricingtiers".sub('{format}','json').sub('{' + 'did' + '}', did.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(pricing_tier) auth_names = ['artikcloud_oauth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DevicePricingTierEnvelope') if @api_client.config.debugging @api_client.config.logger.debug "API called: MonetizationApi#set_pricing_tier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |