Swiftgram/submodules/TelegramUI/TelegramUI/NSString+Stripe_CardBrands.m
Peter b317aab568 Add 'submodules/TelegramUI/' from commit 'fa3ac0b61a27c8dd3296518a15891a6f9750cbf2'
git-subtree-dir: submodules/TelegramUI
git-subtree-mainline: 5c1613d1048026b9e00a6ce753775cef87eb53fa
git-subtree-split: fa3ac0b61a27c8dd3296518a15891a6f9750cbf2
2019-06-11 19:00:46 +01:00

28 lines
768 B
Objective-C
Executable File

//
// NSString+Stripe_CardBrands.m
// Stripe
//
// Created by Jack Flintermann on 1/15/16.
// Copyright © 2016 Stripe, Inc. All rights reserved.
//
#import "NSString+Stripe_CardBrands.h"
@implementation NSString (Stripe_CardBrands)
+ (nonnull instancetype)stp_stringWithCardBrand:(STPCardBrand)brand {
switch (brand) {
case STPCardBrandAmex: return @"American Express";
case STPCardBrandDinersClub: return @"Diners Club";
case STPCardBrandDiscover: return @"Discover";
case STPCardBrandJCB: return @"JCB";
case STPCardBrandMasterCard: return @"MasterCard";
case STPCardBrandUnknown: return @"Unknown";
case STPCardBrandVisa: return @"Visa";
}
}
@end
void linkNSStringCardBrandsCategory(void){}