Skip to content

Commit 2025e5a

Browse files
author
lars steiger
committed
Added FsprgStoreParameters#tags
1 parent 82db439 commit 2025e5a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

FsprgEmbeddedStore/FsprgStoreParameters.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,16 @@ extern NSString * const kFsprgModeTest;
104104
- (NSString *)coupon;
105105
- (void)setCoupon:(NSString *)aCoupon;
106106

107+
/*!
108+
* This parameter has many uses within SpringBoard. A tag is a variable that can hold any positive integer value.
109+
* If no value is specified, it holds a value of 1. Tags can be used by parts of the order process. Adding multiple
110+
* tag parameters can be achieved by separating each tag (sometimes with numeric value) with a comma, as shown below.
111+
*
112+
* mytaga,mytagb,mytagc=2,anothertag=8
113+
*/
114+
- (NSString *)tags;
115+
- (void)setTags:(NSString *)aTags;
116+
107117
- (BOOL)hasContactDefaults;
108118
- (NSString *)contactFname;
109119
- (void)setContactFname:(NSString *)aContactFname;

FsprgEmbeddedStore/FsprgStoreParameters.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
static NSString * const kReferrer = @"referrer";
2727
static NSString * const kSource = @"source";
2828
static NSString * const kCoupon = @"coupon";
29+
static NSString * const kTags = @"tags";
2930
static NSString * const kContactFname = @"contact_fname";
3031
static NSString * const kContactLname = @"contact_lname";
3132
static NSString * const kContactEmail = @"contact_email";
@@ -270,6 +271,15 @@ - (void)setCoupon:(NSString *)aCoupon
270271
[self setObject:aCoupon forKey:kCoupon];
271272
}
272273

274+
- (NSString *)tags
275+
{
276+
return [[self raw] objectForKey:kTags];
277+
}
278+
- (void)setTags:(NSString *)aTags
279+
{
280+
[self setObject:aTags forKey:kTags];
281+
}
282+
273283
- (BOOL)hasContactDefaults
274284
{
275285
NSArray *allKeys = [[self raw] allKeys];

0 commit comments

Comments
 (0)