VOMutableVoucher

@interface VOMutableVoucher : VOVoucher

VOMutableVoucher is the mutable model that represents the bundle of personalizations.

  • vId

    The id of the VOVoucher. This will be unique for each VOVoucher and never change.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) long long vId;

    Swift

    var vId: Int64 { get set }
  • The status of the VOVoucher. See VOVoucherStatus for all the possible states.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) VOVoucherStatus status;

    Swift

    var status: VOVoucherStatus { get set }
  • The amount that is given to the VOUser.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) double amount;

    Swift

    var amount: Double { get set }
  • fee

    The fee associated with the given amount.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) double fee;

    Swift

    var fee: Double { get set }
  • The currency of the VOVoucher. Eg. USD.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSString *currency;

    Swift

    var currency: String? { get set }
  • The merchant associated with the VOVoucher. Eg. Paypal.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) VOMerchant *merchant;

    Swift

    var merchant: VOMerchant? { get set }
  • The payment info provided by the Sender of the VOVoucher.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) VOVoucherPayment *paymentInfo;

    Swift

    var paymentInfo: VOVoucherPayment? { get set }
  • Require a thank you photo to be taken by the claimer of the VOVoucher before they are able to claim it.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL isThankYouPhotoRequired;

    Swift

    var isThankYouPhotoRequired: Bool { get set }
  • The date the thank you photo was taken for a VOVoucher.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable) NSDate *thankYouDate;

    Swift

    var thankYouDate: Date? { get set }
  • The last date the VOVoucher was modified. Anytime a value changes in the VOVoucher, this property will update.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSDate *_Nonnull dateModified;

    Swift

    var dateModified: Date { get set }
  • The date the VOVoucher was created. This date will never change.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSDate *_Nonnull dateCreated;

    Swift

    var dateCreated: Date { get set }
  • The date the VOVoucher is first able to be claimed. This date will never change.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSDate *_Nonnull dateClaimable;

    Swift

    var dateClaimable: Date { get set }
  • The Creator of the VOVoucher.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) VOUser *_Nonnull creator;

    Swift

    var creator: VOUser { get set }
  • The claimer of the VOVoucher.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) VOUser *claimer;

    Swift

    var claimer: VOUser? { get set }
  • Any users who are able to view the VOVoucher.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSArray<VOUser *> *viewers;

    Swift

    var viewers: [VOUser]? { get set }
  • Any users who are able to claim the VOVoucher before it has been claimed.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSArray<VOUser *> *recipients;

    Swift

    var recipients: [VOUser]? { get set }
  • Any user ids who have unwrapped the VOVoucher.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable)
        NSArray<NSNumber *> *unwrappedUsers;

    Swift

    var unwrappedUsers: [NSNumber]? { get set }
  • The title of the VOVoucher. Customizable by the user when creating the VOVoucher.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSString *title;

    Swift

    var title: String? { get set }
  • TODO: this property

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSString *shareImageUrl;

    Swift

    var shareImageUrl: String? { get set }
  • The privacy status of the VOVoucher. Either Private / Friends / Public.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) VOVoucherPrivacyStatus privacy;

    Swift

    var privacy: VOVoucherPrivacyStatus { get set }
  • The game the User must play to claim the VOVoucher.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) VOGameData *_Nonnull gameData;

    Swift

    var gameData: VOGameData { get set }
  • An array of all media items. This includes pictures, videos, sounds, notes. Customizable by the user when sending the VOVoucher.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable)
        NSArray<VOVoucherMedia *> *medias;

    Swift

    var medias: [VOVoucherMedia]? { get set }
  • The wrapping paper that shows up on the envelope before the VOVoucher has been claimed.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable)
        VOWrappingPaperMedia *wrappingPaperMedia;

    Swift

    var wrappingPaperMedia: VOWrappingPaperMedia? { get set }
  • Default initializer to create a VOMutableVoucher.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDictionary:(nonnull NSDictionary *)dictionary;

    Swift

    init(dictionary: [AnyHashable : Any])

    Parameters

    dictionary

    - the dictionary representation of the the VOMutableVoucher.

    Return Value

    instance of VOMutableVoucher.

  • Static initializer to create a VOMutableVoucher.

    Declaration

    Objective-C

    + (nonnull instancetype)mutableVoucherWithDictionary:
        (nonnull NSDictionary *)dictionary;

    Parameters

    dictionary

    - the dictionary representation of the the VOMutableVoucher.

    Return Value

    instance of VOMutableVoucher.

  • Static initializer to create a VOMutableVoucher from another VOVoucher. All properties of the VOVoucher will be copied to the VOMutableVoucher.

    Declaration

    Objective-C

    + (nonnull instancetype)mutableVoucherWithVoucher:(nonnull VOVoucher *)voucher;

    Swift

    convenience init(voucher: VOVoucher)

    Parameters

    voucher

    - VOVoucher used to create the VOMutableVoucher.

    Return Value

    instance of VOMutableVoucher.

  • Copies the contents of a preexisting voucher into the current voucher

    Declaration

    Objective-C

    - (void)replaceVoucherContents:(nonnull VOMutableVoucher *)mutableVoucher;

    Swift

    func replaceContents(_ mutableVoucher: VOMutableVoucher)

    Parameters

    mutableVoucher

    - the source voucher to copy contents from

  • Adds a media object to the VOVoucherMedia array. If no id is set on the VOVoucherMedia item, an id will be given.

    Declaration

    Objective-C

    - (void)addMedia:(nonnull VOVoucherMedia *)media;

    Swift

    func addMedia(_ media: VOVoucherMedia)

    Parameters

    media

    - The media item to add to the array.

  • Removes a media object from the VOVoucherMedia array. If no id is set on the VOVoucherMedia item, an id will be given.

    Declaration

    Objective-C

    - (void)removeMedia:(nonnull VOVoucherMedia *)media;

    Swift

    func removeMedia(_ media: VOVoucherMedia)

    Parameters

    media

    - The media item to be removed from the array

  • Removes a VOPersonalizationOption creation item from the VOVoucher.

    Declaration

    Objective-C

    - (void)removeCreationObjectFromVoucher:
        (nonnull VOCreationItemView *)creationItem;

    Swift

    func removeCreationObject(fromVoucher creationItem: VOCreationItemView)

    Parameters

    creationItem

    - The creation item of a VOPersonalizationOption to be removed from the VOVoucher.

  • Clears the VOPersonalizationOption contents of a VOMutableVoucher. Does not modify VOVoucher specific properties such as vId and status.

    Declaration

    Objective-C

    - (void)clearMutableVoucherData;

    Swift

    func clearData()