Class: Telnyx::Resources::ChargesSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/charges_summary.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ ChargesSummary

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 ChargesSummary.

Parameters:



38
39
40
# File 'lib/telnyx/resources/charges_summary.rb', line 38

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(end_date:, start_date:, request_options: {}) ⇒ Telnyx::Models::ChargesSummaryRetrieveResponse

Some parameter documentations has been truncated, see Models::ChargesSummaryRetrieveParams for more details.

Retrieve a summary of monthly charges for a specified date range. The date range cannot exceed 31 days.

Parameters:

  • end_date (Date)

    End date for the charges summary in ISO date format (YYYY-MM-DD). The date is ex

  • start_date (Date)

    Start date for the charges summary in ISO date format (YYYY-MM-DD)

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/telnyx/resources/charges_summary.rb', line 23

def retrieve(params)
  parsed, options = Telnyx::ChargesSummaryRetrieveParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "charges_summary",
    query: query,
    model: Telnyx::Models::ChargesSummaryRetrieveResponse,
    options: options
  )
end