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.7 KiB
Swift
46 lines
1.7 KiB
Swift
//
|
|
// TopupIn.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct TopupIn: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AmountCents is how much to charge, in cents of Currency. Required. */
|
|
public var amountCents: Int64?
|
|
/** Currency is the ISO-4217 code to charge in. Empty takes the deployment's own default. */
|
|
public var currency: String?
|
|
/** MethodID names a card the subject already saved, for the saved-card endpoint. */
|
|
public var paymentMethodId: String?
|
|
/** SourceID is a single-use card token from the payment form, for the token endpoint. It is vaulted as part of the charge, so a caller never holds card numbers and this service never sees one. */
|
|
public var sourceId: String?
|
|
|
|
public init(amountCents: Int64? = nil, currency: String? = nil, paymentMethodId: String? = nil, sourceId: String? = nil) {
|
|
self.amountCents = amountCents
|
|
self.currency = currency
|
|
self.paymentMethodId = paymentMethodId
|
|
self.sourceId = sourceId
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case amountCents
|
|
case currency
|
|
case paymentMethodId
|
|
case sourceId
|
|
}
|
|
|
|
// 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(currency, forKey: .currency)
|
|
try container.encodeIfPresent(paymentMethodId, forKey: .paymentMethodId)
|
|
try container.encodeIfPresent(sourceId, forKey: .sourceId)
|
|
}
|
|
}
|
|
|