VOVoucherCreationManager

@interface VOVoucherCreationManager : NSObject

VOVoucherCreationManager is an object that encapsulates all dependencies necessary to facilitate the creation of a new VOVoucher.

  • The voucher that is being created. This will be modified throughout the create process via any personalizations. It will be become a VOVoucher at the end of the create process.

    Note

    Default is a new, empty voucher.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic)
        VOMutableVoucher *_Nonnull mutableVoucher;

    Swift

    var mutableVoucher: VOMutableVoucher { get }
  • Used throughout the create flow to facilitate network calls.

    Note

    Default is nil.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) id<VONetworkManagerProtocol>
        networkManager;
  • An instance of VOVoucherManager used to create and activate the mutableVoucher.

    Note

    Default is nil.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        id<VOVoucherManagerProtocol> _Nullable voucherManager;
  • Analytics manager used to track events throughout the create flow.

    Note

    Default is nil.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        id<VOAnalyticsManagerProtocol> _Nullable analyticsManager;
  • VOUser manager used to login, get users.

    Note

    Default is nil.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) id<VOUserManagerProtocol> userManager;
  • Game Manager used to retrieve games.

    Note

    Default is nil.

    Declaration

    Objective-C

    @property (readonly, nonatomic) id<VOGameManagerProtocol> _Nullable gameManager;
  • Used to fetch wrapping papers that the user can use to personalize their voucher.

    Note

    Default is nil.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) id<VOWrappingPaperManagerProtocol>
        wrappingPaperManager;
  • VOMerchant manager is used to display merchants that the user can purchase gift cards from.

    Note

    Default is nil.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) id<VOMerchantManagerProtocol>
        merchantManager;
  • Youtube manager is used to display Youtube videos that the user can select.

    Note

    Default is nil.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) id<VOYoutubeManagerProtocol>
        youtubeManager;
  • Used to manage anything related to canned sounds.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        id<VOCannedSoundManagerProtocol> _Nullable cannedSoundManager;
  • A Fullscreen loading view that will be displayed when user interaction needs to be blocked during load time.

    Note

    Default is a UIActivityIndicator with a semi-transparent overlay.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic)
        UIView<VOLoadingViewProtocol> *_Nonnull fullScreenLoadingView;
  • A loading view that will be displayed within a view.

    Note

    Default is a UIActivityIndicator.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic)
        UIView<VOLoadingViewProtocol> *_Nonnull smallLoadingView;
  • A VODialogView is a customizable alert view that will be displayed to the user.

    Note

    Default is nil.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic)
        UIView<VODialogViewProtocol> *_Nonnull vouchrDialogView;
  • Colours shown in the background of the create screen. Colors are cycled based on wrapping paper selection. After a wrapping paper is chosen, the color closest to the wrapping paper is set as the new background color.

    Note

    Default colors are: Red: #E86963, Orange: #FFAD76, Yellow: #FFDA67, Green: #77E097, Teal: #2FCCAD, Navy Blue: #509CDE, Purple: #9372FF Pass in an empty array for no color.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic)
        NSArray<UIColor *> *_Nonnull voucherCreationBackgroundColors;

    Swift

    var voucherCreationBackgroundColors: [UIColor] { get }
  • Array of colours that is shown in the background of the create screen. After a wrapping paper is chosen, the color with the closest average color in the wrapping paper will be chosen from the Array.

    Note

    Default list consists of a single color; white.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic)
        NSArray<UIColor *> *_Nonnull creationItemBorderColors;

    Swift

    var creationItemBorderColors: [UIColor] { get }
  • The border width shown on the items dropped into the envelope.

    Note

    Default is 7 px.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGFloat creationItemBorderWidth;

    Swift

    var creationItemBorderWidth: CGFloat { get }
  • The text shown if the create carousel is emptied (all personalizations completed by the user).

    Note

    Default text is localized ‘Your looks awesome!’.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *_Nonnull carouselEmptiedText;

    Swift

    var carouselEmptiedText: String { get }
  • Specifies whether recipient information is required to be entered before sending a VOVoucher.

    Note

    Default is YES.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL recipientRequired;

    Swift

    var recipientRequired: Bool { get }
  • Specifies whether a summary screen should be displayed when no monetary value is included in the voucher.

    Note

    The summary screen displays a breakdown of the price and payment

    Note

    Default is NO

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL alwaysShowFullSummaryScreen;

    Swift

    var alwaysShowFullSummaryScreen: Bool { get }
  • Minimum number of customizations required before allowing the voucher to be created

    Note

    Default is 1

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSInteger minimumNumberOfCustomizations;

    Swift

    var minimumNumberOfCustomizations: Int { get }
  • Specifies whether vouchers must include a monetary amount.

    Note

    Default is YES

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL allowFreeGifts;

    Swift

    var allowFreeGifts: Bool { get }
  • The VOTheme for the VOSummaryScreenViewController if it is used. If not set, the global VOConfig VOTheme will be used.

    Note

    Default is nil.

    Declaration

    Objective-C

    @property (readonly, nonatomic) VOTheme *_Nonnull defaultSummaryScreenTheme;

    Swift

    var defaultSummaryScreenTheme: VOTheme { get }
  • The VOTheme for the VODialogView if it is used.

    Note

    Default is nil.

    Declaration

    Objective-C

    @property (readonly, nonatomic) VOTheme *_Nonnull dialogViewTheme;

    Swift

    var dialogViewTheme: VOTheme { get }
  • Used to show the reveal screen as a preview during creation. If no preview should be shown, leave this as nil. If a different preview should be shown, instead implement previewViewControllerForVoucher: as part of the VOVoucherCreationFlowDelegate.

    Note

    Default is nil.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        VOVoucherRevealFlowCoordinator *_Nonnull revealFlowCoordinator;

    Swift

    var revealFlowCoordinator: VOVoucherRevealFlowCoordinator { get }
  • Default initializer for VOVoucherCreationManager.

    Declaration

    Objective-C

    + (nonnull instancetype)voucherCreationManagerWithBuilder:
        (nonnull void (^)(VoucherCreationManagerBuilder *_Nonnull))builderBlock;

    Swift

    convenience init(builder builderBlock: @escaping (VoucherCreationManagerBuilder) -> Void)

    Parameters

    builderBlock

    - block containing builder object used to configure properties in VOVoucherCreationManager. Set desired properties on this builder.

    Return Value

    instance of VOVoucherCreationManager.

  • Reinstantiates the VOMutableVoucher inside ‘VOVoucherCreationManager’.

    Declaration

    Objective-C

    - (void)resetMutableVoucher;

    Swift

    func resetMutableVoucher()