Class: Mailtrap::BillingAPI

Inherits:
Object
  • Object
show all
Includes:
BaseAPI
Defined in:
lib/mailtrap/billing_api.rb

Instance Attribute Summary

Attributes included from BaseAPI

#account_id, #client

Instance Method Summary collapse

Methods included from BaseAPI

included, #initialize

Instance Method Details

#usageBillingUsage

Get current billing cycle usage

Returns:

Raises:



13
14
15
16
# File 'lib/mailtrap/billing_api.rb', line 13

def usage
  response = client.get("/api/accounts/#{}/billing/usage")
  build_entity(response, BillingUsage)
end