mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
46 lines
1.6 KiB
Swift
46 lines
1.6 KiB
Swift
//
|
|
// CartOpen.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct CartOpen: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Currency is the ISO 4217 code the cart is priced in, lower-cased. Empty means usd. */
|
|
public var currency: String?
|
|
/** Email is the shopper's address, for a cart that belongs to someone who has not signed in. It is what a guest checkout and an abandoned-cart follow-up key on. Empty is fine. */
|
|
public var email: String?
|
|
/** Store is the storefront this cart is being filled on. Empty uses the org's default store, which is what a single-storefront merchant always wants. */
|
|
public var store: String?
|
|
/** User is the id of the signed-in shopper this cart belongs to, when there is one. Empty means a guest cart identified only by its own id. */
|
|
public var user: String?
|
|
|
|
public init(currency: String? = nil, email: String? = nil, store: String? = nil, user: String? = nil) {
|
|
self.currency = currency
|
|
self.email = email
|
|
self.store = store
|
|
self.user = user
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case currency
|
|
case email
|
|
case store
|
|
case user
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(currency, forKey: .currency)
|
|
try container.encodeIfPresent(email, forKey: .email)
|
|
try container.encodeIfPresent(store, forKey: .store)
|
|
try container.encodeIfPresent(user, forKey: .user)
|
|
}
|
|
}
|
|
|