@@ -222,33 +222,6 @@ public enum class PaymentModeIOS(val rawValue: String) {
222222 fun toJson (): String = rawValue
223223}
224224
225- public enum class ProductDetailType (val rawValue : String ) {
226- Consumable (" consumable" ),
227- NonConsumable (" non-consumable" ),
228- AutoRenewableSubscription (" auto-renewable-subscription" ),
229- NonRenewingSubscription (" non-renewing-subscription" )
230-
231- companion object {
232- fun fromJson (value : String ): ProductDetailType = when (value) {
233- " consumable" -> ProductDetailType .Consumable
234- " CONSUMABLE" -> ProductDetailType .Consumable
235- " Consumable" -> ProductDetailType .Consumable
236- " non-consumable" -> ProductDetailType .NonConsumable
237- " NON_CONSUMABLE" -> ProductDetailType .NonConsumable
238- " NonConsumable" -> ProductDetailType .NonConsumable
239- " auto-renewable-subscription" -> ProductDetailType .AutoRenewableSubscription
240- " AUTO_RENEWABLE_SUBSCRIPTION" -> ProductDetailType .AutoRenewableSubscription
241- " AutoRenewableSubscription" -> ProductDetailType .AutoRenewableSubscription
242- " non-renewing-subscription" -> ProductDetailType .NonRenewingSubscription
243- " NON_RENEWING_SUBSCRIPTION" -> ProductDetailType .NonRenewingSubscription
244- " NonRenewingSubscription" -> ProductDetailType .NonRenewingSubscription
245- else -> throw IllegalArgumentException (" Unknown ProductDetailType value: $value " )
246- }
247- }
248-
249- fun toJson (): String = rawValue
250- }
251-
252225public enum class ProductQueryType (val rawValue : String ) {
253226 InApp (" in-app" ),
254227 Subs (" subs" ),
@@ -416,7 +389,6 @@ public interface ProductCommon {
416389 val price: Double?
417390 val title: String
418391 val type: ProductType
419- val typeDetails: ProductDetailType
420392}
421393
422394public interface PurchaseCommon {
@@ -713,8 +685,7 @@ public data class ProductAndroid(
713685 val price : Double? = null ,
714686 val subscriptionOfferDetailsAndroid : List <ProductSubscriptionAndroidOfferDetails >? = null ,
715687 val title : String ,
716- val type : ProductType ,
717- val typeDetails : ProductDetailType
688+ val type : ProductType
718689) : ProductCommon, Product {
719690
720691 companion object {
@@ -733,7 +704,6 @@ public data class ProductAndroid(
733704 subscriptionOfferDetailsAndroid = (json[" subscriptionOfferDetailsAndroid" ] as List <* >? )?.map { ProductSubscriptionAndroidOfferDetails .fromJson((it as Map <String , Any ?>)) },
734705 title = json[" title" ] as String ,
735706 type = ProductType .fromJson(json[" type" ] as String ),
736- typeDetails = ProductDetailType .fromJson(json[" typeDetails" ] as String ),
737707 )
738708 }
739709 }
@@ -753,7 +723,6 @@ public data class ProductAndroid(
753723 " subscriptionOfferDetailsAndroid" to subscriptionOfferDetailsAndroid?.map { it.toJson() },
754724 " title" to title,
755725 " type" to type.toJson(),
756- " typeDetails" to typeDetails.toJson(),
757726 )
758727}
759728
@@ -796,7 +765,6 @@ public data class ProductIOS(
796765 val subscriptionInfoIOS : SubscriptionInfoIOS ? = null ,
797766 val title : String ,
798767 val type : ProductType ,
799- val typeDetails : ProductDetailType ,
800768 val typeIOS : ProductTypeIOS
801769) : ProductCommon, Product {
802770
@@ -817,7 +785,6 @@ public data class ProductIOS(
817785 subscriptionInfoIOS = (json[" subscriptionInfoIOS" ] as Map <String , Any ?>? )?.let { SubscriptionInfoIOS .fromJson(it) },
818786 title = json[" title" ] as String ,
819787 type = ProductType .fromJson(json[" type" ] as String ),
820- typeDetails = ProductDetailType .fromJson(json[" typeDetails" ] as String ),
821788 typeIOS = ProductTypeIOS .fromJson(json[" typeIOS" ] as String ),
822789 )
823790 }
@@ -839,7 +806,6 @@ public data class ProductIOS(
839806 " subscriptionInfoIOS" to subscriptionInfoIOS?.toJson(),
840807 " title" to title,
841808 " type" to type.toJson(),
842- " typeDetails" to typeDetails.toJson(),
843809 " typeIOS" to typeIOS.toJson(),
844810 )
845811}
@@ -857,8 +823,7 @@ public data class ProductSubscriptionAndroid(
857823 val price : Double? = null ,
858824 val subscriptionOfferDetailsAndroid : List <ProductSubscriptionAndroidOfferDetails >,
859825 val title : String ,
860- val type : ProductType ,
861- val typeDetails : ProductDetailType
826+ val type : ProductType
862827) : ProductCommon, ProductSubscription {
863828
864829 companion object {
@@ -877,7 +842,6 @@ public data class ProductSubscriptionAndroid(
877842 subscriptionOfferDetailsAndroid = (json[" subscriptionOfferDetailsAndroid" ] as List <* >).map { ProductSubscriptionAndroidOfferDetails .fromJson((it as Map <String , Any ?>)) },
878843 title = json[" title" ] as String ,
879844 type = ProductType .fromJson(json[" type" ] as String ),
880- typeDetails = ProductDetailType .fromJson(json[" typeDetails" ] as String ),
881845 )
882846 }
883847 }
@@ -897,7 +861,6 @@ public data class ProductSubscriptionAndroid(
897861 " subscriptionOfferDetailsAndroid" to subscriptionOfferDetailsAndroid.map { it.toJson() },
898862 " title" to title,
899863 " type" to type.toJson(),
900- " typeDetails" to typeDetails.toJson(),
901864 )
902865}
903866
@@ -954,7 +917,6 @@ public data class ProductSubscriptionIOS(
954917 val subscriptionPeriodUnitIOS : SubscriptionPeriodIOS ? = null ,
955918 val title : String ,
956919 val type : ProductType ,
957- val typeDetails : ProductDetailType ,
958920 val typeIOS : ProductTypeIOS
959921) : ProductCommon, ProductSubscription {
960922
@@ -983,7 +945,6 @@ public data class ProductSubscriptionIOS(
983945 subscriptionPeriodUnitIOS = (json[" subscriptionPeriodUnitIOS" ] as String? )?.let { SubscriptionPeriodIOS .fromJson(it) },
984946 title = json[" title" ] as String ,
985947 type = ProductType .fromJson(json[" type" ] as String ),
986- typeDetails = ProductDetailType .fromJson(json[" typeDetails" ] as String ),
987948 typeIOS = ProductTypeIOS .fromJson(json[" typeIOS" ] as String ),
988949 )
989950 }
@@ -1013,7 +974,6 @@ public data class ProductSubscriptionIOS(
1013974 " subscriptionPeriodUnitIOS" to subscriptionPeriodUnitIOS?.toJson(),
1014975 " title" to title,
1015976 " type" to type.toJson(),
1016- " typeDetails" to typeDetails.toJson(),
1017977 " typeIOS" to typeIOS.toJson(),
1018978 )
1019979}
0 commit comments