diff --git a/BVSDK.podspec b/BVSDK.podspec index 4a2bc334..90b68151 100644 --- a/BVSDK.podspec +++ b/BVSDK.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.name = "BVSDK" - s.version = '8.9.1' + s.version = '8.10.0' s.homepage = 'https://developer.bazaarvoice.com/' s.license = { :type => 'Commercial', :text => 'See https://developer.bazaarvoice.com/API_Terms_of_Use' } s.author = { 'Bazaarvoice' => 'support@bazaarvoice.com' } diff --git a/BVSDK.xcodeproj/project.pbxproj b/BVSDK.xcodeproj/project.pbxproj index 27e2af83..279d1d5f 100644 --- a/BVSDK.xcodeproj/project.pbxproj +++ b/BVSDK.xcodeproj/project.pbxproj @@ -3754,6 +3754,7 @@ buildSettings = { CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = TH9FFAVND4; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", "COCOAPODS=1", @@ -3774,6 +3775,7 @@ buildSettings = { CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = TH9FFAVND4; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", "COCOAPODS=1", diff --git a/BVSDK/BVCommon/BVSDKConstants.h b/BVSDK/BVCommon/BVSDKConstants.h index ef29ae44..b7ff6bf5 100644 --- a/BVSDK/BVCommon/BVSDKConstants.h +++ b/BVSDK/BVCommon/BVSDKConstants.h @@ -10,7 +10,7 @@ #define BVSDKConstants_h /// Provides the master version of the SDK. -#define BV_SDK_VERSION @"8.9.1" +#define BV_SDK_VERSION @"8.10.1" /// Conversation SDK Version #define SDK_HEADER_NAME @"X-UA-BV-SDK" diff --git a/BVSDK/BVConversations/Display/Model/BVProductStatistics.h b/BVSDK/BVConversations/Display/Model/BVProductStatistics.h index 864bb0b4..82a58c26 100644 --- a/BVSDK/BVConversations/Display/Model/BVProductStatistics.h +++ b/BVSDK/BVConversations/Display/Model/BVProductStatistics.h @@ -7,6 +7,7 @@ #import "BVGenericConversationsResult.h" #import "BVReviewStatistic.h" +#import "BVQAStatistics.h" #import /* @@ -17,5 +18,6 @@ @property(nullable) NSString *productId; @property(nullable) BVReviewStatistic *reviewStatistics; @property(nullable) BVReviewStatistic *nativeReviewStatistics; +@property(nullable) BVQAStatistics *qaStatisctics; @end diff --git a/BVSDK/BVConversations/Display/Model/BVProductStatistics.m b/BVSDK/BVConversations/Display/Model/BVProductStatistics.m index a6dacf8a..6708ace9 100644 --- a/BVSDK/BVConversations/Display/Model/BVProductStatistics.m +++ b/BVSDK/BVConversations/Display/Model/BVProductStatistics.m @@ -21,6 +21,8 @@ - (nonnull id)initWithApiResponse:(nonnull NSDictionary *)apiResponse initWithApiResponse:productStatistics[@"ReviewStatistics"]]; self.nativeReviewStatistics = [[BVReviewStatistic alloc] initWithApiResponse:productStatistics[@"NativeReviewStatistics"]]; + self.qaStatisctics = [[BVQAStatistics alloc] + initWithApiResponse:productStatistics[@"QAStatistics"]]; } return self; } diff --git a/BVSDK/BVConversations/Display/Sorting & Filtering/BVBulkRatingIncludeTypeValue.h b/BVSDK/BVConversations/Display/Sorting & Filtering/BVBulkRatingIncludeTypeValue.h index 3ed77b00..e522f40d 100644 --- a/BVSDK/BVConversations/Display/Sorting & Filtering/BVBulkRatingIncludeTypeValue.h +++ b/BVSDK/BVConversations/Display/Sorting & Filtering/BVBulkRatingIncludeTypeValue.h @@ -13,6 +13,8 @@ typedef NS_ENUM(NSInteger, BVBulkRatingIncludeTypeValue) { BVBulkRatingIncludeTypeValueBulkRatingReviews, BVBulkRatingIncludeTypeValueBulkRatingNativeReviews, + BVBulkRatingIncludeTypeValueBulkRatingQuestions, + BVBulkRatingIncludeTypeValueBulkRatingNativeAnswers, BVBulkRatingIncludeTypeValueBulkRatingAll }; diff --git a/BVSDK/BVConversations/Display/Sorting & Filtering/Private/BVBulkRatingIncludeType.m b/BVSDK/BVConversations/Display/Sorting & Filtering/Private/BVBulkRatingIncludeType.m index c7108a99..0730c78a 100644 --- a/BVSDK/BVConversations/Display/Sorting & Filtering/Private/BVBulkRatingIncludeType.m +++ b/BVSDK/BVConversations/Display/Sorting & Filtering/Private/BVBulkRatingIncludeType.m @@ -31,8 +31,14 @@ - (nonnull instancetype)initWithRawValue:(NSInteger)rawValue { case BVBulkRatingIncludeTypeValueBulkRatingNativeReviews: self.value = @"NativeReviews"; break; + case BVBulkRatingIncludeTypeValueBulkRatingNativeAnswers: + self.value = @"Answers"; + break; + case BVBulkRatingIncludeTypeValueBulkRatingQuestions: + self.value = @"Questions"; + break; case BVBulkRatingIncludeTypeValueBulkRatingAll: - self.value = @"Reviews,NativeReviews"; + self.value = @"Reviews,NativeReviews,Answers,Questions"; break; } } diff --git a/BVSDK/Support/Info.plist b/BVSDK/Support/Info.plist index f494e945..1fc3205e 100644 --- a/BVSDK/Support/Info.plist +++ b/BVSDK/Support/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 8.9.1 + 8.10.0 CFBundleVersion 1 LSApplicationCategoryType diff --git a/BVSDKTests/ConversationsTests/DisplayTests/InlineRatingsDisplayTests.swift b/BVSDKTests/ConversationsTests/DisplayTests/InlineRatingsDisplayTests.swift index 6c52da9d..733839d5 100644 --- a/BVSDKTests/ConversationsTests/DisplayTests/InlineRatingsDisplayTests.swift +++ b/BVSDKTests/ConversationsTests/DisplayTests/InlineRatingsDisplayTests.swift @@ -130,4 +130,30 @@ class InlineRatingsDisplayTests: XCTestCase { } + func testInlineRatingsQAstatistics() { + + let configDict = ["clientId": "apitestcustomer", + "apiKeyConversations": "caB45h2jBqXFw1OE043qoMBD1gJC8EwFNCjktzgwncXY4"]; + BVSDKManager.configure(withConfiguration: configDict, configType: .staging) + + + let expectation = self.expectation(description: "testInlineRatingsQAstatistics") + + let request = + BVBulkRatingsRequest(productIds: ["data-gen-moppq9ekthfzbc6qff3bqokie"], statistics: .bulkRatingAll) + .filter(on: .bulkRatingContentLocale, relationalFilterOperatorValue: .equalTo, values: ["en_US"]) + + request.load({ (response) in + XCTAssertEqual(response.results.count, 1) + XCTAssertNotNil(response.results[0].qaStatisctics?.totalQuestionCount) + XCTAssertNotNil(response.results[0].qaStatisctics?.totalAnswerCount) + expectation.fulfill() + }) { (error) in + XCTFail("inline ratings request error: \(error)") + } + + self.waitForExpectations(timeout: 10) { (error) in + XCTAssertNil(error, "Something went horribly wrong, request took too long.") + } + } }