mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-12 16:23:32 +01:00
25 lines
488 B
Swift
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
|
|
}
|
|
}
|