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.
69 lines
2.4 KiB
Swift
69 lines
2.4 KiB
Swift
//
|
|
// CaptableInvestment.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct CaptableInvestment: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Amount is the cash invested. */
|
|
public var amount: Double?
|
|
/** Date is the ISO date of the investment. */
|
|
public var date: String?
|
|
/** ID is the investment id. */
|
|
public var id: String?
|
|
/** RoundID is the round the cheque went into. */
|
|
public var roundId: String?
|
|
/** ShareClassID is the class shares were issued in, for a priced round. */
|
|
public var shareClassId: String?
|
|
/** Shares is how many shares the investment bought; 0 when the round issues no equity at the time of investment. */
|
|
public var shares: Int64?
|
|
/** StakeholderID is the investor. */
|
|
public var stakeholderId: String?
|
|
/** StakeholderName is that investor's name. */
|
|
public var stakeholderName: String?
|
|
|
|
public init(amount: Double? = nil, date: String? = nil, id: String? = nil, roundId: String? = nil, shareClassId: String? = nil, shares: Int64? = nil, stakeholderId: String? = nil, stakeholderName: String? = nil) {
|
|
self.amount = amount
|
|
self.date = date
|
|
self.id = id
|
|
self.roundId = roundId
|
|
self.shareClassId = shareClassId
|
|
self.shares = shares
|
|
self.stakeholderId = stakeholderId
|
|
self.stakeholderName = stakeholderName
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case amount
|
|
case date
|
|
case id
|
|
case roundId
|
|
case shareClassId
|
|
case shares
|
|
case stakeholderId
|
|
case stakeholderName
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(amount, forKey: .amount)
|
|
try container.encodeIfPresent(date, forKey: .date)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(roundId, forKey: .roundId)
|
|
try container.encodeIfPresent(shareClassId, forKey: .shareClassId)
|
|
try container.encodeIfPresent(shares, forKey: .shares)
|
|
try container.encodeIfPresent(stakeholderId, forKey: .stakeholderId)
|
|
try container.encodeIfPresent(stakeholderName, forKey: .stakeholderName)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension CaptableInvestment: Identifiable {}
|