Skip to main content

ChargingManagerImplementation

Implementation of the ChargingManager Protocol - this is only meant to be instantiated internally.

Hierarchy

Index

Methods

__aenter__

  • async __aenter__(): None
  • Initialize the charging manager - this is called by the Actor class and shouldn't be invoked manually.


    Returns None

__aexit__

  • async __aexit__(exc_type, exc_value, exc_traceback): None
  • Parameters

    • exc_type: type[BaseException] | None
    • exc_value: BaseException | None
    • exc_traceback: TracebackType | None

    Returns None

__init__

  • __init__(configuration, client): None
  • Parameters

    Returns None

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

Properties

LOCAL_CHARGING_LOG_DATASET_NAME

LOCAL_CHARGING_LOG_DATASET_NAME: Undefined