Class: MemoriClient::Backend::V2::ConsumptionLog

Inherits:
Resource show all
Defined in:
lib/memori_client/backend/v2/consumption_log.rb

Overview

Generated on 2025-01-27 16:56:15 +0000

Class Method Summary collapse

Methods inherited from Resource

build_url

Methods inherited from Resource

build_arguments, build_url, exec_http_request, validate_payload!

Class Method Details

.get_memori_consumption_logs(strToken:, strMemoriID:, strType:, strDateFrom: nil, strDateTo: nil) ⇒ Object

‘GET /api/v2/MemoriConsumptionLogs/strToken/strMemoriID/strType/strDateFrom/strDateTo`

Gets the Consumption Log objects for a specific Memori in a specific date interval.

‘get_memori_consumption_logs(strToken:, strMemoriID:, strType:, strDateFrom: nil, strDateTo: nil)`

Parameters:

  • strToken (string)

    The login token. required

  • strMemoriID (string)

    The ID of the Memori object. required

  • strType (string)

    Type of consumption (i.e. granularity), it may either be Daily or Monthly. required

  • strDateFrom (string) (defaults to: nil)

    The optional begin of the date interval, in UTC time, in the format yyyyMMdd. optional

  • strDateTo (string) (defaults to: nil)

    The optional end of the date interval, in UTC time, in the format yyyyMMdd. optional



63
64
65
66
67
# File 'lib/memori_client/backend/v2/consumption_log.rb', line 63

def self.get_memori_consumption_logs(strToken:, strMemoriID:, strType:, strDateFrom: nil, strDateTo: nil)
  args = build_arguments(binding)

  exec_http_request('get', '/api/v2/MemoriConsumptionLogs/{strToken}/{strMemoriID}/{strType}/{strDateFrom}/{strDateTo}', **args)
end

.get_tenant_consumption_logs(strToken:, tenantName:, strType:, strDateFrom: nil, strDateTo: nil) ⇒ Object

‘GET /api/v2/TenantConsumptionLogs/strToken/tenantName/strType/strDateFrom/strDateTo`

Gets the Consumption Log objects for a specific Tenant in a specific date interval.

‘get_tenant_consumption_logs(strToken:, tenantName:, strType:, strDateFrom: nil, strDateTo: nil)`

Parameters:

  • strToken (string)

    The login token. required

  • tenantName (string)

    The name of the Tenant. required

  • strType (string)

    Type of consumption (i.e. granularity), it may either be Daily or Monthly. required

  • strDateFrom (string) (defaults to: nil)

    The optional begin of the date interval, in UTC time, in the format yyyyMMdd. optional

  • strDateTo (string) (defaults to: nil)

    The optional end of the date interval, in UTC time, in the format yyyyMMdd. optional



19
20
21
22
23
# File 'lib/memori_client/backend/v2/consumption_log.rb', line 19

def self.get_tenant_consumption_logs(strToken:, tenantName:, strType:, strDateFrom: nil, strDateTo: nil)
  args = build_arguments(binding)

  exec_http_request('get', '/api/v2/TenantConsumptionLogs/{strToken}/{tenantName}/{strType}/{strDateFrom}/{strDateTo}', **args)
end

.get_user_consumption_logs(strToken:, strUserID:, strType:, strDateFrom: nil, strDateTo: nil) ⇒ Object

‘GET /api/v2/UserConsumptionLogs/strToken/strUserID/strType/strDateFrom/strDateTo`

Gets the Consumption Log objects for a specific User in a specific date interval.

‘get_user_consumption_logs(strToken:, strUserID:, strType:, strDateFrom: nil, strDateTo: nil)`

Parameters:

  • strToken (string)

    The login token. required

  • strUserID (string)

    The ID of the User object. required

  • strType (string)

    Type of consumption (i.e. granularity), it may either be Daily or Monthly. required

  • strDateFrom (string) (defaults to: nil)

    The optional begin of the date interval, in UTC time, in the format yyyyMMdd. optional

  • strDateTo (string) (defaults to: nil)

    The optional end of the date interval, in UTC time, in the format yyyyMMdd. optional



41
42
43
44
45
# File 'lib/memori_client/backend/v2/consumption_log.rb', line 41

def self.get_user_consumption_logs(strToken:, strUserID:, strType:, strDateFrom: nil, strDateTo: nil)
  args = build_arguments(binding)

  exec_http_request('get', '/api/v2/UserConsumptionLogs/{strToken}/{strUserID}/{strType}/{strDateFrom}/{strDateTo}', **args)
end