Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
dependencies {
implementation "com.facebook.react:react-android"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "io.qonversion:sandwich:7.10.1"
implementation "io.qonversion:sandwich:7.11.0"
}

if (isNewArchitectureEnabled()) {
Expand Down
2 changes: 1 addition & 1 deletion qonversion-react-native-sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Pod::Spec.new do |s|
s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
s.private_header_files = "ios/**/*.h"

s.dependency "QonversionSandwich", "7.10.1"
s.dependency "QonversionSandwich", "7.11.0"
install_modules_dependencies(s)
end
11 changes: 10 additions & 1 deletion src/dto/Product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,17 @@ class Product {
storeId: string | null;

/**
* Identifier of the base plan for Google product.
* Identifier of the base plan for a Google Play subscription product.
* Android only. Null for one-time products - use {@link purchaseOptionId} for those.
*/
basePlanId: string | null;

/**
* Identifier of the Google Play purchase option for a one-time (in-app) product.
* Android only. Null for subscription products - use {@link basePlanId} for those.
*/
purchaseOptionId: string | null;

/**
* Google Play Store details of this product.
* Android only. Null for iOS, or if the product was not found.
Expand Down Expand Up @@ -66,6 +73,7 @@ class Product {
qonversionId: string,
storeId: string,
basePlanId: string | null,
purchaseOptionId: string | null,
storeDetails: ProductStoreDetails | null,
skProduct: SKProduct | null,
offeringId: string | null,
Expand All @@ -82,6 +90,7 @@ class Product {
this.qonversionId = qonversionId;
this.storeId = storeId;
this.basePlanId = basePlanId;
this.purchaseOptionId = purchaseOptionId;
this.storeDetails = storeDetails;
this.skProduct = skProduct;
this.offeringId = offeringId;
Expand Down
12 changes: 10 additions & 2 deletions src/dto/storeProducts/ProductStoreDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ import ProductInAppDetails from "./ProductInAppDetails";
*/
class ProductStoreDetails {
/**
* Identifier of the base plan to which these details relate.
* Null for in-app products.
* Identifier of the base plan for a Google Play subscription product.
* Null for one-time products - use {@link purchaseOptionId} for those.
*/
basePlanId: string | null;

/**
* Identifier of the Google Play purchase option for a one-time (in-app) product.
* Null for subscription products - use {@link basePlanId} for those.
*/
purchaseOptionId: string | null;

/**
* Identifier of the subscription or the in-app product.
*/
Expand Down Expand Up @@ -111,6 +117,7 @@ class ProductStoreDetails {

constructor(
basePlanId: string | null,
purchaseOptionId: string | null,
productId: string,
name: string,
title: string,
Expand All @@ -129,6 +136,7 @@ class ProductStoreDetails {
isInstallment: boolean,
) {
this.basePlanId = basePlanId;
this.purchaseOptionId = purchaseOptionId;
this.productId = productId;
this.name = name;
this.title = title;
Expand Down
4 changes: 4 additions & 0 deletions src/internal/Mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export type QProduct = {
id: string;
storeId: string;
basePlanId?: string | null;
purchaseOptionId?: string | null;
type: string;
subscriptionPeriod?: QSubscriptionPeriod | null;
trialPeriod?: QSubscriptionPeriod | null;
Expand All @@ -74,6 +75,7 @@ export type QProduct = {

type QProductStoreDetails = {
basePlanId?: string | null,
purchaseOptionId?: string | null,
productId: string,
name: string,
title: string
Expand Down Expand Up @@ -622,6 +624,7 @@ class Mapper {
product.id,
product.storeId,
product.basePlanId ?? null,
product.purchaseOptionId ?? null,
storeDetails,
skProduct,
offeringId,
Expand Down Expand Up @@ -877,6 +880,7 @@ class Mapper {

return new ProductStoreDetails(
productStoreDetails.basePlanId ?? null,
productStoreDetails.purchaseOptionId ?? null,
productStoreDetails.productId,
productStoreDetails.name,
productStoreDetails.title,
Expand Down
Loading