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.
46 lines
1.8 KiB
Swift
46 lines
1.8 KiB
Swift
//
|
|
// Account.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Account: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Name is the account's human name, for a statement's line label. */
|
|
public var name: String?
|
|
/** Number is the posting key every voucher leg, rule and report references — stable, and the reason the chart is a fixed value rather than a table anybody can edit. It looks numeric and is a string: \"1000\" sorts and compares as text. */
|
|
public var number: String?
|
|
/** Party marks the account as carrying a SUBLEDGER — receivable is money owed to us, payable money we owe — so a leg posted here also writes a payment-ledger row against a counterparty. Absent means no subledger: a bank, wallet, revenue or cost account tracks no counterparty at all. */
|
|
public var party: String?
|
|
/** Type is the account's fundamental class, which is also its NORMAL balance side: asset and expense are debit-normal, liability, income and equity credit-normal. */
|
|
public var type: String?
|
|
|
|
public init(name: String? = nil, number: String? = nil, party: String? = nil, type: String? = nil) {
|
|
self.name = name
|
|
self.number = number
|
|
self.party = party
|
|
self.type = type
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case name
|
|
case number
|
|
case party
|
|
case type
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(number, forKey: .number)
|
|
try container.encodeIfPresent(party, forKey: .party)
|
|
try container.encodeIfPresent(type, forKey: .type)
|
|
}
|
|
}
|
|
|