lib/datacentred/request/usage.rb in datacentred-0.1.1pre vs lib/datacentred/request/usage.rb in datacentred-1.1.1

- old
+ new

@@ -1,8 +1,17 @@ module Datacentred module Request + # RESTful API requests for the usage endpoints. class Usage < Base - + # Retrieve account usage data for a given year/month. + # + # GET /api/usage/2017/9 + # + # @param [Integer] year The year. + # @param [Integer] month The month. + # @raise [Errors::NotFound] Raised if no usage data found for given year/month pair. + # @raise [Errors::Unauthorized] Raised if credentials aren't valid. + # @return [Hash] Usage for given year/month pair. def self.show(year, month) get("usage/#{year}/#{month}") end end end