kittycad.models.invoice
Classes
| 
 | An invoice. | 
- class kittycad.models.invoice.Invoice(**data)[source][source]
- An invoice. - 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 allow- selfas a field name.- __annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[Dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_computed_fields__': 'ClassVar[Dict[str, ComputedFieldInfo]]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields__': 'ClassVar[Dict[str, FieldInfo]]', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[Dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator | PluggableSchemaValidator]', '__signature__': 'ClassVar[Signature]', 'amount_due': <class 'float'>, 'amount_paid': <class 'float'>, 'amount_remaining': <class 'float'>, 'attempt_count': <class 'int'>, 'attempted': <class 'bool'>, 'created_at': <class 'datetime.datetime'>, 'currency': <class 'kittycad.models.currency.Currency'>, 'customer_email': typing.Optional[str], 'customer_id': typing.Optional[str], 'default_payment_method': typing.Optional[str], 'description': typing.Optional[str], 'discounts': typing.Optional[typing.List[kittycad.models.discount.Discount]], 'id': typing.Optional[str], 'lines': typing.Optional[typing.List[kittycad.models.invoice_line_item.InvoiceLineItem]], 'metadata': typing.Dict[str, str], 'model_computed_fields': 'ClassVar[dict[str, ComputedFieldInfo]]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'number': typing.Optional[str], 'paid': <class 'bool'>, 'pdf': typing.Optional[str], 'receipt_number': typing.Optional[str], 'statement_descriptor': typing.Optional[str], 'status': typing.Optional[kittycad.models.invoice_status.InvoiceStatus], 'subtotal': <class 'float'>, 'tax': <class 'float'>, 'total': <class 'float'>, 'url': typing.Optional[str]}[source]
 - classmethod __class_getitem__(typevar_values)[source]
- Return type:
- type[- BaseModel] |- PydanticRecursiveRef
 
 - __class_vars__: ClassVar[set[str]] = {}[source]
- The names of the class variables defined on the model. 
 - classmethod __get_pydantic_core_schema__(source, handler, /)[source]
- Hook into generating the model’s CoreSchema. - Parameters:
- source ( - type[- BaseModel]) – The class we are generating a schema for. This will generally be the same as the- clsargument if this is a classmethod.
- handler ( - GetCoreSchemaHandler) – A callable that calls into Pydantic’s internal CoreSchema generation logic.
 
- Return type:
- Union[- InvalidSchema,- AnySchema,- NoneSchema,- BoolSchema,- IntSchema,- FloatSchema,- DecimalSchema,- StringSchema,- BytesSchema,- DateSchema,- TimeSchema,- DatetimeSchema,- TimedeltaSchema,- LiteralSchema,- EnumSchema,- IsInstanceSchema,- IsSubclassSchema,- CallableSchema,- ListSchema,- TupleSchema,- SetSchema,- FrozenSetSchema,- GeneratorSchema,- DictSchema,- AfterValidatorFunctionSchema,- BeforeValidatorFunctionSchema,- WrapValidatorFunctionSchema,- PlainValidatorFunctionSchema,- WithDefaultSchema,- NullableSchema,- UnionSchema,- TaggedUnionSchema,- ChainSchema,- LaxOrStrictSchema,- JsonOrPythonSchema,- TypedDictSchema,- ModelFieldsSchema,- ModelSchema,- DataclassArgsSchema,- DataclassSchema,- ArgumentsSchema,- CallSchema,- CustomErrorSchema,- JsonSchema,- UrlSchema,- MultiHostUrlSchema,- DefinitionsSchema,- DefinitionReferenceSchema,- UuidSchema,- ComplexSchema]
- Returns:
- A - pydantic-core- CoreSchema.
 
 - classmethod __get_pydantic_json_schema__(core_schema, handler, /)[source]
- Hook into generating the model’s JSON schema. - Parameters:
- core_schema ( - Union[- InvalidSchema,- AnySchema,- NoneSchema,- BoolSchema,- IntSchema,- FloatSchema,- DecimalSchema,- StringSchema,- BytesSchema,- DateSchema,- TimeSchema,- DatetimeSchema,- TimedeltaSchema,- LiteralSchema,- EnumSchema,- IsInstanceSchema,- IsSubclassSchema,- CallableSchema,- ListSchema,- TupleSchema,- SetSchema,- FrozenSetSchema,- GeneratorSchema,- DictSchema,- AfterValidatorFunctionSchema,- BeforeValidatorFunctionSchema,- WrapValidatorFunctionSchema,- PlainValidatorFunctionSchema,- WithDefaultSchema,- NullableSchema,- UnionSchema,- TaggedUnionSchema,- ChainSchema,- LaxOrStrictSchema,- JsonOrPythonSchema,- TypedDictSchema,- ModelFieldsSchema,- ModelSchema,- DataclassArgsSchema,- DataclassSchema,- ArgumentsSchema,- CallSchema,- CustomErrorSchema,- JsonSchema,- UrlSchema,- MultiHostUrlSchema,- DefinitionsSchema,- DefinitionReferenceSchema,- UuidSchema,- ComplexSchema]) – A- pydantic-coreCoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema (- {'type': 'nullable', 'schema': current_schema}), or just call the handler with the original schema.
- handler ( - GetJsonSchemaHandler) – Call into Pydantic’s internal JSON schema generation. This will raise a- pydantic.errors.PydanticInvalidForJsonSchemaif JSON schema generation fails. Since this gets called by- BaseModel.model_json_schemayou can override the- schema_generatorargument to that function to change JSON schema generation globally for a type.
 
- Return type:
- Returns:
- A JSON schema, as a Python object. 
 
 - __init__(**data)[source]
- 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 allow- selfas a field name.
 - __pretty__(fmt, **kwargs)[source]
- Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects. 
 - __private_attributes__: ClassVar[Dict[str, ModelPrivateAttr]] = {}[source]
- Metadata about the private attributes of the model. 
 - __pydantic_complete__: ClassVar[bool] = True[source]
- Whether model building is completed, or if there are still undefined fields. 
 - __pydantic_computed_fields__: ClassVar[Dict[str, ComputedFieldInfo]] = {}[source]
- A dictionary of computed field names and their corresponding [ - ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
 - __pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.invoice.Invoice'>, 'config': {'title': 'Invoice'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.invoice.Invoice'>>]}, 'ref': 'kittycad.models.invoice.Invoice:94394495679328', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'amount_due': {'metadata': {}, 'schema': {'default': 0.0, 'schema': {'type': 'float'}, 'type': 'default'}, 'type': 'model-field'}, 'amount_paid': {'metadata': {}, 'schema': {'default': 0.0, 'schema': {'type': 'float'}, 'type': 'default'}, 'type': 'model-field'}, 'amount_remaining': {'metadata': {}, 'schema': {'default': 0.0, 'schema': {'type': 'float'}, 'type': 'default'}, 'type': 'model-field'}, 'attempt_count': {'metadata': {}, 'schema': {'default': 0, 'schema': {'type': 'int'}, 'type': 'default'}, 'type': 'model-field'}, 'attempted': {'metadata': {}, 'schema': {'default': False, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}, 'created_at': {'metadata': {}, 'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'model-field'}, 'currency': {'metadata': {}, 'schema': {'default': 'usd', 'schema': {'function': {'function': <class 'kittycad.models.currency.Currency'>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'type': 'default'}, 'type': 'model-field'}, 'customer_email': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'customer_id': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'default_payment_method': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'description': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'discounts': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'items_schema': {'cls': <class 'kittycad.models.discount.Discount'>, 'config': {'title': 'Discount'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.discount.Discount'>>]}, 'ref': 'kittycad.models.discount.Discount:94394494545856', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'coupon': {'metadata': {}, 'schema': {'cls': <class 'kittycad.models.coupon.Coupon'>, 'config': {'title': 'Coupon'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.coupon.Coupon'>>]}, 'ref': 'kittycad.models.coupon.Coupon:94394493666976', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'amount_off': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'float'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'deleted': {'metadata': {}, 'schema': {'default': False, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}, 'id': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'metadata': {'metadata': {}, 'schema': {'default': {}, 'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'str'}}, 'type': 'default'}, 'type': 'model-field'}, 'name': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'percent_off': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'float'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'Coupon', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}}, 'model_name': 'Discount', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'list'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'id': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'lines': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'items_schema': {'cls': <class 'kittycad.models.invoice_line_item.InvoiceLineItem'>, 'config': {'title': 'InvoiceLineItem'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.invoice_line_item.InvoiceLineItem'>>]}, 'ref': 'kittycad.models.invoice_line_item.InvoiceLineItem:94394495745216', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'amount': {'metadata': {}, 'schema': {'default': 0.0, 'schema': {'type': 'float'}, 'type': 'default'}, 'type': 'model-field'}, 'currency': {'metadata': {}, 'schema': {'default': 'usd', 'schema': {'function': {'function': <class 'kittycad.models.currency.Currency'>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'type': 'default'}, 'type': 'model-field'}, 'description': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'id': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'invoice_item': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'metadata': {'metadata': {}, 'schema': {'default': {}, 'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'str'}}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'InvoiceLineItem', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'list'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'metadata': {'metadata': {}, 'schema': {'default': {}, 'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'str'}}, 'type': 'default'}, 'type': 'model-field'}, 'number': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'paid': {'metadata': {}, 'schema': {'default': False, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}, 'pdf': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'receipt_number': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'statement_descriptor': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'status': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'cls': <enum 'InvoiceStatus'>, 'members': [InvoiceStatus.DRAFT, InvoiceStatus.OPEN, InvoiceStatus.PAID, InvoiceStatus.UNCOLLECTIBLE, InvoiceStatus.VOID], 'metadata': {'pydantic_js_functions': [<function GenerateSchema._enum_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.invoice_status.InvoiceStatus:94394495731984', 'sub_type': 'str', 'type': 'enum'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'subtotal': {'metadata': {}, 'schema': {'default': 0.0, 'schema': {'type': 'float'}, 'type': 'default'}, 'type': 'model-field'}, 'tax': {'metadata': {}, 'schema': {'default': 0.0, 'schema': {'type': 'float'}, 'type': 'default'}, 'type': 'model-field'}, 'total': {'metadata': {}, 'schema': {'default': 0.0, 'schema': {'type': 'float'}, 'type': 'default'}, 'type': 'model-field'}, 'url': {'metadata': {}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'Invoice', 'type': 'model-fields'}, 'type': 'model'}[source]
- The core schema of the model. 
 - __pydantic_custom_init__: ClassVar[bool] = False[source]
- Whether the model has a custom - __init__method.
 - __pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
- Metadata containing the decorators defined on the model. This replaces - Model.__validators__and- Model.__root_validators__from Pydantic V1.
 - __pydantic_extra__: dict[str, Any] | None[source]
- A dictionary containing extra values, if [ - extra][pydantic.config.ConfigDict.extra] is set to- 'allow'.
 - __pydantic_fields__: ClassVar[Dict[str, FieldInfo]] = {'amount_due': FieldInfo(annotation=float, required=False, default=0.0), 'amount_paid': FieldInfo(annotation=float, required=False, default=0.0), 'amount_remaining': FieldInfo(annotation=float, required=False, default=0.0), 'attempt_count': FieldInfo(annotation=int, required=False, default=0), 'attempted': FieldInfo(annotation=bool, required=False, default=False), 'created_at': FieldInfo(annotation=datetime, required=True), 'currency': FieldInfo(annotation=Currency, required=False, default='usd'), 'customer_email': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'customer_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'default_payment_method': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'discounts': FieldInfo(annotation=Union[List[Discount], NoneType], required=False, default=None), 'id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'lines': FieldInfo(annotation=Union[List[InvoiceLineItem], NoneType], required=False, default=None), 'metadata': FieldInfo(annotation=Dict[str, str], required=False, default={}), 'number': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'paid': FieldInfo(annotation=bool, required=False, default=False), 'pdf': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'receipt_number': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'statement_descriptor': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'status': FieldInfo(annotation=Union[InvoiceStatus, NoneType], required=False, default=None), 'subtotal': FieldInfo(annotation=float, required=False, default=0.0), 'tax': FieldInfo(annotation=float, required=False, default=0.0), 'total': FieldInfo(annotation=float, required=False, default=0.0), 'url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}[source]
- A dictionary of field names and their corresponding [ - FieldInfo][pydantic.fields.FieldInfo] objects. This replaces- Model.__fields__from Pydantic V1.
 - __pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
- Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these. 
 - classmethod __pydantic_init_subclass__(**kwargs)[source]
- This is intended to behave just like - __init_subclass__, but is called by- ModelMetaclassonly after the class is actually fully initialized. In particular, attributes like- model_fieldswill be present when this is called.- This is necessary because - __init_subclass__will always be called by- type.__new__, and it would require a prohibitively large refactor to the- ModelMetaclassto ensure that- type.__new__was called in such a manner that the class would already be sufficiently initialized.- This will receive the same - kwargsthat would be passed to the standard- __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.
 - __pydantic_parent_namespace__: ClassVar[Dict[str, Any] | None] = None[source]
- Parent namespace of the model, used for automatic rebuilding of models. 
 - __pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
- The name of the post-init method for the model, if defined. 
 - __pydantic_private__: dict[str, Any] | None[source]
- Values of private attributes set on the model instance. 
 - __pydantic_root_model__: ClassVar[bool] = False[source]
- Whether the model is a [ - RootModel][pydantic.root_model.RootModel].
 - __pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model( ModelSerializer { class: Py( 0x000055d9ee623b60, ), serializer: Fields( GeneralFieldsSerializer { fields: { "description": SerField { key_py: Py( 0x00007f1ec21995f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "id": SerField { key_py: Py( 0x00007f1ec28215c0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "customer_email": SerField { key_py: Py( 0x00007f1ebe25bc30, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "number": SerField { key_py: Py( 0x00007f1ec2f04d40, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "lines": SerField { key_py: Py( 0x00007f1ec29116b0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: List( ListSerializer { item_serializer: Model( ModelSerializer { class: Py( 0x000055d9ee633cc0, ), serializer: Fields( GeneralFieldsSerializer { fields: { "currency": SerField { key_py: Py( 0x00007f1ec20818f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec1943180, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, }, "id": SerField { key_py: Py( 0x00007f1ec28215c0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "description": SerField { key_py: Py( 0x00007f1ec21995f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "invoice_item": SerField { key_py: Py( 0x00007f1ebe25ecf0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "metadata": SerField { key_py: Py( 0x00007f1ec2f04590, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ebe258900, ), ), serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Str( StrSerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, str]", }, ), }, ), ), required: true, }, "amount": SerField { key_py: Py( 0x00007f1ec2072ac0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ebf2fb930, ), ), serializer: Float( FloatSerializer { inf_nan_mode: Null, }, ), }, ), ), required: true, }, }, computed_fields: Some( ComputedFields( [], ), ), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None, }, required_fields: 6, }, ), has_extra: false, root_model: false, name: "InvoiceLineItem", }, ), filter: SchemaFilter { include: None, exclude: None, }, name: "list[InvoiceLineItem]", }, ), }, ), }, ), ), required: true, }, "statement_descriptor": SerField { key_py: Py( 0x00007f1ebe25ddf0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "attempted": SerField { key_py: Py( 0x00007f1ebf4794b0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2eb99e0, ), ), serializer: Bool( BoolSerializer, ), }, ), ), required: true, }, "amount_paid": SerField { key_py: Py( 0x00007f1ebe25baf0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ebecf4310, ), ), serializer: Float( FloatSerializer { inf_nan_mode: Null, }, ), }, ), ), required: true, }, "currency": SerField { key_py: Py( 0x00007f1ec20818f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec1943180, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, }, "metadata": SerField { key_py: Py( 0x00007f1ec2f04590, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ebe25e1c0, ), ), serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Str( StrSerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, str]", }, ), }, ), ), required: true, }, "subtotal": SerField { key_py: Py( 0x00007f1ebe25de30, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ebecf4310, ), ), serializer: Float( FloatSerializer { inf_nan_mode: Null, }, ), }, ), ), required: true, }, "default_payment_method": SerField { key_py: Py( 0x00007f1ebe25bcb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "total": SerField { key_py: Py( 0x00007f1ec25de070, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ebecf4310, ), ), serializer: Float( FloatSerializer { inf_nan_mode: Null, }, ), }, ), ), required: true, }, "receipt_number": SerField { key_py: Py( 0x00007f1ebe25dd70, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "discounts": SerField { key_py: Py( 0x00007f1ebe25dd30, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: List( ListSerializer { item_serializer: Model( ModelSerializer { class: Py( 0x000055d9ee50efc0, ), serializer: Fields( GeneralFieldsSerializer { fields: { "coupon": SerField { key_py: Py( 0x00007f1ebf25e7f0, ), alias: None, alias_py: None, serializer: Some( Model( ModelSerializer { class: Py( 0x000055d9ee4386a0, ), serializer: Fields( GeneralFieldsSerializer { fields: { "amount_off": SerField { key_py: Py( 0x00007f1ebe3869f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Float( FloatSerializer { inf_nan_mode: Null, }, ), }, ), }, ), ), required: true, }, "deleted": SerField { key_py: Py( 0x00007f1ebf640fc0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2eb99e0, ), ), serializer: Bool( BoolSerializer, ), }, ), ), required: true, }, "metadata": SerField { key_py: Py( 0x00007f1ec2f04590, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ebe385dc0, ), ), serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Str( StrSerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, str]", }, ), }, ), ), required: true, }, "name": SerField { key_py: Py( 0x00007f1ec2f04968, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "id": SerField { key_py: Py( 0x00007f1ec28215c0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "percent_off": SerField { key_py: Py( 0x00007f1ebe3b3430, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Float( FloatSerializer { inf_nan_mode: Null, }, ), }, ), }, ), ), required: true, }, }, computed_fields: Some( ComputedFields( [], ), ), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None, }, required_fields: 6, }, ), has_extra: false, root_model: false, name: "Coupon", }, ), ), required: true, }, }, computed_fields: Some( ComputedFields( [], ), ), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None, }, required_fields: 1, }, ), has_extra: false, root_model: false, name: "Discount", }, ), filter: SchemaFilter { include: None, exclude: None, }, name: "list[Discount]", }, ), }, ), }, ), ), required: true, }, "url": SerField { key_py: Py( 0x00007f1ec1daa010, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "status": SerField { key_py: Py( 0x00007f1ec2f063a0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Enum( EnumSerializer { class: Py( 0x000055d9ee630910, ), serializer: Some( Str( StrSerializer, ), ), }, ), }, ), }, ), ), required: true, }, "customer_id": SerField { key_py: Py( 0x00007f1ebe25bbf0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "amount_remaining": SerField { key_py: Py( 0x00007f1ebe25bb70, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ebecf4310, ), ), serializer: Float( FloatSerializer { inf_nan_mode: Null, }, ), }, ), ), required: true, }, "paid": SerField { key_py: Py( 0x00007f1ebeb6aeb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2eb99e0, ), ), serializer: Bool( BoolSerializer, ), }, ), ), required: true, }, "created_at": SerField { key_py: Py( 0x00007f1ebe5f9db0, ), alias: None, alias_py: None, serializer: Some( Datetime( DatetimeSerializer, ), ), required: true, }, "amount_due": SerField { key_py: Py( 0x00007f1ebe25bab0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ebecf4310, ), ), serializer: Float( FloatSerializer { inf_nan_mode: Null, }, ), }, ), ), required: true, }, "attempt_count": SerField { key_py: Py( 0x00007f1ebe25bbb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ef8790, ), ), serializer: Int( IntSerializer, ), }, ), ), required: true, }, "pdf": SerField { key_py: Py( 0x00007f1ec0d31170, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ec2ed0400, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, }, "tax": SerField { key_py: Py( 0x00007f1ebeb6b2d0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1ebecf4310, ), ), serializer: Float( FloatSerializer { inf_nan_mode: Null, }, ), }, ), ), required: true, }, }, computed_fields: Some( ComputedFields( [], ), ), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None, }, required_fields: 25, }, ), has_extra: false, root_model: false, name: "Invoice", }, ), definitions=[])[source]
- The - pydantic-core- SchemaSerializerused to dump instances of the model.
 - __pydantic_validator__: ClassVar[SchemaValidator | PluggableSchemaValidator] = SchemaValidator(title="Invoice", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "amount_due", lookup_key: Simple { key: "amount_due", py_key: Py( 0x00007f1ebe268270, ), path: LookupPath( [ S( "amount_due", Py( 0x00007f1ebe2740b0, ), ), ], ), }, name_py: Py( 0x00007f1ebe25bab0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ebecf4310, ), ), on_error: Raise, validator: Float( FloatValidator { strict: false, allow_inf_nan: true, }, ), validate_default: false, copy_default: false, name: "default[float]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "amount_paid", lookup_key: Simple { key: "amount_paid", py_key: Py( 0x00007f1ebe274130, ), path: LookupPath( [ S( "amount_paid", Py( 0x00007f1ebe2740f0, ), ), ], ), }, name_py: Py( 0x00007f1ebe25baf0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ebecf4310, ), ), on_error: Raise, validator: Float( FloatValidator { strict: false, allow_inf_nan: true, }, ), validate_default: false, copy_default: false, name: "default[float]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "amount_remaining", lookup_key: Simple { key: "amount_remaining", py_key: Py( 0x00007f1ebe274170, ), path: LookupPath( [ S( "amount_remaining", Py( 0x00007f1ebe2741b0, ), ), ], ), }, name_py: Py( 0x00007f1ebe25bb70, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ebecf4310, ), ), on_error: Raise, validator: Float( FloatValidator { strict: false, allow_inf_nan: true, }, ), validate_default: false, copy_default: false, name: "default[float]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "attempt_count", lookup_key: Simple { key: "attempt_count", py_key: Py( 0x00007f1ebe2741f0, ), path: LookupPath( [ S( "attempt_count", Py( 0x00007f1ebe274230, ), ), ], ), }, name_py: Py( 0x00007f1ebe25bbb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ef8790, ), ), on_error: Raise, validator: Int( IntValidator { strict: false, }, ), validate_default: false, copy_default: false, name: "default[int]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "attempted", lookup_key: Simple { key: "attempted", py_key: Py( 0x00007f1ebe274270, ), path: LookupPath( [ S( "attempted", Py( 0x00007f1ebe2742b0, ), ), ], ), }, name_py: Py( 0x00007f1ebf4794b0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2eb99e0, ), ), on_error: Raise, validator: Bool( BoolValidator { strict: false, }, ), validate_default: false, copy_default: false, name: "default[bool]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "created_at", lookup_key: Simple { key: "created_at", py_key: Py( 0x00007f1ebe2742f0, ), path: LookupPath( [ S( "created_at", Py( 0x00007f1ebe274330, ), ), ], ), }, name_py: Py( 0x00007f1ebe5f9db0, ), validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, }, ), frozen: false, }, Field { name: "currency", lookup_key: Simple { key: "currency", py_key: Py( 0x00007f1ebe274370, ), path: LookupPath( [ S( "currency", Py( 0x00007f1ebe2743b0, ), ), ], ), }, name_py: Py( 0x00007f1ec20818f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec1943180, ), ), on_error: Raise, validator: FunctionAfter( FunctionAfterValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), func: Py( 0x000055d9ee473750, ), config: Py( 0x00007f1ebe274040, ), name: "function-after[Currency(), str]", field_name: None, info_arg: false, }, ), validate_default: false, copy_default: false, name: "default[function-after[Currency(), str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "customer_email", lookup_key: Simple { key: "customer_email", py_key: Py( 0x00007f1ebe2743f0, ), path: LookupPath( [ S( "customer_email", Py( 0x00007f1ebe274430, ), ), ], ), }, name_py: Py( 0x00007f1ebe25bc30, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "customer_id", lookup_key: Simple { key: "customer_id", py_key: Py( 0x00007f1ebe274470, ), path: LookupPath( [ S( "customer_id", Py( 0x00007f1ebe2744b0, ), ), ], ), }, name_py: Py( 0x00007f1ebe25bbf0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "default_payment_method", lookup_key: Simple { key: "default_payment_method", py_key: Py( 0x00007f1ebe2744f0, ), path: LookupPath( [ S( "default_payment_method", Py( 0x00007f1ebe274530, ), ), ], ), }, name_py: Py( 0x00007f1ebe25bcb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "description", lookup_key: Simple { key: "description", py_key: Py( 0x00007f1ebe274570, ), path: LookupPath( [ S( "description", Py( 0x00007f1ebe2745b0, ), ), ], ), }, name_py: Py( 0x00007f1ec21995f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "discounts", lookup_key: Simple { key: "discounts", py_key: Py( 0x00007f1ebe274770, ), path: LookupPath( [ S( "discounts", Py( 0x00007f1ebe2747b0, ), ), ], ), }, name_py: Py( 0x00007f1ebe25dd30, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: List( ListValidator { strict: false, item_validator: Some( Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "coupon", lookup_key: Simple { key: "coupon", py_key: Py( 0x00007f1ebeb66e80, ), path: LookupPath( [ S( "coupon", Py( 0x00007f1ebeb657d0, ), ), ], ), }, name_py: Py( 0x00007f1ebf25e7f0, ), validator: Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "amount_off", lookup_key: Simple { key: "amount_off", py_key: Py( 0x00007f1ebe2745f0, ), path: LookupPath( [ S( "amount_off", Py( 0x00007f1ebe274630, ), ), ], ), }, name_py: Py( 0x00007f1ebe3869f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Float( FloatValidator { strict: false, allow_inf_nan: true, }, ), name: "nullable[float]", }, ), validate_default: false, copy_default: false, name: "default[nullable[float]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "deleted", lookup_key: Simple { key: "deleted", py_key: Py( 0x00007f1ebeb66fa0, ), path: LookupPath( [ S( "deleted", Py( 0x00007f1ebeb66fd0, ), ), ], ), }, name_py: Py( 0x00007f1ebf640fc0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2eb99e0, ), ), on_error: Raise, validator: Bool( BoolValidator { strict: false, }, ), validate_default: false, copy_default: false, name: "default[bool]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "id", lookup_key: Simple { key: "id", py_key: Py( 0x00007f1ebeb67000, ), path: LookupPath( [ S( "id", Py( 0x00007f1ebeb657a0, ), ), ], ), }, name_py: Py( 0x00007f1ec28215c0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "metadata", lookup_key: Simple { key: "metadata", py_key: Py( 0x00007f1ebe274670, ), path: LookupPath( [ S( "metadata", Py( 0x00007f1ebe2746b0, ), ), ], ), }, name_py: Py( 0x00007f1ec2f04590, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ebe385dc0, ), ), on_error: Raise, validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), min_length: None, max_length: None, name: "dict[str,str]", }, ), validate_default: false, copy_default: true, name: "default[dict[str,str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "name", lookup_key: Simple { key: "name", py_key: Py( 0x00007f1ebeb65440, ), path: LookupPath( [ S( "name", Py( 0x00007f1ebeb66e50, ), ), ], ), }, name_py: Py( 0x00007f1ec2f04968, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "percent_off", lookup_key: Simple { key: "percent_off", py_key: Py( 0x00007f1ebe2746f0, ), path: LookupPath( [ S( "percent_off", Py( 0x00007f1ebe274730, ), ), ], ), }, name_py: Py( 0x00007f1ebe3b3430, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Float( FloatValidator { strict: false, allow_inf_nan: true, }, ), name: "nullable[float]", }, ), validate_default: false, copy_default: false, name: "default[nullable[float]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, ], model_name: "Coupon", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true, }, ), class: Py( 0x000055d9ee4386a0, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x00007f1ec0cae3d0, ), name: "Coupon", }, ), frozen: false, }, ], model_name: "Discount", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true, }, ), class: Py( 0x000055d9ee50efc0, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x00007f1ec0cae3d0, ), name: "Discount", }, ), ), min_length: None, max_length: None, name: OnceLock( "list[Discount]", ), fail_fast: false, }, ), name: "nullable[list[Discount]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[list[Discount]]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "id", lookup_key: Simple { key: "id", py_key: Py( 0x00007f1ebeb658f0, ), path: LookupPath( [ S( "id", Py( 0x00007f1ebeb65b90, ), ), ], ), }, name_py: Py( 0x00007f1ec28215c0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "lines", lookup_key: Simple { key: "lines", py_key: Py( 0x00007f1ebeb67300, ), path: LookupPath( [ S( "lines", Py( 0x00007f1ebeb659b0, ), ), ], ), }, name_py: Py( 0x00007f1ec29116b0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: List( ListValidator { strict: false, item_validator: Some( Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "amount", lookup_key: Simple { key: "amount", py_key: Py( 0x00007f1ebeb65e90, ), path: LookupPath( [ S( "amount", Py( 0x00007f1ebeb66ac0, ), ), ], ), }, name_py: Py( 0x00007f1ec2072ac0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ebf2fb930, ), ), on_error: Raise, validator: Float( FloatValidator { strict: false, allow_inf_nan: true, }, ), validate_default: false, copy_default: false, name: "default[float]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "currency", lookup_key: Simple { key: "currency", py_key: Py( 0x00007f1ebe2747f0, ), path: LookupPath( [ S( "currency", Py( 0x00007f1ebe274830, ), ), ], ), }, name_py: Py( 0x00007f1ec20818f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec1943180, ), ), on_error: Raise, validator: FunctionAfter( FunctionAfterValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), func: Py( 0x000055d9ee473750, ), config: Py( 0x00007f1ebe26b200, ), name: "function-after[Currency(), str]", field_name: None, info_arg: false, }, ), validate_default: false, copy_default: false, name: "default[function-after[Currency(), str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "description", lookup_key: Simple { key: "description", py_key: Py( 0x00007f1ebe274870, ), path: LookupPath( [ S( "description", Py( 0x00007f1ebe2748b0, ), ), ], ), }, name_py: Py( 0x00007f1ec21995f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "id", lookup_key: Simple { key: "id", py_key: Py( 0x00007f1ebeb65d70, ), path: LookupPath( [ S( "id", Py( 0x00007f1ebeb65e60, ), ), ], ), }, name_py: Py( 0x00007f1ec28215c0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "invoice_item", lookup_key: Simple { key: "invoice_item", py_key: Py( 0x00007f1ebe2748f0, ), path: LookupPath( [ S( "invoice_item", Py( 0x00007f1ebe274930, ), ), ], ), }, name_py: Py( 0x00007f1ebe25ecf0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "metadata", lookup_key: Simple { key: "metadata", py_key: Py( 0x00007f1ebe274970, ), path: LookupPath( [ S( "metadata", Py( 0x00007f1ebe2749b0, ), ), ], ), }, name_py: Py( 0x00007f1ec2f04590, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ebe258900, ), ), on_error: Raise, validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), min_length: None, max_length: None, name: "dict[str,str]", }, ), validate_default: false, copy_default: true, name: "default[dict[str,str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, ], model_name: "InvoiceLineItem", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true, }, ), class: Py( 0x000055d9ee633cc0, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x00007f1ec0cae3d0, ), name: "InvoiceLineItem", }, ), ), min_length: None, max_length: None, name: OnceLock( "list[InvoiceLineItem]", ), fail_fast: false, }, ), name: "nullable[list[InvoiceLineItem]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[list[InvoiceLineItem]]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "metadata", lookup_key: Simple { key: "metadata", py_key: Py( 0x00007f1ebe2749f0, ), path: LookupPath( [ S( "metadata", Py( 0x00007f1ebe274a30, ), ), ], ), }, name_py: Py( 0x00007f1ec2f04590, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ebe25e1c0, ), ), on_error: Raise, validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), min_length: None, max_length: None, name: "dict[str,str]", }, ), validate_default: false, copy_default: true, name: "default[dict[str,str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "number", lookup_key: Simple { key: "number", py_key: Py( 0x00007f1ebeb64f90, ), path: LookupPath( [ S( "number", Py( 0x00007f1ebeb672a0, ), ), ], ), }, name_py: Py( 0x00007f1ec2f04d40, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "paid", lookup_key: Simple { key: "paid", py_key: Py( 0x00007f1ebeb64990, ), path: LookupPath( [ S( "paid", Py( 0x00007f1ebec015c0, ), ), ], ), }, name_py: Py( 0x00007f1ebeb6aeb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2eb99e0, ), ), on_error: Raise, validator: Bool( BoolValidator { strict: false, }, ), validate_default: false, copy_default: false, name: "default[bool]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "pdf", lookup_key: Simple { key: "pdf", py_key: Py( 0x00007f1ebec00ed0, ), path: LookupPath( [ S( "pdf", Py( 0x00007f1ebec025e0, ), ), ], ), }, name_py: Py( 0x00007f1ec0d31170, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "receipt_number", lookup_key: Simple { key: "receipt_number", py_key: Py( 0x00007f1ebe274a70, ), path: LookupPath( [ S( "receipt_number", Py( 0x00007f1ebe274ab0, ), ), ], ), }, name_py: Py( 0x00007f1ebe25dd70, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "statement_descriptor", lookup_key: Simple { key: "statement_descriptor", py_key: Py( 0x00007f1ebe274af0, ), path: LookupPath( [ S( "statement_descriptor", Py( 0x00007f1ebe274b30, ), ), ], ), }, name_py: Py( 0x00007f1ebe25ddf0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "status", lookup_key: Simple { key: "status", py_key: Py( 0x00007f1ebec02610, ), path: LookupPath( [ S( "status", Py( 0x00007f1ebec02130, ), ), ], ), }, name_py: Py( 0x00007f1ec2f063a0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: StrEnum( EnumValidator { phantom: PhantomData<_pydantic_core::validators::enum_::StrEnumValidator>, class: Py( 0x000055d9ee630910, ), lookup: LiteralLookup { expected_bool: None, expected_int: None, expected_str: Some( { "draft": 0, "paid": 2, "void": 4, "uncollectible": 3, "open": 1, }, ), expected_py_dict: None, expected_py_values: None, expected_py_primitives: Some( Py( 0x00007f1ebe274bc0, ), ), values: [ Py( 0x00007f1ebe43f3b0, ), Py( 0x00007f1ebe43f4d0, ), Py( 0x00007f1ebe43f590, ), Py( 0x00007f1ebe43f5f0, ), Py( 0x00007f1ebe43f650, ), ], }, missing: None, expected_repr: "'draft', 'open', 'paid', 'uncollectible' or 'void'", strict: false, class_repr: "InvoiceStatus", name: "str-enum[InvoiceStatus]", }, ), name: "nullable[str-enum[InvoiceStatus]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str-enum[InvoiceStatus]]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "subtotal", lookup_key: Simple { key: "subtotal", py_key: Py( 0x00007f1ebe274bf0, ), path: LookupPath( [ S( "subtotal", Py( 0x00007f1ebe274c30, ), ), ], ), }, name_py: Py( 0x00007f1ebe25de30, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ebecf4310, ), ), on_error: Raise, validator: Float( FloatValidator { strict: false, allow_inf_nan: true, }, ), validate_default: false, copy_default: false, name: "default[float]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "tax", lookup_key: Simple { key: "tax", py_key: Py( 0x00007f1ebec026d0, ), path: LookupPath( [ S( "tax", Py( 0x00007f1ebec02f10, ), ), ], ), }, name_py: Py( 0x00007f1ebeb6b2d0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ebecf4310, ), ), on_error: Raise, validator: Float( FloatValidator { strict: false, allow_inf_nan: true, }, ), validate_default: false, copy_default: false, name: "default[float]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "total", lookup_key: Simple { key: "total", py_key: Py( 0x00007f1ebec00e40, ), path: LookupPath( [ S( "total", Py( 0x00007f1ebec024c0, ), ), ], ), }, name_py: Py( 0x00007f1ec25de070, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ebecf4310, ), ), on_error: Raise, validator: Float( FloatValidator { strict: false, allow_inf_nan: true, }, ), validate_default: false, copy_default: false, name: "default[float]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, Field { name: "url", lookup_key: Simple { key: "url", py_key: Py( 0x00007f1ebed24f30, ), path: LookupPath( [ S( "url", Py( 0x00007f1ebed248a0, ), ), ], ), }, name_py: Py( 0x00007f1ec1daa010, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1ec2ed0400, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x00007f1ec0cae3d0, ), }, ), frozen: false, }, ], model_name: "Invoice", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true, }, ), class: Py( 0x000055d9ee623b60, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x00007f1ec0cae3d0, ), name: "Invoice", }, ), definitions=[], cache_strings=True)[source]
- The - pydantic-core- SchemaValidatorused to validate instances of the model.
 - __repr_recursion__(object)[source]
- Returns the string representation of a recursive object. - Return type:
 
 - __rich_repr__()[source]
- Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects. 
 - __signature__: ClassVar[Signature] = <Signature (*, amount_due: float = 0.0, amount_paid: float = 0.0, amount_remaining: float = 0.0, attempt_count: int = 0, attempted: bool = False, created_at: datetime.datetime, currency: kittycad.models.currency.Currency = 'usd', customer_email: Optional[str] = None, customer_id: Optional[str] = None, default_payment_method: Optional[str] = None, description: Optional[str] = None, discounts: Optional[List[kittycad.models.discount.Discount]] = None, id: Optional[str] = None, lines: Optional[List[kittycad.models.invoice_line_item.InvoiceLineItem]] = None, metadata: Dict[str, str] = {}, number: Optional[str] = None, paid: bool = False, pdf: Optional[str] = None, receipt_number: Optional[str] = None, statement_descriptor: Optional[str] = None, status: Optional[kittycad.models.invoice_status.InvoiceStatus] = None, subtotal: float = 0.0, tax: float = 0.0, total: float = 0.0, url: Optional[str] = None) -> None>[source]
- The synthesized - __init__[- Signature][inspect.Signature] of the model.
 - __slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
 - copy(*, include=None, exclude=None, update=None, deep=False)[source]
- Returns a copy of the model. - !!! warning “Deprecated”
- This method is now deprecated; use - model_copyinstead.
 - If you need - includeor- exclude, use:- `python {test="skip" lint="skip"} data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `- Parameters:
- include – Optional set or mapping specifying which fields to include in the copied model. 
- exclude – Optional set or mapping specifying which fields to exclude in the copied model. 
- update – Optional dictionary of field-value pairs to override field values in the copied model. 
- deep – If True, the values of fields that are Pydantic models will be deep-copied. 
 
- Returns:
- A copy of the model with included, excluded and updated fields as specified. 
 
 - dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
 - json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
- Return type:
 
 - 
lines: Optional[List[InvoiceLineItem]][source]
 - model_config: ClassVar[ConfigDict] = {'protected_namespaces': ()}[source]
- Configuration for the model, should be a dictionary conforming to [ - ConfigDict][pydantic.config.ConfigDict].
 - classmethod model_construct(_fields_set=None, **values)[source]
- Creates a new instance of the - Modelclass with validated data.- Creates a new model setting - __dict__and- __pydantic_fields_set__from trusted or pre-validated data. Default values are respected, but no other validation is performed.- !!! note
- model_construct()generally respects the- model_config.extrasetting on the provided model. That is, if- model_config.extra == 'allow', then all extra passed values are added to the model instance’s- __dict__and- __pydantic_extra__fields. If- model_config.extra == 'ignore'(the default), then all extra passed values are ignored. Because no validation is performed with a call to- model_construct(), having- model_config.extra == 'forbid'does not result in an error if extra values are passed, but they will be ignored.
 - Parameters:
- _fields_set ( - set[- str] |- None) – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [- model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the- valuesargument will be used.
- values ( - Any) – Trusted or pre-validated data dictionary.
 
- Return type:
- Self
- Returns:
- A new instance of the - Modelclass with validated data.
 
 - model_copy(*, update=None, deep=False)[source]
- Usage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#model_copy - Returns a copy of the model. 
 - model_dump(*, mode='python', include=None, exclude=None, context=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True, serialize_as_any=False)[source]
- Usage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#modelmodel_dump - Generate a dictionary representation of the model, optionally specifying which fields to include or exclude. - Parameters:
- mode ( - Union[- Literal[- 'json',- 'python'],- str]) – The mode in which- to_pythonshould run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
- include ( - Union[- Set[- int],- Set[- str],- Mapping[- int,- Union[- Set[- int],- Set[- str],- Mapping[- int,- Union[IncEx,- bool]],- Mapping[- str,- Union[IncEx,- bool]],- bool]],- Mapping[- str,- Union[- Set[- int],- Set[- str],- Mapping[- int,- Union[IncEx,- bool]],- Mapping[- str,- Union[IncEx,- bool]],- bool]],- None]) – A set of fields to include in the output.
- exclude ( - Union[- Set[- int],- Set[- str],- Mapping[- int,- Union[- Set[- int],- Set[- str],- Mapping[- int,- Union[IncEx,- bool]],- Mapping[- str,- Union[IncEx,- bool]],- bool]],- Mapping[- str,- Union[- Set[- int],- Set[- str],- Mapping[- int,- Union[IncEx,- bool]],- Mapping[- str,- Union[IncEx,- bool]],- bool]],- None]) – A set of fields to exclude from the output.
- context ( - Any|- None) – Additional context to pass to the serializer.
- by_alias ( - bool) – Whether to use the field’s alias in the dictionary key if defined.
- exclude_unset ( - bool) – Whether to exclude fields that have not been explicitly set.
- exclude_defaults ( - bool) – Whether to exclude fields that are set to their default value.
- exclude_none ( - bool) – Whether to exclude fields that have a value of- None.
- round_trip ( - bool) – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
- warnings ( - Union[- bool,- Literal[- 'none',- 'warn',- 'error']]) – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [- PydanticSerializationError][pydantic_core.PydanticSerializationError].
- serialize_as_any ( - bool) – Whether to serialize fields with duck-typing serialization behavior.
 
- Return type:
- Returns:
- A dictionary representation of the model. 
 
 - model_dump_json(*, indent=None, include=None, exclude=None, context=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True, serialize_as_any=False)[source]
- Usage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#modelmodel_dump_json - Generates a JSON representation of the model using Pydantic’s - to_jsonmethod.- Parameters:
- indent ( - int|- None) – Indentation to use in the JSON output. If None is passed, the output will be compact.
- include ( - Union[- Set[- int],- Set[- str],- Mapping[- int,- Union[- Set[- int],- Set[- str],- Mapping[- int,- Union[IncEx,- bool]],- Mapping[- str,- Union[IncEx,- bool]],- bool]],- Mapping[- str,- Union[- Set[- int],- Set[- str],- Mapping[- int,- Union[IncEx,- bool]],- Mapping[- str,- Union[IncEx,- bool]],- bool]],- None]) – Field(s) to include in the JSON output.
- exclude ( - Union[- Set[- int],- Set[- str],- Mapping[- int,- Union[- Set[- int],- Set[- str],- Mapping[- int,- Union[IncEx,- bool]],- Mapping[- str,- Union[IncEx,- bool]],- bool]],- Mapping[- str,- Union[- Set[- int],- Set[- str],- Mapping[- int,- Union[IncEx,- bool]],- Mapping[- str,- Union[IncEx,- bool]],- bool]],- None]) – Field(s) to exclude from the JSON output.
- context ( - Any|- None) – Additional context to pass to the serializer.
- by_alias ( - bool) – Whether to serialize using field aliases.
- exclude_unset ( - bool) – Whether to exclude fields that have not been explicitly set.
- exclude_defaults ( - bool) – Whether to exclude fields that are set to their default value.
- exclude_none ( - bool) – Whether to exclude fields that have a value of- None.
- round_trip ( - bool) – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
- warnings ( - Union[- bool,- Literal[- 'none',- 'warn',- 'error']]) – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [- PydanticSerializationError][pydantic_core.PydanticSerializationError].
- serialize_as_any ( - bool) – Whether to serialize fields with duck-typing serialization behavior.
 
- Return type:
- Returns:
- A JSON string representation of the model. 
 
 - property model_extra: dict[str, Any] | None[source]
- Get extra fields set during validation. - Returns:
- A dictionary of extra fields, or - Noneif- config.extrais not set to- "allow".
 
 - model_fields: ClassVar[dict[str, FieldInfo]] = {'amount_due': FieldInfo(annotation=float, required=False, default=0.0), 'amount_paid': FieldInfo(annotation=float, required=False, default=0.0), 'amount_remaining': FieldInfo(annotation=float, required=False, default=0.0), 'attempt_count': FieldInfo(annotation=int, required=False, default=0), 'attempted': FieldInfo(annotation=bool, required=False, default=False), 'created_at': FieldInfo(annotation=datetime, required=True), 'currency': FieldInfo(annotation=Currency, required=False, default='usd'), 'customer_email': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'customer_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'default_payment_method': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'discounts': FieldInfo(annotation=Union[List[Discount], NoneType], required=False, default=None), 'id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'lines': FieldInfo(annotation=Union[List[InvoiceLineItem], NoneType], required=False, default=None), 'metadata': FieldInfo(annotation=Dict[str, str], required=False, default={}), 'number': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'paid': FieldInfo(annotation=bool, required=False, default=False), 'pdf': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'receipt_number': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'statement_descriptor': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'status': FieldInfo(annotation=Union[InvoiceStatus, NoneType], required=False, default=None), 'subtotal': FieldInfo(annotation=float, required=False, default=0.0), 'tax': FieldInfo(annotation=float, required=False, default=0.0), 'total': FieldInfo(annotation=float, required=False, default=0.0), 'url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}[source]
 - property model_fields_set: set[str][source]
- Returns the set of fields that have been explicitly set on this model instance. - Returns:
- A set of strings representing the fields that have been set,
- i.e. that were not filled from defaults. 
 
 
 - classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]
- Generates a JSON schema for a model class. - Parameters:
- by_alias ( - bool) – Whether to use attribute aliases or not.
- ref_template ( - str) – The reference template.
- schema_generator ( - type[- GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of- GenerateJsonSchemawith your desired modifications
- mode ( - Literal[- 'validation',- 'serialization']) – The mode in which to generate the schema.
 
- Return type:
- Returns:
- The JSON schema for the given model class. 
 
 - classmethod model_parametrized_name(params)[source]
- Compute the class name for parametrizations of generic classes. - This method can be overridden to achieve a custom naming scheme for generic BaseModels. - Parameters:
- params ( - tuple[- type[- Any],- ...]) – Tuple of types of the class. Given a generic class- Modelwith 2 type variables and a concrete model- Model[str, int], the value- (str, int)would be passed to- params.
- Return type:
- Returns:
- String representing the new class where - paramsare passed to- clsas type variables.
- Raises:
- TypeError – Raised when trying to generate concrete names for non-generic models. 
 
 - model_post_init(_BaseModel__context)[source]
- Override this method to perform additional initialization after - __init__and- model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.- Return type:
 
 - classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]
- Try to rebuild the pydantic-core schema for the model. - This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails. - Parameters:
- force ( - bool) – Whether to force the rebuilding of the model schema, defaults to- False.
- raise_errors ( - bool) – Whether to raise errors, defaults to- True.
- _parent_namespace_depth ( - int) – The depth level of the parent namespace, defaults to 2.
- _types_namespace ( - Optional[- Mapping[- str,- Any]]) – The types namespace, defaults to- None.
 
- Return type:
- Returns:
- Returns - Noneif the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns- Trueif rebuilding was successful, otherwise- False.
 
 - classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]
- Validate a pydantic model instance. - Parameters:
- Raises:
- ValidationError – If the object could not be validated. 
- Return type:
- Self
- Returns:
- The validated model instance. 
 
 - classmethod model_validate_json(json_data, *, strict=None, context=None)[source]
- Usage docs: https://docs.pydantic.dev/2.10/concepts/json/#json-parsing - Validate the given JSON data against the Pydantic model. - Parameters:
- Return type:
- Self
- Returns:
- The validated Pydantic model. 
- Raises:
- ValidationError – If - json_datais not a JSON string or the object could not be validated.
 
 - classmethod model_validate_strings(obj, *, strict=None, context=None)[source]
- Validate the given object with string data against the Pydantic model. 
 - classmethod parse_file(path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
- Return type:
- Self
 
 - classmethod parse_raw(b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
- Return type:
- Self
 
 - classmethod schema_json(*, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
- Return type:
 
 - 
status: Optional[InvoiceStatus][source]