Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions _changelog/entries/2021/2021-06-14-chargebee-v1-new-tables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: "Chargebee (v1) update: New item tables for Chargebee Product Catalog v2!"
content-type: "changelog-entry"
date: 2021-06-14
entry-type: updated-feature
entry-category: "integration, documentation"
connection-id: "chargebee"
connection-version: "1"
pull-request: "https://github.com/singer-io/tap-chargebee/pull/42"
---
{{ site.data.changelog.metadata.single-integration | flatify }}

We've made some big changes to how our {{ this-connection.display_name }} integration works, along with adding some new tables.

{{ integration.display_name }} (v{{ this-connection.this-version }}) integrations now use the Product Catalog version for the {{ integration.display_name }} site to determine which tables to display in Stitch. Some tables and fields are only available if your {{ integration.display_name }} site is using v1.0 of the Product Catalog, some only on v2.0. We've added a new section to the [{{ integration.display_name }} documentation]({{ this-connection.url | prepend: site.baseurl | prepend: site.home | append: "#product-catalog-versions" }}) that goes into more detail.

In addition to this change, we've added a few new tables which are available if using {{ integration.display_name }} Product Catalog v2.0:

- [items]({{ this-connection.url | prepend: site.baseurl | prepend: site.home | append: "#items" }})
- [item_families]({{ this-connection.url | prepend: site.baseurl | prepend: site.home | append: "#item_families" }})
- [item_prices]({{ this-connection.url | prepend: site.baseurl | prepend: site.home | append: "#item_prices" }})

**Note**: Stitch's {{ integration.display_name }} (v{{ this-connection.this-version }}) integration supports both Product Catalog v1.0 and v2.0. The version of the integration doesn't refer to support for a specific {{ integration.display_name }} Product Catalog version.
17 changes: 10 additions & 7 deletions _includes/integrations/templates/schemas/table-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,24 @@
{% endif %}

{% if attribute.subattributes %}
{% case attribute.type %}
{% when 'object' %}
{% if attribute.type %}
{% if attribute.type == 'object' %}
{% capture nested-data-note %}
attributes in this object will be flattened into the table.
{% endcapture %}

{% when 'array' %}
{% elsif attribute.type == 'array' %}
{% capture nested-data-note %}
attributes will be denested into a subtable.
{% endcapture %}
{% endcase %}
{% endif %}


{% capture nested-data-tooltip %}This is a nested data structure. If your destination doesn't natively support nested data, {{ nested-data-note | strip }} <a href='{{ link.destinations.storage.nested-structures | prepend: site.baseurl }}' target='new'>Learn more</a>.{% endcapture %}

{{ plus-icon | replace:"TOOLTIP",nested-data-tooltip }}

{% endif %}
{% endif %}
<br>
{{ attribute.type | upcase }}
Expand All @@ -89,13 +92,13 @@

{% assign full-id = table.name | append: "--" | append: attribute.name | append: "--" | append: attribute-id %}

<div class="panel-group" id="{{ full-id }}">
<div class="panel-group" id="{{ full-id | slugify }}">
<div class="panel panel-table-subattributes">
<div class="panel-table-subattribute-heading">
<a class="noCrossRef accordion-toggle" data-toggle="collapse" data-parent="#{{ full-id | strip }}" href="#collapse{{ full-id }}">Click to expand {{ attribute.name }}</a>
<a class="noCrossRef accordion-toggle" data-toggle="collapse" data-parent="#{{ full-id | slugify | strip }}" href="#collapse{{ full-id | slugify }}">Click to expand {{ attribute.name }}</a>
</div>

<div id="collapse{{ full-id | strip }}" class="panel-collapse collapse noCrossRef">
<div id="collapse{{ full-id | slugify | strip }}" class="panel-collapse collapse noCrossRef">
{% include integrations/templates/schemas/table-attributes.html table=attribute.subattributes %}
</div>
<span class="table-subattribute-label">
Expand Down
4 changes: 2 additions & 2 deletions _includes/integrations/templates/schemas/table-schemas.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
{% assign integration-tables = site.integration-schemas | where:"tap",integration.name %}

<!-- Using the filtered data set above, filter out only the tables for this version of the integration -->
{% assign schema = integration-tables | where:"version",integration.this-version %}
{% assign schema = integration-tables | where:"version",integration.this-version | sort_natural:"name" %}

{% else %}
{% assign schema = site.integration-schemas | where:"tap",integration.name %}
{% assign schema = site.integration-schemas | where:"tap",integration.name | sort_natural:"name" %}
{% endif %}

<!-- NOTICE ABOUT DOC/DESTINATION OBJECT DIFFERENCES -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ version: "1"
key: "addon"

name: "addons"
doc-link: "https://apidocs.chargebee.com/docs/api/addons"
singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/addons.json"
doc-link: ""
singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/plan_model/addons.json"
description: |
The `{{ table.name }}` table contains info about the addons in your {{ integration.display_name }} account. Addons are additional charges applied to subscriptions apart from base charges.

{{ integration.table-type | flatify }}

replication-method: "Key-based Incremental"

api-method:
name: "List addons"
doc-link: "https://apidocs.chargebee.com/docs/api/addons#list_addons"
name: "List addons"
doc-link: "https://apidocs.chargebee.com/docs/api/addons?prod_cat_ver=1#list_addons"

product-catalog-version: "v1"

attributes:
- name: "id"
Expand Down Expand Up @@ -130,6 +134,10 @@ attributes:
description: "The addon price. Addon price is calculated based on the addon type and charge type."
doc-link: "https://www.chargebee.com/docs/addons.html#charge-type-and-pricing"

- name: "price_in_decimal"
type: "string"
description: ""

- name: "pricing_model"
type: "string"
description: |
Expand Down Expand Up @@ -205,5 +213,5 @@ attributes:
- name: "unit"
type: "string"
description: |
Applicable only for quantity type addons. This specifies the type of quantity. For example: If the addon price is `$10` and `agent` is the unit, it will be displayed as `$10/agent`.
Applicable only for quantity type addons. This specifies the type of quantity. For example: If the addon price is `$10` and `agent` is the unit, it will be displayed as `$10/agent`.
---
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
---
tap: "chargebee"
version: "1"
key: "coupon"
key: "coupons"

name: "coupons"
doc-link: "https://apidocs.chargebee.com/docs/api/coupons"
singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/coupons.json"
doc-link: ""
singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/item_model/coupons.json"
description: |
The `{{ table.name }}` table contains info about the coupons in your {{ integration.display_name }} account.

{{ integration.table-type | flatify }}

replication-method: "Key-based Incremental"

api-method:
name: "List coupons"
doc-link: "https://apidocs.chargebee.com/docs/api/coupons#list_coupons"
name: "List coupons"
doc-link: "https://apidocs.chargebee.com/docs/api/coupons#list_coupons"

product-catalog-version: "any"

attributes:
- name: "id"
Expand All @@ -30,6 +34,8 @@ attributes:
- name: "addon_constraint"
type: "string"
description: |
{{ integration.product-catalog-v1 | flatify }}

The addons the coupon can be applied to. Possible values are:

- `none`
Expand All @@ -39,7 +45,10 @@ attributes:

- name: "addon_ids"
type: "array"
description: "IDs of the addons associated with the coupon."
description: |
{{ integration.product-catalog-v1 | flatify }}

A list of IDs of addons associated with the coupon.
subattributes:
- name: "value"
type: "string"
Expand Down Expand Up @@ -108,6 +117,62 @@ attributes:
type: "string"
description: "Invoice notes for the coupon."

- name: "item_constraint_criteria"
type: "array"
description: |
{{ integration.product-catalog-v2 | flatify }}
subattributes:
- name: "currencies"
type: "array"
description: ""
subattributes:
- name: "value"
type: "string"
description: ""

- name: "item_family_ids"
type: "array"
description: ""
subattributes:
- name: "value"
type: "string"
description: ""
foreign-key-id: "item-family-id"

- name: "item_price_periods"
type: "array"
description: ""
subattributes:
- name: "value"
type: "string"
description: ""

- name: "item_type"
type: "string"
description: ""

- name: "item_constraints"
type: "array"
description: |
{{ integration.product-catalog-v2 | flatify }}
subattributes:
- name: "constraint"
type: "string"
description: ""

- name: "item_price_ids"
type: "array"
description: ""
subattributes:
- name: "value"
type: "string"
description: ""
foreign-key-id: "item-price-id"

- name: "item_type"
type: "string"
description: ""

- name: "max_redemptions"
type: "integer"
description: "The maximum number of times the coupon can be redeemed."
Expand All @@ -127,6 +192,8 @@ attributes:
- name: "plan_constraint"
type: "string"
description: |
{{ integration.product-catalog-v1 | flatify }}

The plans the coupon can be applied to. Possible values are:

- `none`
Expand All @@ -136,7 +203,10 @@ attributes:

- name: "plan_ids"
type: "array"
description: "IDs of the plans associated with the coupon."
description: |
{{ integration.product-catalog-v1 | flatify }}

A list of IDs of plans associated with the coupon.
subattributes:
- name: "value"
type: "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ key: "credit-note"

name: "credit_notes"
doc-link: "https://apidocs.chargebee.com/docs/api/credit_notes"
singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/credit_notes.json"
singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/common/credit_notes.json"
description: |
The `{{ table.name }}` table contains info about the credit notes in your {{ integration.display_name }} account. A credit note is a document that specifies the money owed by a business to a customer.

{{ integration.table-type | flatify }}

replication-method: "Key-based Incremental"

api-method:
name: "List credit notes"
doc-link: "https://apidocs.chargebee.com/docs/api/credit_notes#list_credit_notes"
name: "List credit notes"
doc-link: "https://apidocs.chargebee.com/docs/api/credit_notes#list_credit_notes"

product-catalog-version: "any"

attributes:
- name: "id"
Expand Down Expand Up @@ -333,7 +337,7 @@ attributes:

- name: "txn_date"
type: "date-time"
description: "The date the transaction occured."
description: "The date the transaction occurred."

- name: "txn_id"
type: "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_charg
description: |
The `{{ table.name }}` table contains info about the customers in your {{ integration.display_name }} account.

{{ integration.table-type | flatify }}

replication-method: "Key-based Incremental"

api-method:
name: "List customers"
doc-link: "https://apidocs.chargebee.com/docs/api/customers#list_customers"
name: "List customers"
doc-link: "https://apidocs.chargebee.com/docs/api/customers#list_customers"

product-catalog-version: "any"

attributes:
- name: "id"
Expand Down Expand Up @@ -447,6 +451,23 @@ attributes:
type: "boolean"
description: "Indicates if the customer is registered under GST. Available for Australia only."

- name: "relationship"
type: "object"
description: ""
subattributes:
- name: "invoice_owner_id"
type: "string"
description: ""
- name: "parent_id"
type: "string"
description: ""
- name: "payment_owner_id"
type: "string"
description: ""
- name: "root_id"
type: "string"
description: ""

- name: "resource_version"
type: "integer"
description: "The version number of the customer. Each update of the customer results in an incremental change of this value. **Note**: This attribute will be present only if the customer has been updated after 2016-09-28."
Expand Down Expand Up @@ -476,8 +497,4 @@ attributes:
- `invalid`
- `not_validated`
- `undetermined`

- name: "vat_number_validated_time"
type: "date-time"
description: ""
---
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_charg
description: |
The `{{ table.name }}` table contains info about the events that have occurred on your {{ integration.display_name }} site. Event records contain data about affected resources and additional details, such as when the change occurred. This can be used to create a log of events for a record and analyze how it has changed over time.

{{ integration.table-type | flatify }}

replication-method: "Key-based Incremental"

api-method:
name: "List events"
doc-link: "https://apidocs.chargebee.com/docs/api/events#list_events"
name: "List events"
doc-link: "https://apidocs.chargebee.com/docs/api/events#list_events"

product-catalog-version: "any"

attributes:
- name: "id"
Expand Down
Loading