|
| 1 | +// |
| 2 | +// BNCCommerceEvent.h |
| 3 | +// BranchSDK-iOS |
| 4 | +// |
| 5 | +// Created by Edward Smith on 12/14/16. |
| 6 | +// Copyright (c) 2016 Branch Metrics. All rights reserved. |
| 7 | +// |
| 8 | + |
| 9 | + |
| 10 | +#import <Foundation/Foundation.h> |
| 11 | +#import "BNCServerRequest.h" |
| 12 | + |
| 13 | + |
| 14 | +#pragma mark BNCProductCategory |
| 15 | + |
| 16 | +typedef NSString*const BNCProductCategory; |
| 17 | + |
| 18 | +extern BNCProductCategory BNCProductCategoryAnimalSupplies; |
| 19 | +extern BNCProductCategory BNCProductCategoryApparel; |
| 20 | +extern BNCProductCategory BNCProductCategoryArtsEntertainment; |
| 21 | +extern BNCProductCategory BNCProductCategoryBabyToddler; |
| 22 | +extern BNCProductCategory BNCProductCategoryBusinessIndustrial; |
| 23 | +extern BNCProductCategory BNCProductCategoryCamerasOptics; |
| 24 | +extern BNCProductCategory BNCProductCategoryElectronics; |
| 25 | +extern BNCProductCategory BNCProductCategoryFoodBeverageTobacco; |
| 26 | +extern BNCProductCategory BNCProductCategoryFurniture; |
| 27 | +extern BNCProductCategory BNCProductCategoryHardware; |
| 28 | +extern BNCProductCategory BNCProductCategoryHealthBeauty; |
| 29 | +extern BNCProductCategory BNCProductCategoryHomeGarden; |
| 30 | +extern BNCProductCategory BNCProductCategoryLuggageBags; |
| 31 | +extern BNCProductCategory BNCProductCategoryMature; |
| 32 | +extern BNCProductCategory BNCProductCategoryMedia; |
| 33 | +extern BNCProductCategory BNCProductCategoryOfficeSupplies; |
| 34 | +extern BNCProductCategory BNCProductCategoryReligious; |
| 35 | +extern BNCProductCategory BNCProductCategorySoftware; |
| 36 | +extern BNCProductCategory BNCProductCategorySportingGoods; |
| 37 | +extern BNCProductCategory BNCProductCategoryToysGames; |
| 38 | +extern BNCProductCategory BNCProductCategoryVehiclesParts; |
| 39 | + |
| 40 | +#pragma mark - BNCProduct |
| 41 | + |
| 42 | +@interface BNCProduct : NSObject |
| 43 | +@property (nonatomic, strong) NSString *sku; |
| 44 | +@property (nonatomic, strong) NSString *name; |
| 45 | +@property (nonatomic, strong) NSDecimalNumber *price; |
| 46 | +@property (nonatomic, strong) NSNumber *quantity; |
| 47 | +@property (nonatomic, strong) NSString *brand; |
| 48 | +@property (nonatomic, strong) BNCProductCategory category; |
| 49 | +@property (nonatomic, strong) NSString *variant; |
| 50 | +@end |
| 51 | + |
| 52 | +#pragma mark - BNCCommerceEvent |
| 53 | + |
| 54 | +@interface BNCCommerceEvent : NSObject |
| 55 | +@property (nonatomic, strong) NSDecimalNumber *revenue; |
| 56 | +@property (nonatomic, strong) NSString *currency; |
| 57 | +@property (nonatomic, strong) NSString *transactionID; |
| 58 | +@property (nonatomic, strong) NSDecimalNumber *shipping; |
| 59 | +@property (nonatomic, strong) NSDecimalNumber *tax; |
| 60 | +@property (nonatomic, strong) NSString *coupon; |
| 61 | +@property (nonatomic, strong) NSString *affiliation; |
| 62 | +@property (nonatomic, strong) NSArray<BNCProduct*> *products; |
| 63 | +@end |
| 64 | + |
| 65 | + |
| 66 | +@interface BranchCommerceEventRequest : BNCServerRequest <NSCoding> |
| 67 | + |
| 68 | +- (instancetype) initWithCommerceEvent:(BNCCommerceEvent*)commerceEvent |
| 69 | + metadata:(NSDictionary*)dictionary |
| 70 | + completion:(void (^)(NSDictionary* response, NSError* error))callBack; |
| 71 | + |
| 72 | +@end |
0 commit comments