mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
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.
41 lines
1.2 KiB
Swift
41 lines
1.2 KiB
Swift
//
|
|
// Leg.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Leg: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Account is the chart-of-accounts number this side posts to, e.g. \"5300\". */
|
|
public var account: String?
|
|
/** Credit is the leg's credit in exact cents. Set this or Debit, not both. */
|
|
public var credit: Int64?
|
|
/** Debit is the leg's debit in exact cents. Set this or Credit, not both. */
|
|
public var debit: Int64?
|
|
|
|
public init(account: String? = nil, credit: Int64? = nil, debit: Int64? = nil) {
|
|
self.account = account
|
|
self.credit = credit
|
|
self.debit = debit
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case account
|
|
case credit
|
|
case debit
|
|
}
|
|
|
|
// 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(credit, forKey: .credit)
|
|
try container.encodeIfPresent(debit, forKey: .debit)
|
|
}
|
|
}
|
|
|