Models

  • Voucher is the model that encompases all components of a ‘gift’. This class is immutable. Use MutableVoucher if you need to change values.

    See more

    Declaration

    Objective-C

    @interface Voucher : NSObject <NSCoding>

    Swift

    class Voucher : NSObject, NSCoding
  • MutableVoucher is the mutable model that represents the bundle of personalizations.

    See more

    Declaration

    Objective-C

    @interface MutableVoucher : Voucher

    Swift

    class MutableVoucher : Voucher
  • User model for the VouchrSDK. Users are used to identify the logged in user and typically gifts are sent to a User(s).

    See more

    Declaration

    Objective-C

    @interface User : NSObject <NSCoding, NSCopying>

    Swift

    class User : NSObject, NSCoding, NSCopying
  • ActivityFeedVoucher is a light version of the Voucher containing only information relevant to the activity feed. ActivityFeedVoucher is intended to be used to display in a list of cells.

    See more

    Declaration

    Objective-C

    @interface ActivityFeedVoucher : NSObject

    Swift

    class ActivityFeedVoucher : NSObject
  • Credential is used to pass credentials to the Vouchr Server when logging in and authenticating Users.

    See more

    Declaration

    Objective-C

    @interface Credential : NSObject

    Swift

    class Credential : NSObject
  • GameData contains all the data for a game / challenge. It contains data that will stay static (eg. the title of the game), and data that will change based on which Voucher it is in (eg. scoreToWin).

    See more

    Declaration

    Objective-C

    @interface GameData : NSObject

    Swift

    class GameData : NSObject
  • GameDifficulty represents a difficulty a specific GameData is to be played at.

    See more

    Declaration

    Objective-C

    @interface GameDifficulty : NSObject

    Swift

    class GameDifficulty : NSObject
  • VoucherMedia is the model for all Media items inside of a Voucher. It represents all of the different Media types: Image - Any kind of photo (eg. png, jpg). Animation - Any kind of animated photo (eg. gif). Sound - Any kind of sound (eg. mp3). Youtube - A youtube video. Video - Any kind of video (eg. m4a). Note - Any kind of text.

    See more

    Declaration

    Objective-C

    @interface VoucherMedia : NSObject <NSCoding>

    Swift

    class VoucherMedia : NSObject, NSCoding
  • VoucherPayment contains all payment information including source, destination, and redemption information. Each User requesting a Voucher will receive different VoucherPayment information depending on their association of the Voucher.

    See more

    Declaration

    Objective-C

    @interface VoucherPayment : NSObject

    Swift

    class VoucherPayment : NSObject
  • UserNetwork is a model to represent the different networks a user has connected with.

    See more

    Declaration

    Objective-C

    @interface UserNetwork : NSObject

    Swift

    class UserNetwork : NSObject
  • SimpleUser is a simplified, mutable version of User that is used as part of registration or when a full User is not required.

    See more

    Declaration

    Objective-C

    @interface SimpleUser : NSObject

    Swift

    class SimpleUser : NSObject
  • Merchants represent a personalization type that is of monetary value (eg. Gift cards, Money Transfers).

    See more

    Declaration

    Objective-C

    @interface Merchant : NSObject <NSCoding>

    Swift

    class Merchant : NSObject, NSCoding
  • PaymentInfo contains data related to a part of the payment process.

    See more

    Declaration

    Objective-C

    @interface PaymentInfo : NSObject

    Swift

    class PaymentInfo : NSObject
  • PaymentMerchantInfo contains all the information related to a specific payment object inside a Merchant.

    See more

    Declaration

    Objective-C

    @interface PaymentMerchantInfo : NSObject

    Swift

    class PaymentMerchantInfo : NSObject
  • MerchantProduct represents a product inside a Merchant. Eg. Xbox 3 month membership gift card.

    See more

    Declaration

    Objective-C

    @interface MerchantProduct : NSObject

    Swift

    class MerchantProduct : NSObject
  • VouchrError will be returned inside the userInfo of an NSError on errors from the VouchrServer when using the NetworkManager to make network calls.

    It can be accessed from the NSError:

    VouchrError *vouchrError = error.userInfo[@"message"];
    
    See more

    Declaration

    Objective-C

    @interface VouchrError : NSObject

    Swift

    class VouchrError : NSObject
  • WrappingPaperCategory is the model for representing a collection of like WrappingPapers.

    See more

    Declaration

    Objective-C

    @interface WrappingPaperCategory : NSObject

    Swift

    class WrappingPaperCategory : NSObject