From e5b96b300546c536e0871f1d846a7552b9f91b85 Mon Sep 17 00:00:00 2001 From: Surik Date: Sat, 30 Dec 2023 04:25:13 +0400 Subject: [PATCH] Updated mapping --- app/src/main/java/com/qonversion/android/app/HomeFragment.kt | 2 +- .../qonversion/android/sdk/dto/entitlements/QTransaction.kt | 2 +- .../android/sdk/dto/entitlements/QTransactionType.kt | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/qonversion/android/app/HomeFragment.kt b/app/src/main/java/com/qonversion/android/app/HomeFragment.kt index 89a98c29..d7550285 100644 --- a/app/src/main/java/com/qonversion/android/app/HomeFragment.kt +++ b/app/src/main/java/com/qonversion/android/app/HomeFragment.kt @@ -34,7 +34,7 @@ private const val TAG = "HomeFragment" class HomeFragment : Fragment() { lateinit var binding: FragmentHomeBinding - private val productIdSubs = "main" + private val productIdSubs = "annual" private val productIdInApp = "in_app" private val entitlementPlus = "plus" private val entitlementStandart = "standart" diff --git a/sdk/src/main/java/com/qonversion/android/sdk/dto/entitlements/QTransaction.kt b/sdk/src/main/java/com/qonversion/android/sdk/dto/entitlements/QTransaction.kt index 4c6cedbe..312fed16 100644 --- a/sdk/src/main/java/com/qonversion/android/sdk/dto/entitlements/QTransaction.kt +++ b/sdk/src/main/java/com/qonversion/android/sdk/dto/entitlements/QTransaction.kt @@ -8,7 +8,7 @@ import java.util.Date data class QTransaction( @Json(name = "original_transaction_id") val originalTransactionId: String, @Json(name = "transaction_id") val transactionId: String, - @Json(name = "offer_code") val offerCode: String, + @Json(name = "offer_code") val offerCode: String?, @Json(name = "transaction_timestamp") val transactionDate: Date, @Json(name = "expiration_timestamp") val expirationDate: Date?, @Json(name = "transaction_revoke_timestamp") val transactionRevocationDate: Date?, diff --git a/sdk/src/main/java/com/qonversion/android/sdk/dto/entitlements/QTransactionType.kt b/sdk/src/main/java/com/qonversion/android/sdk/dto/entitlements/QTransactionType.kt index e9f361ae..41e630e9 100644 --- a/sdk/src/main/java/com/qonversion/android/sdk/dto/entitlements/QTransactionType.kt +++ b/sdk/src/main/java/com/qonversion/android/sdk/dto/entitlements/QTransactionType.kt @@ -1,6 +1,7 @@ package com.qonversion.android.sdk.dto.entitlements enum class QTransactionType(val type: String) { + Unknown("unknown"), SubscriptionStarted("subscription_started"), SubscriptionRenewed("subscription_renewed"), TrialStrated("trial_started"), @@ -17,7 +18,7 @@ enum class QTransactionType(val type: String) { "intro_started" -> IntroStarted "intro_renewed" -> IntroRenewed "non_consumable_purchase" -> NonConsumablePurchase - else -> SubscriptionRenewed + else -> Unknown } } }