-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc68adc
commit abbfe44
Showing
17 changed files
with
317 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
BVSDK/BVConversations/Display/Sorting & Filtering/BVRelevancySortTypeValue.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// BVRelevancySortTypeValue.h | ||
// BVSDK | ||
// | ||
// Copyright © 2022 Bazaarvoice. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
typedef NS_ENUM(NSInteger, BVRelevancySortTypeValue) { | ||
BVRelevancySortTypeValueA2, | ||
}; | ||
|
||
|
12 changes: 12 additions & 0 deletions
12
BVSDK/BVConversations/Display/Sorting & Filtering/BVReviewsRelevancySortOptionValue.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// | ||
// BVReviewsRelevancySortOptionValue.h | ||
// BVSDK | ||
// | ||
// Copyright © 2022 Bazaarvoice. All rights reserved. | ||
// | ||
#import <Foundation/Foundation.h> | ||
|
||
typedef NS_ENUM(NSInteger, BVReviewsRelevancySortOptionValue) { | ||
BVReviewsRelevancySortOptionValueRelevancy | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
BVSDK/BVConversations/Display/Sorting & Filtering/BVSortTypeValues.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// BVSortTypeValues.h | ||
// BVSDK | ||
// | ||
// Copyright © 2022 Bazaarvoice. All rights reserved. | ||
// | ||
|
||
#ifndef BVSortTypeValues_h | ||
#define BVSortTypeValues_h | ||
|
||
#import "BVRelevancySortTypeValue.h" | ||
|
||
#endif /* BVSortTypeValues_h */ |
16 changes: 16 additions & 0 deletions
16
BVSDK/BVConversations/Display/Sorting & Filtering/Private/BVRelevancySortType.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// BVRelevancySortType.h | ||
// BVSDK | ||
// | ||
// Copyright © 2022 Bazaarvoice. All rights reserved. | ||
// | ||
|
||
#import "BVRelevancySortTypeValue.h" | ||
#import "BVSortType.h" | ||
|
||
@interface BVRelevancySortType : BVSortType | ||
|
||
- (nonnull instancetype)initWithRelevancySortTypeValue: | ||
(BVRelevancySortTypeValue)relevancySortTypeValue; | ||
|
||
@end |
45 changes: 45 additions & 0 deletions
45
BVSDK/BVConversations/Display/Sorting & Filtering/Private/BVRelevancySortType.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
// BVRelevancySortType.m | ||
// BVSDK | ||
// | ||
// Copyright © 2022 Bazaarvoice. All rights reserved. | ||
// | ||
|
||
#import "BVRelevancySortType.h" | ||
|
||
@interface BVRelevancySortType () | ||
@property(nonnull, nonatomic, strong) NSString *value; | ||
@end | ||
|
||
@implementation BVRelevancySortType | ||
|
||
+ (nonnull NSString *)toSortTypeParameterStringWithRawValue: | ||
(NSInteger)rawValue { | ||
return [BVRelevancySortType sortTypeWithRawValue:rawValue].value; | ||
} | ||
|
||
+ (nonnull instancetype)sortTypeWithRawValue:(NSInteger)rawValue { | ||
return [[BVRelevancySortType alloc] initWithRawValue:rawValue]; | ||
} | ||
|
||
- (nonnull instancetype)initWithRawValue:(NSInteger)rawValue { | ||
if ((self = [super initWithRawValue:rawValue])) { | ||
switch (rawValue) { | ||
case BVRelevancySortTypeValueA2: | ||
self.value = @"A2"; | ||
break; | ||
} | ||
} | ||
return self; | ||
} | ||
|
||
- (nonnull NSString *)toSortTypeParameterString { | ||
return self.value; | ||
} | ||
|
||
- (nonnull instancetype)initWithRelevancySortTypeValue: | ||
(BVRelevancySortTypeValue)relevancySortTypeValue { | ||
return [BVRelevancySortType sortTypeWithRawValue:relevancySortTypeValue]; | ||
} | ||
|
||
@end |
17 changes: 17 additions & 0 deletions
17
BVSDK/BVConversations/Display/Sorting & Filtering/Private/BVReviewsRelevancySortOption.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// BVReviewsRelevancySortOption.h | ||
// BVSDK | ||
// | ||
// Copyright © 2022 Bazaarvoice. All rights reserved. | ||
// | ||
|
||
#import "BVReviewsRelevancySortOptionValue.h" | ||
#import "BVSortOption.h" | ||
|
||
@interface BVReviewsRelevancySortOption : BVSortOption | ||
|
||
- (nonnull instancetype)initWithReviewsRelevancySortOptionValue: | ||
(BVReviewsRelevancySortOptionValue)reviewsRelevancySortOptionValue; | ||
|
||
@end | ||
|
46 changes: 46 additions & 0 deletions
46
BVSDK/BVConversations/Display/Sorting & Filtering/Private/BVReviewsRelevancySortOption.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// BVReviewsRelevancySortOption.m | ||
// BVSDK | ||
// | ||
// Copyright © 2022 Bazaarvoice. All rights reserved. | ||
// | ||
|
||
#import "BVReviewsRelevancySortOption.h" | ||
|
||
@interface BVReviewsRelevancySortOption () | ||
@property(nonnull, nonatomic, strong) NSString *value; | ||
@end | ||
|
||
@implementation BVReviewsRelevancySortOption | ||
|
||
+ (nonnull NSString *)toSortOptionParameterStringWithRawValue: | ||
(NSInteger)rawValue { | ||
return [BVReviewsRelevancySortOption sortOptionWithRawValue:rawValue].value; | ||
} | ||
|
||
+ (nonnull instancetype)sortOptionWithRawValue:(NSInteger)rawValue { | ||
return [[BVReviewsRelevancySortOption alloc] initWithRawValue:rawValue]; | ||
} | ||
|
||
- (nonnull instancetype)initWithRawValue:(NSInteger)rawValue { | ||
if ((self = [super initWithRawValue:rawValue])) { | ||
switch (rawValue) { | ||
case BVReviewsRelevancySortOptionValueRelevancy: | ||
self.value = @"Relevancy"; | ||
break; | ||
} | ||
} | ||
return self; | ||
} | ||
|
||
- (nonnull NSString *)toSortOptionParameterString { | ||
return self.value; | ||
} | ||
|
||
- (nonnull instancetype)initWithReviewsRelevancySortOptionValue: | ||
(BVReviewsRelevancySortOptionValue)reviewsRelevancySortOptionValue { | ||
return [BVReviewsRelevancySortOption sortOptionWithRawValue:reviewsRelevancySortOptionValue]; | ||
} | ||
|
||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.