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.
59 lines
2.4 KiB
Swift
59 lines
2.4 KiB
Swift
//
|
|
// Remittance.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Remittance: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AmountCents is the amount disbursed, in cents. It was reserved against pending commission atomically when recorded, so it never exceeds what was owed. */
|
|
public var amountCents: Int64?
|
|
/** CreatedAt is when the payout was recorded, Unix seconds UTC — when the balance moved, not necessarily when the cash landed. */
|
|
public var createdAt: Int64?
|
|
/** ID is the payout row's server-minted handle, \"apo_\"-prefixed. */
|
|
public var id: String?
|
|
/** Method is how it was settled. \"credits\" issued a commerce grant into the affiliate org's own wallet; any other value (wire, paypal, check, …) is a RECORD of cash a human moved out of band. */
|
|
public var method: String?
|
|
/** Reference is the operator's settlement note — a bank id, a ledger ref. Free text, absent when none was given. */
|
|
public var reference: String?
|
|
/** Txn is the commerce ledger transaction id, set ONLY where a \"credits\" payout actually issued the grant. Absent for cash methods, which write no ledger row. */
|
|
public var txn: String?
|
|
|
|
public init(amountCents: Int64? = nil, createdAt: Int64? = nil, id: String? = nil, method: String? = nil, reference: String? = nil, txn: String? = nil) {
|
|
self.amountCents = amountCents
|
|
self.createdAt = createdAt
|
|
self.id = id
|
|
self.method = method
|
|
self.reference = reference
|
|
self.txn = txn
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case amountCents
|
|
case createdAt
|
|
case id
|
|
case method
|
|
case reference
|
|
case txn
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(amountCents, forKey: .amountCents)
|
|
try container.encodeIfPresent(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(method, forKey: .method)
|
|
try container.encodeIfPresent(reference, forKey: .reference)
|
|
try container.encodeIfPresent(txn, forKey: .txn)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension Remittance: Identifiable {}
|