Commit e7180381 by Brent Gulanowski

Add convenience to retrieve a specific item, by key, from account credentials.

parent 554abcb1
......@@ -48,6 +48,7 @@ OBJC_EXTERN NSString * const BUYAccountPasswordKey;
+ (BUYAccountCredentials *)credentialsWithItems:(NSArray<BUYAccountCredentialItem *> *)items;
- (instancetype)initWithItems:(NSArray<BUYAccountCredentialItem *> *)items;
- (BUYAccountCredentialItem *)credentialItemForKey:(NSString *)key;
- (BUYAccountCredentials *)credentialsByAddingItems:(NSArray<BUYAccountCredentialItem *> *)items;
......
......@@ -75,6 +75,11 @@ NSString * const BUYAccountPasswordKey = @"password";
return self.credentialItems.allValues;
}
- (BUYAccountCredentialItem *)credentialItemForKey:(NSString *)key
{
return _credentialItems[key];
}
- (NSUInteger)count
{
return self.credentialItems.count;
......
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