Module adcp.types.domains.error_details.requote_required

Classes

class EnvelopeField (value: Any = <object object>, *, root: Any = <object object>)
Expand source code
class EnvelopeField(ScalarStr):
    __slots__ = ()
    _constraints = {'min_length': 1}
    _json_schema_extra = {
        'description': 'Buyer-visible request field path or paths that breached the accepted commercial envelope. Values MUST NOT name seller-internal objects or identifiers. New emitters SHOULD use the array form even for one path; the scalar form remains valid for compatibility with existing 3.x sellers.',
    }

A str generated from a JSON Schema string root.

Ancestors

  • adcp.types._scalar.ScalarStr
  • adcp.types._scalar._ScalarRoot
  • builtins.str
class EnvelopeField1 (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class EnvelopeField1(RootModel[list[EnvelopeField1Item]]):
    root: Annotated[
        list[EnvelopeField1Item],
        Field(
            description='Buyer-visible request field path or paths that breached the accepted commercial envelope. Values MUST NOT name seller-internal objects or identifiers. New emitters SHOULD use the array form even for one path; the scalar form remains valid for compatibility with existing 3.x sellers.',
            min_length=1,
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes
-----=
root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

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

  • pydantic.root_model.RootModel[list[EnvelopeField1Item]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var root : list[EnvelopeField1Item]
class EnvelopeField1Item (value: Any = <object object>, *, root: Any = <object object>)
Expand source code
class EnvelopeField1Item(ScalarStr):
    __slots__ = ()
    _constraints = {'min_length': 1}

A str generated from a JSON Schema string root.

Ancestors

  • adcp.types._scalar.ScalarStr
  • adcp.types._scalar._ScalarRoot
  • builtins.str
class RequoteRequiredDetails (**data: Any)
Expand source code
class RequoteRequiredDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    envelope_field: Annotated[
        EnvelopeField | EnvelopeField1 | None,
        Field(
            description='Buyer-visible request field path or paths that breached the accepted commercial envelope. Values MUST NOT name seller-internal objects or identifiers. New emitters SHOULD use the array form even for one path; the scalar form remains valid for compatibility with existing 3.x sellers.'
        ),
    ] = None
    change_term_id: Annotated[
        media_buy_change_term_id.MediaBuyChangeTermId | None,
        Field(
            description='Accepted proposal change term whose typed constraint the request exceeded.'
        ),
    ] = None
    decline_reason: Annotated[
        seller_policy_decline_reason.SellerPolicyDeclineReason | None,
        Field(
            description='Coarse seller-policy dimension that declined the requested shape. Sellers SHOULD populate this when they have a structured reason and disclosure does not expose private thresholds or enforcement controls. When present, it MUST be consistent with the enclosing error.recovery classification.'
        ),
    ] = 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 change_term_id : MediaBuyChangeTermId | None
var decline_reason : SellerPolicyDeclineReason | None
var envelope_field : EnvelopeField | EnvelopeField1 | None
var model_config

Inherited members