Updated on 2026-08-14

This commit is contained in:
Tangem 2026-07-14 17:43:51 +03:00
parent 15a518c576
commit 78cb0fc750
18 changed files with 747 additions and 15 deletions

View file

@ -202,4 +202,10 @@ interface TangemPayApi {
@Header("Authorization") authHeader: String,
@Header("Accept-Language") language: String,
): ApiResponse<CashbackAccrualDocsResponse>
@GET("v1/customer/cashback/history")
suspend fun getCashbackHistory(
@Header("Authorization") authHeader: String,
@Query("months") months: Int,
): ApiResponse<CashbackHistoryResponse>
}

View file

@ -0,0 +1,25 @@
package com.tangem.datasource.api.pay.models.response
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import java.math.BigDecimal
/**
* Response from `GET /v1/customer/cashback/history`.
*
* Confirmed cashback grouped by calendar month, ordered oldest to newest. Drives the monthly
* earnings histogram on the Cashback screen.
*/
@JsonClass(generateAdapter = true)
data class CashbackHistoryResponse(
@Json(name = "currency") val currency: String?,
@Json(name = "items") val items: List<Item>?,
) {
@JsonClass(generateAdapter = true)
data class Item(
@Json(name = "year") val year: Int,
@Json(name = "month") val month: Int,
@Json(name = "confirmed_amount") val confirmedAmount: BigDecimal?,
)
}