class CardInputWidget extends LinearLayout {

    @Nullable
    public Card getCard() {
        String cardNumber = mCardNumberEditText.getCardNumber();
        int[] cardDate = mExpiryDateEditText.getValidDateFields();
        if (cardNumber == null || cardDate == null || cardDate.length != 2) {
            return null;
        }

        // CVC/CVV is the only field not validated by the entry control itself, so we check here.
        int requiredLength = mIsAmEx ? Card.CVC_LENGTH_AMERICAN_EXPRESS : Card.CVC_LENGTH_COMMON;
        String cvcValue = mCvcNumberEditText.getText().toString();
        if (StripeTextUtils.isBlank(cvcValue) || cvcValue.length() != requiredLength) {
            return null;
        }

        return new Card(cardNumber, cardDate[0], cardDate[1], cvcValue)
                .addLoggingToken(LOGGING_TOKEN);
    }

    public  CardInputWidget(Context context);
    public  CardInputWidget(Context context, AttributeSet attrs);
    public  CardInputWidget(Context context, AttributeSet attrs, int defStyleAttr);

}