Module adcp.types.domains.sponsored_intelligence.si_identity

Classes

class ConsentScopeEnum (*args, **kwds)
Expand source code
class ConsentScopeEnum(StrEnum):
    name = 'name'
    email = 'email'
    shipping_address = 'shipping_address'
    phone = 'phone'
    locale = 'locale'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var email
var locale
var name
var phone
var shipping_address
class PrivacyPolicyAcknowledged (**data: Any)
Expand source code
class PrivacyPolicyAcknowledged(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    brand_policy_url: Annotated[
        AnyUrl | None, Field(description="URL to brand's privacy policy")
    ] = None
    brand_policy_version: Annotated[
        str | None, Field(description='Version of policy acknowledged')
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so 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.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

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 brand_policy_url : pydantic.networks.AnyUrl | None
var brand_policy_version : str | None
var model_config

Inherited members

class ShippingAddress (**data: Any)
Expand source code
class ShippingAddress(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    street: str | None = None
    city: str | None = None
    state: str | None = None
    postal_code: str | None = None
    country: str | None = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so 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.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

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 city : str | None
var country : str | None
var model_config
var postal_code : str | None
var state : str | None
var street : str | None

Inherited members

class SiIdentity (**data: Any)
Expand source code
class SiIdentity(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    consent_granted: Annotated[
        StrictBool, Field(description='Whether user consented to share identity')
    ]
    consent_timestamp: Annotated[
        AwareDatetime | None, Field(description='When consent was granted (ISO 8601)')
    ] = None
    consent_scope: Annotated[
        list[ConsentScopeEnum] | None, Field(description='What data was consented to share')
    ] = None
    privacy_policy_acknowledged: Annotated[
        PrivacyPolicyAcknowledged | None, Field(description='Brand privacy policy acknowledgment')
    ] = None
    user: Annotated[
        User | None, Field(description='User data (only present if consent_granted is true)')
    ] = None
    anonymous_session_id: Annotated[
        str | None,
        Field(description='Session ID for anonymous users (when consent_granted is false)'),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so 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.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

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 anonymous_session_id : str | None
var consent_granted : bool
var consent_scope : list[ConsentScopeEnum] | None
var consent_timestamp : pydantic.types.AwareDatetime | None
var model_config
var privacy_policy_acknowledged : PrivacyPolicyAcknowledged | None
var user : User | None

Inherited members

class User (**data: Any)
Expand source code
class User(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    email: Annotated[EmailStr | None, Field(description="User's email address")] = None
    name: Annotated[str | None, Field(description="User's display name")] = None
    locale: Annotated[str | None, Field(description="User's locale (e.g., en-US)")] = None
    phone: Annotated[str | None, Field(description="User's phone number")] = None
    shipping_address: Annotated[
        ShippingAddress | None, Field(description="User's shipping address for accurate pricing")
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so 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.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

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 email : pydantic.networks.EmailStr | None
var locale : str | None
var model_config
var name : str | None
var phone : str | None
var shipping_address : ShippingAddress | None

Inherited members