Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-02 17:49:20 +04:00
parent 8cff4c1bba
commit ab6072e12d
18 changed files with 219 additions and 57 deletions

View file

@ -103,4 +103,7 @@ interface TangemPayApi {
@GET("v1/customer/kyc")
suspend fun getKycAccess(@Header("Authorization") authHeader: String): ApiResponse<KycAccessInfoResponse>
@GET("v1/customer/me")
suspend fun getCustomerMe(@Header("Authorization") authHeader: String): ApiResponse<CustomerMeResponse>
}

View file

@ -0,0 +1,48 @@
package com.tangem.datasource.api.pay.models.response
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class CustomerMeResponse(
@Json(name = "result") val result: Result?,
@Json(name = "error") val error: String?,
) {
@JsonClass(generateAdapter = true)
data class Result(
@Json(name = "id") val id: String,
@Json(name = "state") val state: String,
@Json(name = "createdAt") val createdAt: String,
@Json(name = "product_instance") val productInstance: ProductInstance,
@Json(name = "payment_account") val paymentAccount: PaymentAccount,
@Json(name = "kyc") val kyc: Kyc,
)
@JsonClass(generateAdapter = true)
data class ProductInstance(
@Json(name = "id") val id: String,
@Json(name = "cid") val cid: String,
@Json(name = "card_id") val cardId: String,
@Json(name = "card_wallet_address") val cardWalletAddress: String,
@Json(name = "status") val status: String,
@Json(name = "updated_at") val updatedAt: String,
@Json(name = "payment_account_id") val paymentAccountId: String,
)
@JsonClass(generateAdapter = true)
data class PaymentAccount(
@Json(name = "id") val id: String,
@Json(name = "address") val address: String,
@Json(name = "customer_wallet_address") val customerWalletAddress: String,
)
@JsonClass(generateAdapter = true)
data class Kyc(
@Json(name = "id") val id: String,
@Json(name = "provider") val provider: String,
@Json(name = "status") val status: String,
@Json(name = "risk") val risk: String,
@Json(name = "review_answer") val reviewAnswer: String,
@Json(name = "created_at") val createdAt: String,
)
}

View file

@ -0,0 +1,10 @@
package com.tangem.datasource.local.visa
interface TangemPayStorage {
suspend fun store(authHeader: String)
suspend fun get(): String?
suspend fun clear()
}