Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conform StripeClient to Sendable #274

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.7
// swift-tools-version:5.10
import PackageDescription

let package = Package(
Expand All @@ -13,7 +13,7 @@ let package = Package(
.library(name: "StripeKit", targets: ["StripeKit"])
],
dependencies: [
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.1.0"),
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.24.0"),
.package(url: "https://github.com/apple/swift-crypto.git", "1.0.0" ..< "4.0.0"),
],
targets: [
Expand Down
2 changes: 1 addition & 1 deletion Sources/StripeKit/Checkout/SessionRoutes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import NIO
import NIOHTTP1
import Foundation

public protocol SessionRoutes {
public protocol SessionRoutes: Sendable {
/// Creates a Session object.
/// - Parameters:
/// - lineItems: A list of items the customer is purchasing. Use this parameter to pass one-time or recurring Prices. For payment mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. For subscription mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.
Expand Down
2 changes: 1 addition & 1 deletion Sources/StripeKit/StripeAPIRoute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation
import NIOHTTP1

public protocol StripeAPIRoute {
public protocol StripeAPIRoute: Sendable {
var headers: HTTPHeaders { get set }

/// Headers to send with the request.
Expand Down
2 changes: 1 addition & 1 deletion Sources/StripeKit/StripeClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import NIO
import AsyncHTTPClient

public final class StripeClient {
public struct StripeClient: Sendable {
// MARK: - CORE RESOURCES
public var balances: BalanceRoutes
public var balanceTransactions: BalanceTransactionRoutes
Expand Down
2 changes: 1 addition & 1 deletion Tests/StripeKitTests/ExpandableTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import XCTest
@testable import StripeKit

class ExpandableTests: XCTestCase {
final class ExpandableTests: XCTestCase {

func testDynamicExpandable_decodesProperly() throws {

Expand Down
2 changes: 1 addition & 1 deletion Tests/StripeKitTests/QueryEncodingTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import XCTest
@testable import StripeKit

class QueryEncodingTests: XCTestCase {
final class QueryEncodingTests: XCTestCase {

func testSimpleQueryEncodedProperly() throws {
let query = [
Expand Down
2 changes: 1 addition & 1 deletion Tests/StripeKitTests/SignatureVerificationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import XCTest
@testable import StripeKit
import Crypto

class SignatureVerificationTests: XCTestCase {
final class SignatureVerificationTests: XCTestCase {
var jsonData: Data = try! JSONEncoder().encode(["key": "value"])
var secret: String = "SECRET"

Expand Down
Loading