Skip to content

Commit b97fefe

Browse files
fix: AB test variant fields nullability (#720)
1 parent 8d927d1 commit b97fefe

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Sources/AlgoliaSearchClient/Models/Analytics/ABTest/Response/ABTestResponse+Variant.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ import Foundation
1010
extension ABTestResponse {
1111

1212
public struct Variant: Codable {
13+
14+
public let indexName: IndexName
15+
16+
public let trafficPercentage: Int
1317

1418
/// Distinct click count for the variant.
15-
public let clickCount: Int
19+
public let clickCount: Int?
1620

1721
/// Distinct conversion count for the variant.
18-
public let conversionCount: Int
19-
20-
public let description: String
22+
public let conversionCount: Int?
2123

22-
public let indexName: IndexName
23-
24-
public let trafficPercentage: Int
24+
public let description: String?
2525

2626
/// Conversion rate for the variant.
2727
public let conversionRate: Double?

Sources/AlgoliaSearchClient/Models/Analytics/ABTest/Response/ABTestResponse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public struct ABTestResponse {
1717
public let clickSignificance: Double?
1818

1919
/// ABTest significance based on conversion data.
20-
/// Should be > 0.95 to be considered significant (no matter which variant is winning
20+
/// Should be > 0.95 to be considered significant (no matter which variant is winning)
2121
public let conversionSignificance: Double?
2222

2323
/// Time at which the ABTest has been created.

0 commit comments

Comments
 (0)