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.
130 lines
5.3 KiB
Swift
130 lines
5.3 KiB
Swift
//
|
|
// BillingInvoice.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct BillingInvoice: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var amountDue: Int64?
|
|
public var amountPaid: Int64?
|
|
public var attemptCount: Int64?
|
|
public var createdAt: String?
|
|
public var creditApplied: Int64?
|
|
public var currency: String?
|
|
public var customerEmail: String?
|
|
public var discount: Int64?
|
|
public var dueDate: String?
|
|
public var id: String?
|
|
/** LineItems carries no omitempty and is never allocated empty, because the wire it reproduces sends `null` for an invoice with no lines. An empty array there would be a different answer to \"were there lines\". */
|
|
public var lineItems: [InvoiceLineItem]?
|
|
public var number: Int64?
|
|
public var numberStr: String?
|
|
public var paidAt: String?
|
|
public var paymentMethod: String?
|
|
public var paymentRef: String?
|
|
public var periodEnd: String?
|
|
public var periodStart: String?
|
|
public var status: String?
|
|
public var subscriptionId: String?
|
|
public var subtotal: Int64?
|
|
public var tax: Int64?
|
|
public var updatedAt: String?
|
|
public var userId: String?
|
|
public var voidedAt: String?
|
|
|
|
public init(amountDue: Int64? = nil, amountPaid: Int64? = nil, attemptCount: Int64? = nil, createdAt: String? = nil, creditApplied: Int64? = nil, currency: String? = nil, customerEmail: String? = nil, discount: Int64? = nil, dueDate: String? = nil, id: String? = nil, lineItems: [InvoiceLineItem]? = nil, number: Int64? = nil, numberStr: String? = nil, paidAt: String? = nil, paymentMethod: String? = nil, paymentRef: String? = nil, periodEnd: String? = nil, periodStart: String? = nil, status: String? = nil, subscriptionId: String? = nil, subtotal: Int64? = nil, tax: Int64? = nil, updatedAt: String? = nil, userId: String? = nil, voidedAt: String? = nil) {
|
|
self.amountDue = amountDue
|
|
self.amountPaid = amountPaid
|
|
self.attemptCount = attemptCount
|
|
self.createdAt = createdAt
|
|
self.creditApplied = creditApplied
|
|
self.currency = currency
|
|
self.customerEmail = customerEmail
|
|
self.discount = discount
|
|
self.dueDate = dueDate
|
|
self.id = id
|
|
self.lineItems = lineItems
|
|
self.number = number
|
|
self.numberStr = numberStr
|
|
self.paidAt = paidAt
|
|
self.paymentMethod = paymentMethod
|
|
self.paymentRef = paymentRef
|
|
self.periodEnd = periodEnd
|
|
self.periodStart = periodStart
|
|
self.status = status
|
|
self.subscriptionId = subscriptionId
|
|
self.subtotal = subtotal
|
|
self.tax = tax
|
|
self.updatedAt = updatedAt
|
|
self.userId = userId
|
|
self.voidedAt = voidedAt
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case amountDue
|
|
case amountPaid
|
|
case attemptCount
|
|
case createdAt
|
|
case creditApplied
|
|
case currency
|
|
case customerEmail
|
|
case discount
|
|
case dueDate
|
|
case id
|
|
case lineItems
|
|
case number
|
|
case numberStr
|
|
case paidAt
|
|
case paymentMethod
|
|
case paymentRef
|
|
case periodEnd
|
|
case periodStart
|
|
case status
|
|
case subscriptionId
|
|
case subtotal
|
|
case tax
|
|
case updatedAt
|
|
case userId
|
|
case voidedAt
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(amountDue, forKey: .amountDue)
|
|
try container.encodeIfPresent(amountPaid, forKey: .amountPaid)
|
|
try container.encodeIfPresent(attemptCount, forKey: .attemptCount)
|
|
try container.encodeIfPresent(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(creditApplied, forKey: .creditApplied)
|
|
try container.encodeIfPresent(currency, forKey: .currency)
|
|
try container.encodeIfPresent(customerEmail, forKey: .customerEmail)
|
|
try container.encodeIfPresent(discount, forKey: .discount)
|
|
try container.encodeIfPresent(dueDate, forKey: .dueDate)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(lineItems, forKey: .lineItems)
|
|
try container.encodeIfPresent(number, forKey: .number)
|
|
try container.encodeIfPresent(numberStr, forKey: .numberStr)
|
|
try container.encodeIfPresent(paidAt, forKey: .paidAt)
|
|
try container.encodeIfPresent(paymentMethod, forKey: .paymentMethod)
|
|
try container.encodeIfPresent(paymentRef, forKey: .paymentRef)
|
|
try container.encodeIfPresent(periodEnd, forKey: .periodEnd)
|
|
try container.encodeIfPresent(periodStart, forKey: .periodStart)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(subscriptionId, forKey: .subscriptionId)
|
|
try container.encodeIfPresent(subtotal, forKey: .subtotal)
|
|
try container.encodeIfPresent(tax, forKey: .tax)
|
|
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
|
|
try container.encodeIfPresent(userId, forKey: .userId)
|
|
try container.encodeIfPresent(voidedAt, forKey: .voidedAt)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension BillingInvoice: Identifiable {}
|