Files
SideStore/Sources/SideStoreCore/Patreon/Benefit.swift
2023-03-10 19:30:09 -05:00

25 lines
488 B
Swift

//
// Benefit.swift
// AltStore
//
// Created by Riley Testut on 8/21/19.
// Copyright © 2019 Riley Testut. All rights reserved.
//
import Foundation
extension PatreonAPI {
struct BenefitResponse: Decodable {
var id: String
}
}
public struct Benefit: Hashable {
public var type: ALTPatreonBenefitType
init?(response: PatreonAPI.BenefitResponse) {
guard let type = ALTPatreonBenefitType(rawValue: response.id) else { return nil }
self.type = type
}
}