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 |
|
|
16 |
/** |
|
17 |
The user's minimun age, nil if unspecified |
|
18 |
*/ |
|
19 |
@property (nullable, nonatomic, readonly, strong) NSNumber *min; |
|
20 |
/** |
|
21 |
The user's maximun age, nil if unspecified |
|
22 |
*/ |
|
23 |
@property (nullable, nonatomic, readonly, strong) NSNumber *max; |
|
24 |
|
|
25 |
- (instancetype)init NS_UNAVAILABLE; |
|
26 |
+ (instancetype)new NS_UNAVAILABLE; |
|
27 |
|
|
28 |
/** |
|
29 |
Returns a UserAgeRange object from a dinctionary containing valid user age range. |
|
30 |
@param dictionary The dictionary containing raw user age range |
|
31 |
|
|
32 |
Valid user age range will consist of "min" and/or "max" values that are |
|
33 |
positive integers, where "min" is smaller than or equal to "max". |
|
34 |
*/ |
|
35 |
+ (nullable instancetype)ageRangeFromDictionary:(NSDictionary<NSString *, NSNumber *> *)dictionary; |
|
36 |
|
|
37 |
@end |
|
38 |
|
|
39 |
NS_ASSUME_NONNULL_END |