Skip to content

Commit

Permalink
Bump ktlint from 0.41.0 to 0.42.1 (#4092)
Browse files Browse the repository at this point in the history
* Bump ktlint from 0.41.0 to 0.42.1

Bumps [ktlint](https://github.com/pinterest/ktlint) from 0.41.0 to 0.42.1.
- [Release notes](https://github.com/pinterest/ktlint/releases)
- [Changelog](https://github.com/pinterest/ktlint/blob/master/CHANGELOG.md)
- [Commits](pinterest/ktlint@0.41.0...0.42.1)

---
updated-dependencies:
- dependency-name: com.pinterest:ktlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix formatting.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michelle Brubaker <michelleb@stripe.com>
  • Loading branch information
dependabot[bot] and michelleb-stripe authored Aug 9, 2021
1 parent 6bf3031 commit 456e2ea
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
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

0 comments on commit 456e2ea

Please sign in to comment.