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.5 KiB
Swift
59 lines
2.5 KiB
Swift
//
|
|
// Application.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Application: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Code is the minted referral code. Empty on a first apply — applying does not mint a code, approval does; a re-apply echoes whatever the row already holds. */
|
|
public var code: String?
|
|
/** Created says whether THIS call made the row. false means the org had already applied and nothing changed — no second row, no reset of an existing approval. The HTTP status states the same fact: 201 when true, 200 when false. */
|
|
public var created: Bool?
|
|
/** ID is the affiliate's server-minted handle, \"aff_\"-prefixed — the id staff approve, suspend, re-rate and pay against. */
|
|
public var id: String?
|
|
/** RateBps is the direct (level 1) commission rate the row carries, in basis points OF Hanzo's margin (2000 = 20% of margin, never of the customer's bill). */
|
|
public var rateBps: Int64?
|
|
/** RequestedCode echoes the vanity code asked for, normalized to lower case. It is a request only: approval mints a different slug if this one is taken. */
|
|
public var requestedCode: String?
|
|
/** Status is \"applied\" for a row this call created. A re-apply echoes the existing row's status, which may already be \"approved\" or \"suspended\". */
|
|
public var status: String?
|
|
|
|
public init(code: String? = nil, created: Bool? = nil, id: String? = nil, rateBps: Int64? = nil, requestedCode: String? = nil, status: String? = nil) {
|
|
self.code = code
|
|
self.created = created
|
|
self.id = id
|
|
self.rateBps = rateBps
|
|
self.requestedCode = requestedCode
|
|
self.status = status
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case code
|
|
case created
|
|
case id
|
|
case rateBps
|
|
case requestedCode
|
|
case status
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(code, forKey: .code)
|
|
try container.encodeIfPresent(created, forKey: .created)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(rateBps, forKey: .rateBps)
|
|
try container.encodeIfPresent(requestedCode, forKey: .requestedCode)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension Application: Identifiable {}
|