Package com.stripe.android.payments.core.injection

Types

CoroutineContextModule
Link copied to clipboard
@Module
class CoroutineContextModule
Injectable
Link copied to clipboard
interface Injectable<FallbackInitializeParam>

Mark a class that can be injected by a Injector. This should be implemented by classes that cannot directly have their dependencies injected through constructor and need to have them injected through lateinit properties.

Injector
Link copied to clipboard
interface Injector

Mark a class that can inject into Injectables.

InjectorKey
Link copied to clipboard
@Qualifier
annotation class InjectorKey

Annotation to identify an Injector instance.

IntentAuthenticatorKey
Link copied to clipboard
@MapKey
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class IntentAuthenticatorKey(value: KClass<out StripeIntent.NextActionData>)

MapKey for the IntentAuthenticatorMap, encapsulating the NextActionData class type.

IntentAuthenticatorMap
Link copied to clipboard
@Qualifier
annotation class IntentAuthenticatorMap

Qualifier for the multibinding map between NextActionData and PaymentAuthenticator.

IOContext
Link copied to clipboard
@Qualifier
annotation class IOContext

Qualifier for coroutine context used for IO.

LoggingModule
Link copied to clipboard
@Module
class LoggingModule
StripeRepositoryModule
Link copied to clipboard
@Module
abstract class StripeRepositoryModule

A Module to provide StripeRepository and its corresponding dependencies. Context, Logger, PUBLISHABLE_KEY, PRODUCT_USAGE and IOContext need to be provided elsewhere to use this module.

UIContext
Link copied to clipboard
@Qualifier
annotation class UIContext

Qualifier for coroutine context used for UI.

WeakMapInjectorRegistry
Link copied to clipboard
object WeakMapInjectorRegistry : InjectorRegistry

A InjectorRegistry implemented with a weak map. An entry from the map will be will be garbage collected once the Injector instance is no longer held elsewhere.

Functions

injectWithFallback
Link copied to clipboard
fun <FallbackInitializeParam> Injectable<FallbackInitializeParam>.injectWithFallback(injectorKey: String?, fallbackInitializeParam: FallbackInitializeParam)

Try use an InjectorKey to retrieve an Injector and inject, if no Injector is found, invoke Injectable.fallbackInitialize with fallbackInitializeParam.

Properties

DUMMY_INJECTOR_KEY
Link copied to clipboard
const val DUMMY_INJECTOR_KEY: String

Dummy key when an Injector is not available.

ENABLE_LOGGING
Link copied to clipboard
const val ENABLE_LOGGING: String

Name for injected boolean to denote if logging is enabled.

IS_PAYMENT_INTENT
Link copied to clipboard
const val IS_PAYMENT_INTENT: String

Name to indicate whether the current StripeIntent is a PaymentIntent or SetupIntent.

PRODUCT_USAGE
Link copied to clipboard
const val PRODUCT_USAGE: String

Name for injected set if strings to represent product usage for analytics.

PUBLISHABLE_KEY
Link copied to clipboard
const val PUBLISHABLE_KEY: String

Name for user's publishable key

STRIPE_ACCOUNT_ID
Link copied to clipboard
const val STRIPE_ACCOUNT_ID: String

Name for user's account id