toJsonLd method
Serialize SchemaOffer to JSON-LD
Implementation
@override
Map<String, dynamic> toJsonLd() => removeEmpty({
...super.toJsonLd(),
'@type': 'Offer',
'acceptedPaymentMethod': convertToJsonLd(acceptedPaymentMethod,
[SchemaLoanOrCredit, SchemaPaymentMethod, String]),
'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]),
'availability': convertToJsonLd(availability, [SchemaItemAvailability]),
'availabilityEnds': convertToJsonLd(availabilityEnds, [String]),
'availabilityStarts': convertToJsonLd(availabilityStarts, [String]),
'availableAtOrFrom': convertToJsonLd(availableAtOrFrom, [SchemaPlace]),
'availableDeliveryMethod':
convertToJsonLd(availableDeliveryMethod, [SchemaDeliveryMethod]),
'businessFunction':
convertToJsonLd(businessFunction, [SchemaBusinessFunction]),
'category': convertToJsonLd(category, [
SchemaCategoryCode,
SchemaPhysicalActivityCategory,
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]),
'gtin12': convertToJsonLd(gtin12, [String]),
'gtin13': convertToJsonLd(gtin13, [String]),
'gtin14': convertToJsonLd(gtin14, [String]),
'gtin8': convertToJsonLd(gtin8, [String]),
'hasAdultConsideration': convertToJsonLd(
hasAdultConsideration, [SchemaAdultOrientedEnumeration]),
'hasGS1DigitalLink': convertToJsonLd(hasGS1DigitalLink, [String]),
'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, num]),
'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]),
'validForMemberTier':
convertToJsonLd(validForMemberTier, [SchemaMemberProgramTier]),
'validFrom': convertToJsonLd(validFrom, [String]),
'validThrough': convertToJsonLd(validThrough, [String]),
'warranty': convertToJsonLd(warranty, [SchemaWarrantyPromise]),
});