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.
65 lines
2.0 KiB
Swift
65 lines
2.0 KiB
Swift
//
|
|
// Transaction.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Transaction: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var amount: Int64?
|
|
public var createdAt: String?
|
|
public var currency: String?
|
|
public var expiresAt: String?
|
|
public var id: String?
|
|
public var metadata: JSONValue?
|
|
public var notes: String?
|
|
public var tags: String?
|
|
public var type: String?
|
|
|
|
public init(amount: Int64? = nil, createdAt: String? = nil, currency: String? = nil, expiresAt: String? = nil, id: String? = nil, metadata: JSONValue? = nil, notes: String? = nil, tags: String? = nil, type: String? = nil) {
|
|
self.amount = amount
|
|
self.createdAt = createdAt
|
|
self.currency = currency
|
|
self.expiresAt = expiresAt
|
|
self.id = id
|
|
self.metadata = metadata
|
|
self.notes = notes
|
|
self.tags = tags
|
|
self.type = type
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case amount
|
|
case createdAt
|
|
case currency
|
|
case expiresAt
|
|
case id
|
|
case metadata
|
|
case notes
|
|
case tags
|
|
case type
|
|
}
|
|
|
|
// 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(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(currency, forKey: .currency)
|
|
try container.encodeIfPresent(expiresAt, forKey: .expiresAt)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(metadata, forKey: .metadata)
|
|
try container.encodeIfPresent(notes, forKey: .notes)
|
|
try container.encodeIfPresent(tags, forKey: .tags)
|
|
try container.encodeIfPresent(type, forKey: .type)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension Transaction: Identifiable {}
|