Class: Datacentred::Request::Usage

Inherits:
Base
  • Object
show all
Defined in:
lib/datacentred/request/usage.rb

Overview

RESTful API requests for the usage endpoints.

Class Method Summary collapse

Methods inherited from Base

delete, get, post, put

Class Method Details

.show(year, month) ⇒ Hash

Retrieve account usage data for a given year/month.

GET /api/usage/2017/9

Parameters:

  • year (Integer)

    The year.

  • month (Integer)

    The month.

Returns:

  • (Hash)

    Usage for given year/month pair.

Raises:



14
15
16
# File 'lib/datacentred/request/usage.rb', line 14

def self.show(year, month)
  get("usage/#{year}/#{month}")
end