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.
56 lines
1.9 KiB
Swift
56 lines
1.9 KiB
Swift
//
|
|
// TreasuryReport.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct TreasuryReport: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** lifetime revenue-share into the fund */
|
|
public var accruedCents: Int64?
|
|
/** program → lifetime paid */
|
|
public var byProgramCents: [String: Int64]?
|
|
/** lifetime backed payouts out of the fund */
|
|
public var paidCents: Int64?
|
|
/** current revenue-share policy */
|
|
public var policy: SharePolicy?
|
|
/** fund:reserve balance (available now) */
|
|
public var reserveCents: Int64?
|
|
/** reserve > 0: at least some payout is backable */
|
|
public var solventForPayout: Bool?
|
|
|
|
public init(accruedCents: Int64? = nil, byProgramCents: [String: Int64]? = nil, paidCents: Int64? = nil, policy: SharePolicy? = nil, reserveCents: Int64? = nil, solventForPayout: Bool? = nil) {
|
|
self.accruedCents = accruedCents
|
|
self.byProgramCents = byProgramCents
|
|
self.paidCents = paidCents
|
|
self.policy = policy
|
|
self.reserveCents = reserveCents
|
|
self.solventForPayout = solventForPayout
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case accruedCents
|
|
case byProgramCents
|
|
case paidCents
|
|
case policy
|
|
case reserveCents
|
|
case solventForPayout
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(accruedCents, forKey: .accruedCents)
|
|
try container.encodeIfPresent(byProgramCents, forKey: .byProgramCents)
|
|
try container.encodeIfPresent(paidCents, forKey: .paidCents)
|
|
try container.encodeIfPresent(policy, forKey: .policy)
|
|
try container.encodeIfPresent(reserveCents, forKey: .reserveCents)
|
|
try container.encodeIfPresent(solventForPayout, forKey: .solventForPayout)
|
|
}
|
|
}
|
|
|