Skip to content

Commit b150555

Browse files
committed
add price to BUO
1 parent cdc9440 commit b150555

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Branch-SDK/Branch-SDK/BranchUniversalObject.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ typedef NS_ENUM(NSInteger, ContentIndexMode) {
3333
@property (nonatomic, strong) NSArray *keywords;
3434
@property (nonatomic, strong) NSDate *expirationDate;
3535
@property (nonatomic, strong) NSString *spotlightIdentifier;
36+
@property (nonatomic, assign) CGFloat price;
3637

3738
- (instancetype)initWithCanonicalIdentifier:(NSString *)canonicalIdentifier;
3839
- (instancetype)initWithTitle:(NSString *)title;

Branch-SDK/Branch-SDK/BranchUniversalObject.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,9 @@ - (NSDictionary *)getParamsForServerRequest {
347347
[self safeSetValue:self.keywords forKey:BRANCH_LINK_DATA_KEY_KEYWORDS onDict:temp];
348348
[self safeSetValue:@(1000 * [self.expirationDate timeIntervalSince1970]) forKey:BRANCH_LINK_DATA_KEY_CONTENT_EXPIRATION_DATE onDict:temp];
349349
[self safeSetValue:self.type forKey:BRANCH_LINK_DATA_KEY_CONTENT_TYPE onDict:temp];
350-
350+
if (self.price) {
351+
[self safeSetValue:[NSNumber numberWithFloat:self.price] forKey:BNCPurchaseAmount onDict:temp];
352+
}
351353
[temp addEntriesFromDictionary:[self.metadata copy]];
352354
return [temp copy];
353355
}

0 commit comments

Comments
 (0)