ChargingManager
Hierarchy
- ChargingManager
Index
Methods
calculate_max_event_charge_count_within_limit
- Calculate how many instances of an event can be charged before we reach the configured limit. - Parameters- event_name: str- Name of the inspected event. 
 - Returns int | None
calculate_total_charged_amount
- Calculate the total amount of money charged for pay-per-event events so far. - Returns Decimal
charge
- Charge for a specified number of events - sub-operations of the Actor. - This is relevant only for the pay-per-event pricing model. - Parameters- event_name: str- Name of the event to be charged for. 
- optionalcount: int = 1- Number of events to charge for. 
 - Returns ChargeResult
get_charged_event_count
- Get the number of events with the given name that were charged so far. - Parameters- event_name: str- Name of the inspected event. 
 - Returns int
get_max_total_charge_usd
- Get the configured maximum total charge for this Actor run. - Returns Decimal
get_pricing_info
- Retrieve detailed information about the effective pricing of the current Actor run. - This can be used for instance when your code needs to support multiple pricing models in transition periods. - Returns ActorPricingInfo
Provides fine-grained access to pay-per-event functionality.
The ChargingManager allows you to charge for specific events in your Actor when using the pay-per-event pricing model. This enables precise cost control and transparent billing for different operations within your Actor.
References