Captainup
2.4
|
#import <CPTAsset.h>
Instance Methods | |
(nullable id< CPTReward >) | - getReward |
(BOOL) | - hasReward |
(BOOL) | - isSegmentedForUser: |
![]() | |
(nonnull instancetype) | - initWithDictionary: |
(nonnull NSDictionary< NSString *, id > *) | - toDictionary |
Properties | |
NSString * | assetId |
CPTAssetType | type |
NSString * | name |
NSString * | assetDescription |
BOOL | isActive |
NSArray< NSString * > * | acquireOn |
NSUInteger | weight |
NSUInteger | stock |
NSString * | presetImage |
NSDate * | createdAt |
NSDate * | updatedAt |
NSString * | descriptionHtml |
NSDictionary< NSString *, NSNumber * > * | currencies |
id< CPTImageFiles > | imageFiles |
BOOL | isUnlimitedStock |
BOOL | isSegmented |
NSArray< id< CPTReward > > * | rewards |
![]() | |
NSDictionary< NSString *, id > * | sourceDictionary |
An asset object, can be used as a Shop Item {
- (nullable id<CPTReward>) getReward |
The Asset Reward Object
CPTReward
Object or Null if there is no reward for this asset - (BOOL) hasReward |
Does the asset has a reward object attached to it
BOOL
true if the asset has a reward object or false if reward object is null - (BOOL) isSegmentedForUser: | (nonnull id< CPTUser >) | user |
Use this function to know if a asset should be displayed for your specific user For example: asset.isSegmentedForUser(CaptainUp.getLoggedInUser())
user | user object |
|
readnonatomicassign |
asset acquired on list
|
readnonatomicassign |
asset description
|
readnonatomicassign |
The ID of the asset
|
readnonatomicassign |
Description
|
readnonatomicassign |
Description
|
readnonatomicassign |
Description
|
readnonatomicassign |
Description
|
readnonatomicassign |
is asset active
|
readnonatomicassign |
Asset segmentation allows you to filter the asset presentation according to different user attributes. For example - you can add a "market" filter so only users in this specific market can see the asset.
|
readnonatomicassign |
Description
|
readnonatomicassign |
asset name
|
readnonatomicassign |
Description
|
readnonatomicassign |
The Asset Rewards Array
NSArray<CPTReward>
NSArray or Null if there is no reward for this asset
|
readnonatomicassign |
asset stock
|
readnonatomicassign |
asset type
|
readnonatomicassign |
Description
|
readnonatomicassign |
asset weight