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

56 lines
2.0 KiB
Swift

//
// CommerceOverview.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct CommerceOverview: Sendable, Codable, ParameterConvertible, Hashable {
/** AOV is average order value — Revenue/Orders, rounded to two places. Zero when there were no orders. */
public var aov: Double?
/** Available is false when the product-event table could not be read — the lens is reported missing rather than as zeros that look like no sales. */
public var available: Bool?
/** Orders is how many order_completed events landed in the window. */
public var orders: Int64?
/** Reason says why the lens is unavailable. Omitted when it is available. */
public var reason: String?
/** Revenue is the total those orders carried, in the events' own currency unit. */
public var revenue: Double?
/** Source is the warehouse table the lens read. */
public var source: String?
public init(aov: Double? = nil, available: Bool? = nil, orders: Int64? = nil, reason: String? = nil, revenue: Double? = nil, source: String? = nil) {
self.aov = aov
self.available = available
self.orders = orders
self.reason = reason
self.revenue = revenue
self.source = source
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case aov
case available
case orders
case reason
case revenue
case source
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(aov, forKey: .aov)
try container.encodeIfPresent(available, forKey: .available)
try container.encodeIfPresent(orders, forKey: .orders)
try container.encodeIfPresent(reason, forKey: .reason)
try container.encodeIfPresent(revenue, forKey: .revenue)
try container.encodeIfPresent(source, forKey: .source)
}
}