Class: Imagekitio::Resources::Accounts::Usage
- Inherits:
-
Object
- Object
- Imagekitio::Resources::Accounts::Usage
- Defined in:
- lib/imagekitio/resources/accounts/usage.rb
Instance Method Summary collapse
-
#get(end_date: , start_date: , request_options: {}) ⇒ Imagekitio::Models::Accounts::UsageGetResponse
Some parameter documentations has been truncated, see Models::Accounts::UsageGetParams for more details.
-
#initialize(client:) ⇒ Usage
constructor
private
A new instance of Usage.
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.
40 41 42 |
# File 'lib/imagekitio/resources/accounts/usage.rb', line 40 def initialize(client:) @client = client end |
Instance Method Details
#get(end_date: , start_date: , request_options: {}) ⇒ Imagekitio::Models::Accounts::UsageGetResponse
Some parameter documentations has been truncated, see Models::Accounts::UsageGetParams for more details.
Get the account usage information between two dates. Note that the API response includes data from the start date while excluding data from the end date. In other words, the data covers the period starting from the specified start date up to, but not including, the end date.
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/imagekitio/resources/accounts/usage.rb', line 26 def get(params) parsed, = Imagekitio::Accounts::UsageGetParams.dump_request(params) @client.request( method: :get, path: "v1/accounts/usage", query: parsed.transform_keys(end_date: "endDate", start_date: "startDate"), model: Imagekitio::Models::Accounts::UsageGetResponse, options: ) end |