Add BillingDependencies and shared implementation.

This commit is contained in:
Alex Hart
2024-09-05 13:46:55 -03:00
committed by Cody Henthorne
parent 36bfd19bcf
commit 982b90d423
6 changed files with 67 additions and 10 deletions

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2024 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.core.util.billing
import android.content.Context
/**
* Provides a dependency model by which the billing api can request different resources.
*/
interface BillingDependencies {
/**
* Application context
*/
val context: Context
/**
* Get the product id from the donations configuration object.
*/
suspend fun getProductId(): String
/**
* Get the base plan id from the donations configuration object.
*/
suspend fun getBasePlanId(): String
}