public struct InvoiceAttachment: Codable {
public let id: Any
public let description: String
public init(id: Any, description: String) {
self.id = id
self.description = description
}
public init(from decoder: Decoder) throws {
self.id = ""
do {
let container = try decoder.singleValueContainer()
self.description = try container.decode(String.self)
} catch {
self.description = "Ooops"
}
}
public func encode(to encoder: Encoder) throws {
var container = encoder.singleValueContainer()
try container.encode(self.description)
}
}