-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61b1f24
commit 94503d7
Showing
3 changed files
with
57 additions
and
5 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
Sources/Flare/Classes/Models/Internal/ProductsRequest.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// Flare | ||
// Copyright © 2024 Space Code. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import StoreKit | ||
|
||
final class ProductsRequest: ISKRequest { | ||
// MARK: Properties | ||
|
||
private let request: SKRequest | ||
|
||
var id: String { request.id } | ||
|
||
// MARK: Initialization | ||
|
||
init(_ request: SKRequest) { | ||
self.request = request | ||
} | ||
|
||
// MARK: Hashable | ||
|
||
func hash(into hasher: inout Hasher) { | ||
hasher.combine(id) | ||
} | ||
|
||
// MARK: Equatable | ||
|
||
static func == (lhs: ProductsRequest, rhs: ProductsRequest) -> Bool { | ||
lhs.id == rhs.id | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
Sources/Flare/Classes/Models/Internal/Protocols/ISKRequest.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// | ||
// Flare | ||
// Copyright © 2024 Space Code. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol ISKRequest: Hashable { | ||
var id: String { get } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters