Module adcp.types.generated_poc.tmp.offer

Classes

class Offer (**data: Any)
Expand source code
class Offer(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    brand: Annotated[
        brand_ref.BrandReference | None,
        Field(
            description='Brand for this offer. Required when the product allows dynamic brands (brand selected at match time rather than fixed on the package). For single-brand packages, the brand is already known from the media buy.'
        ),
    ] = None
    creative_manifest: Annotated[
        creative_manifest_1.CreativeManifest | None,
        Field(
            description='Full creative details, inline. When present, the publisher has everything needed to render. Inline for small creatives (markdown, product card). For large creatives (VAST, video), the manifest references external assets via URLs.'
        ),
    ] = None
    macros: Annotated[
        dict[str, str] | None,
        Field(
            description='Key-value pairs the buyer passes for dynamic creative rendering or attribution tracking. In the GAM case, these flow as macro values. Not tied to user identity — attribution reconciliation happens via delivery reporting or clean room.'
        ),
    ] = None
    package_id: Annotated[str, Field(description='Package identifier from the media buy.')]
    price: Annotated[
        offer_price.OfferPrice | None,
        Field(
            description='Price for this offer. Only present when the product supports variable pricing. For fixed-price packages, price is already set on the media buy.'
        ),
    ] = None
    summary: Annotated[
        str | None,
        Field(
            description="Buyer-generated description of the offer, for the publisher to judge relevance. E.g., '50% off Goldenfield mayo — recipe integration'. The publisher (or their AI assistant) uses this to decide whether the offer fits the context."
        ),
    ] = None

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 set additionalProperties: true override this with extra='allow' in their own model_config. Consumers who want strict validation can override with extra='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.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var brandBrandReference | None
var creative_manifestCreativeManifest | None
var macros : dict[str, str] | None
var model_config
var package_id : str
var priceOfferPrice | None
var summary : str | None

Inherited members