toJsonLd method

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

Serialize SchemaFinancialIncentive to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'FinancialIncentive',
      'areaServed': convertToJsonLd(areaServed,
          [SchemaAdministrativeArea, SchemaGeoShape, SchemaPlace, String]),
      'eligibleWithSupplier':
          convertToJsonLd(eligibleWithSupplier, [SchemaOrganization]),
      'incentiveAmount': convertToJsonLd(incentiveAmount, [
        SchemaLoanOrCredit,
        SchemaQuantitativeValue,
        SchemaUnitPriceSpecification
      ]),
      'incentiveStatus':
          convertToJsonLd(incentiveStatus, [SchemaIncentiveStatus]),
      'incentiveType': convertToJsonLd(incentiveType, [SchemaIncentiveType]),
      'incentivizedItem': convertToJsonLd(
          incentivizedItem, [SchemaDefinedTerm, SchemaProduct]),
      'incomeLimit':
          convertToJsonLd(incomeLimit, [SchemaMonetaryAmount, String]),
      'provider':
          convertToJsonLd(provider, [SchemaOrganization, SchemaPerson]),
      'publisher':
          convertToJsonLd(publisher, [SchemaOrganization, SchemaPerson]),
      'purchasePriceLimit':
          convertToJsonLd(purchasePriceLimit, [SchemaMonetaryAmount]),
      'purchaseType': convertToJsonLd(purchaseType, [SchemaPurchaseType]),
      'qualifiedExpense': convertToJsonLd(
          qualifiedExpense, [SchemaIncentiveQualifiedExpenseType]),
      'validFrom': convertToJsonLd(validFrom, [String]),
      'validThrough': convertToJsonLd(validThrough, [String]),
    });