SEO.JSONLD.Invoice (SEO v0.3.0-rc.0)

View Source

A statement of the money due for goods or services; a bill.

Helper for building a Schema.org Invoice JSON-LD structure.

Summary

Types

t()

A JSON-LD map ready to be nested or rendered. String-keyed, always includes "@type" set to "Invoice", plus any camelCased field keys the caller provided (see build/1). "@context" is added at render time by SEO.JSONLD.meta/1 on the top-level node only.

Functions

Build a Invoice JSON-LD map.

Types

attrs()

@type attrs() ::
  %{
    optional(:account_id) => String.t(),
    optional(:billing_period) => Duration.t() | String.t(),
    optional(:broker) =>
      SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
    optional(:category) =>
      String.t()
      | URI.t()
      | SEO.JSONLD.Thing.t()
      | map()
      | :aerobic_activity
      | :anaerobic_activity
      | :balance
      | :flexibility
      | :leisure_time_activity
      | :occupational_activity
      | :strength_training
      | SEO.JSONLD.CategoryCode.t(),
    optional(:confirmation_number) => String.t(),
    optional(:customer) =>
      SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
    optional(:minimum_payment_due) =>
      SEO.JSONLD.PriceSpecification.t() | map() | SEO.JSONLD.MonetaryAmount.t(),
    optional(:payment_due) => DateTime.t() | NaiveDateTime.t() | String.t(),
    optional(:payment_due_date) =>
      DateTime.t() | NaiveDateTime.t() | String.t() | Date.t(),
    optional(:payment_method) =>
      String.t() | SEO.JSONLD.PaymentMethod.t() | map(),
    optional(:payment_method_id) => String.t(),
    optional(:payment_status) =>
      String.t()
      | :payment_automatically_applied
      | :payment_complete
      | :payment_declined
      | :payment_due
      | :payment_past_due,
    optional(:provider) =>
      SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
    optional(:references_order) => SEO.JSONLD.Order.t() | map(),
    optional(:scheduled_payment_date) => Date.t() | String.t(),
    optional(:total_payment_due) =>
      SEO.JSONLD.MonetaryAmount.t() | map() | SEO.JSONLD.PriceSpecification.t(),
    optional(:additional_type) => String.t() | URI.t(),
    optional(:alternate_name) => String.t(),
    optional(:description) => SEO.JSONLD.TextObject.t() | map() | String.t(),
    optional(:disambiguating_description) => String.t(),
    optional(:identifier) =>
      String.t() | URI.t() | SEO.JSONLD.PropertyValue.t() | map(),
    optional(:image) =>
      URI.t() | String.t() | SEO.JSONLD.ImageObject.t() | map(),
    optional(:main_entity_of_page) =>
      SEO.JSONLD.CreativeWork.t() | map() | URI.t() | String.t(),
    optional(:name) => String.t(),
    optional(:owner) =>
      SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
    optional(:potential_action) => SEO.JSONLD.Action.t() | map(),
    optional(:same_as) => URI.t() | String.t(),
    optional(:subject_of) =>
      SEO.JSONLD.Event.t() | map() | SEO.JSONLD.CreativeWork.t(),
    optional(:url) => URI.t() | String.t()
  }
  | [
      account_id: String.t(),
      billing_period: Duration.t() | String.t(),
      broker: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
      category:
        String.t()
        | URI.t()
        | SEO.JSONLD.Thing.t()
        | map()
        | :aerobic_activity
        | :anaerobic_activity
        | :balance
        | :flexibility
        | :leisure_time_activity
        | :occupational_activity
        | :strength_training
        | SEO.JSONLD.CategoryCode.t(),
      confirmation_number: String.t(),
      customer: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
      minimum_payment_due:
        SEO.JSONLD.PriceSpecification.t()
        | map()
        | SEO.JSONLD.MonetaryAmount.t(),
      payment_due: DateTime.t() | NaiveDateTime.t() | String.t(),
      payment_due_date:
        DateTime.t() | NaiveDateTime.t() | String.t() | Date.t(),
      payment_method: String.t() | SEO.JSONLD.PaymentMethod.t() | map(),
      payment_method_id: String.t(),
      payment_status:
        String.t()
        | :payment_automatically_applied
        | :payment_complete
        | :payment_declined
        | :payment_due
        | :payment_past_due,
      provider: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
      references_order: SEO.JSONLD.Order.t() | map(),
      scheduled_payment_date: Date.t() | String.t(),
      total_payment_due:
        SEO.JSONLD.MonetaryAmount.t()
        | map()
        | SEO.JSONLD.PriceSpecification.t(),
      additional_type: String.t() | URI.t(),
      alternate_name: String.t(),
      description: SEO.JSONLD.TextObject.t() | map() | String.t(),
      disambiguating_description: String.t(),
      identifier: String.t() | URI.t() | SEO.JSONLD.PropertyValue.t() | map(),
      image: URI.t() | String.t() | SEO.JSONLD.ImageObject.t() | map(),
      main_entity_of_page:
        SEO.JSONLD.CreativeWork.t() | map() | URI.t() | String.t(),
      name: String.t(),
      owner: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
      potential_action: SEO.JSONLD.Action.t() | map(),
      same_as: URI.t() | String.t(),
      subject_of: SEO.JSONLD.Event.t() | map() | SEO.JSONLD.CreativeWork.t(),
      url: URI.t() | String.t()
    ]

t()

@type t() :: %{required(String.t()) => term()}

A JSON-LD map ready to be nested or rendered. String-keyed, always includes "@type" set to "Invoice", plus any camelCased field keys the caller provided (see build/1). "@context" is added at render time by SEO.JSONLD.meta/1 on the top-level node only.

Functions

build(attrs)

@spec build(attrs()) :: t()

Build a Invoice JSON-LD map.

Fields

  • :account_id - The identifier for the account the payment will be applied to.
  • :billing_period - The time interval used to compute the invoice.
  • :broker - An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred.
  • :category - A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. One of: :aerobic_activity, :anaerobic_activity, :balance, :flexibility, :leisure_time_activity, :occupational_activity, :strength_training.
  • :confirmation_number - A number that confirms the given order or payment has been received.
  • :customer - Party placing the order or paying the invoice.
  • :minimum_payment_due - The minimum payment required at this time.
  • :payment_due - The date that payment is due.
  • :payment_due_date - The date that payment is due.
  • :payment_method - The name of the credit card or other method of payment for the order.
  • :payment_method_id - An identifier for the method of payment used (e.g. the last 4 digits of the credit card).
  • :payment_status - The status of payment; whether the invoice has been paid or not. One of: :payment_automatically_applied, :payment_complete, :payment_declined, :payment_due, :payment_past_due.
  • :provider - The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.
  • :references_order - The Order(s) related to this Invoice. One or more Orders may be combined into a single Invoice.
  • :scheduled_payment_date - The date the invoice is scheduled to be paid.
  • :total_payment_due - The total amount due.

Inherited properties

Additional properties are available through the inheritance chain. See each ancestor's docs for its properties: