/
GAITransactionItem.h
49 lines (34 loc) · 1.45 KB
/
GAITransactionItem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*!
@header GAITransactionItem.h
@abstract Google Analytics iOS SDK Transaction Item Header
@version 2.0
@copyright Copyright 2011 Google Inc. All rights reserved.
*/
#import <Foundation/Foundation.h>
/*! A simple class to hold transaction item data. */
@interface GAITransactionItem : NSObject
/*! The item code, as a string. */
@property(nonatomic, copy, readonly) NSString *productCode;
/*! The item name. */
@property(nonatomic, copy) NSString *productName;
/*! The item variation. */
@property(nonatomic, copy) NSString *productCategory;
/*! The item price in micros (millionths of a currency unit). */
@property(nonatomic, assign) int64_t priceMicros;
/*! The item quantity. */
@property(nonatomic, assign) NSInteger quantity;
/*!
Create and initialize an item.
@param productCode The item product code; must not be `nil` or empty.
@param productName The item product name; must not be `nil` or empty.
@param productCategory The item product category; may be `nil`.
@param priceMicros The item price, in micros (millionths of a currency unit).
@param quantity The item quantity, as an NSInteger.
@return The newly initialized item.
*/
+ (GAITransactionItem *)itemWithCode:(NSString *)productCode
name:(NSString *)productName
category:(NSString *)productCategory
priceMicros:(int64_t)priceMicros
quantity:(NSInteger)quantity;
@end