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.
46 lines
1.5 KiB
Swift
46 lines
1.5 KiB
Swift
//
|
|
// InvoiceLine.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct InvoiceLine: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Amount is the line total in whole cents (250000 is $2,500.00). */
|
|
public var amount: Int64?
|
|
/** Description is the human-readable line, e.g. \"Advisory retainer — August\". */
|
|
public var description: String?
|
|
/** Quantity is the number of units, when the line is metered. Optional. */
|
|
public var quantity: Int64?
|
|
/** UnitPrice is the per-unit price in cents, when the line is metered. Optional. */
|
|
public var unitPrice: Int64?
|
|
|
|
public init(amount: Int64? = nil, description: String? = nil, quantity: Int64? = nil, unitPrice: Int64? = nil) {
|
|
self.amount = amount
|
|
self.description = description
|
|
self.quantity = quantity
|
|
self.unitPrice = unitPrice
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case amount
|
|
case description
|
|
case quantity
|
|
case unitPrice
|
|
}
|
|
|
|
// 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(description, forKey: .description)
|
|
try container.encodeIfPresent(quantity, forKey: .quantity)
|
|
try container.encodeIfPresent(unitPrice, forKey: .unitPrice)
|
|
}
|
|
}
|
|
|