PreEmptive Analytics iOS API  2.0
The official iOS API for sending PreEmptive Analytics data.
PAExtendedKey Class Reference

Class that handles the creation of extended key data used for sending additional information with messages. More...

Inheritance diagram for PAExtendedKey:

Instance Methods

(id) - initWithKey:string:
 Initializes a PAExtendedKey with type STRING_TYPE and with a properly formatted key and value. More...
 
(id) - initWithKey:decimal:
 Initializes a PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value. More...
 
(id) - initWithKey:number:
 Initializes a PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value. More...
 
(id) - initWithKey:int:
 Initializes a PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value. More...
 
(id) - initWithKey:integer:
 Initializes a PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value. More...
 
(id) - initWithKey:long:
 Initializes a PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value. More...
 
(id) - initWithKey:float:
 Initializes a PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value. More...
 
(id) - initWithKey:double:
 Initializes a PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value. More...
 
(id) - initWithKey:boolean:
 Initializes a PAExtendedKey with type STRING_TYPE and a properly formatted key and value. More...
 

Class Methods

(PAExtendedKey *) + key:string:
 Creates a new PAExtendedKey with type STRING_TYPE and a properly formatted key and value. More...
 
(PAExtendedKey *) + key:number:
 Creates a new PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value. More...
 
(PAExtendedKey *) + key:int:
 Creates a new PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value. More...
 
(PAExtendedKey *) + key:integer:
 Creates a new PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value. More...
 
(PAExtendedKey *) + key:long:
 Creates a new PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value. More...
 
(PAExtendedKey *) + key:float:
 Creates a new PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value. More...
 
(PAExtendedKey *) + key:double:
 Creates a new PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value. More...
 
(PAExtendedKey *) + key:boolean:
 Creates a new PAExtendedKey with type STRING_TYPE and a properly formatted key and value. More...
 

Protected Types

enum  PAExtendedKeyType : NSUInteger { STRING_TYPE =0, DECIMAL_TYPE =1 }
 The type of value. More...
 

Properties

NSString * key
 The trimmed key. More...
 
NSString * value
 The trimmed value. More...
 
enum PAExtendedKeyType type
 The type of value.
 

Detailed Description

Class that handles the creation of extended key data used for sending additional information with messages.

Numeric values have an 18 signigicant limit and may be adjusted. The number being sent can be seen in the value property.

Definition at line 13 of file PAExtendedKey.h.

Member Enumeration Documentation

- (enum PAExtendedKeyType) :
protected

The type of value.

Enumerator
STRING_TYPE 

The value is a string.

DECIMAL_TYPE 

The value is a number.

Numbers will be limited to 18 significant digits and a maximum of 5 decimal places. For Example:

  • -999,999,999,999,999,999 is allowed.
  • 999,999,999,999,999,999 is allowed.
  • 1,222,333,444,555,666,777,888,999 will become 999,999,999,999,999,999.
  • 12.3456789 will become 12.34568.

Definition at line 18 of file PAExtendedKey.h.

Method Documentation

- (id) initWithKey: (NSString *)  key
boolean: (BOOL)  aBool 

Initializes a PAExtendedKey with type STRING_TYPE and a properly formatted key and value.

Parameters
keyThe key. (Maximum size 2000)
aBoolThe value. YES = "TRUE" NO = "FALSE"
Returns
An initalized PAExtendedKey.
- (id) initWithKey: (NSString *)  key
decimal: (NSDecimalNumber *)  aDecimal 

Initializes a PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value.

Parameters
keyThe key. (Maximum size 2000)
aDecimalThe value. (See DECIMAL_TYPE limit)
Returns
An initalized PAExtendedKey.
- (id) initWithKey: (NSString *)  key
double: (double)  aDouble 

Initializes a PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value.

Parameters
keyThe key. (Maximum size 2000)
aDoubleThe value. (See DECIMAL_TYPE limit)
Returns
An initalized PAExtendedKey.
- (id) initWithKey: (NSString *)  key
float: (float)  aFloat 

Initializes a PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value.

Parameters
keyThe key. (Maximum size 2000)
aFloatThe value. (See DECIMAL_TYPE limit)
Returns
An initalized PAExtendedKey.
- (id) initWithKey: (NSString *)  key
int: (int)  anInt 

Initializes a PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value.

Parameters
keyThe key. (Maximum size 2000)
anIntThe value. (See DECIMAL_TYPE limit)
Returns
An initalized PAExtendedKey.
- (id) initWithKey: (NSString *)  key
integer: (NSInteger)  anInt 

Initializes a PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value.

Parameters
keyThe key. (Maximum size 2000)
anIntThe value. (See DECIMAL_TYPE limit)
Returns
An initalized PAExtendedKey.
- (id) initWithKey: (NSString *)  key
long: (long)  aLong 

Initializes a PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value.

Parameters
keyThe key. (Maximum size 2000)
aLongThe value. (See DECIMAL_TYPE limit)
Returns
An initalized PAExtendedKey.
- (id) initWithKey: (NSString *)  key
number: (NSNumber *)  aNumber 

Initializes a PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value.

Parameters
keyThe key. (Maximum size 2000)
aNumberThe value. (See DECIMAL_TYPE limit)
Returns
An initalized PAExtendedKey.
- (id) initWithKey: (NSString *)  key
string: (NSString *)  aString 

Initializes a PAExtendedKey with type STRING_TYPE and with a properly formatted key and value.

Parameters
keyThe key. (Maximum size 2000)
aStringThe value. (Maximum size 4000)
Returns
An initalized PAExtendedKey.
+ (PAExtendedKey*) key: (NSString *)  aKey
boolean: (BOOL)  aBool 

Creates a new PAExtendedKey with type STRING_TYPE and a properly formatted key and value.

Parameters
aKeyThe key. (Maximum size 2000)
aBoolThe value. YES = "TRUE" NO = "FALSE"
Returns
A PAExtendedKey with a formatted key and value.
+ (PAExtendedKey*) key: (NSString *)  aKey
double: (double)  aDouble 

Creates a new PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value.

Parameters
aKeyThe key. (Maximum size 2000)
aDoubleThe value. (See DECIMAL_TYPE limit)
Returns
A PAExtendedKey with a formatted key and value. The value is the formatted double.
+ (PAExtendedKey*) key: (NSString *)  aKey
float: (float)  aFloat 

Creates a new PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value.

Parameters
aKeyThe key. (Maximum size 2000)
aFloatThe value. (See DECIMAL_TYPE limit)
Returns
A PAExtendedKey with a formatted key and value. The value is the formatted float.
+ (PAExtendedKey*) key: (NSString *)  aKey
int: (int)  anInt 

Creates a new PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value.

Parameters
aKeyThe key. (Maximum size 2000)
anIntThe value. (See DECIMAL_TYPE limit)
Returns
A PAExtendedKey with a formatted key and value. The value is the formatted int.
+ (PAExtendedKey*) key: (NSString *)  aKey
integer: (NSInteger)  anInt 

Creates a new PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value.

Parameters
aKeyThe key. (Maximum size 2000)
anIntThe value. (See DECIMAL_TYPE limit)
Returns
A PAExtendedKey with a formatted key and value. The value is the formatted int.
+ (PAExtendedKey*) key: (NSString *)  aKey
long: (long)  aLong 

Creates a new PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value.

Parameters
aKeyThe key. (Maximum size 2000)
aLongThe value. (See DECIMAL_TYPE limit)
Returns
A PAExtendedKey with a formatted key and value. The value is the formatted long.
+ (PAExtendedKey*) key: (NSString *)  aKey
number: (NSNumber *)  aNumber 

Creates a new PAExtendedKey with type DECIMAL_TYPE and a properly formatted key and value.

Parameters
aKeyThe key. (Maximum size 2000)
aNumberThe value. (See DECIMAL_TYPE limit)
Returns
A PAExtendedKey with a formatted key and value. The value is the formatted number.
+ (PAExtendedKey*) key: (NSString *)  aKey
string: (NSString *)  aString 

Creates a new PAExtendedKey with type STRING_TYPE and a properly formatted key and value.

Parameters
aKeyThe key. (Maximum size 2000)
aStringThe value. (Maximum size 4000)
Returns
A PAExtendedKey with a formatted key and value.

Property Documentation

- (NSString*) key
readatomicstrong

The trimmed key.

(Maximum size 2000)

Definition at line 167 of file PAExtendedKey.h.

- (NSString*) value
readatomicstrong

The trimmed value.

Numeric values will be formatted. (Maximum size 4000 for String values (see DECIMAL_TYPE for numerical value limit))

Definition at line 172 of file PAExtendedKey.h.


The documentation for this class was generated from the following file: