Class: Zavudev::Resources::Usage

Inherits:
Object
  • Object
show all
Defined in:
lib/zavudev/resources/usage.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Usage

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Usage.

Parameters:



28
29
30
# File 'lib/zavudev/resources/usage.rb', line 28

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(request_options: {}) ⇒ Zavudev::Models::UsageRetrieveResponse

Get the current month’s usage counters for A2P messages and emails, along with the tier limits.

Parameters:

Returns:

See Also:



16
17
18
19
20
21
22
23
# File 'lib/zavudev/resources/usage.rb', line 16

def retrieve(params = {})
  @client.request(
    method: :get,
    path: "v1/usage",
    model: Zavudev::Models::UsageRetrieveResponse,
    options: params[:request_options]
  )
end