Class: TogaiClient::EntitlementsApi
- Inherits:
-
Object
- Object
- TogaiClient::EntitlementsApi
- Defined in:
- lib/togai_client/api/entitlements_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_entitlement_value(account_id, feature_id, opts = {}) ⇒ GetEntitlementValuesResponse
Get entitlement value for a account This API let’s you to get the entitlement value for a account.
-
#get_entitlement_value_with_http_info(account_id, feature_id, opts = {}) ⇒ Array<(GetEntitlementValuesResponse, Integer, Hash)>
Get entitlement value for a account This API let’s you to get the entitlement value for a account.
-
#get_entitlements(account_id, opts = {}) ⇒ GetEntitlementValuesResponse
Get entitlements for a account This API let’s you to get the entitlements for a account.
-
#get_entitlements_with_http_info(account_id, opts = {}) ⇒ Array<(GetEntitlementValuesResponse, Integer, Hash)>
Get entitlements for a account This API let’s you to get the entitlements for a account.
-
#get_feature_credits(account_id, feature_id, opts = {}) ⇒ GetFeatureCreditsResponse
Get Feature credits balance This API let’s you to get the feature credits balance.
-
#get_feature_credits_with_http_info(account_id, feature_id, opts = {}) ⇒ Array<(GetFeatureCreditsResponse, Integer, Hash)>
Get Feature credits balance This API let’s you to get the feature credits balance.
-
#ingest_entitled_event(opts = {}) ⇒ BaseSuccessResponse
Ingest event if a user is entitled to a feature This API let’s you to ingest an event if a user is entitled to a feature.
-
#ingest_entitled_event_with_http_info(opts = {}) ⇒ Array<(BaseSuccessResponse, Integer, Hash)>
Ingest event if a user is entitled to a feature This API let’s you to ingest an event if a user is entitled to a feature.
-
#initialize(api_client = ApiClient.default) ⇒ EntitlementsApi
constructor
A new instance of EntitlementsApi.
-
#list_feature_credit_entries(account_id, feature_id, opts = {}) ⇒ GetFeatureCreditEntriesPaginatedResponse
List feature credits entries of a feature for an account This API let’s you to list the feature credits entries of a feature for an account.
-
#list_feature_credit_entries_with_http_info(account_id, feature_id, opts = {}) ⇒ Array<(GetFeatureCreditEntriesPaginatedResponse, Integer, Hash)>
List feature credits entries of a feature for an account This API let’s you to list the feature credits entries of a feature for an account.
-
#update_feature_credit_entry(account_id, feature_id, entry_id, opts = {}) ⇒ FeatureCreditEntry
Update a feature credits entry #### This API let’s you to update the following attributes: ‘effectiveUntil` and `granted` - effectiveUntil: must be in future - granted: must be greater than the existing usage (previous granted - current balance).
-
#update_feature_credit_entry_with_http_info(account_id, feature_id, entry_id, opts = {}) ⇒ Array<(FeatureCreditEntry, Integer, Hash)>
Update a feature credits entry #### This API let's you to update the following attributes: `effectiveUntil` and `granted` - effectiveUntil: must be in future - granted: must be greater than the existing usage (previous granted - current balance).
-
#validate_entitlement_value(account_id, feature_id, opts = {}) ⇒ BaseSuccessResponse
Check entitlement value for a account This API let’s you to validate the entitlement value for a account.
-
#validate_entitlement_value_with_http_info(account_id, feature_id, opts = {}) ⇒ Array<(BaseSuccessResponse, Integer, Hash)>
Check entitlement value for a account This API let’s you to validate the entitlement value for a account.
-
#void_feature_credit_entry(account_id, feature_id, entry_id, opts = {}) ⇒ BaseSuccessResponse
Void a feature credits entry of a feature for an account This API let’s you to void the feature credits entries of a feature for an account.
-
#void_feature_credit_entry_with_http_info(account_id, feature_id, entry_id, opts = {}) ⇒ Array<(BaseSuccessResponse, Integer, Hash)>
Void a feature credits entry of a feature for an account This API let’s you to void the feature credits entries of a feature for an account.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ EntitlementsApi
Returns a new instance of EntitlementsApi.
19 20 21 |
# File 'lib/togai_client/api/entitlements_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/togai_client/api/entitlements_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_entitlement_value(account_id, feature_id, opts = {}) ⇒ GetEntitlementValuesResponse
Get entitlement value for a account This API let’s you to get the entitlement value for a account
28 29 30 31 |
# File 'lib/togai_client/api/entitlements_api.rb', line 28 def get_entitlement_value(account_id, feature_id, opts = {}) data, _status_code, _headers = get_entitlement_value_with_http_info(account_id, feature_id, opts) data end |
#get_entitlement_value_with_http_info(account_id, feature_id, opts = {}) ⇒ Array<(GetEntitlementValuesResponse, Integer, Hash)>
Get entitlement value for a account This API let’s you to get the entitlement value for a account
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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/togai_client/api/entitlements_api.rb', line 39 def get_entitlement_value_with_http_info(account_id, feature_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitlementsApi.get_entitlement_value ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling EntitlementsApi.get_entitlement_value" end if @api_client.config.client_side_validation && account_id.to_s.length > 50 fail ArgumentError, 'invalid value for "account_id" when calling EntitlementsApi.get_entitlement_value, the character length must be smaller than or equal to 50.' end # verify the required parameter 'feature_id' is set if @api_client.config.client_side_validation && feature_id.nil? fail ArgumentError, "Missing the required parameter 'feature_id' when calling EntitlementsApi.get_entitlement_value" end if @api_client.config.client_side_validation && feature_id.to_s.length > 50 fail ArgumentError, 'invalid value for "feature_id" when calling EntitlementsApi.get_entitlement_value, the character length must be smaller than or equal to 50.' end # resource path local_var_path = '/accounts/{account_id}/entitlements/{feature_id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'feature_id' + '}', CGI.escape(feature_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetEntitlementValuesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"EntitlementsApi.get_entitlement_value", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EntitlementsApi#get_entitlement_value\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_entitlements(account_id, opts = {}) ⇒ GetEntitlementValuesResponse
Get entitlements for a account This API let’s you to get the entitlements for a account
104 105 106 107 |
# File 'lib/togai_client/api/entitlements_api.rb', line 104 def get_entitlements(account_id, opts = {}) data, _status_code, _headers = get_entitlements_with_http_info(account_id, opts) data end |
#get_entitlements_with_http_info(account_id, opts = {}) ⇒ Array<(GetEntitlementValuesResponse, Integer, Hash)>
Get entitlements for a account This API let’s you to get the entitlements for a account
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/togai_client/api/entitlements_api.rb', line 114 def get_entitlements_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitlementsApi.get_entitlements ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling EntitlementsApi.get_entitlements" end if @api_client.config.client_side_validation && account_id.to_s.length > 50 fail ArgumentError, 'invalid value for "account_id" when calling EntitlementsApi.get_entitlements, the character length must be smaller than or equal to 50.' end # resource path local_var_path = '/accounts/{account_id}/entitlements'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetEntitlementValuesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"EntitlementsApi.get_entitlements", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EntitlementsApi#get_entitlements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_feature_credits(account_id, feature_id, opts = {}) ⇒ GetFeatureCreditsResponse
Get Feature credits balance This API let’s you to get the feature credits balance
172 173 174 175 |
# File 'lib/togai_client/api/entitlements_api.rb', line 172 def get_feature_credits(account_id, feature_id, opts = {}) data, _status_code, _headers = get_feature_credits_with_http_info(account_id, feature_id, opts) data end |
#get_feature_credits_with_http_info(account_id, feature_id, opts = {}) ⇒ Array<(GetFeatureCreditsResponse, Integer, Hash)>
Get Feature credits balance This API let’s you to get the feature credits balance
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 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 240 241 |
# File 'lib/togai_client/api/entitlements_api.rb', line 183 def get_feature_credits_with_http_info(account_id, feature_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitlementsApi.get_feature_credits ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling EntitlementsApi.get_feature_credits" end if @api_client.config.client_side_validation && account_id.to_s.length > 50 fail ArgumentError, 'invalid value for "account_id" when calling EntitlementsApi.get_feature_credits, the character length must be smaller than or equal to 50.' end # verify the required parameter 'feature_id' is set if @api_client.config.client_side_validation && feature_id.nil? fail ArgumentError, "Missing the required parameter 'feature_id' when calling EntitlementsApi.get_feature_credits" end if @api_client.config.client_side_validation && feature_id.to_s.length > 50 fail ArgumentError, 'invalid value for "feature_id" when calling EntitlementsApi.get_feature_credits, the character length must be smaller than or equal to 50.' end # resource path local_var_path = '/accounts/{account_id}/features/{feature_id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'feature_id' + '}', CGI.escape(feature_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetFeatureCreditsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"EntitlementsApi.get_feature_credits", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EntitlementsApi#get_feature_credits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#ingest_entitled_event(opts = {}) ⇒ BaseSuccessResponse
Ingest event if a user is entitled to a feature This API let’s you to ingest an event if a user is entitled to a feature
248 249 250 251 |
# File 'lib/togai_client/api/entitlements_api.rb', line 248 def ingest_entitled_event(opts = {}) data, _status_code, _headers = ingest_entitled_event_with_http_info(opts) data end |
#ingest_entitled_event_with_http_info(opts = {}) ⇒ Array<(BaseSuccessResponse, Integer, Hash)>
Ingest event if a user is entitled to a feature This API let’s you to ingest an event if a user is entitled to a feature
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 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/togai_client/api/entitlements_api.rb', line 258 def ingest_entitled_event_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitlementsApi.ingest_entitled_event ...' end # resource path local_var_path = '/entitled' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'ingest_event_request']) # return_type return_type = opts[:debug_return_type] || 'BaseSuccessResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"EntitlementsApi.ingest_entitled_event", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EntitlementsApi#ingest_entitled_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_feature_credit_entries(account_id, feature_id, opts = {}) ⇒ GetFeatureCreditEntriesPaginatedResponse
List feature credits entries of a feature for an account This API let’s you to list the feature credits entries of a feature for an account
315 316 317 318 |
# File 'lib/togai_client/api/entitlements_api.rb', line 315 def list_feature_credit_entries(account_id, feature_id, opts = {}) data, _status_code, _headers = list_feature_credit_entries_with_http_info(account_id, feature_id, opts) data end |
#list_feature_credit_entries_with_http_info(account_id, feature_id, opts = {}) ⇒ Array<(GetFeatureCreditEntriesPaginatedResponse, Integer, Hash)>
List feature credits entries of a feature for an account This API let’s you to list the feature credits entries of a feature for an account
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/togai_client/api/entitlements_api.rb', line 328 def list_feature_credit_entries_with_http_info(account_id, feature_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitlementsApi.list_feature_credit_entries ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling EntitlementsApi.list_feature_credit_entries" end if @api_client.config.client_side_validation && account_id.to_s.length > 50 fail ArgumentError, 'invalid value for "account_id" when calling EntitlementsApi.list_feature_credit_entries, the character length must be smaller than or equal to 50.' end # verify the required parameter 'feature_id' is set if @api_client.config.client_side_validation && feature_id.nil? fail ArgumentError, "Missing the required parameter 'feature_id' when calling EntitlementsApi.list_feature_credit_entries" end if @api_client.config.client_side_validation && feature_id.to_s.length > 50 fail ArgumentError, 'invalid value for "feature_id" when calling EntitlementsApi.list_feature_credit_entries, the character length must be smaller than or equal to 50.' end # resource path local_var_path = '/accounts/{account_id}/features/{feature_id}/entries'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'feature_id' + '}', CGI.escape(feature_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetFeatureCreditEntriesPaginatedResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"EntitlementsApi.list_feature_credit_entries", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EntitlementsApi#list_feature_credit_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_feature_credit_entry(account_id, feature_id, entry_id, opts = {}) ⇒ FeatureCreditEntry
Update a feature credits entry #### This API let’s you to update the following attributes: ‘effectiveUntil` and `granted` - effectiveUntil: must be in future - granted: must be greater than the existing usage (previous granted - current balance)
398 399 400 401 |
# File 'lib/togai_client/api/entitlements_api.rb', line 398 def update_feature_credit_entry(account_id, feature_id, entry_id, opts = {}) data, _status_code, _headers = update_feature_credit_entry_with_http_info(account_id, feature_id, entry_id, opts) data end |
#update_feature_credit_entry_with_http_info(account_id, feature_id, entry_id, opts = {}) ⇒ Array<(FeatureCreditEntry, Integer, Hash)>
Update a feature credits entry #### This API let's you to update the following attributes: `effectiveUntil` and `granted` - effectiveUntil: must be in future - granted: must be greater than the existing usage (previous granted - current balance)
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 |
# File 'lib/togai_client/api/entitlements_api.rb', line 411 def update_feature_credit_entry_with_http_info(account_id, feature_id, entry_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitlementsApi.update_feature_credit_entry ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling EntitlementsApi.update_feature_credit_entry" end if @api_client.config.client_side_validation && account_id.to_s.length > 50 fail ArgumentError, 'invalid value for "account_id" when calling EntitlementsApi.update_feature_credit_entry, the character length must be smaller than or equal to 50.' end # verify the required parameter 'feature_id' is set if @api_client.config.client_side_validation && feature_id.nil? fail ArgumentError, "Missing the required parameter 'feature_id' when calling EntitlementsApi.update_feature_credit_entry" end if @api_client.config.client_side_validation && feature_id.to_s.length > 50 fail ArgumentError, 'invalid value for "feature_id" when calling EntitlementsApi.update_feature_credit_entry, the character length must be smaller than or equal to 50.' end # verify the required parameter 'entry_id' is set if @api_client.config.client_side_validation && entry_id.nil? fail ArgumentError, "Missing the required parameter 'entry_id' when calling EntitlementsApi.update_feature_credit_entry" end if @api_client.config.client_side_validation && entry_id.to_s.length > 50 fail ArgumentError, 'invalid value for "entry_id" when calling EntitlementsApi.update_feature_credit_entry, the character length must be smaller than or equal to 50.' end # resource path local_var_path = '/accounts/{account_id}/features/{feature_id}/entries/{entry_id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'feature_id' + '}', CGI.escape(feature_id.to_s)).sub('{' + 'entry_id' + '}', CGI.escape(entry_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_feature_credits_request']) # return_type return_type = opts[:debug_return_type] || 'FeatureCreditEntry' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"EntitlementsApi.update_feature_credit_entry", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EntitlementsApi#update_feature_credit_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#validate_entitlement_value(account_id, feature_id, opts = {}) ⇒ BaseSuccessResponse
Check entitlement value for a account This API let’s you to validate the entitlement value for a account
491 492 493 494 |
# File 'lib/togai_client/api/entitlements_api.rb', line 491 def validate_entitlement_value(account_id, feature_id, opts = {}) data, _status_code, _headers = validate_entitlement_value_with_http_info(account_id, feature_id, opts) data end |
#validate_entitlement_value_with_http_info(account_id, feature_id, opts = {}) ⇒ Array<(BaseSuccessResponse, Integer, Hash)>
Check entitlement value for a account This API let’s you to validate the entitlement value for a account
503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 |
# File 'lib/togai_client/api/entitlements_api.rb', line 503 def validate_entitlement_value_with_http_info(account_id, feature_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitlementsApi.validate_entitlement_value ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling EntitlementsApi.validate_entitlement_value" end if @api_client.config.client_side_validation && account_id.to_s.length > 50 fail ArgumentError, 'invalid value for "account_id" when calling EntitlementsApi.validate_entitlement_value, the character length must be smaller than or equal to 50.' end # verify the required parameter 'feature_id' is set if @api_client.config.client_side_validation && feature_id.nil? fail ArgumentError, "Missing the required parameter 'feature_id' when calling EntitlementsApi.validate_entitlement_value" end if @api_client.config.client_side_validation && feature_id.to_s.length > 50 fail ArgumentError, 'invalid value for "feature_id" when calling EntitlementsApi.validate_entitlement_value, the character length must be smaller than or equal to 50.' end # resource path local_var_path = '/accounts/{account_id}/entitlements/{feature_id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'feature_id' + '}', CGI.escape(feature_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'validate_entitlement_value_request']) # return_type return_type = opts[:debug_return_type] || 'BaseSuccessResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"EntitlementsApi.validate_entitlement_value", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EntitlementsApi#validate_entitlement_value\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#void_feature_credit_entry(account_id, feature_id, entry_id, opts = {}) ⇒ BaseSuccessResponse
Void a feature credits entry of a feature for an account This API let’s you to void the feature credits entries of a feature for an account
575 576 577 578 |
# File 'lib/togai_client/api/entitlements_api.rb', line 575 def void_feature_credit_entry(account_id, feature_id, entry_id, opts = {}) data, _status_code, _headers = void_feature_credit_entry_with_http_info(account_id, feature_id, entry_id, opts) data end |
#void_feature_credit_entry_with_http_info(account_id, feature_id, entry_id, opts = {}) ⇒ Array<(BaseSuccessResponse, Integer, Hash)>
Void a feature credits entry of a feature for an account This API let’s you to void the feature credits entries of a feature for an account
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 |
# File 'lib/togai_client/api/entitlements_api.rb', line 587 def void_feature_credit_entry_with_http_info(account_id, feature_id, entry_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitlementsApi.void_feature_credit_entry ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling EntitlementsApi.void_feature_credit_entry" end if @api_client.config.client_side_validation && account_id.to_s.length > 50 fail ArgumentError, 'invalid value for "account_id" when calling EntitlementsApi.void_feature_credit_entry, the character length must be smaller than or equal to 50.' end # verify the required parameter 'feature_id' is set if @api_client.config.client_side_validation && feature_id.nil? fail ArgumentError, "Missing the required parameter 'feature_id' when calling EntitlementsApi.void_feature_credit_entry" end if @api_client.config.client_side_validation && feature_id.to_s.length > 50 fail ArgumentError, 'invalid value for "feature_id" when calling EntitlementsApi.void_feature_credit_entry, the character length must be smaller than or equal to 50.' end # verify the required parameter 'entry_id' is set if @api_client.config.client_side_validation && entry_id.nil? fail ArgumentError, "Missing the required parameter 'entry_id' when calling EntitlementsApi.void_feature_credit_entry" end if @api_client.config.client_side_validation && entry_id.to_s.length > 50 fail ArgumentError, 'invalid value for "entry_id" when calling EntitlementsApi.void_feature_credit_entry, the character length must be smaller than or equal to 50.' end # resource path local_var_path = '/accounts/{account_id}/features/{feature_id}/entries/{entry_id}/void'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'feature_id' + '}', CGI.escape(feature_id.to_s)).sub('{' + 'entry_id' + '}', CGI.escape(entry_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BaseSuccessResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"EntitlementsApi.void_feature_credit_entry", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EntitlementsApi#void_feature_credit_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |