Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 908ca6c

Browse files
committed
Make StatsEmailSummaryData properties public
1 parent afffbff commit 908ca6c

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

Sources/WordPressKit/Models/Stats/Emails/StatsEmailsSummaryData.swift

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Foundation
22
import WordPressShared
33

4-
public struct StatsEmailsSummaryData: Decodable {
4+
public struct StatsEmailsSummaryData: Decodable, Equatable {
55
public let posts: [Post]
66

77
public init(posts: [Post]) {
@@ -17,14 +17,24 @@ public struct StatsEmailsSummaryData: Decodable {
1717
posts = try container.decode([Post].self, forKey: .posts)
1818
}
1919

20-
public struct Post: Codable {
21-
let id: Int
22-
let link: URL
23-
let date: Date
24-
let title: String
25-
let type: PostType
26-
let opens: Int
27-
let clicks: Int
20+
public struct Post: Codable, Equatable {
21+
public let id: Int
22+
public let link: URL
23+
public let date: Date
24+
public let title: String
25+
public let type: PostType
26+
public let opens: Int
27+
public let clicks: Int
28+
29+
public init(id: Int, link: URL, date: Date, title: String, type: PostType, opens: Int, clicks: Int) {
30+
self.id = id
31+
self.link = link
32+
self.date = date
33+
self.title = title
34+
self.type = type
35+
self.opens = opens
36+
self.clicks = clicks
37+
}
2838

2939
public enum PostType: String, Codable {
3040
case post = "post"

0 commit comments

Comments
 (0)