mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
38 lines
1.0 KiB
Objective-C
Executable File
38 lines
1.0 KiB
Objective-C
Executable File
//
|
|
// STPPaymentCardTextFieldViewModel.h
|
|
// Stripe
|
|
//
|
|
// Created by Jack Flintermann on 7/21/15.
|
|
// Copyright (c) 2015 Stripe, Inc. All rights reserved.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import <UIKit/UIKit.h>
|
|
|
|
#import "STPCard.h"
|
|
#import "STPCardValidator.h"
|
|
|
|
typedef NS_ENUM(NSInteger, STPCardFieldType) {
|
|
STPCardFieldTypeNumber,
|
|
STPCardFieldTypeExpiration,
|
|
STPCardFieldTypeCVC,
|
|
};
|
|
|
|
@interface STPPaymentCardTextFieldViewModel : NSObject
|
|
|
|
@property(nonatomic, readwrite, copy, nullable)NSString *cardNumber;
|
|
@property(nonatomic, readwrite, copy, nullable)NSString *rawExpiration;
|
|
@property(nonatomic, readonly, nullable)NSString *expirationMonth;
|
|
@property(nonatomic, readonly, nullable)NSString *expirationYear;
|
|
@property(nonatomic, readwrite, copy, nullable)NSString *cvc;
|
|
@property(nonatomic, readonly) STPCardBrand brand;
|
|
|
|
- (nonnull NSString *)defaultPlaceholder;
|
|
- (nullable NSString *)numberWithoutLastDigits;
|
|
|
|
- (BOOL)isValid;
|
|
|
|
- (STPCardValidationState)validationStateForField:(STPCardFieldType)fieldType;
|
|
|
|
@end
|