toJsonLd method

  1. @override
Map<String, dynamic> toJsonLd()
override

Serialize SchemaPriceSpecification to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'PriceSpecification',
      'eligibleQuantity':
          convertToJsonLd(eligibleQuantity, [SchemaQuantitativeValue]),
      'eligibleTransactionVolume': convertToJsonLd(
          eligibleTransactionVolume, [SchemaPriceSpecification]),
      'maxPrice': convertToJsonLd(maxPrice, [num]),
      'membershipPointsEarned': convertToJsonLd(
          membershipPointsEarned, [SchemaQuantitativeValue, num]),
      'minPrice': convertToJsonLd(minPrice, [num]),
      'price': convertToJsonLd(price, [String, num]),
      'priceCurrency': convertToJsonLd(priceCurrency, [String]),
      'validForMemberTier':
          convertToJsonLd(validForMemberTier, [SchemaMemberProgramTier]),
      'validFrom': convertToJsonLd(validFrom, [String]),
      'validThrough': convertToJsonLd(validThrough, [String]),
      'valueAddedTaxIncluded': convertToJsonLd(valueAddedTaxIncluded, [bool]),
    });