svthalia/concrexit

View on GitHub
website/payments/api/v2/admin/serializers/payable_create.py

Summary

Maintainability
A
0 mins
Test Coverage
from rest_framework.fields import ChoiceField
from rest_framework.serializers import Serializer

from payments.models import Payment


class PayableCreateAdminSerializer(Serializer):
    """Serializer to create a payment from a payable."""

    payment_type = ChoiceField(choices=[Payment.CASH, Payment.CARD, Payment.WIRE])