InAppProduct.fromJson constructor

InAppProduct.fromJson(
  1. Map json_
)

Implementation

InAppProduct.fromJson(core.Map json_)
    : this(
        defaultLanguage: json_.containsKey('defaultLanguage')
            ? json_['defaultLanguage'] as core.String
            : null,
        defaultPrice: json_.containsKey('defaultPrice')
            ? Price.fromJson(
                json_['defaultPrice'] as core.Map<core.String, core.dynamic>)
            : null,
        gracePeriod: json_.containsKey('gracePeriod')
            ? json_['gracePeriod'] as core.String
            : null,
        listings: json_.containsKey('listings')
            ? (json_['listings'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  InAppProductListing.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        managedProductTaxesAndComplianceSettings:
            json_.containsKey('managedProductTaxesAndComplianceSettings')
                ? ManagedProductTaxAndComplianceSettings.fromJson(
                    json_['managedProductTaxesAndComplianceSettings']
                        as core.Map<core.String, core.dynamic>)
                : null,
        packageName: json_.containsKey('packageName')
            ? json_['packageName'] as core.String
            : null,
        prices: json_.containsKey('prices')
            ? (json_['prices'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  Price.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        purchaseType: json_.containsKey('purchaseType')
            ? json_['purchaseType'] as core.String
            : null,
        sku: json_.containsKey('sku') ? json_['sku'] as core.String : null,
        status: json_.containsKey('status')
            ? json_['status'] as core.String
            : null,
        subscriptionPeriod: json_.containsKey('subscriptionPeriod')
            ? json_['subscriptionPeriod'] as core.String
            : null,
        subscriptionTaxesAndComplianceSettings:
            json_.containsKey('subscriptionTaxesAndComplianceSettings')
                ? SubscriptionTaxAndComplianceSettings.fromJson(
                    json_['subscriptionTaxesAndComplianceSettings']
                        as core.Map<core.String, core.dynamic>)
                : null,
        trialPeriod: json_.containsKey('trialPeriod')
            ? json_['trialPeriod'] as core.String
            : null,
      );