toJsonLd method

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

Serialize SchemaInvoice to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      '@context': 'https://schema.org',
      '@type': 'Invoice',
      'accountId': convertToJsonLd(accountId, [String]),
      'billingPeriod': convertToJsonLd(billingPeriod, [SchemaDuration]),
      'broker': convertToJsonLd(broker, [SchemaOrganization, SchemaPerson]),
      'category': convertToJsonLd(category, [
        SchemaCategoryCode,
        SchemaPhysicalActivityCategory,
        String,
        String,
        SchemaThing
      ]),
      'confirmationNumber': convertToJsonLd(confirmationNumber, [String]),
      'customer':
          convertToJsonLd(customer, [SchemaOrganization, SchemaPerson]),
      'minimumPaymentDue': convertToJsonLd(minimumPaymentDue,
          [SchemaMonetaryAmount, SchemaPriceSpecification]),
      'paymentDue': convertToJsonLd(paymentDue, [String]),
      'paymentDueDate': convertToJsonLd(paymentDueDate, [String, String]),
      'paymentMethod': convertToJsonLd(paymentMethod, [SchemaPaymentMethod]),
      'paymentMethodId': convertToJsonLd(paymentMethodId, [String]),
      'paymentStatus':
          convertToJsonLd(paymentStatus, [SchemaPaymentStatusType, String]),
      'provider':
          convertToJsonLd(provider, [SchemaOrganization, SchemaPerson]),
      'referencesOrder': convertToJsonLd(referencesOrder, [SchemaOrder]),
      'scheduledPaymentDate': convertToJsonLd(scheduledPaymentDate, [String]),
      'totalPaymentDue': convertToJsonLd(
          totalPaymentDue, [SchemaMonetaryAmount, SchemaPriceSpecification]),
      '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]),
    });