This repository was archived by the owner on Sep 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathJetpackAssistantFeatureDetails.swift
More file actions
79 lines (69 loc) · 2.46 KB
/
Copy pathJetpackAssistantFeatureDetails.swift
File metadata and controls
79 lines (69 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import Foundation
public final class JetpackAssistantFeatureDetails: Codable {
public let hasFeature: Bool
/// Returns `true` if you are out of limit for the current plan.
public let isOverLimit: Bool
/// The all-time request count.
public let requestsCount: Int
/// The request limit for a free plan.
public let requestsLimit: Int
/// Contains data about the user plan.
public let currentTier: Tier?
public let usagePeriod: UsagePeriod?
public let isSiteUpdateRequired: Bool?
public let upgradeType: String?
public let upgradeURL: String?
public let nextTier: Tier?
public let tierPlans: [Tier]?
public let tierPlansEnabled: Bool?
public let costs: Costs?
public struct Tier: Codable {
public let slug: String?
public let limit: Int
public let value: Int
public let readableLimit: String?
enum CodingKeys: String, CodingKey {
case slug, limit, value
case readableLimit = "readable-limit"
}
}
public struct UsagePeriod: Codable {
public let currentStart: String?
public let nextStart: String?
public let requestsCount: Int
enum CodingKeys: String, CodingKey {
case currentStart = "current-start"
case nextStart = "next-start"
case requestsCount = "requests-count"
}
}
public struct Costs: Codable {
public let jetpackAILogoGenerator: JetpackAILogoGenerator
public let featuredPostImage: FeaturedPostImage
enum CodingKeys: String, CodingKey {
case jetpackAILogoGenerator = "jetpack-ai-logo-generator"
case featuredPostImage = "featured-post-image"
}
}
public struct FeaturedPostImage: Codable {
public let image: Int
}
public struct JetpackAILogoGenerator: Codable {
public let logo: Int
}
enum CodingKeys: String, CodingKey {
case hasFeature = "has-feature"
case isOverLimit = "is-over-limit"
case requestsCount = "requests-count"
case requestsLimit = "requests-limit"
case usagePeriod = "usage-period"
case isSiteUpdateRequired = "site-require-upgrade"
case upgradeURL = "upgrade-url"
case upgradeType = "upgrade-type"
case currentTier = "current-tier"
case nextTier = "next-tier"
case tierPlans = "tier-plans"
case tierPlansEnabled = "tier-plans-enabled"
case costs
}
}