pub struct RunChargeOptions {
pub event_name: String,
pub count: Option<i64>,
pub idempotency_key: Option<String>,
pub request_id: Option<String>,
}Expand description
Options for charging a pay-per-event run via RunClient::charge.
Fields§
§event_name: StringName of the event to charge for. Required.
count: Option<i64>Number of times to charge the event (defaults to 1).
idempotency_key: Option<String>Idempotency key deduplicating the charge across retries. The API requires this header
on every charge request and forgets each key 3 minutes after the charge, so a retry sent
past that window with the same key creates a new charge rather than being deduplicated.
If None, one is auto-generated as {runId}-{eventName}-{timestampMillis}-{random},
matching the reference client, so a transport-retried charge is applied at most once.
request_id: Option<String>ID of the Server Actor request being charged, taken from the X-Actor-Request-ID header
of the incoming request. Required for multi-tenant Server Actor runs, where it maps the
charge to the caller’s account instead of the account that started the run. Omitted from
the request body when None.