Commit d40e94ba by Rune Madsen

Adding product tags to BUYProduct

parent 4d5f72ed
...@@ -89,6 +89,12 @@ ...@@ -89,6 +89,12 @@
@property (nonatomic, readonly, assign) BOOL available; @property (nonatomic, readonly, assign) BOOL available;
/** /**
* A categorization that a product can be tagged with, commonly used for filtering and searching.
* Each tag has a character limit of 255.
*/
@property (nonatomic, readonly, copy) NSSet *tags;
/**
* The product is published on the current sales channel * The product is published on the current sales channel
*/ */
@property (nonatomic, readonly, assign) BOOL published; @property (nonatomic, readonly, assign) BOOL published;
......
...@@ -53,6 +53,9 @@ ...@@ -53,6 +53,9 @@
_createdAtDate = [dateFormatter dateFromString:dictionary[@"created_at"]]; _createdAtDate = [dateFormatter dateFromString:dictionary[@"created_at"]];
_updatedAtDate = [dateFormatter dateFromString:dictionary[@"updated_at"]]; _updatedAtDate = [dateFormatter dateFromString:dictionary[@"updated_at"]];
_publishedAtDate = [dateFormatter dateFromString:dictionary[@"published_at"]]; _publishedAtDate = [dateFormatter dateFromString:dictionary[@"published_at"]];
NSArray *tagsArray = [[dictionary[@"tags"] stringByReplacingOccurrencesOfString:@", " withString:@","] componentsSeparatedByString:@","];
NSSet *tagsSet = [NSSet setWithArray:tagsArray];
_tags = [tagsSet copy];
} }
@end @end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment