commit | author | age
|
2e29a3
|
1 |
/* |
L |
2 |
* Copyright (c) Meta Platforms, Inc. and affiliates. |
|
3 |
* All rights reserved. |
|
4 |
* |
|
5 |
* This source code is licensed under the license found in the |
|
6 |
* LICENSE file in the root directory of this source tree. |
|
7 |
*/ |
|
8 |
|
|
9 |
#import <Foundation/Foundation.h> |
|
10 |
|
|
11 |
NS_ASSUME_NONNULL_BEGIN |
|
12 |
|
|
13 |
NS_SWIFT_NAME(UserAgeRange) |
|
14 |
@interface FBSDKUserAgeRange : NSObject <NSCopying, NSObject, NSSecureCoding> |
|
15 |
|
e0ec42
|
16 |
/// The user's minimum age, nil if unspecified |
2e29a3
|
17 |
@property (nullable, nonatomic, readonly, strong) NSNumber *min; |
e0ec42
|
18 |
/// The user's maximum age, nil if unspecified |
2e29a3
|
19 |
@property (nullable, nonatomic, readonly, strong) NSNumber *max; |
L |
20 |
|
|
21 |
- (instancetype)init NS_UNAVAILABLE; |
|
22 |
+ (instancetype)new NS_UNAVAILABLE; |
|
23 |
|
|
24 |
/** |
e0ec42
|
25 |
Returns a UserAgeRange object from a dinctionary containing valid user age range. |
2e29a3
|
26 |
@param dictionary The dictionary containing raw user age range |
L |
27 |
|
|
28 |
Valid user age range will consist of "min" and/or "max" values that are |
|
29 |
positive integers, where "min" is smaller than or equal to "max". |
|
30 |
*/ |
|
31 |
+ (nullable instancetype)ageRangeFromDictionary:(NSDictionary<NSString *, NSNumber *> *)dictionary; |
|
32 |
|
|
33 |
@end |
|
34 |
|
|
35 |
NS_ASSUME_NONNULL_END |