<commit_before>from apps.bluebottle_drf2.serializers import PolymorphicSerializer
from rest_framework import serializers
from .models import DocDataPaymentOrder, DocDataWebDirectDirectDebit


class DocDataOrderProfileSerializer(serializers.ModelSerializer):
    # TODO Generate country list from docdata api and use ChoiceField.
    country = serializers.CharField(required=True)

    class Meta:
        model = DocDataPaymentOrder
        fields = ('id', 'first_name', 'last_name', 'email', 'street', 'city', 'postal_code', 'country')


class DocDataWebDirectDirectDebitSerializer(serializers.ModelSerializer):
    class Meta:
        model = DocDataWebDirectDirectDebit
        fields = ('id', 'bank_account_number', 'bank_account_name', 'bank_account_city')


class DocDataPaymentMethodSerializer(PolymorphicSerializer):
    class Meta:
        child_models = (
            (DocDataWebDirectDirectDebit, DocDataWebDirectDirectDebitSerializer),
        )<commit_msg>Remove unused DocDataPaymentMethodSerializer.<commit_after>from rest_framework import serializers
from .models import DocDataPaymentOrder, DocDataWebDirectDirectDebit


class DocDataOrderProfileSerializer(serializers.ModelSerializer):
    # TODO Generate country list from docdata api and use ChoiceField.
    country = serializers.CharField(required=True)

    class Meta:
        model = DocDataPaymentOrder
        fields = ('id', 'first_name', 'last_name', 'email', 'street', 'city', 'postal_code', 'country')


class DocDataWebDirectDirectDebitSerializer(serializers.ModelSerializer):
    class Meta:
        model = DocDataWebDirectDirectDebit
        fields = ('id', 'bank_account_number', 'bank_account_name', 'bank_account_city')
{'fraction_non_alphanumeric': 0.08318687756297598, 'fraction_numerical': 0.0005858230814294083, 'mean_word_length': 5.233576642335766, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1987159', 'n_tokens_mistral': 469, 'n_tokens_neox': 448, 'n_words': 107}