toJsonLd method

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

Serialize SchemaOfferForPurchase to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      '@context': 'https://schema.org',
      '@type': 'OfferForPurchase',
      'acceptedPaymentMethod': convertToJsonLd(
          acceptedPaymentMethod, [SchemaLoanOrCredit, SchemaPaymentMethod]),
      'addOn': convertToJsonLd(addOn, [SchemaOffer]),
      'additionalProperty':
          convertToJsonLd(additionalProperty, [SchemaPropertyValue]),
      'advanceBookingRequirement': convertToJsonLd(
          advanceBookingRequirement, [SchemaQuantitativeValue]),
      'aggregateRating':
          convertToJsonLd(aggregateRating, [SchemaAggregateRating]),
      'areaServed': convertToJsonLd(areaServed,
          [SchemaAdministrativeArea, SchemaGeoShape, SchemaPlace, String]),
      'asin': convertToJsonLd(asin, [String, String]),
      'availability': convertToJsonLd(availability, [SchemaItemAvailability]),
      'availabilityEnds':
          convertToJsonLd(availabilityEnds, [String, String, String]),
      'availabilityStarts':
          convertToJsonLd(availabilityStarts, [String, String, String]),
      'availableAtOrFrom': convertToJsonLd(availableAtOrFrom, [SchemaPlace]),
      'availableDeliveryMethod':
          convertToJsonLd(availableDeliveryMethod, [SchemaDeliveryMethod]),
      'businessFunction':
          convertToJsonLd(businessFunction, [SchemaBusinessFunction]),
      'category': convertToJsonLd(category, [
        SchemaCategoryCode,
        SchemaPhysicalActivityCategory,
        String,
        String,
        SchemaThing
      ]),
      'checkoutPageURLTemplate':
          convertToJsonLd(checkoutPageURLTemplate, [String]),
      'deliveryLeadTime':
          convertToJsonLd(deliveryLeadTime, [SchemaQuantitativeValue]),
      'eligibleCustomerType':
          convertToJsonLd(eligibleCustomerType, [SchemaBusinessEntityType]),
      'eligibleDuration':
          convertToJsonLd(eligibleDuration, [SchemaQuantitativeValue]),
      'eligibleQuantity':
          convertToJsonLd(eligibleQuantity, [SchemaQuantitativeValue]),
      'eligibleRegion': convertToJsonLd(
          eligibleRegion, [SchemaGeoShape, SchemaPlace, String]),
      'eligibleTransactionVolume': convertToJsonLd(
          eligibleTransactionVolume, [SchemaPriceSpecification]),
      'gtin': convertToJsonLd(gtin, [String, String]),
      'gtin12': convertToJsonLd(gtin12, [String]),
      'gtin13': convertToJsonLd(gtin13, [String]),
      'gtin14': convertToJsonLd(gtin14, [String]),
      'gtin8': convertToJsonLd(gtin8, [String]),
      'hasAdultConsideration': convertToJsonLd(
          hasAdultConsideration, [SchemaAdultOrientedEnumeration]),
      'hasMeasurement':
          convertToJsonLd(hasMeasurement, [SchemaQuantitativeValue]),
      'hasMerchantReturnPolicy': convertToJsonLd(
          hasMerchantReturnPolicy, [SchemaMerchantReturnPolicy]),
      'includesObject':
          convertToJsonLd(includesObject, [SchemaTypeAndQuantityNode]),
      'ineligibleRegion': convertToJsonLd(
          ineligibleRegion, [SchemaGeoShape, SchemaPlace, String]),
      'inventoryLevel':
          convertToJsonLd(inventoryLevel, [SchemaQuantitativeValue]),
      'isFamilyFriendly': convertToJsonLd(isFamilyFriendly, [bool]),
      'itemCondition':
          convertToJsonLd(itemCondition, [SchemaOfferItemCondition]),
      'itemOffered': convertToJsonLd(itemOffered, [
        SchemaAggregateOffer,
        SchemaCreativeWork,
        SchemaEvent,
        SchemaMenuItem,
        SchemaProduct,
        SchemaService,
        SchemaTrip
      ]),
      'leaseLength': convertToJsonLd(
          leaseLength, [SchemaDuration, SchemaQuantitativeValue]),
      'mobileUrl': convertToJsonLd(mobileUrl, [String]),
      'mpn': convertToJsonLd(mpn, [String]),
      'offeredBy':
          convertToJsonLd(offeredBy, [SchemaOrganization, SchemaPerson]),
      'price': convertToJsonLd(price, [String, int]),
      'priceCurrency': convertToJsonLd(priceCurrency, [String]),
      'priceSpecification':
          convertToJsonLd(priceSpecification, [SchemaPriceSpecification]),
      'priceValidUntil': convertToJsonLd(priceValidUntil, [String]),
      'review': convertToJsonLd(review, [SchemaReview]),
      'reviews': convertToJsonLd(reviews, [SchemaReview]),
      'seller': convertToJsonLd(seller, [SchemaOrganization, SchemaPerson]),
      'serialNumber': convertToJsonLd(serialNumber, [String]),
      'shippingDetails':
          convertToJsonLd(shippingDetails, [SchemaOfferShippingDetails]),
      'sku': convertToJsonLd(sku, [String]),
      'validFrom': convertToJsonLd(validFrom, [String, String]),
      'validThrough': convertToJsonLd(validThrough, [String, String]),
      'warranty': convertToJsonLd(warranty, [SchemaWarrantyPromise]),
      'additionalType': convertToJsonLd(additionalType, [String, String]),
      'alternateName': convertToJsonLd(alternateName, [String]),
      'description': convertToJsonLd(description, [String, SchemaTextObject]),
      'disambiguatingDescription':
          convertToJsonLd(disambiguatingDescription, [String]),
      'identifier':
          convertToJsonLd(identifier, [SchemaPropertyValue, String, String]),
      'image': convertToJsonLd(image, [SchemaImageObject, String]),
      'mainEntityOfPage':
          convertToJsonLd(mainEntityOfPage, [SchemaCreativeWork, String]),
      'name': convertToJsonLd(name, [String]),
      'potentialAction': convertToJsonLd(potentialAction, [SchemaAction]),
      'sameAs': convertToJsonLd(sameAs, [String]),
      'subjectOf':
          convertToJsonLd(subjectOf, [SchemaCreativeWork, SchemaEvent]),
      'url': convertToJsonLd(url, [String]),
    });