Class: Telnyx::Models::CallCostWebhookEvent::Data::Payload::CostPart

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/call_cost_webhook_event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(billed_duration_secs: nil, billing_group_id: nil, call_control_id: nil, call_leg_id: nil, call_session_id: nil, client_state: nil, connection_id: nil, cost_parts: nil, occurred_at: nil, status: nil, total_cost: nil) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::CallCostWebhookEvent::Data::Payload for more details.

Parameters:

  • billed_duration_secs (Integer, nil) (defaults to: nil)

    The longest billed duration across all cost parts, in seconds.

  • billing_group_id (String, nil) (defaults to: nil)

    Identifies the billing group associated with the call.

  • call_control_id (String) (defaults to: nil)

    Call ID used to issue commands via Call Control API.

  • call_leg_id (String) (defaults to: nil)

    ID that is unique to the call and can be used to correlate webhook events.

  • call_session_id (String) (defaults to: nil)

    ID that is unique to the call session and can be used to correlate webhook event

  • client_state (String) (defaults to: nil)

    State received from a command. Base64-encoded.

  • connection_id (String) (defaults to: nil)

    Call Control App ID (formerly Telnyx connection ID) used in the call.

  • cost_parts (Array<Telnyx::Models::CallCostWebhookEvent::Data::Payload::CostPart>) (defaults to: nil)

    Breakdown of costs by call part.

  • occurred_at (Time) (defaults to: nil)

    ISO 8601 datetime of when the event occurred.

  • status (Symbol, Telnyx::Models::CallCostWebhookEvent::Data::Payload::Status) (defaults to: nil)

    The status of the cost calculation (‘success` or `error`).

  • total_cost (String, nil) (defaults to: nil)

    The total cost of the call.



165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/telnyx/models/call_cost_webhook_event.rb', line 165

class CostPart < Telnyx::Internal::Type::BaseModel
  # @!attribute billed_duration_secs
  #   The billed duration in seconds for this part of the call.
  #
  #   @return [Integer, nil]
  optional :billed_duration_secs, Integer

  # @!attribute call_part
  #   The product component this cost applies to. Values are determined by the billing
  #   system (e.g. sip-trunking, call-control, call-recording). Not a fixed set — new
  #   values may appear as products evolve.
  #
  #   @return [String, nil]
  optional :call_part, String

  # @!attribute cost
  #   The cost for this part of the call.
  #
  #   @return [String, nil]
  optional :cost, String

  # @!attribute currency
  #   The currency of the cost.
  #
  #   @return [String, nil]
  optional :currency, String

  # @!attribute rate
  #   The per-minute rate applied.
  #
  #   @return [String, nil]
  optional :rate, String

  # @!method initialize(billed_duration_secs: nil, call_part: nil, cost: nil, currency: nil, rate: nil)
  #   Some parameter documentations has been truncated, see
  #   {Telnyx::Models::CallCostWebhookEvent::Data::Payload::CostPart} for more
  #   details.
  #
  #   @param billed_duration_secs [Integer] The billed duration in seconds for this part of the call.
  #
  #   @param call_part [String] The product component this cost applies to. Values are determined by the billing
  #
  #   @param cost [String] The cost for this part of the call.
  #
  #   @param currency [String] The currency of the cost.
  #
  #   @param rate [String] The per-minute rate applied.
end

Instance Attribute Details

#billed_duration_secsInteger?

The billed duration in seconds for this part of the call.

Returns:

  • (Integer, nil)


170
# File 'lib/telnyx/models/call_cost_webhook_event.rb', line 170

optional :billed_duration_secs, Integer

#call_partString?

The product component this cost applies to. Values are determined by the billing system (e.g. sip-trunking, call-control, call-recording). Not a fixed set — new values may appear as products evolve.

Returns:

  • (String, nil)


178
# File 'lib/telnyx/models/call_cost_webhook_event.rb', line 178

optional :call_part, String

#costString?

The cost for this part of the call.

Returns:

  • (String, nil)


184
# File 'lib/telnyx/models/call_cost_webhook_event.rb', line 184

optional :cost, String

#currencyString?

The currency of the cost.

Returns:

  • (String, nil)


190
# File 'lib/telnyx/models/call_cost_webhook_event.rb', line 190

optional :currency, String

#rateString?

The per-minute rate applied.

Returns:

  • (String, nil)


196
# File 'lib/telnyx/models/call_cost_webhook_event.rb', line 196

optional :rate, String