123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- //
- // TalkingDataAppCpa.h
- // TalkingDataAppCpa
- //
- // Created by liweiqiang on 13-12-25.
- // Copyright (c) 2012年 __TendCloud__. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- @interface TDOrder : NSObject
- /**
- * @method orderWithOrderId
- * @param orderId 订单id 类型:NSString
- * @param total 订单总价 类型:int
- * @param currencyType 币种 类型:NSString
- */
- + (TDOrder *)orderWithOrderId:(NSString *)orderId total:(int)total currencyType:(NSString *)currencyType;
- /**
- * @method addItemWithCategory
- * @param category 商品类别 类型:NSString
- * @param name 商品名称 类型:NSString
- * @param unitPrice 商品单价 类型:int
- * @param amount 商品数量 类型:int
- */
- - (TDOrder *)addItemWithCategory:(NSString *)category name:(NSString *)name unitPrice:(int)unitPrice amount:(int)amount;
- /**
- * @method addItemWithCategory
- * @param category 商品类别 类型:NSString
- * @param itemId 商品Id 类型:NSString
- * @param name 商品名称 类型:NSString
- * @param unitPrice 商品单价 类型:int
- * @param amount 商品数量 类型:int
- */
- - (TDOrder *)addItemWithCategory:(NSString *)category itemId:(NSString *)itemId name:(NSString *)name unitPrice:(int)unitPrice amount:(int)amount;
- @end
- @interface TDShoppingCart : NSObject
- /**
- * @method createShoppingCart
- */
- + (TDShoppingCart *)createShoppingCart;
- /**
- * @method addItemWithCategory
- * @param category 商品类别 类型:NSString
- * @param itemId 商品Id 类型:NSString
- * @param name 商品名称 类型:NSString
- * @param unitPrice 商品单价 类型:int
- * @param amount 商品数量 类型:int
- */
- - (TDShoppingCart *)addItemWithCategory:(NSString *)category itemId:(NSString *)itemId name:(NSString *)name unitPrice:(int)unitPrice amount:(int)amount;
- @end
- @interface TalkingDataAppCpa : NSObject
- /**
- * @method setVerboseLogDisabled 设置不显示日志 如发布时不需显示日志,应当最先调用该方法
- */
- + (void)setVerboseLogDisabled;
- /**
- * @method backgroundSessionEnabled
- * 开启后台使用时长统计,需在SDK初始化之前调用。
- */
- + (void)backgroundSessionEnabled;
- /**
- * @method enableSFSafariViewControllerTracking 用于精准的追踪以Safari作为资源载体的广告来源 如果需要使用应当在init方法之前调用
- */
- + (void)enableSFSafariViewControllerTracking NS_DEPRECATED_IOS(10_0, NA, "此方法会影响到用户交互,使用前请确保和产品、业务沟通清楚!");
- /**
- * @method init 初始化统计实例 请在application:didFinishLaunchingWithOptions:方法里调用
- * @param appID 应用标识 类型:NSString 应用的唯一标识,统计后台注册得到
- * @param channelId 渠道名(可选) 类型:NSString 如“app store”
- */
- + (void)init:(NSString *)appID withChannelId:(NSString *)channelId;
- /**
- * @method onReceiveDeepLink
- * @param link 链接 类型:NSURL
- */
- + (void)onReceiveDeepLink:(NSURL *)link;
- /**
- * @method onRegister 登录
- * @param account 账户名称 类型:NSString
- */
- + (void)onRegister:(NSString *)account;
- /**
- * @method onLogin 登录
- * @param account 账户名称 类型:NSString
- */
- + (void)onLogin:(NSString *)account;
- /**
- * @method onCreateRole 创建角色
- * @param name 角色名称 类型:NSString
- */
- + (void)onCreateRole:(NSString *)name;
- /**
- * @method onPay 支付
- * @param account 账户名称 类型:NSString
- * @param orderId 订单id 类型:NSString
- * @param amount 金额 类型:int
- * @param currencyType 币种 类型:NSString
- * @param payType 支付类型 类型:NSString
- */
- + (void)onPay:(NSString *)account withOrderId:(NSString *)orderId withAmount:(int)amount withCurrencyType:(NSString *)currencyType withPayType:(NSString *)payType;
- /**
- * @method onPay 支付
- * @param account 账户名称 类型:NSString
- * @param orderId 订单id 类型:NSString
- * @param amount 金额 类型:int
- * @param currencyType 币种 类型:NSString
- * @param payType 支付类型 类型:NSString
- * @param order 订单详情 类型:TDOrder
- */
- + (void)onPay:(NSString *)account withOrderId:(NSString *)orderId withAmount:(int)amount withCurrencyType:(NSString *)currencyType withPayType:(NSString *)payType withOrder:(TDOrder *)order;
- /**
- * @method onPay 支付
- * @param account 账户名称 类型:NSString
- * @param orderId 订单id 类型:NSString
- * @param amount 金额 类型:int
- * @param currencyType 币种 类型:NSString
- * @param payType 支付类型 类型:NSString
- * @param itemId 商品id 类型:NSString
- * @param itemCount 商品个数 类型:int
- */
- + (void)onPay:(NSString *)account withOrderId:(NSString *)orderId withAmount:(int)amount withCurrencyType:(NSString *)currencyType withPayType:(NSString *)payType withItemId:(NSString *)itemId withItemCount:(int)itemCount;
- /**
- * @method onPlaceOrder 下单
- * @param account 账户名称 类型:NSString
- * @param order 订单 类型:TDOrder
- */
- + (void)onPlaceOrder:(NSString *)account withOrder:(TDOrder *)order;
- /**
- * @method onOrderPaySucc 支付
- * @param account 账户名称 类型:NSString
- * @param orderId 订单id 类型:NSString
- * @param amount 金额 类型:int
- * @param currencyType 币种 类型:NSString
- * @param payType 支付类型 类型:NSString
- */
- + (void)onOrderPaySucc:(NSString *)account withOrderId:(NSString *)orderId withAmount:(int)amount withCurrencyType:(NSString *)currencyType withPayType:(NSString *)payType;
- /**
- * @method onViewItemWithCategory
- * @param category 商品类别 类型:NSString
- * @param itemId 商品Id 类型:NSString
- * @param name 商品名称 类型:NSString
- * @param unitPrice 商品单价 类型:int
- */
- + (void)onViewItemWithCategory:(NSString *)category itemId:(NSString *)itemId name:(NSString *)name unitPrice:(int)unitPrice;
- /**
- * @method onAddItemToShoppingCartWithCategory
- * @param category 商品类别 类型:NSString
- * @param itemId 商品Id 类型:NSString
- * @param name 商品名称 类型:NSString
- * @param unitPrice 商品单价 类型:int
- * @param amount 商品数量 类型:int
- */
- + (void)onAddItemToShoppingCartWithCategory:(NSString *)category itemId:(NSString *)itemId name:(NSString *)name unitPrice:(int)unitPrice amount:(int)amount;
- /**
- * @method onViewShoppingCart
- * @param shoppingCart 购物车信息 类型:TDShoppingCart
- */
- + (void)onViewShoppingCart:(TDShoppingCart *)shoppingCart;
- /**
- * @method getDeviceId 获取设备Id
- */
- + (NSString *)getDeviceId;
- @end
|