async function updateParallelTestTable()

in typescript/src/subscription-status/googleSubStatus.ts [169:200]


async function updateParallelTestTable(
  purchaseToken: string,
  packageName: string,
) {
  try {
    const googleSubscription = await fetchGoogleSubscriptionV2(
      purchaseToken,
      packageName,
    );

    const subscription = new Subscription(
      purchaseToken,
      googleSubscription.startTime?.toISOString() ?? '',
      googleSubscription.expiryTime.toISOString(),
      googleSubscription.userCancellationTime?.toISOString(),
      googleSubscription.autoRenewing,
      googleSubscription.productId,
      googlePackageNameToPlatform(packageName),
      googleSubscription.freeTrial,
      googleSubscription.billingPeriodDuration,
      googleSubscription,
      undefined,
      null,
      dateToSecondTimestamp(thirtyMonths(googleSubscription.expiryTime)),
      'subscriptions-parallel-test',
    );

    await dynamoMapper.put({ item: subscription });
  } catch (err) {
    console.log(`ANDROID-PARALLEL-TEST: Error: ${JSON.stringify(err)}`);
  }
}