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

Remove PaymentSession.paymentSessionData #2180

Merged
merged 1 commit into from
Feb 13, 2020
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
15 changes: 5 additions & 10 deletions stripe/src/main/java/com/stripe/android/PaymentSession.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ class PaymentSession @VisibleForTesting internal constructor(
)
)[PaymentSessionViewModel::class.java]

/**
* @return the data associated with the instance of this class.
*/
val paymentSessionData: PaymentSessionData
get() = viewModel.paymentSessionData

@JvmSynthetic
internal var listener: PaymentSessionListener? = null

Expand Down Expand Up @@ -188,9 +182,10 @@ class PaymentSession @VisibleForTesting internal constructor(
* data changes. The reference to the [listener] will be released when the host (i.e.
* `Activity` or `Fragment`) is destroyed.
*
* If the [PaymentSessionConfig.shouldPrefetchCustomer] is true, a new Customer instance
* will be fetched. Otherwise, the [listener] will be immediately called with the current
* [paymentSessionData].
* The [listener] will be immediately called with the current [PaymentSessionData].
*
* If the [PaymentSessionConfig.shouldPrefetchCustomer] is true, a new `Customer` instance
* will be fetched.
*
* @param listener a [PaymentSessionListener]
*/
Expand Down Expand Up @@ -254,7 +249,7 @@ class PaymentSession @VisibleForTesting internal constructor(
paymentFlowActivityStarter.startForResult(
PaymentFlowActivityStarter.Args(
paymentSessionConfig = config,
paymentSessionData = paymentSessionData,
paymentSessionData = viewModel.paymentSessionData,
isPaymentSessionActive = true,
windowFlags = config.windowFlags
)
Expand Down