Updated on 2026-08-14

This commit is contained in:
Tangem 2025-12-23 18:54:08 +05:00
parent cea4ba817a
commit 737bb507d9
19 changed files with 221 additions and 75 deletions

View file

@ -29,6 +29,12 @@ interface TangemPayApi {
@Path("customer_wallet_id") customerWalletId: String,
): ApiResponse<CheckCustomerWalletResponse>
@PATCH("v1/customer/pay-enabled")
suspend fun setTangemPayEnabledStatus(
@Header("Authorization") authHeader: String,
@Body body: SetTangemPayEnabledRequest,
): ApiResponse<Any>
@POST("v1/deeplink/validate")
suspend fun validateDeeplink(@Body body: DeeplinkValidityRequest): ApiResponse<DeeplinkValidityResponse>

View file

@ -0,0 +1,9 @@
package com.tangem.datasource.api.pay.models.request
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class SetTangemPayEnabledRequest(
@Json(name = "is_tangem_pay_enabled") val isTangemPayEnabled: Boolean,
)

View file

@ -9,5 +9,6 @@ data class CheckCustomerWalletResponse(
) {
data class Result(
@Json(name = "id") val id: String?,
@Json(name = "is_tangem_pay_enabled") val isTangemPayEnabled: Boolean?,
)
}

View file

@ -8,9 +8,12 @@ interface TangemPayStorage {
suspend fun storeCustomerWalletAddress(userWalletId: UserWalletId, customerWalletAddress: String)
suspend fun getCustomerWalletAddress(userWalletId: UserWalletId): String?
suspend fun clearCustomerWalletAddress(userWalletId: UserWalletId)
suspend fun storeAuthTokens(customerWalletAddress: String, tokens: TangemPayAuthTokens)
suspend fun getAuthTokens(customerWalletAddress: String): TangemPayAuthTokens?
suspend fun clearAuthTokens(customerWalletAddress: String)
suspend fun storeOrderId(customerWalletAddress: String, orderId: String)