File tree Expand file tree Collapse file tree 1 file changed +22
-6
lines changed
Modules/Sources/Networking/Remote Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,11 @@ import Foundation
55public 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+ }
You can’t perform that action at this time.
0 commit comments