MBITopUpParser


@interface MBITopUpParser : MBIParser <NSCopying>

MBITopUpParser is used for parsing Top Up numbers

  • Undocumented

    Declaration

    Objective-C

    MB_INIT

    Swift

    init()
  • Top Up parser result

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) MBITopUpParserResult *_Nonnull result;

    Swift

    var result: MBITopUpParserResult { get }
  • Indicates whether USSD codes without prefix are allowed.

    Default: NO

    Declaration

    Objective-C

    @property (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 (nonatomic) BOOL returnCodeWithoutPrefix;

    Swift

    var returnCodeWithoutPrefix: Bool { get set }
  • Sets the top up prefix and USSD code length based on the given MBITopUpPreset. 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:(MBITopUpPreset)topUpPreset;

    Swift

    func setTopUpPreset(_ topUpPreset: MBITopUpPreset)

    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 {“` #} 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)