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.
41 lines
1.5 KiB
Swift
41 lines
1.5 KiB
Swift
//
|
|
// BookRequest.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct BookRequest: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Override books this bill even when one of the SAME economic identity (vendor, total, issue date) already posted — the explicit human confirmation that a same-looking bill is a genuine second spend, not the same receipt re-scanned. */
|
|
public var _override: Bool?
|
|
/** ScanID is the scanned document's file hash, as GET /v1/books/inbox and the scan draft report it. It is the idempotency key: re-booking the same scan writes nothing. */
|
|
public var scanId: String?
|
|
/** Voucher is the reviewed voucher to post. Its source is FORCED to (scan, scanId) server-side, so it can never be booked under another source's key. */
|
|
public var voucher: Voucher?
|
|
|
|
public init(_override: Bool? = nil, scanId: String? = nil, voucher: Voucher? = nil) {
|
|
self._override = _override
|
|
self.scanId = scanId
|
|
self.voucher = voucher
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case _override = "override"
|
|
case scanId
|
|
case voucher
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(_override, forKey: ._override)
|
|
try container.encodeIfPresent(scanId, forKey: .scanId)
|
|
try container.encodeIfPresent(voucher, forKey: .voucher)
|
|
}
|
|
}
|
|
|