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

66 lines
2.5 KiB
Swift

//
// Promo.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct Promo: Sendable, Codable, ParameterConvertible, Hashable {
/** Active is false for a promo that is no longer offered; an inactive promo quotes as ineligible and refuses to redeem. */
public var active: Bool?
/** Code is the promo id, e.g. \"first1000\". */
public var code: String?
/** CreatedAt is unix seconds. */
public var createdAt: Int64?
/** Description is the human-readable offer. */
public var description: String?
/** MaxRedemptions is the hard fleet-wide cap; the redemption past it is declined. */
public var maxRedemptions: Int64?
/** PercentOff is the discount applied to ONE month's list price. */
public var percentOff: Int64?
/** Plans is the csv of eligible plan ids (\"pro,max,team\"). */
public var plans: String?
/** TeamSeatCap is how many Team seats bill at the promo rate; seats beyond it bill at list. */
public var teamSeatCap: Int64?
public init(active: Bool? = nil, code: String? = nil, createdAt: Int64? = nil, description: String? = nil, maxRedemptions: Int64? = nil, percentOff: Int64? = nil, plans: String? = nil, teamSeatCap: Int64? = nil) {
self.active = active
self.code = code
self.createdAt = createdAt
self.description = description
self.maxRedemptions = maxRedemptions
self.percentOff = percentOff
self.plans = plans
self.teamSeatCap = teamSeatCap
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case active
case code
case createdAt
case description
case maxRedemptions
case percentOff
case plans
case teamSeatCap
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(active, forKey: .active)
try container.encodeIfPresent(code, forKey: .code)
try container.encodeIfPresent(createdAt, forKey: .createdAt)
try container.encodeIfPresent(description, forKey: .description)
try container.encodeIfPresent(maxRedemptions, forKey: .maxRedemptions)
try container.encodeIfPresent(percentOff, forKey: .percentOff)
try container.encodeIfPresent(plans, forKey: .plans)
try container.encodeIfPresent(teamSeatCap, forKey: .teamSeatCap)
}
}