toJsonLd method

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

Serialize SchemaOrder to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      '@context': 'https://schema.org',
      '@type': 'Order',
      'acceptedOffer': convertToJsonLd(acceptedOffer, [SchemaOffer]),
      'billingAddress':
          convertToJsonLd(billingAddress, [SchemaPostalAddress]),
      'broker': convertToJsonLd(broker, [SchemaOrganization, SchemaPerson]),
      'confirmationNumber': convertToJsonLd(confirmationNumber, [String]),
      'customer':
          convertToJsonLd(customer, [SchemaOrganization, SchemaPerson]),
      'discount': convertToJsonLd(discount, [String, int]),
      'discountCode': convertToJsonLd(discountCode, [String]),
      'discountCurrency': convertToJsonLd(discountCurrency, [String]),
      'isGift': convertToJsonLd(isGift, [bool]),
      'merchant':
          convertToJsonLd(merchant, [SchemaOrganization, SchemaPerson]),
      'orderDate': convertToJsonLd(orderDate, [String, String]),
      'orderDelivery': convertToJsonLd(orderDelivery, [SchemaParcelDelivery]),
      'orderNumber': convertToJsonLd(orderNumber, [String]),
      'orderStatus': convertToJsonLd(orderStatus, [SchemaOrderStatus]),
      'orderedItem': convertToJsonLd(
          orderedItem, [SchemaOrderItem, SchemaProduct, SchemaService]),
      'partOfInvoice': convertToJsonLd(partOfInvoice, [SchemaInvoice]),
      'paymentDue': convertToJsonLd(paymentDue, [String]),
      'paymentDueDate': convertToJsonLd(paymentDueDate, [String, String]),
      'paymentMethod': convertToJsonLd(paymentMethod, [SchemaPaymentMethod]),
      'paymentMethodId': convertToJsonLd(paymentMethodId, [String]),
      'paymentUrl': convertToJsonLd(paymentUrl, [String]),
      'seller': convertToJsonLd(seller, [SchemaOrganization, SchemaPerson]),
      '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]),
    });