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
3.1 KiB
Swift

//
// Txn.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct Txn: Sendable, Codable, ParameterConvertible, Hashable {
/** AmountCents is the voucher's total, in whole cents — its total debit, which equals its total credit because every voucher balances. It is the size of the entry and carries no direction; the category says which way it went. */
public var amountCents: Int64?
/** Category is the chart-of-accounts NUMBER of the income or expense account this voucher touched — where it lands on the P&L, not a free-text label. */
public var category: String?
/** CategoryName is that account's human name, so a caller need not carry the chart to render the row. */
public var categoryName: String?
/** Date is when the voucher POSTED — the accounting date the reports window on, which for an imported bank row is the bank's date and not the day it landed here. */
public var date: String?
/** Description is the line a person reads: the memo carried in from the source. */
public var description: String?
/** Source is where the entry came from: bank_txn for an imported statement line, scan for a receipt or bill read by the scanner, commerce_txn for a sale booked by the store. */
public var source: String?
/** Vendor is the counterparty, resolved from whatever the source knew — a bank row's merchant, a scanned bill's supplier. Absent when the source named none. */
public var vendor: String?
/** VoucherID identifies the underlying double-entry voucher, so a caller can open the full set of legs behind this single register line. */
public var voucherId: Int64?
public init(amountCents: Int64? = nil, category: String? = nil, categoryName: String? = nil, date: String? = nil, description: String? = nil, source: String? = nil, vendor: String? = nil, voucherId: Int64? = nil) {
self.amountCents = amountCents
self.category = category
self.categoryName = categoryName
self.date = date
self.description = description
self.source = source
self.vendor = vendor
self.voucherId = voucherId
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case amountCents
case category
case categoryName
case date
case description
case source
case vendor
case voucherId
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(amountCents, forKey: .amountCents)
try container.encodeIfPresent(category, forKey: .category)
try container.encodeIfPresent(categoryName, forKey: .categoryName)
try container.encodeIfPresent(date, forKey: .date)
try container.encodeIfPresent(description, forKey: .description)
try container.encodeIfPresent(source, forKey: .source)
try container.encodeIfPresent(vendor, forKey: .vendor)
try container.encodeIfPresent(voucherId, forKey: .voucherId)
}
}