cayu.budgets.billing
Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.
BillingIdentity
Section titled “BillingIdentity”from cayu.budgets import BillingIdentityProvider-neutral commercial identity and possible pricing contexts.
Providers own the meaning of their evidence. Core preserves it durably and enforces that completion cannot rewrite request evidence or widen the set of pricing outcomes established before dispatch.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
provider_name |
str |
required |
resource_id |
str |
required |
request_evidence |
Mapping[str, Any] |
Field(default_factory=dict) |
completion_evidence |
Mapping[str, Any] |
Field(default_factory=dict) |
pricing_contexts |
tuple[PricingContext, ...] |
() |
validate_identity_text (method)
Section titled “validate_identity_text (method)”BillingIdentity.validate_identity_text(value: str, info) -> strvalidate_evidence_input (method)
Section titled “validate_evidence_input (method)”BillingIdentity.validate_evidence_input(value: Any, info) -> dict[str, Any]freeze_evidence (method)
Section titled “freeze_evidence (method)”BillingIdentity.freeze_evidence(value: Mapping[str, Any]) -> Mapping[str, Any]serialize_evidence (method)
Section titled “serialize_evidence (method)”BillingIdentity.serialize_evidence(value: Mapping[str, Any]) -> dict[str, Any]validate_unique_pricing_contexts (method)
Section titled “validate_unique_pricing_contexts (method)”BillingIdentity.validate_unique_pricing_contexts() -> BillingIdentityRelease source · Runtime guarantees · Capability guides
BillingIdentityState
Section titled “BillingIdentityState”from cayu.budgets import BillingIdentityStateBillingIdentityState = Annotated[UnresolvedBillingIdentity | ResolvedBillingIdentity, Field(discriminator='status')]Release source · Runtime guarantees · Capability guides
PricingContext
Section titled “PricingContext”from cayu.budgets import PricingContextOne exact set of commercial dimensions that may price a dispatch.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
dimensions |
Mapping[str, str] |
required |
validate_dimensions_input (method)
Section titled “validate_dimensions_input (method)”PricingContext.validate_dimensions_input(value: Any) -> dict[str, str]freeze_dimensions (method)
Section titled “freeze_dimensions (method)”PricingContext.freeze_dimensions(value: Mapping[str, str]) -> Mapping[str, str]serialize_dimensions (method)
Section titled “serialize_dimensions (method)”PricingContext.serialize_dimensions(value: Mapping[str, str]) -> dict[str, str]storage_key (method)
Section titled “storage_key (method)”PricingContext.storage_key() -> tuple[tuple[str, str], ...]Release source · Runtime guarantees · Capability guides
ResolvedBillingIdentity
Section titled “ResolvedBillingIdentity”from cayu.budgets import ResolvedBillingIdentityThe provider hook ran; the dispatch may or may not have an identity.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
status |
Literal['resolved'] |
'resolved' |
identity |
BillingIdentity | None |
None |
validate_identity (method)
Section titled “validate_identity (method)”ResolvedBillingIdentity.validate_identity(value: BillingIdentity | None) -> BillingIdentity | NoneRelease source · Runtime guarantees · Capability guides
UnresolvedBillingIdentity
Section titled “UnresolvedBillingIdentity”from cayu.budgets import UnresolvedBillingIdentityThe provider’s request hook has not resolved commercial identity yet.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
status |
Literal['unresolved'] |
'unresolved' |