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.
61 lines
2.0 KiB
Swift
61 lines
2.0 KiB
Swift
//
|
|
// Offer.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Offer: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** whether it can be bought right now */
|
|
public var available: Bool?
|
|
/** the currency both prices are in */
|
|
public var currency: String?
|
|
/** the name this quote prices */
|
|
public var domain: String?
|
|
/** whether the registry prices it above the standard rate */
|
|
public var premium: Bool?
|
|
/** sell (first-term registration) */
|
|
public var priceCents: Int64?
|
|
/** sell (renewal) */
|
|
public var renewalPriceCents: Int64?
|
|
/** the top-level domain the name sits under */
|
|
public var tld: String?
|
|
|
|
public init(available: Bool? = nil, currency: String? = nil, domain: String? = nil, premium: Bool? = nil, priceCents: Int64? = nil, renewalPriceCents: Int64? = nil, tld: String? = nil) {
|
|
self.available = available
|
|
self.currency = currency
|
|
self.domain = domain
|
|
self.premium = premium
|
|
self.priceCents = priceCents
|
|
self.renewalPriceCents = renewalPriceCents
|
|
self.tld = tld
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case available
|
|
case currency
|
|
case domain
|
|
case premium
|
|
case priceCents
|
|
case renewalPriceCents
|
|
case tld
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(available, forKey: .available)
|
|
try container.encodeIfPresent(currency, forKey: .currency)
|
|
try container.encodeIfPresent(domain, forKey: .domain)
|
|
try container.encodeIfPresent(premium, forKey: .premium)
|
|
try container.encodeIfPresent(priceCents, forKey: .priceCents)
|
|
try container.encodeIfPresent(renewalPriceCents, forKey: .renewalPriceCents)
|
|
try container.encodeIfPresent(tld, forKey: .tld)
|
|
}
|
|
}
|
|
|