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

Make EphemeralKeyProvider a fun interface #3508

Merged
merged 1 commit into from
Mar 23, 2021
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.LargeTest
import com.stripe.android.CustomerSession
import com.stripe.android.EphemeralKeyProvider
import com.stripe.android.EphemeralKeyUpdateListener
import com.stripe.example.R
import org.junit.Before
import org.junit.Rule
Expand All @@ -32,12 +30,8 @@ class AddFpxPaymentMethodTest {
fun setup() {
CustomerSession.initCustomerSession(
context,
object : EphemeralKeyProvider {
override fun createEphemeralKey(
apiVersion: String,
keyUpdateListener: EphemeralKeyUpdateListener
) {
}
ephemeralKeyProvider = { _, _ ->
// noop
}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ class ExampleApplication : Application() {
}

private companion object {
private val IS_PENALTY_DEATH_ENABLED = false
private const val IS_PENALTY_DEATH_ENABLED = false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import androidx.annotation.Size
* Represents an object that can call to a server and create
* [EphemeralKeys][EphemeralKey].
*/
interface EphemeralKeyProvider {
fun interface EphemeralKeyProvider {

/**
* When called, talks to a client server that then communicates with Stripe's servers to
Expand Down