All Downloads are FREE. Search and download functionalities are using the official Maven repository.

iosMain.com.revenuecat.purchases.kmp.mappings.Offerings.ios.kt Maven / Gradle / Ivy

There is a newer version: 1.3.2+13.9.0
Show newest version
package com.revenuecat.purchases.kmp.mappings

import com.revenuecat.purchases.kmp.models.Offerings
import com.revenuecat.purchases.kmp.mappings.ktx.mapEntries
import cocoapods.PurchasesHybridCommon.RCOffering as IosOffering
import cocoapods.PurchasesHybridCommon.RCOfferings as IosOfferings

public fun IosOfferings.toOfferings(): Offerings =
    Offerings(
        current = current()?.toOffering(),
        all = all().mapEntries { (offeringId, offering) ->
            offeringId as String to (offering as IosOffering).toOffering()
        }
    )




© 2015 - 2024 Weber Informatics LLC | Privacy Policy