Get Started

Theme switcher

Object Example

The Object Example widget in Theneo's web editor is a versatile tool that enhances the documentation of API objects. It provides a structured and interactive way to present and explain the different components of an API object. Here's how you can use this widget effectively:

Adding an Object Example

  1. Position your cursor where you want to insert the object example in your documentation.
  2. Type /object example to bring up the widget menu and select the Object Example widget.
  3. A new tab will be created where you can define your object example.

Working with Object Examples

  • Code View: This view allows you to input raw JSON or other supported formats directly. The editor will parse and display the data in an organized and readable format.
  • Form View: Here, you can add more detailed information about each field of your object, such as whether the field is required, provide descriptions, and set additional properties like minimum or maximum values.

Managing Multiple Object Examples

  • You can create multiple tabs for different object examples as needed, allowing you to document various objects within the same context.
  • Switch between tabs to manage or view different examples.

Supported Languages

The Object Example widget supports the same languages as the code block highlight feature, providing consistency in how code and objects are presented throughout your documentation.

Extended Use Case

Interestingly, some customers have creatively used the Object Example widget for code snippet highlights, taking advantage of the tab feature to organize and display multiple code examples side-by-side.

This widget is just another way Theneo empowers you to create comprehensive and user-friendly documentation, making complex API objects understandable at a glance.

Customer Object Demo

idstring Required

Unique identifier for the object.

objectstring

String representing the object’s type. Objects of the same type share the same value.

addressstring

The customer’s address.

balancenumber

The current balance, if any, that’s stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that’s added to their next invoice. The balance only considers amounts that Stripe hasn’t successfully applied to any invoice. It doesn’t reflect unpaid invoices. This balance is only taken into account after invoices finalize.

creatednumber

Time at which the object was created. Measured in seconds since the Unix epoch.

currencystring

Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes.

default_sourcestring

ID of the default payment source for the customer.

delinquentboolean

Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the invoice.due_date will set this field to true.

descriptionstring
discountstring

Describes the current discount active on the customer, if there is one.

emailstring

The customer’s email address.

invoice_prefixstring
invoice_settingsobject

Show child attributes

livemodeboolean
metadataobject
namestring
next_invoice_sequencenumber
phonestring
preferred_localesarray
shippingstring
tax_exemptstring
test_clockstring
Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 { "id": "cus_NffrFeUfNV2Hib", "object": "customer", "address": null, "balance": null, "created": 1680893993, "currency": null, "default_source": null, "delinquent": false, "description": null, "discount": null, "email": "jennyrosen@example.com", "invoice_prefix": "0759376C", "invoice_settings": { "custom_fields": null, "default_payment_method": null, "footer": null, "rendering_options": null }, "livemode": false, "metadata": {}, "name": "Jenny Rosen", "next_invoice_sequence": 1, "phone": null, "preferred_locales": [], "shipping": null, "tax_exempt": "none", "test_clock": null }
Was this section helpful?

What made this section unhelpful for you?