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

74 lines
3.1 KiB
Swift

//
// GLRow.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct GLRow: Sendable, Codable, ParameterConvertible, Hashable {
/** Account is the chart-of-accounts number this leg posts to. */
public var account: String?
/** Against names the OTHER accounts in the same voucher — the contra side of this leg — so a single row reads as an entry rather than as half of one. */
public var against: String?
/** Credit is the amount credited to that account, in whole cents. */
public var credit: Int64?
/** Debit is the amount debited to that account, in whole cents. Exactly one of debit and credit is non-zero on a leg; a negative amount is never used to mean the other side. */
public var debit: Int64?
/** ID is the entry's position in the ledger. The ledger is append-only, so ids ascend with posting order and a higher id is a later entry. */
public var id: Int64?
/** PostingAt is the accounting date this entry belongs to — what the reports window on, which need not be when the row was written. */
public var postingAt: String?
/** Remarks is the memo carried onto the entry, for a human reading the ledger. */
public var remarks: String?
/** SourceID identifies that originating record within its kind. */
public var sourceId: String?
/** SourceKind is what caused the posting: a bank line, a scanned document, a commerce sale. With sourceId it traces the entry back to the thing that produced it. */
public var sourceKind: String?
public init(account: String? = nil, against: String? = nil, credit: Int64? = nil, debit: Int64? = nil, id: Int64? = nil, postingAt: String? = nil, remarks: String? = nil, sourceId: String? = nil, sourceKind: String? = nil) {
self.account = account
self.against = against
self.credit = credit
self.debit = debit
self.id = id
self.postingAt = postingAt
self.remarks = remarks
self.sourceId = sourceId
self.sourceKind = sourceKind
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case account
case against
case credit
case debit
case id
case postingAt
case remarks
case sourceId
case sourceKind
}
// 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(against, forKey: .against)
try container.encodeIfPresent(credit, forKey: .credit)
try container.encodeIfPresent(debit, forKey: .debit)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(postingAt, forKey: .postingAt)
try container.encodeIfPresent(remarks, forKey: .remarks)
try container.encodeIfPresent(sourceId, forKey: .sourceId)
try container.encodeIfPresent(sourceKind, forKey: .sourceKind)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension GLRow: Identifiable {}