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

Bump ktlint from 0.41.0 to 0.42.1 #4092

Merged
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ext {
kotlinCoroutinesVersion = '1.5.1'
composeVersion = '1.0.1'
espressoVersion = '3.4.0'
ktlintVersion = '0.41.0'
ktlintVersion = '0.42.1'
materialVersion = '1.4.0'
daggerVersion = '2.38.1'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ internal class DefaultFlowControllerInitializer @Inject constructor(
): Boolean {
return clientSecret is PaymentIntentClientSecret &&
paymentSheetConfiguration?.googlePay?.environment?.let { environment ->
googlePayRepositoryFactory(
when (environment) {
PaymentSheet.GooglePayConfiguration.Environment.Production ->
GooglePayEnvironment.Production
PaymentSheet.GooglePayConfiguration.Environment.Test ->
GooglePayEnvironment.Test
}
)
}?.isReady()?.first() ?: false
googlePayRepositoryFactory(
when (environment) {
PaymentSheet.GooglePayConfiguration.Environment.Production ->
GooglePayEnvironment.Production
PaymentSheet.GooglePayConfiguration.Environment.Test ->
GooglePayEnvironment.Test
}
)
}?.isReady()?.first() ?: false
}

private suspend fun createWithCustomer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@ import com.stripe.android.view.ShippingInfoWidget

internal object PaymentSessionFixtures {
internal val CONFIG = PaymentSessionConfig.Builder()

// hide the phone field on the shipping information form
.setHiddenShippingInfoFields(
ShippingInfoWidget.CustomizableShippingField.Line2
)

// make the address line 2 field optional
.setOptionalShippingInfoFields(
ShippingInfoWidget.CustomizableShippingField.Phone
)

// specify an address to pre-populate the shipping information form
.setPrepopulatedShippingInfo(
ShippingInformation(
Expand All @@ -35,30 +32,24 @@ internal object PaymentSessionFixtures {
"4158675309"
)
)

// collect shipping information
.setShippingInfoRequired(true)

// collect shipping method
.setShippingMethodsRequired(true)

// specify the payment method types that the customer can use;
// defaults to PaymentMethod.Type.Card
.setPaymentMethodTypes(
listOf(PaymentMethod.Type.Card)
)

// only allowed US and Canada shipping addresses
.setAllowedShippingCountryCodes(
setOf("US", "CA")
)
.setBillingAddressFields(BillingAddressFields.Full)
.setShouldPrefetchCustomer(true)

// Enable PaymentMethod Deletion from PaymentMethodActivity
// This is default behavior
.setCanDeletePaymentMethods(true)

.setShippingInformationValidator(FakeShippingInformationValidator())
.setShippingMethodsFactory(FakeShippingMethodsFactory())
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import android.view.inputmethod.EditorInfo
import com.stripe.android.model.PaymentMethodCreateParams
import com.stripe.android.model.PaymentMethodCreateParamsFixtures
import org.junit.runner.RunWith
import org.mockito.Mockito.`when`
import org.mockito.Mockito.verify
import org.mockito.Mockito.`when`
import org.mockito.kotlin.mock
import org.robolectric.RobolectricTestRunner
import kotlin.test.Test
Expand Down