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

Fix incorrect paths in TerminalReaderRoutes #237

Merged
merged 1 commit into from
Sep 1, 2023
Merged
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
12 changes: 6 additions & 6 deletions Sources/StripeKit/Terminal/Reader/TerminalReaderRoutes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public struct StripeTerminalReaderRoutes: TerminalReaderRoutes {
body["expand"] = expand
}

return try await apiHandler.send(method: .POST, path: terminalreaders, query: "\(terminalreaders)/\(reader)/process_payment_intent", body: .string(body.queryParameters), headers: headers)
return try await apiHandler.send(method: .POST, path: "\(terminalreaders)/\(reader)/process_payment_intent", body: .string(body.queryParameters), headers: headers)
}

public func handoffSetupIntent(reader: String,
Expand All @@ -243,7 +243,7 @@ public struct StripeTerminalReaderRoutes: TerminalReaderRoutes {
body["expand"] = expand
}

return try await apiHandler.send(method: .POST, path: terminalreaders, query: "\(terminalreaders)/\(reader)/process_setup_intent", body: .string(body.queryParameters), headers: headers)
return try await apiHandler.send(method: .POST, path: "\(terminalreaders)/\(reader)/process_setup_intent", body: .string(body.queryParameters), headers: headers)
}

public func setupReaderDisplay(reader: String,
Expand All @@ -260,7 +260,7 @@ public struct StripeTerminalReaderRoutes: TerminalReaderRoutes {
body["expand"] = expand
}

return try await apiHandler.send(method: .POST, path: terminalreaders, query: "\(terminalreaders)/\(reader)/set_reader_display", body: .string(body.queryParameters), headers: headers)
return try await apiHandler.send(method: .POST, path: "\(terminalreaders)/\(reader)/set_reader_display", body: .string(body.queryParameters), headers: headers)
}

public func refund(reader: String,
Expand Down Expand Up @@ -297,7 +297,7 @@ public struct StripeTerminalReaderRoutes: TerminalReaderRoutes {
body["expand"] = expand
}

return try await apiHandler.send(method: .POST, path: terminalreaders, query: "\(terminalreaders)/\(reader)/refund_payment", body: .string(body.queryParameters), headers: headers)
return try await apiHandler.send(method: .POST, path: "\(terminalreaders)/\(reader)/refund_payment", body: .string(body.queryParameters), headers: headers)
}

public func cancelCurrentAction(reader: String, expand: [String]? = nil) async throws -> TerminalReader {
Expand All @@ -307,7 +307,7 @@ public struct StripeTerminalReaderRoutes: TerminalReaderRoutes {
body["expand"] = expand
}

return try await apiHandler.send(method: .POST, path: terminalreaders, query: "\(terminalreaders)/\(reader)/cancel_action", body: .string(body.queryParameters), headers: headers)
return try await apiHandler.send(method: .POST, path: "\(terminalreaders)/\(reader)/cancel_action", body: .string(body.queryParameters), headers: headers)
}

public func simulatePresentPaymentMethod(reader: String,
Expand Down Expand Up @@ -338,6 +338,6 @@ public struct StripeTerminalReaderRoutes: TerminalReaderRoutes {
body["expand"] = expand
}

return try await apiHandler.send(method: .POST, path: terminalreaders, query: "\(testhelpers)/\(reader)/present_payment_method", body: .string(body.queryParameters), headers: headers)
return try await apiHandler.send(method: .POST, path: "\(testhelpers)/\(reader)/present_payment_method", body: .string(body.queryParameters), headers: headers)
}
}