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

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

The newest version!
package com.revenuecat.purchases.kmp.mappings

import cocoapods.PurchasesHybridCommon.RCPaymentModeFreeTrial
import cocoapods.PurchasesHybridCommon.RCPaymentModePayAsYouGo
import cocoapods.PurchasesHybridCommon.RCPaymentModePayUpFront
import com.revenuecat.purchases.kmp.models.DiscountPaymentMode
import cocoapods.PurchasesHybridCommon.RCPaymentMode as IosDiscountPaymentMode

internal fun IosDiscountPaymentMode.toDiscountPaymentMode(): DiscountPaymentMode =
    when (this) {
        RCPaymentModeFreeTrial -> DiscountPaymentMode.FREE_TRIAL
        RCPaymentModePayAsYouGo -> DiscountPaymentMode.PAY_AS_YOU_GO
        RCPaymentModePayUpFront -> DiscountPaymentMode.PAY_UP_FRONT
        else -> error("Unexpected RCPaymentMode: $this")
    }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy