iosMain.com.revenuecat.purchases.kmp.mappings.CacheFetchPolicy.ios.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of purchases-kmp-mappings Show documentation
Show all versions of purchases-kmp-mappings Show documentation
Mobile subscriptions in hours, not months.
package com.revenuecat.purchases.kmp.mappings
import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicyCachedOrFetched
import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicyFetchCurrent
import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicyFromCacheOnly
import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicyNotStaleCachedOrFetched
import com.revenuecat.purchases.kmp.models.CacheFetchPolicy
import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicy as IosCacheFetchPolicy
public fun CacheFetchPolicy.toIosCacheFetchPolicy(): IosCacheFetchPolicy =
when (this) {
CacheFetchPolicy.CACHE_ONLY -> RCCacheFetchPolicyFromCacheOnly
CacheFetchPolicy.FETCH_CURRENT -> RCCacheFetchPolicyFetchCurrent
CacheFetchPolicy.NOT_STALE_CACHED_OR_CURRENT -> RCCacheFetchPolicyNotStaleCachedOrFetched
CacheFetchPolicy.CACHED_OR_FETCHED -> RCCacheFetchPolicyCachedOrFetched
}