toJsonLd method

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

Serialize SchemaOfferShippingDetails to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'OfferShippingDetails',
      'deliveryTime':
          convertToJsonLd(deliveryTime, [SchemaShippingDeliveryTime]),
      'depth':
          convertToJsonLd(depth, [SchemaDistance, SchemaQuantitativeValue]),
      'doesNotShip': convertToJsonLd(doesNotShip, [bool]),
      'hasShippingService':
          convertToJsonLd(hasShippingService, [SchemaShippingService]),
      'height':
          convertToJsonLd(height, [SchemaDistance, SchemaQuantitativeValue]),
      'shippingDestination':
          convertToJsonLd(shippingDestination, [SchemaDefinedRegion]),
      'shippingOrigin':
          convertToJsonLd(shippingOrigin, [SchemaDefinedRegion]),
      'shippingRate': convertToJsonLd(
          shippingRate, [SchemaMonetaryAmount, SchemaShippingRateSettings]),
      'validForMemberTier':
          convertToJsonLd(validForMemberTier, [SchemaMemberProgramTier]),
      'weight':
          convertToJsonLd(weight, [SchemaMass, SchemaQuantitativeValue]),
      'width':
          convertToJsonLd(width, [SchemaDistance, SchemaQuantitativeValue]),
    });