Skip to content

Commit 961d2f9

Browse files
committed
Move SystemStatusRemote.Field raw value to a private extension.
1 parent 3a26eb2 commit 961d2f9

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

Modules/Sources/Networking/Remote/SystemStatusRemote.swift

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ import Foundation
55
public class SystemStatusRemote: Remote {
66
/// Fields that can be requested in the app from the system status endpoint.
77
/// Reference of all supported fields: https://woocommerce.github.io/woocommerce-rest-api-docs/#system-status-properties
8-
/// TODO: move raw value to private extension
9-
public enum Field: String {
10-
case activePlugins = "active_plugins"
11-
case inactivePlugins = "inactive_plugins"
12-
case environment = "environment"
13-
case settings = "settings"
8+
public enum Field {
9+
case activePlugins
10+
case inactivePlugins
11+
case environment
12+
case settings
1413
}
1514

1615
/// Retrieves information from the system status that belongs to the current site.
@@ -102,3 +101,20 @@ private extension SystemStatusRemote {
102101
static let fields: String = "_fields"
103102
}
104103
}
104+
105+
// MARK: - Field Raw Values
106+
//
107+
private extension SystemStatusRemote.Field {
108+
var rawValue: String {
109+
switch self {
110+
case .activePlugins:
111+
return "active_plugins"
112+
case .inactivePlugins:
113+
return "inactive_plugins"
114+
case .environment:
115+
return "environment"
116+
case .settings:
117+
return "settings"
118+
}
119+
}
120+
}

0 commit comments

Comments
 (0)