"""ReferencePaymentEntity marshmallow schema.""" from abacus_common_logic.marshalling.custom_fields import ma from marshmallow import fields class ReferencePaymentEntitySchema(ma.Schema): """ReferencePaymentEntity schema.""" reference_payment_entity_id = ma.IntegerId(required=True) payment_entity_name = ma.NonemptyString(required=True) country_of_tax_reporting = ma.NonemptyString(required=True) class ReferencePaymentEntityDataloaderSchema(ma.Schema): """Schema wrapping one payment entity (or none) per requested id.""" data = fields.Nested(ReferencePaymentEntitySchema, allow_none=True)