mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
66 lines
2.6 KiB
Swift
66 lines
2.6 KiB
Swift
//
|
|
// FinancialPackage.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct FinancialPackage: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** BalanceSheet is struck as of the period END, not the start. */
|
|
public var balanceSheet: BalanceSheet?
|
|
/** From opens the reporting period. Absent means from the beginning of the ledger. */
|
|
public var from: String?
|
|
/** GeneratedAt is when the bundle was assembled — the moment the statements were struck, which is what makes two exports of the same period comparable. */
|
|
public var generatedAt: String?
|
|
/** GL is the newest slice of ledger detail, as the audit trail behind the statements. It is CAPPED, so on a busy ledger it is a sample rather than the full support for the figures above. */
|
|
public var gl: [GLRow]?
|
|
/** Org is the organisation whose books these are — the validated caller's own, stamped so a downloaded bundle still says whose it is. */
|
|
public var org: String?
|
|
/** PnL is the income statement for the period, on an accrual basis. */
|
|
public var pnl: PnL?
|
|
/** To closes it. Absent means up to now. */
|
|
public var to: String?
|
|
/** TrialBalance is the proof the ledger balances over the period. */
|
|
public var trialBalance: TrialBalance?
|
|
|
|
public init(balanceSheet: BalanceSheet? = nil, from: String? = nil, generatedAt: String? = nil, gl: [GLRow]? = nil, org: String? = nil, pnl: PnL? = nil, to: String? = nil, trialBalance: TrialBalance? = nil) {
|
|
self.balanceSheet = balanceSheet
|
|
self.from = from
|
|
self.generatedAt = generatedAt
|
|
self.gl = gl
|
|
self.org = org
|
|
self.pnl = pnl
|
|
self.to = to
|
|
self.trialBalance = trialBalance
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case balanceSheet
|
|
case from
|
|
case generatedAt
|
|
case gl
|
|
case org
|
|
case pnl
|
|
case to
|
|
case trialBalance
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(balanceSheet, forKey: .balanceSheet)
|
|
try container.encodeIfPresent(from, forKey: .from)
|
|
try container.encodeIfPresent(generatedAt, forKey: .generatedAt)
|
|
try container.encodeIfPresent(gl, forKey: .gl)
|
|
try container.encodeIfPresent(org, forKey: .org)
|
|
try container.encodeIfPresent(pnl, forKey: .pnl)
|
|
try container.encodeIfPresent(to, forKey: .to)
|
|
try container.encodeIfPresent(trialBalance, forKey: .trialBalance)
|
|
}
|
|
}
|
|
|