Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
The projection these were generated from predated the compute migration, so
they described /v1/visor — which the API serves at zero paths now.

No /v1/visor path survives here.
2026-09-05 18:55:38 -07:00

41 lines
1.4 KiB
Swift

//
// PromoStatus.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct PromoStatus: Sendable, Codable, ParameterConvertible, Hashable {
/** Promo is the offer itself. It is fleet-wide, identical for every org — only the two counters beside it move. */
public var promo: Promo?
/** Redeemed is how many orgs have taken it, Remaining how many are left under the fleet-wide cap. */
public var redeemed: Int64?
/** Remaining is MaxRedemptions minus Redeemed, floored at 0. At 0 the next redeem is declined, and a quote reports ineligible rather than pricing an offer that cannot be taken. */
public var remaining: Int64?
public init(promo: Promo? = nil, redeemed: Int64? = nil, remaining: Int64? = nil) {
self.promo = promo
self.redeemed = redeemed
self.remaining = remaining
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case promo
case redeemed
case remaining
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(promo, forKey: .promo)
try container.encodeIfPresent(redeemed, forKey: .redeemed)
try container.encodeIfPresent(remaining, forKey: .remaining)
}
}