Class: CropwisePlatformSdk::LicensingApi
- Inherits:
-
Object
- Object
- CropwisePlatformSdk::LicensingApi
- Defined in:
- lib/cropwise-platform-sdk/api/licensing_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_licensingstatus(opts = {}) ⇒ LicensingStatus
Licensing Status The licensing status returned is grouped by app.
-
#get_licensingstatus_with_http_info(opts = {}) ⇒ Array<(LicensingStatus, Integer, Hash)>
Licensing Status The licensing status returned is grouped by app.
-
#initialize(api_client = ApiClient.default) ⇒ LicensingApi
constructor
A new instance of LicensingApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ LicensingApi
Returns a new instance of LicensingApi.
19 20 21 |
# File 'lib/cropwise-platform-sdk/api/licensing_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/cropwise-platform-sdk/api/licensing_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_licensingstatus(opts = {}) ⇒ LicensingStatus
Licensing Status The licensing status returned is grouped by app. Often, the "apps" list will just include one object, which is the calling app. In specific cases (like inter-app integrations), other apps may be configured to share their licensing information with other applications. In this case, you will see this information too if you request it (see "apps" parameter). Querystring parameters: - ‘org`: ID of the Organization to be checked. Mutually exclusive with `account`. - `account`: ID of the workspace (not the User). Mutually exclusive with org. Either `org` or `account` must be present. - `apps`: - description: Which apps should have their licensing info included in the response. - acceptable values: - `me` (default): just the calling app - `all`: the calling app, plus all the apps that have agreed to share licensing information with the calling app (if any). This sharing MAY be partial (for example, entitlements are shared but quotas are not). - `fields`: - description: a comma-separated list of strings specifying fields to include - default value: `entitlements` - acceptable values: - `all`: add all available fields - `entitlements`: add entitlements - `quotas`: add quotas and their usages - `meta`: add all metadata (Accounts and Contracts). Clients can set up to 1KB of metadata for each Contract or Account to make it easier to store free-form external info for human consumption or system integrations. - `meta(account)`: add only Account metadata - `meta(contract)`: add only Contract metadata - `notes`: add contract notes to the response
31 32 33 34 |
# File 'lib/cropwise-platform-sdk/api/licensing_api.rb', line 31 def get_licensingstatus(opts = {}) data, _status_code, _headers = get_licensingstatus_with_http_info(opts) data end |
#get_licensingstatus_with_http_info(opts = {}) ⇒ Array<(LicensingStatus, Integer, Hash)>
Licensing Status The licensing status returned is grouped by app. Often, the "apps" list will just include one object, which is the calling app. In specific cases (like inter-app integrations), other apps may be configured to share their licensing information with other applications. In this case, you will see this information too if you request it (see "apps" parameter). Querystring parameters: - `org`: ID of the Organization to be checked. Mutually exclusive with `account`. - `account`: ID of the workspace (not the User). Mutually exclusive with org. Either `org` or `account` must be present. - `apps`: - description: Which apps should have their licensing info included in the response. - acceptable values: - `me` (default): just the calling app - `all`: the calling app, plus all the apps that have agreed to share licensing information with the calling app (if any). This sharing MAY be partial (for example, entitlements are shared but quotas are not). - `fields`: - description: a comma-separated list of strings specifying fields to include - default value: `entitlements` - acceptable values: - `all`: add all available fields - `entitlements`: add entitlements - `quotas`: add quotas and their usages - `meta`: add all metadata (Accounts and Contracts). Clients can set up to 1KB of metadata for each Contract or Account to make it easier to store free-form external info for human consumption or system integrations. - `meta(account)`: add only Account metadata - `meta(contract)`: add only Contract metadata - `notes`: add contract notes to the response
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 |
# File 'lib/cropwise-platform-sdk/api/licensing_api.rb', line 45 def get_licensingstatus_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LicensingApi.get_licensingstatus ...' end allowable_values = ["me", "all"] if @api_client.config.client_side_validation && opts[:'apps'] && !allowable_values.include?(opts[:'apps']) fail ArgumentError, "invalid value for \"apps\", must be one of #{allowable_values}" end # resource path local_var_path = '/v2/licensing/status' # query parameters query_params = opts[:query_params] || {} query_params[:'org'] = opts[:'org'] if !opts[:'org'].nil? query_params[:'account'] = opts[:'account'] if !opts[:'account'].nil? query_params[:'apps'] = opts[:'apps'] if !opts[:'apps'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? query_params[:'include_deleted_contracts'] = opts[:'include_deleted_contracts'] if !opts[:'include_deleted_contracts'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'LicensingStatus' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"LicensingApi.get_licensingstatus", :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: LicensingApi#get_licensingstatus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |