ZendriveShiftDetail
@interface ZendriveShiftDetail : NSObject
Represents a shift comprising of shift intervals over the week.
-
The name of the shift.
Declaration
Objective-C
@property (nonatomic, nullable) NSString *shiftName;
-
The unique identifer used to identify a shift.
Declaration
Objective-C
@property (nonatomic, nonnull) NSString *shiftId;
-
An NSTimezone object which specifies the timezone of the shift.
Declaration
Objective-C
@property (nonatomic, nonnull) NSTimeZone *timezone;
-
Shift intervals specify the intervals when the SDK should be active.
Declaration
Objective-C
@property (nonatomic, nullable) NSArray<ZendriveShiftInterval *> *shiftIntervals;
-
Initialize the shift details object with shiftName, shiftId, timezone and shiftIntervals.
Declaration
Objective-C
- (id _Nonnull)initWithShiftName:(NSString *_Nullable)shiftName shiftId:(NSString *_Nonnull)shiftId timezone:(NSTimeZone *_Nonnull)timezone shiftIntervals:(NSArray<ZendriveShiftInterval *> *_Nonnull) shiftIntervals;
-
Initialize the shift details object with Dictionary.
Declaration
Objective-C
- (id _Nonnull)initWithDictionary:(NSDictionary *_Nonnull)dictionary;
-
Converts the ZendriveShiftDetail object to dictionary. This function could be used for printing the shift details returned by SDK. Example:
{ @"shift_id": "zendrive_shift_1", @"shift_name": "shift_1", @"timezone": "Asia/Kolkata", @"shift_intervals": {{ @"start_time": { @"day_of_week": @"Sunday", @"hour": 11, @"minute": 30 }, @"end_time": { @"day_of_week": @"Sunday", @"hour": 14, @"minute": 0 } }} }
Declaration
Objective-C
- (NSDictionary *_Nonnull)toDictionary;