Module adcp.types.generated_poc.pricing_options.cpa_option
Classes
class CpaPricingOption (**data: Any)-
Expand source code
class CpaPricingOption(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) currency: Annotated[ str, Field( description='ISO 4217 currency code', examples=['USD', 'EUR', 'GBP', 'JPY'], pattern='^[A-Z]{3}$', ), ] custom_event_name: Annotated[ str | None, Field( description="Name of the custom event when event_type is 'custom'. Required when event_type is 'custom', ignored otherwise." ), ] = None eligible_adjustments: Annotated[ list[adjustment_kind.PriceAdjustmentKind] | None, Field( description='Adjustment kinds applicable to this pricing option. Tells buyer agents which adjustments are available before negotiation. When absent, no adjustments are pre-declared — the buyer should check price_breakdown if present.' ), ] = None event_source_id: Annotated[ str | None, Field( description='When present, only events from this specific event source count toward billing. Allows different CPA rates for different sources (e.g., online vs in-store purchases). Must match an event source configured via sync_event_sources.' ), ] = None event_type: Annotated[ event_type_1.EventType, Field( description='The conversion event type that triggers billing (e.g., purchase, lead, app_install)' ), ] fixed_price: Annotated[ float, Field(description='Fixed price per acquisition in the specified currency', gt=0.0) ] min_spend_per_package: Annotated[ float | None, Field( description='Minimum spend requirement per package using this pricing option, in the specified currency', ge=0.0, ), ] = None price_breakdown: Annotated[ price_breakdown_1.PriceBreakdown | None, Field( description='Breakdown of how fixed_price was derived from the list (rate card) price. Only meaningful when fixed_price is present.' ), ] = None pricing_model: Annotated[ Literal['cpa'], Field(description='Cost per acquisition (conversion event)') ] pricing_option_id: Annotated[ str, Field(description='Unique identifier for this pricing option within the product') ]Base model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so that unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='forbid'.Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var currency : strvar custom_event_name : str | Nonevar eligible_adjustments : list[PriceAdjustmentKind] | Nonevar event_source_id : str | Nonevar event_type : EventTypevar fixed_price : floatvar min_spend_per_package : float | Nonevar model_configvar price_breakdown : PriceBreakdown | Nonevar pricing_model : Literal['cpa']var pricing_option_id : str
Inherited members