mirror of
https://github.com/hanzo-swift/sdk.git
synced 2026-10-30 20:43:50 +00:00
36 lines
947 B
Swift
36 lines
947 B
Swift
//
|
|
// SpendPoint.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct SpendPoint: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Cents is the consumption recorded in that bucket, in US cents. */
|
|
public var cents: Int64?
|
|
/** T is the bucket's start instant, RFC3339 UTC. Buckets are gap-filled, so a window with no spend still has its points. */
|
|
public var t: String?
|
|
|
|
public init(cents: Int64? = nil, t: String? = nil) {
|
|
self.cents = cents
|
|
self.t = t
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case cents
|
|
case t
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(cents, forKey: .cents)
|
|
try container.encodeIfPresent(t, forKey: .t)
|
|
}
|
|
}
|
|
|