Skip to main content

ChargingManager

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

Hierarchy

Index

Methods

calculate_max_event_charge_count_within_limit

  • calculate_max_event_charge_count_within_limit(event_name): int | None

calculate_total_charged_amount

  • calculate_total_charged_amount(): 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_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