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

71 lines
3.5 KiB
Swift

//
// Quote.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct Quote: Sendable, Codable, ParameterConvertible, Hashable {
/** ChargeCents is what month one costs after the discount, in USD cents, totalled over the seats quoted. On team that is a multiple of the seat count, so it is not ListCents minus DiscountCents. */
public var chargeCents: Int64?
/** Code is the promo that was priced, as stored. */
public var code: String?
/** DiscountCents is what the promo takes off month one, in USD cents. The promo rate reaches at most TeamSeatCap seats; seats past the cap bill at full list and add nothing here. It is arithmetic only — quoting credits nothing, counts nothing and reserves nothing. */
public var discountCents: Int64?
/** Eligible says whether a redeem would be accepted right now; Reason says why not when it would not. */
public var eligible: Bool?
/** ListCents is the undiscounted month price in USD cents: PER SEAT on team, the whole month on pro and max, 0 for a plan with no list price. */
public var listCents: Int64?
/** Plan is the tier priced, lower-cased and trimmed: pro, max or team. Unlike a redemption's plan this one comes from the REQUEST — quoting has no side effects, so it will happily price a plan the caller does not hold. */
public var plan: String?
/** Reason is why Eligible is false, drawn from: \"promo redemption is closed\" (the subsystem is off, which is how it ships), \"promo redemption cap reached\", \"promo is not active\", \"plan is free or unknown; nothing to discount\", \"promo does not cover plan <plan>\". Absent when Eligible is true. */
public var reason: String?
/** Remaining is how many redemptions are left under the fleet-wide cap. */
public var remaining: Int64?
/** Seats is the seat count priced; a request of 0 or less was read as 1. It only bites on team, the one per-seat plan — pro and max are single-seat and ignore it. */
public var seats: Int64?
public init(chargeCents: Int64? = nil, code: String? = nil, discountCents: Int64? = nil, eligible: Bool? = nil, listCents: Int64? = nil, plan: String? = nil, reason: String? = nil, remaining: Int64? = nil, seats: Int64? = nil) {
self.chargeCents = chargeCents
self.code = code
self.discountCents = discountCents
self.eligible = eligible
self.listCents = listCents
self.plan = plan
self.reason = reason
self.remaining = remaining
self.seats = seats
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case chargeCents
case code
case discountCents
case eligible
case listCents
case plan
case reason
case remaining
case seats
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(chargeCents, forKey: .chargeCents)
try container.encodeIfPresent(code, forKey: .code)
try container.encodeIfPresent(discountCents, forKey: .discountCents)
try container.encodeIfPresent(eligible, forKey: .eligible)
try container.encodeIfPresent(listCents, forKey: .listCents)
try container.encodeIfPresent(plan, forKey: .plan)
try container.encodeIfPresent(reason, forKey: .reason)
try container.encodeIfPresent(remaining, forKey: .remaining)
try container.encodeIfPresent(seats, forKey: .seats)
}
}