Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
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.
2026-09-05 18:55:38 -07:00

61 lines
2.5 KiB
Swift

//
// Collected.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct Collected: Sendable, Codable, ParameterConvertible, Hashable {
/** BalanceUsedCents is how much was covered by prepaid balance. */
public var balanceUsedCents: Int64?
/** CardChargedCents is how much was charged to the card on file. */
public var cardChargedCents: Int64?
/** CreditUsedCents is how much was covered by credit grants. */
public var creditUsedCents: Int64?
/** Invoice is the invoice AFTER the attempt — its status is the authority on what happened, not this struct's other fields. */
public var invoice: Invoice?
/** Paid reports whether the invoice is now settled in full. A false here with no error is a DECLINE: the invoice stays open and may be collected again. */
public var paid: Bool?
/** ProcessorRef is the processor's reference for any card charge — the field that proves money moved at the gateway rather than only in our ledger. */
public var processorRef: String?
/** Reason explains a decline or partial collection. Empty on success. */
public var reason: String?
public init(balanceUsedCents: Int64? = nil, cardChargedCents: Int64? = nil, creditUsedCents: Int64? = nil, invoice: Invoice? = nil, paid: Bool? = nil, processorRef: String? = nil, reason: String? = nil) {
self.balanceUsedCents = balanceUsedCents
self.cardChargedCents = cardChargedCents
self.creditUsedCents = creditUsedCents
self.invoice = invoice
self.paid = paid
self.processorRef = processorRef
self.reason = reason
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case balanceUsedCents
case cardChargedCents
case creditUsedCents
case invoice
case paid
case processorRef
case reason
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(balanceUsedCents, forKey: .balanceUsedCents)
try container.encodeIfPresent(cardChargedCents, forKey: .cardChargedCents)
try container.encodeIfPresent(creditUsedCents, forKey: .creditUsedCents)
try container.encodeIfPresent(invoice, forKey: .invoice)
try container.encodeIfPresent(paid, forKey: .paid)
try container.encodeIfPresent(processorRef, forKey: .processorRef)
try container.encodeIfPresent(reason, forKey: .reason)
}
}