Class: Contentful::Management::ApiUsage

Inherits:
Object
  • Object
show all
Includes:
Resource, Resource::Refresher, Resource::SystemProperties
Defined in:
lib/contentful/management/api_usage.rb

Overview

Resource class for ApiUsage.

See Also:

  • https://www.contentful.com/developers/docs/references/content-management-api/#/reference/api-usages

Instance Attribute Summary

Attributes included from Resource::SystemProperties

#sys

Attributes included from Resource

#client, #properties, #raw_object, #request

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Resource::Refresher

#reload

Methods included from Resource

#array?, #default_locale, #environment_id, #fields, #nested_locale_fields?, #resource?, #save, #sys

Class Method Details

.all(client, organization_id, usage_type, usage_period_id, api, params = {}) ⇒ Contentful::Management::Array<Contentful::Management::ApiUsage>

Gets all api usage statistics for a given organization and usage type, filtered by usage period and api.

rubocop:disable Metrics/ParameterLists

Parameters:

  • client (Contentful::Management::Client)
  • organization_id (String)
  • usage_type (String)
  • usage_period_id (Integer)
  • api (String)
  • params (Hash) (defaults to: {})

Returns:



37
38
39
# File 'lib/contentful/management/api_usage.rb', line 37

def self.all(client, organization_id, usage_type, usage_period_id, api, params = {})
  ClientApiUsageMethodsFactory.new(client, organization_id).all(usage_type, usage_period_id, api, params)
end

.createObject

Not supported



52
53
54
# File 'lib/contentful/management/api_usage.rb', line 52

def self.create(*)
  fail 'Not supported'
end

.findObject

Not supported



42
43
44
# File 'lib/contentful/management/api_usage.rb', line 42

def self.find(*)
  fail 'Not supported'
end

Instance Method Details

#destroyObject

Not supported



57
58
59
# File 'lib/contentful/management/api_usage.rb', line 57

def destroy
  fail 'Not supported'
end

#updateObject

Not supported



62
63
64
# File 'lib/contentful/management/api_usage.rb', line 62

def update(*)
  fail 'Not supported'
end