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 emailvar localevar namevar phonevar 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') ] = NoneBase 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 setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='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 adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport 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_configon 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var brand_policy_url : pydantic.networks.AnyUrl | Nonevar brand_policy_version : str | Nonevar 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 = NoneBase 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 setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='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 adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport 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_configon 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var city : str | Nonevar country : str | Nonevar model_configvar postal_code : str | Nonevar state : str | Nonevar 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)'), ] = NoneBase 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 setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='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 adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport 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_configon 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var anonymous_session_id : str | Nonevar consent_granted : boolvar consent_scope : list[ConsentScopeEnum] | Nonevar consent_timestamp : pydantic.types.AwareDatetime | Nonevar model_configvar privacy_policy_acknowledged : PrivacyPolicyAcknowledged | Nonevar 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") ] = NoneBase 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 setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='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 adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport 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_configon 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var email : pydantic.networks.EmailStr | Nonevar locale : str | Nonevar model_configvar name : str | Nonevar phone : str | Nonevar shipping_address : ShippingAddress | None
Inherited members