toJsonLd method

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

Serialize SchemaShippingRateSettings to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'ShippingRateSettings',
      'doesNotShip': convertToJsonLd(doesNotShip, [bool]),
      'freeShippingThreshold': convertToJsonLd(freeShippingThreshold,
          [SchemaDeliveryChargeSpecification, SchemaMonetaryAmount]),
      'isUnlabelledFallback': convertToJsonLd(isUnlabelledFallback, [bool]),
      'orderPercentage': convertToJsonLd(orderPercentage, [num]),
      'shippingDestination':
          convertToJsonLd(shippingDestination, [SchemaDefinedRegion]),
      'shippingRate': convertToJsonLd(
          shippingRate, [SchemaMonetaryAmount, SchemaShippingRateSettings]),
      'weightPercentage': convertToJsonLd(weightPercentage, [num]),
    });