toJsonLd method

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

Serialize SchemaDeliveryChargeSpecification to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'DeliveryChargeSpecification',
      'appliesToDeliveryMethod':
          convertToJsonLd(appliesToDeliveryMethod, [SchemaDeliveryMethod]),
      'areaServed': convertToJsonLd(areaServed,
          [SchemaAdministrativeArea, SchemaGeoShape, SchemaPlace, String]),
      'eligibleRegion': convertToJsonLd(
          eligibleRegion, [SchemaGeoShape, SchemaPlace, String]),
      'ineligibleRegion': convertToJsonLd(
          ineligibleRegion, [SchemaGeoShape, SchemaPlace, String]),
    });