STPFile
@interface STPFile : NSObject <STPAPIResponseDecodable>
Representation of a file upload object in the Stripe API.
-
The token for this file.
Declaration
Objective-C
@property (readonly, nonatomic) NSString *_Nonnull fileId;
Swift
var fileId: String { get }
-
The date this file was created.
Declaration
Objective-C
@property (readonly, nonatomic) NSDate *_Nonnull created;
Swift
var created: Date { get }
-
The purpose of this file. This can be either an identifing document or an evidence dispute.
Declaration
Objective-C
@property (readonly, nonatomic) STPFilePurpose purpose;
Swift
var purpose: STPFilePurpose { get }
-
The file size in bytes.
Declaration
Objective-C
@property (readonly, nonatomic) NSNumber *_Nonnull size;
Swift
var size: NSNumber { get }
-
The file type. This can be “jpg”, “png”, or “pdf”.
Declaration
Objective-C
@property (readonly, nonatomic) NSString *_Nonnull type;
Swift
var type: String { get }
-
Returns the string value for a purpose.
Declaration
Objective-C
+ (nullable NSString *)stringFromPurpose:(STPFilePurpose)purpose;
Swift
class func string(from purpose: STPFilePurpose) -> String?