PromoCodeContent
@objcMembers
@objc(GetSocialPromoCodeContent)
public final class PromoCodeContent : NSObject
Describe promo code content.
-
Promo code.
Declaration
Swift
public var code: String?
-
Attached data.
Declaration
Swift
public var properties: [String : String]
-
Start date.
Declaration
Swift
public var startDate: Date?
-
End date.
Declaration
Swift
public var endDate: Date?
-
Number of maximum claims.
Declaration
Swift
public var maxClaims: Int
-
Create a promo code with random code.
Declaration
Swift
public static func withRandomCode() -> PromoCodeContent
Return Value
New
PromoCodeContent
instance. -
Create a promo code with the specified code.
Declaration
Swift
@objc(withCode:) public static func withCode(_ code: String) -> PromoCodeContent
Parameters
code
Promo code.
Return Value
New
PromoCodeContent
instance. -
Set time limit of promo code.
Declaration
Swift
@objc(setTimeLimitWithStartDate:endDate:) public func setTimeLimit(startDate: Date?, endDate: Date?)
Parameters
startDate
Start date.
endDate
End date.
-
Set promo code data.
Declaration
Swift
@objc(setPropertyValue:forKey:) public func setProperty(value: String, forKey: String)
Parameters
value
Value to set.
forKey
Key for the value.
-
Description.
Declaration
Swift
public override var description: String { get }