File tree Expand file tree Collapse file tree 5 files changed +12
-3
lines changed Expand file tree Collapse file tree 5 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 3636 */
3737@property (nonatomic , readonly ) BOOL needsConsent;
3838
39+ /* *
40+ A string that describes the expected consent flow.
41+ */
42+ @property (nonatomic , readonly , nullable ) NSString *consentProvider;
43+
3944/* *
4045 A specific property associated with some errors for the GUCE Consent flow.
4146 */
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ - (nonnull instancetype)initWithErrors:(nonnull NSArray <NSDictionary *> *)error
4646 id needsAge = error[@" gdpr_needs_age" ];
4747 id authToken = error[@" gdpr_auth_token" ];
4848 id minimumRequiredAge = error[@" gdpr_minimum_required_age" ];
49+ id consentProvider = error[@" consent_provider" ];
4950
5051 /* *
5152 * Only accept these things if they are the right type :/
@@ -64,7 +65,7 @@ - (nonnull instancetype)initWithErrors:(nonnull NSArray <NSDictionary *> *)error
6465 const NSInteger finalCodeValue = [code integerValue ];
6566 const NSInteger finalMinimumRequiredAgeValue = [minimumRequiredAge integerValue ];
6667
67- [APIErrors addObject: [[TMTopLevelAPIError alloc ] initWithLogout: finalLogoutValue title: title detail: detail code: finalCodeValue needsConsent: finalNeedsConsentValue isConsentBlocking: finalIsConsentBockingValue needsAge: finalNeedsAgeValue minimumRequiredAge: finalMinimumRequiredAgeValue authToken: authToken]];
68+ [APIErrors addObject: [[TMTopLevelAPIError alloc ] initWithLogout: finalLogoutValue title: title detail: detail code: finalCodeValue needsConsent: finalNeedsConsentValue isConsentBlocking: finalIsConsentBockingValue needsAge: finalNeedsAgeValue minimumRequiredAge: finalMinimumRequiredAgeValue consentProvider: consentProvider authToken: authToken]];
6869 }
6970 }
7071 return APIErrors;
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ @implementation TMLegacyAPIError
1717@synthesize minimumRequiredAge = _minimumRequiredAge;
1818@synthesize isConsentBlocking = _isConsentBlocking;
1919@synthesize authToken = _authToken;
20+ @synthesize consentProvider = _consentProvider;
2021
2122- (nonnull instancetype )initWithTitle : (nonnull NSString *)title detail : (nonnull NSString *)detail {
2223 NSParameterAssert (title);
Original file line number Diff line number Diff line change @@ -30,6 +30,6 @@ __attribute__((objc_subclassing_restricted))
3030 *
3131 * @return An initialized instance of @c TMTopLevelAPIError.
3232 */
33- - (nonnull instancetype )initWithLogout:(BOOL )logout title:(nonnull NSString *)title detail:(nonnull NSString *)detail code:(NSInteger )code needsConsent:(BOOL )needsConsent isConsentBlocking:(BOOL )isConsentBlocking needsAge:(BOOL )needsAge minimumRequiredAge:(NSInteger )minimumRequiredAge authToken:(NSString * _Nullable)authToken;
33+ - (nonnull instancetype )initWithLogout:(BOOL )logout title:(nonnull NSString *)title detail:(nonnull NSString *)detail code:(NSInteger )code needsConsent:(BOOL )needsConsent isConsentBlocking:(BOOL )isConsentBlocking needsAge:(BOOL )needsAge minimumRequiredAge:(NSInteger )minimumRequiredAge consentProvider:( NSString * _Nullable)consentProvider authToken:(NSString * _Nullable)authToken;
3434
3535@end
Original file line number Diff line number Diff line change @@ -18,8 +18,9 @@ @implementation TMTopLevelAPIError
1818@synthesize minimumRequiredAge = _minimumRequiredAge;
1919@synthesize isConsentBlocking = _isConsentBlocking;
2020@synthesize authToken = _authToken;
21+ @synthesize consentProvider = _consentProvider;
2122
22- - (nonnull instancetype )initWithLogout : (BOOL )logout title : (nonnull NSString *)title detail : (nonnull NSString *)detail code : (NSInteger )code needsConsent : (BOOL )needsConsent isConsentBlocking : (BOOL )isConsentBlocking needsAge : (BOOL )needsAge minimumRequiredAge : (NSInteger )minimumRequiredAge authToken : (NSString * _Nullable)authToken {
23+ - (nonnull instancetype )initWithLogout : (BOOL )logout title : (nonnull NSString *)title detail : (nonnull NSString *)detail code : (NSInteger )code needsConsent : (BOOL )needsConsent isConsentBlocking : (BOOL )isConsentBlocking needsAge : (BOOL )needsAge minimumRequiredAge : (NSInteger )minimumRequiredAge consentProvider : ( NSString *) consentProvider authToken : (NSString * _Nullable)authToken {
2324 NSParameterAssert (title);
2425 NSParameterAssert (detail);
2526 self = [super init ];
@@ -34,6 +35,7 @@ - (nonnull instancetype)initWithLogout:(BOOL)logout title:(nonnull NSString *)ti
3435 _needsConsent = needsConsent;
3536 _isConsentBlocking = isConsentBlocking;
3637 _authToken = authToken;
38+ _consentProvider = consentProvider;
3739 }
3840
3941 return self;
You can’t perform that action at this time.
0 commit comments