Class: FloopFloop::Usage
- Inherits:
-
Object
- Object
- FloopFloop::Usage
- Defined in:
- lib/floopfloop/usage.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ Usage
constructor
A new instance of Usage.
-
#summary ⇒ Object
Returns the full { “plan” => …, “credits” => …, “currentPeriod” => … } hash.
Constructor Details
#initialize(client) ⇒ Usage
Returns a new instance of Usage.
5 6 7 |
# File 'lib/floopfloop/usage.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#summary ⇒ Object
Returns the full { “plan” => …, “credits” => …, “currentPeriod” => … } hash. Not wrapped in a struct — stays forward-compatible if the backend adds fields.
12 13 14 |
# File 'lib/floopfloop/usage.rb', line 12 def summary @client.request("GET", "/api/v1/usage/summary") end |