Offer

public struct Offer : Codable, Equatable

Struct representing Offer related values.

  • id

    Value representing the entity id.

    Declaration

    Swift

    public var id: Int
  • The call to action label.

    Declaration

    Swift

    public var action: String
  • The barcode of the offer.

    Declaration

    Swift

    public var barcode: String
  • The barcode standard of the offer.

    Declaration

    Swift

    public var barcodeStandard: String
  • The body of the Offer.

    Declaration

    Swift

    public var body: String
  • The list of categories of an Offer.

    Declaration

    Swift

    public var categories: [Offer.Category]
  • Indicates whether the offer object is clipped or not.

    Declaration

    Swift

    public var clipped: Bool
  • The description of the Offer (may be used as title).

    Declaration

    Swift

    public var descriptionText: String
  • The supporting details attached to the Offer.

    Declaration

    Swift

    public var details: String
  • The end date of the validity of the Offer.

    Declaration

    Swift

    public var endDate: String
  • Extra Json added on the offer object

    Declaration

    Swift

    public var extraJSON: [String : AnyCodable]
  • The heading of the Offer. Basically serves as the the Offer title.

    Declaration

    Swift

    public var heading: String
  • The main image url for the Offer.

    Declaration

    Swift

    public var imageUrl: String
  • The internal url of the Offer.

    Declaration

    Swift

    public var internalUrl: String
  • The offer has been marked as favorite.

    Declaration

    Swift

    public var isFavorited: Bool
  • An array of offer responses.

    Declaration

    Swift

    public var responses: [Offer.Response]
  • The start date of the validity of the Offer.

    Declaration

    Swift

    public var startDate: String
  • The subheading of the Offer.

    Declaration

    Swift

    public var subheading: String
  • The target object of the Offer.

    Declaration

    Swift

    public var targetObject: Offer.TargetObject?
  • The target url of the Offer.

    Declaration

    Swift

    public var targetUrl: String
  • The main image’s thumbnail for the Offer.

    Declaration

    Swift

    public var thumbnailUrl: String
  • The type of the Offer.

    Declaration

    Swift

    public var type: Offer.OfferType?
  • url

    The url of the offer.

    Declaration

    Swift

    public var url: String
  • Undocumented

    Declaration

    Swift

    public init(id: Int, action: String, barcode: String, barcodeStandard: String,
                body: String, categories: [Offer.Category], clipped: Bool, descriptionText: String,
                details: String, endDate: String, extraJSON: [String: AnyCodable], heading: String, imageUrl: String,
                internalUrl: String, isFavorited: Bool, responses: [Offer.Response], startDate: String,
                subheading: String, targetObject: Offer.TargetObject?, targetUrl: String, thumbnailUrl: String,
                type: Offer.OfferType?, url: String)
  • Different types of Offer.

    It can be of type:

    • Details
    • URL
    • Barcode
    • Certificate
    • Stellar
    • Custom String

    Usage:

    let detailsType: OfferType = .details
    let urlType: OfferType = .url
    let customType: OfferType = .custom("any_custom_string")
    
    See more

    Declaration

    Swift

    public enum OfferType : Codable, Equatable
  • Struct representing Offer Response related values.

    See more

    Declaration

    Swift

    public struct Response : Codable, Equatable
  • Struct representing Offer Category related values.

    See more

    Declaration

    Swift

    public struct Category : Codable, Equatable
  • Struct representing an Offer target object’s related values.

    See more

    Declaration

    Swift

    public struct TargetObject : Codable, Equatable
  • Struct representing Offer Responding related values.

    See more

    Declaration

    Swift

    public struct ResponseInfo : Codable, Equatable
  • Declaration

    Swift

    public init(from decoder: Decoder) throws