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

46 lines
1.8 KiB
Swift

//
// PnLLine.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct PnLLine: Sendable, Codable, ParameterConvertible, Hashable {
/** Account is the chart-of-accounts number this line reports on. */
public var account: String?
/** Amount is the account's movement over the period in whole cents, in its NATURAL sign: positive when the account behaved normally, for income and expense alike. Income is credit-normal so its stored net is flipped once here for display; the ledger underneath is never sign-flipped. A negative amount therefore means the account ran backwards — a refunded sale, a reversed cost. */
public var amount: Int64?
/** Name is that account's human name from the fixed chart. */
public var name: String?
/** Type is the account's fundamental class, which on this statement is always income or expense — it tells a reader which half of the statement the line came from without re-deriving it from the array it arrived in. */
public var type: String?
public init(account: String? = nil, amount: Int64? = nil, name: String? = nil, type: String? = nil) {
self.account = account
self.amount = amount
self.name = name
self.type = type
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case account
case amount
case name
case type
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(account, forKey: .account)
try container.encodeIfPresent(amount, forKey: .amount)
try container.encodeIfPresent(name, forKey: .name)
try container.encodeIfPresent(type, forKey: .type)
}
}