def receipt_card(card: ReceiptCard) -> Attachment:
        """
        Returns an attachment for a receipt card. Will raise a TypeError if 'card' argument is not a ReceiptCard.
        :param card:
        :return:
        """
        if not isinstance(card, ReceiptCard):
            raise TypeError('CardFactory.receipt_card(): `card` argument is not an instance of an ReceiptCard, '
                            'unable to prepare attachment.')

        return Attachment(content_type=CardFactory.content_types.receipt_card,
                          content=card)
def receipt_card(card: ReceiptCard) -> Attachment:
        """
        Returns an attachment for a receipt card. Will raise a TypeError if 'card' argument is not a ReceiptCard.
        :param card:
        :return:
        """
        if not isinstance(card, ReceiptCard):
            raise TypeError('CardFactory.receipt_card(): `card` argument is not an instance of an ReceiptCard, '
                            'unable to prepare attachment.')

        return Attachment(content_type=CardFactory.content_types.receipt_card,
                          content=card)
def receipt_card ( card : ReceiptCard ) -> Attachment : if not isinstance ( card , ReceiptCard ) : raise TypeError ( 'CardFactory.receipt_card(): `card` argument is not an instance of an ReceiptCard, ' 'unable to prepare attachment.' ) return Attachment ( content_type = CardFactory . content_types . receipt_card , content = card )
Returns an attachment for a receipt card. Will raise a TypeError if 'card' argument is not a ReceiptCard.
        :param card:
        :return:
Returns an attachment for a receipt card . Will raise a TypeError if card argument is not a ReceiptCard . : param card : : return :