MBTopUpParser
@interface MBTopUpParser : MBParser <NSCopying>
MBTopUpParser is used for parsing Top Up numbers
-
Undocumented
Declaration
Objective-C
MB_INIT
Swift
init()
-
Top Up parser result
Declaration
Objective-C
@property (readonly, strong, nonatomic) MBTopUpParserResult *_Nonnull result;
Swift
var result: MBTopUpParserResult { get }
-
Indicates whether USSD codes without prefix are allowed.
Default: NO
Declaration
Objective-C
@property (assign, readwrite, nonatomic) BOOL allowNoPrefix;
Swift
var allowNoPrefix: Bool { get set }
-
Indicates whether digts prefix and # at the end of scanned USSD code will be returned.
Default: NO
Declaration
Objective-C
@property (assign, readwrite, nonatomic) BOOL returnCodeWithoutPrefix;
Swift
var returnCodeWithoutPrefix: Bool { get set }
-
Sets the top up prefix and USSD code length based on the given MBTopUpPreset. Only top ups with the chosen prefix and USSD code length in form will be parsed. If top up prefix and USSD code length is not set, top ups with any prefix and USSD code length can be parsed.
Declaration
Objective-C
- (void)setTopUpPreset:(MBTopUpPreset)topUpPreset;
Swift
func setTopUpPreset(_ topUpPreset: MBTopUpPreset)
Parameters
topUpPreset
that determines top up prefix and USSD code length that will be set.
-
Sets the given top up prefix and USSD code length. Only top ups with the chosen prefix and USSD code length in form {@code
#} will be parsed. If top up prefix and USSD code length is not set, top ups with any prefix and USSD code length can be parsed. Declaration
Objective-C
- (void)setPrefix:(nonnull NSString *)prefix andUssdCodeLength:(NSInteger)ussdCodeLength;
Swift
func setPrefix(_ prefix: String, andUssdCodeLength ussdCodeLength: Int)