diff --git a/_changelog/entries/2021/2021-06-14-chargebee-v1-new-tables.md b/_changelog/entries/2021/2021-06-14-chargebee-v1-new-tables.md
new file mode 100644
index 000000000..b339489bd
--- /dev/null
+++ b/_changelog/entries/2021/2021-06-14-chargebee-v1-new-tables.md
@@ -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.
\ No newline at end of file
diff --git a/_includes/integrations/templates/schemas/table-attributes.html b/_includes/integrations/templates/schemas/table-attributes.html
index 6c66a23ac..9409c16e0 100644
--- a/_includes/integrations/templates/schemas/table-attributes.html
+++ b/_includes/integrations/templates/schemas/table-attributes.html
@@ -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 }} Learn more.{% endcapture %}
{{ plus-icon | replace:"TOOLTIP",nested-data-tooltip }}
+
+ {% endif %}
{% endif %}
{{ attribute.type | upcase }}
@@ -89,13 +92,13 @@
{% assign full-id = table.name | append: "--" | append: attribute.name | append: "--" | append: attribute-id %}
-
+
-
+
{% include integrations/templates/schemas/table-attributes.html table=attribute.subattributes %}
diff --git a/_includes/integrations/templates/schemas/table-schemas.html b/_includes/integrations/templates/schemas/table-schemas.html
index 64c25cb49..11beb6628 100755
--- a/_includes/integrations/templates/schemas/table-schemas.html
+++ b/_includes/integrations/templates/schemas/table-schemas.html
@@ -6,10 +6,10 @@
{% assign integration-tables = site.integration-schemas | where:"tap",integration.name %}
- {% 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 %}
diff --git a/_integration-schemas/chargebee/addons.md b/_integration-schemas/chargebee/v1/addons.md
similarity index 95%
rename from _integration-schemas/chargebee/addons.md
rename to _integration-schemas/chargebee/v1/addons.md
index 9872a98bd..b3b03d412 100644
--- a/_integration-schemas/chargebee/addons.md
+++ b/_integration-schemas/chargebee/v1/addons.md
@@ -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"
@@ -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: |
@@ -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`.
---
\ No newline at end of file
diff --git a/_integration-schemas/chargebee/coupons.md b/_integration-schemas/chargebee/v1/coupons.md
similarity index 67%
rename from _integration-schemas/chargebee/coupons.md
rename to _integration-schemas/chargebee/v1/coupons.md
index a5c6315ee..e6fdf9560 100644
--- a/_integration-schemas/chargebee/coupons.md
+++ b/_integration-schemas/chargebee/v1/coupons.md
@@ -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"
@@ -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`
@@ -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"
@@ -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."
@@ -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`
@@ -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"
diff --git a/_integration-schemas/chargebee/credit_notes.md b/_integration-schemas/chargebee/v1/credit_notes.md
similarity index 97%
rename from _integration-schemas/chargebee/credit_notes.md
rename to _integration-schemas/chargebee/v1/credit_notes.md
index e8533e32e..4a23060a6 100644
--- a/_integration-schemas/chargebee/credit_notes.md
+++ b/_integration-schemas/chargebee/v1/credit_notes.md
@@ -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"
@@ -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"
diff --git a/_integration-schemas/chargebee/customers.md b/_integration-schemas/chargebee/v1/customers.md
similarity index 96%
rename from _integration-schemas/chargebee/customers.md
rename to _integration-schemas/chargebee/v1/customers.md
index 3bae376c8..96e926985 100644
--- a/_integration-schemas/chargebee/customers.md
+++ b/_integration-schemas/chargebee/v1/customers.md
@@ -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"
@@ -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."
@@ -476,8 +497,4 @@ attributes:
- `invalid`
- `not_validated`
- `undetermined`
-
- - name: "vat_number_validated_time"
- type: "date-time"
- description: ""
---
\ No newline at end of file
diff --git a/_integration-schemas/chargebee/events.md b/_integration-schemas/chargebee/v1/events.md
similarity index 99%
rename from _integration-schemas/chargebee/events.md
rename to _integration-schemas/chargebee/v1/events.md
index 6d2d80c31..24b4add81 100644
--- a/_integration-schemas/chargebee/events.md
+++ b/_integration-schemas/chargebee/v1/events.md
@@ -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"
diff --git a/_integration-schemas/chargebee/foreign-keys.md b/_integration-schemas/chargebee/v1/foreign-keys.md
similarity index 90%
rename from _integration-schemas/chargebee/foreign-keys.md
rename to _integration-schemas/chargebee/v1/foreign-keys.md
index f31e911cb..0af8d73af 100644
--- a/_integration-schemas/chargebee/foreign-keys.md
+++ b/_integration-schemas/chargebee/v1/foreign-keys.md
@@ -38,6 +38,13 @@ foreign-keys:
subattribute: "event_based_addons"
join-on: "id"
+ - id: "card-id"
+ table: "cards"
+ attribute: ""
+ all-foreign-keys:
+ - table: "cards"
+ join-on: "id"
+
- id: "coupon-id"
attribute: "coupon_id"
table: "coupons"
@@ -140,6 +147,64 @@ foreign-keys:
- table: "subscriptions"
join-on: "gift_id"
+ - id: "invoice-id"
+ attribute: "invoice_id"
+ table: "invoices"
+ all-foreign-keys:
+ - table: "credit_notes"
+ subattribute: "allocations"
+ - table: "credit_notes"
+ join-on: "reference_invoice_id"
+ - table: "events"
+ subattribute: "content.invoice"
+ join-on: "id"
+ - table: "events"
+ subattribute: "content.transaction.linked_credit_notes"
+ join-on: "cn_reference_invoice_id"
+ - table: "events"
+ subattribute: "content.transaction.linked_payments"
+ - table: "invoices"
+ join-on: "id"
+ - table: "transactions"
+ subattribute: "linked_credit_notes"
+ join-on: "cn_reference_invoice_id"
+ - table: "transactions"
+ subattribute: "linked_payments"
+ - table: "gifts"
+ subattribute: "gifter"
+ join-on: "invoice_id"
+ - table: "orders"
+ join-on: "invoice_id"
+
+ - id: "item-families-id"
+ table: "item_families"
+ attribute: "item_family_id"
+ all-foreign-keys:
+ - table: "item_families"
+ - table: "item_prices"
+ - table: "items"
+
+ - id: "item-price-id"
+ table: "item_prices"
+ attribute: "item_price_id"
+ all-foreign-keys:
+ - table: "item_prices"
+ join-on: "id"
+ - table: "subscriptions"
+ subattribute: "charged_items"
+ - table: "subscriptions"
+ subattribute: "item_tiers"
+ - table: "subscriptions"
+ subattribute: "subscription_items"
+
+ - id: "item-id"
+ table: "items"
+ attribute: "item_id"
+ all-foreign-keys:
+ - table: "items"
+ join-on: "id"
+ - table: "item_prices"
+
- id: "line-item-id"
attribute: "line_item_id"
table: ""
@@ -175,35 +240,6 @@ foreign-keys:
subattribute: "line_item_tax"
join-on: "line_item_id"
- - id: "invoice-id"
- attribute: "invoice_id"
- table: "invoices"
- all-foreign-keys:
- - table: "credit_notes"
- subattribute: "allocations"
- - table: "credit_notes"
- join-on: "reference_invoice_id"
- - table: "events"
- subattribute: "content.invoice"
- join-on: "id"
- - table: "events"
- subattribute: "content.transaction.linked_credit_notes"
- join-on: "cn_reference_invoice_id"
- - table: "events"
- subattribute: "content.transaction.linked_payments"
- - table: "invoices"
- join-on: "id"
- - table: "transactions"
- subattribute: "linked_credit_notes"
- join-on: "cn_reference_invoice_id"
- - table: "transactions"
- subattribute: "linked_payments"
- - table: "gifts"
- subattribute: "gifter"
- join-on: "invoice_id"
- - table: "orders"
- join-on: "invoice_id"
-
- id: "plan-id"
attribute: "plan_id"
table: "plans"
@@ -306,6 +342,8 @@ foreign-keys:
attribute: "id"
table: "orders"
all-foreign-keys:
+ - table: "invoices"
+ subattribute: "linked_orders"
- table: "orders"
join-on: "id"
---
\ No newline at end of file
diff --git a/_integration-schemas/chargebee/gifts.md b/_integration-schemas/chargebee/v1/gifts.md
similarity index 91%
rename from _integration-schemas/chargebee/gifts.md
rename to _integration-schemas/chargebee/v1/gifts.md
index 2d880cc09..495f47a56 100644
--- a/_integration-schemas/chargebee/gifts.md
+++ b/_integration-schemas/chargebee/v1/gifts.md
@@ -6,13 +6,18 @@ key: "gifts"
name: "gifts"
doc-link: "https://apidocs.chargebee.com/docs/api/gifts"
singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/gifts.json"
-description: "The `{{ table.name }}` table contains info about the gifts in your {{ integration.display_name }} account."
+description: |
+ The `{{ table.name }}` table contains info about the gifts in your {{ integration.display_name }} account.
+
+ {{ integration.table-type | flatify }}
replication-method: "Key-based Incremental"
api-method:
- name: "List gifts"
- doc-link: "https://apidocs.chargebee.com/docs/api/gifts#list_gifts"
+ name: "List gifts"
+ doc-link: "https://apidocs.chargebee.com/docs/api/gifts#list_gifts"
+
+product-catalog-version: "any"
attributes:
- name: "id"
diff --git a/_integration-schemas/chargebee/invoices.md b/_integration-schemas/chargebee/v1/invoices.md
similarity index 91%
rename from _integration-schemas/chargebee/invoices.md
rename to _integration-schemas/chargebee/v1/invoices.md
index 8cd552307..f8a30ff1d 100644
--- a/_integration-schemas/chargebee/invoices.md
+++ b/_integration-schemas/chargebee/v1/invoices.md
@@ -5,15 +5,19 @@ key: "invoice"
name: "invoices"
doc-link: "https://apidocs.chargebee.com/docs/api/invoices"
-singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/invoices.json"
+singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/item_model/invoices.json"
description: |
The `{{ table.name }}` table contains info about the invoices in your {{ integration.display_name }} account. Invoices are statements containing charges, adjustments, and any discounts for a subscription specific to a term.
+ {{ integration.table-type | flatify }}
+
replication-method: "Key-based Incremental"
api-method:
- name: "List invoices"
- doc-link: "https://apidocs.chargebee.com/docs/api/invoices#list_invoices"
+ name: "List invoices"
+ doc-link: "https://apidocs.chargebee.com/docs/api/invoices#list_invoices"
+
+product-catalog-version: "any"
attributes:
- name: "id"
@@ -236,6 +240,10 @@ attributes:
- `promotional_credits`: Represents promotional credits in the invoice.
- `prorated_credits`: Represents credit adjustments in the invoice.
+ - name: "object"
+ type: "string"
+ description: ""
+
- name: "due_date"
type: "date-time"
description: "The due date of the invoice."
@@ -270,14 +278,6 @@ attributes:
type: "boolean"
description: "Indicates if the invoice is gifted or not."
- - name: "is_partial_tax_applied"
- type: "boolean"
- description: "Indicates if partial tax has been applied."
-
- - name: "is_non_compliance_tax"
- type: "boolean"
- description: ""
-
- name: "issued_credit_notes"
type: "array"
description: "A list of credit notes issued for the invoice."
@@ -313,11 +313,23 @@ attributes:
type: "array"
description: "The list of taxes applied on line items."
subattributes:
+ - name: "is_partial_tax_applied"
+ type: "boolean"
+ description: ""
+
+ - name: "is_non_compliance_tax"
+ type: "boolean"
+ description: ""
+
- name: "line_item_id"
type: "string"
description: "The ID of the line item for which the tax is applicable."
foreign-key-id: "line-item-id"
+ - name: "taxable_amount"
+ type: "integer"
+ description: ""
+
- name: "tax_amount"
type: "integer"
description: "The tax amount, in cents."
@@ -352,6 +364,46 @@ attributes:
type: "number"
description: "The rate of tax used to calculate the tax amount."
+ - name: "line_item_tiers"
+ type: "array"
+ description: ""
+ subattributes:
+ - name: "ending_unit"
+ type: "integer"
+ description: ""
+
+ - name: "ending_unit_in_decimal"
+ type: "string"
+ description: &plan-model-only "{{ integration.product-catalog-v1 | flatify }}"
+
+ - name: "line_item_id"
+ type: "string"
+ description: ""
+
+ - name: "quantity_used"
+ type: "integer"
+ description: ""
+
+ - name: "quantity_used_in_decimal"
+ type: "string"
+ description: *plan-model-only
+
+ - name: "starting_unit"
+ type: "integer"
+ description: ""
+
+ - name: "starting_unit_in_decimal"
+ type: "string"
+ description: *plan-model-only
+
+ - name: "unit_amount"
+ type: "integer"
+ description: ""
+
+ - name: "unit_amount_in_decimal"
+ type: "string"
+ description: *plan-model-only
+
- name: "line_items"
type: "array"
description: "The line items in the invoice."
@@ -360,6 +412,10 @@ attributes:
type: "integer"
description: "The total amount of the line item, calculated as `unit_amount x quantity`."
+ - name: "amount_in_decimal"
+ type: "string"
+ description: *plan-model-only
+
- name: "date_from"
type: "date-time"
description: "The start date of the line item."
@@ -415,10 +471,18 @@ attributes:
- `volume`: Charges the per unit price for the total quantity purchased based on the tier under which it falls.
- `stairstep`: Charges a price for a range.
+ - name: "object"
+ type: "string"
+ description: ""
+
- name: "quantity"
type: "integer"
description: "The quantity of the recurring item, represented by the line item."
+ - name: "quantity_in_decimal"
+ type: "string"
+ description: *plan-model-only
+
- name: "subscription_id"
type: "string"
description: "The ID of the subscription associated with the line item."
@@ -449,29 +513,9 @@ attributes:
type: "integer"
description: "The unit amount of the line item, in cents."
- - name: "line_item_tiers"
- type: "array"
- description: ""
- subattributes:
- - name: "line_item_id"
+ - name: "unit_amount_in_decimal"
type: "string"
- description: ""
-
- - name: "starting_unit"
- type: "integer"
- description: ""
-
- - name: "ending_unit"
- type: "integer"
- description: ""
-
- - name: "quantity_used"
- type: "integer"
- description: ""
-
- - name: "unit_amount"
- type: "integer"
- description: ""
+ description: *plan-model-only
- name: "linked_orders"
type: "array"
@@ -485,6 +529,10 @@ attributes:
type: "date-time"
description: "the time the order was created."
+ - name: "document_number"
+ type: "string"
+ description: ""
+
- name: "fulfillment_status"
type: "string"
description: "The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include `Shipped`, `Awaiting Shipment`, `Not fulfilled`, etc."
@@ -492,6 +540,11 @@ attributes:
- name: "id"
type: "string"
description: "The order ID."
+ foreign-key-id: "order-id"
+
+ - name: "order_type"
+ type: "string"
+ description: ""
- name: "reference_id"
type: "string"
@@ -527,13 +580,9 @@ attributes:
type: "date-time"
description: "The time the amount was applied."
- - name: "document_number"
- type: "integer"
- description: ""
-
- name: "order_type"
type: "string"
- description: ""
+ description: &item-model-only "{{ integration.product-catalog-v2 | flatify }}"
- name: "txn_amount"
type: "integer"
@@ -541,7 +590,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"
@@ -575,7 +624,7 @@ attributes:
- name: "notes"
type: "array"
description: |
- The list of notes associated with the invoice. If entity_type & entity_id are not present, then it is general notes (i.e Notes input provided under **Customize Invoice** action in {{ integration.display_name }} web interface).
+ The list of notes associated with the invoice. If `entity_type` and `entity_id` are not present, then it's a general note (i.e Notes input provided under **Customize Invoice** action in {{ integration.display_name }} web interface).
subattributes:
- name: "entity_id"
type: "string"
@@ -604,6 +653,10 @@ attributes:
type: "date-time"
description: "The time the invoice was paid."
+ - name: "payment_owner"
+ type: "string"
+ description: ""
+
- name: "po_number"
type: "string"
description: "The number of the purchase order associated with the invoice."
@@ -658,10 +711,6 @@ attributes:
type: "integer"
description: "The total tax amount for the invoice, in cents."
- - name: "taxable_amount"
- type: "integer"
- description: ""
-
- name: "taxes"
type: "array"
description: ""
diff --git a/_integration-schemas/chargebee/v1/item_families.md b/_integration-schemas/chargebee/v1/item_families.md
new file mode 100644
index 000000000..0f0ecbf29
--- /dev/null
+++ b/_integration-schemas/chargebee/v1/item_families.md
@@ -0,0 +1,54 @@
+---
+tap: "chargebee"
+version: "1"
+key: "item-family"
+
+name: "item_families"
+doc-link: ""
+singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/item_model/item_families.json"
+description: |
+ The `{{ table.name }}` table contains info about item families.
+
+ {{ integration.table-type | flatify }}
+
+replication-method: "Key-based Incremental"
+
+api-method:
+ name: "List item families"
+ doc-link: "https://apidocs.chargebee.com/docs/api/item_families?prod_cat_ver=2#list_item_families"
+
+product-catalog-version: "v2"
+
+attributes:
+ - name: "id"
+ type: "string"
+ primary-key: true
+ description: "The item family ID."
+ foreign-key-id: "item-family-id"
+
+ - name: "updated_at"
+ type: "date-time"
+ replication-key: true
+ description: "The time the item family was last updated."
+
+ - name: "description"
+ type: "string"
+ description: "A description of the item family."
+
+ - name: "name"
+ type: "string"
+ description: "The name of the item family."
+
+ - name: "object"
+ type: "string"
+ description: ""
+
+ - name: "resource_version"
+ type: "integer"
+ description: ""
+
+ - name: "status"
+ type: "string"
+ description: |
+ The status of the item family.
+---
\ No newline at end of file
diff --git a/_integration-schemas/chargebee/v1/item_prices.md b/_integration-schemas/chargebee/v1/item_prices.md
new file mode 100644
index 000000000..4b389bdea
--- /dev/null
+++ b/_integration-schemas/chargebee/v1/item_prices.md
@@ -0,0 +1,203 @@
+---
+tap: "chargebee"
+version: "1"
+key: "item-price"
+
+name: "item_prices"
+doc-link: ""
+singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/item_model/item_prices.json"
+description: |
+ The `{{ table.name }}` table contains info about item prices.
+
+ {{ integration.table-type | flatify }}
+
+replication-method: "Key-based Incremental"
+
+api-method:
+ name: "List item prices"
+ doc-link: "https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver=2#list_item_prices"
+
+product-catalog-version: "v2"
+
+attributes:
+ - name: "id"
+ type: "string"
+ primary-key: true
+ description: "The item price ID."
+ foreign-key-id: "item-price-id"
+
+ - name: "updated_at"
+ type: "date-time"
+ replication-key: true
+ description: "The time the item price was last updated."
+
+ - name: "accounting_detail"
+ type: "object"
+ description: ""
+ subattributes:
+ - name: "accounting_category1"
+ type: "string"
+ description: ""
+
+ - name: "accounting_category2"
+ type: "string"
+ description: ""
+
+ - name: "accounting_code"
+ type: "string"
+ description: ""
+
+ - name: "sku"
+ type: "string"
+ description: ""
+
+ - name: "billing_cycles"
+ type: "integer"
+ description: ""
+
+ - name: "created_at"
+ type: "date-time"
+ description: ""
+
+ - name: "currency_code"
+ type: "string"
+ description: ""
+
+ - name: "description"
+ type: "string"
+ description: ""
+
+ - name: "external_name"
+ type: "string"
+ description: ""
+
+ - name: "free_quantity"
+ type: "integer"
+ description: ""
+
+ - name: "invoice_notes"
+ type: "string"
+ description: ""
+
+ - name: "is_taxable"
+ type: "boolean"
+ description: ""
+
+ - name: "item_family_id"
+ type: "string"
+ description: ""
+ foreign-key-id: "item-family-id"
+
+ - name: "item_id"
+ type: "string"
+ description: ""
+ foreign-key-id: "item-id"
+
+ - name: "item_type"
+ type: "string"
+ description: ""
+
+ - name: "metadata"
+ type: "string"
+ description: ""
+
+ - name: "name"
+ type: "string"
+ description: ""
+
+ - name: "object"
+ type: "string"
+ description: ""
+
+ - name: "period"
+ type: "integer"
+ description: ""
+
+ - name: "period_unit"
+ type: "string"
+ description: ""
+
+ - name: "price"
+ type: "integer"
+ description: ""
+
+ - name: "pricing_model"
+ type: "string"
+ description: ""
+
+ - name: "resource_version"
+ type: "integer"
+ description: ""
+
+ - name: "shipping_period"
+ type: "integer"
+ description: ""
+
+ - name: "shipping_period_unit"
+ type: "string"
+ description: ""
+
+ - name: "show_description_in_invoices"
+ type: "boolean"
+ description: ""
+
+ - name: "show_description_in_quotes"
+ type: "boolean"
+ description: ""
+
+ - name: "status"
+ type: "string"
+ description: ""
+
+ - name: "tax_detail"
+ type: "object"
+ description: ""
+ subattributes:
+ - name: "avalara_sale_type"
+ type: "string"
+ description: ""
+
+ - name: "avalara_service_type"
+ type: "integer"
+ description: ""
+
+ - name: "avalara_tax_code"
+ type: "string"
+ description: ""
+
+ - name: "avalara_transaction_type"
+ type: "integer"
+ description: ""
+
+ - name: "tax_profile_id"
+ type: "string"
+ description: ""
+
+ - name: "taxjar_product_code"
+ type: "string"
+ description: ""
+
+ - name: "tiers"
+ type: "array"
+ description: ""
+ subattributes:
+ - name: "ending_unit"
+ type: "integer"
+ description: ""
+
+ - name: "price"
+ type: "integer"
+ description: ""
+
+ - name: "starting_unit"
+ type: "integer"
+ description: ""
+
+ - name: "trial_period"
+ type: "integer"
+ description: ""
+
+ - name: "trial_period_unit"
+ type: "string"
+ description: ""
+---
\ No newline at end of file
diff --git a/_integration-schemas/chargebee/v1/items.md b/_integration-schemas/chargebee/v1/items.md
new file mode 100644
index 000000000..0127f80a6
--- /dev/null
+++ b/_integration-schemas/chargebee/v1/items.md
@@ -0,0 +1,118 @@
+---
+tap: "chargebee"
+version: "1"
+key: "item"
+
+name: "items"
+doc-link: ""
+singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/item_model/items.json"
+description: |
+ The `{{ table.name }}` table contains info about the items in your {{ integration.display_name }} account.
+
+ {{ integration.table-type | flatify }}
+
+replication-method: "Key-based Incremental"
+
+api-method:
+ name: "List items"
+ doc-link: "https://apidocs.chargebee.com/docs/api/items?prod_cat_ver=2#list_items"
+
+product-catalog-version: "v2"
+
+attributes:
+ - name: "id"
+ type: "string"
+ primary-key: true
+ description: "The item ID."
+ foreign-key-id: "item-id"
+
+ - name: "updated_at"
+ type: "date-time"
+ replication-key: true
+ description: "The time the item was last updated."
+
+ - name: "applicable_items"
+ type: "array"
+ description: ""
+ subattributes:
+ - name: "id"
+ type: "string"
+ description: ""
+
+ - name: "description"
+ type: "string"
+ description: ""
+
+ - name: "enabled_for_checkout"
+ type: "boolean"
+ description: ""
+
+ - name: "enabled_in_portal"
+ type: "boolean"
+ description: ""
+
+ - name: "gift_claim_redirect_url"
+ type: "string"
+ description: ""
+
+ - name: "included_in_mrr"
+ type: "boolean"
+ description: ""
+
+ - name: "is_giftable"
+ type: "boolean"
+ description: ""
+
+ - name: "is_shippable"
+ type: "boolean"
+ description: ""
+
+ - name: "item_applicability"
+ type: "string"
+ description: ""
+
+ - name: "item_family_id"
+ type: "string"
+ description: ""
+ foreign-key-id: "item-family-id"
+
+ - name: "metadata"
+ type: "string"
+ description: ""
+
+ - name: "metered"
+ type: "boolean"
+ description: ""
+
+ - name: "name"
+ type: "string"
+ description: ""
+
+ - name: "object"
+ type: "string"
+ description: ""
+
+ - name: "redirect_url"
+ type: "string"
+ description: ""
+
+ - name: "resource_version"
+ type: "integer"
+ description: ""
+
+ - name: "status"
+ type: "string"
+ description: ""
+
+ - name: "type"
+ type: "string"
+ description: ""
+
+ - name: "unit"
+ type: "string"
+ description: ""
+
+ - name: "usage_calculation"
+ type: "string"
+ description: ""
+---
\ No newline at end of file
diff --git a/_integration-schemas/chargebee/orders.md b/_integration-schemas/chargebee/v1/orders.md
similarity index 96%
rename from _integration-schemas/chargebee/orders.md
rename to _integration-schemas/chargebee/v1/orders.md
index 3dcfcf021..098111056 100644
--- a/_integration-schemas/chargebee/orders.md
+++ b/_integration-schemas/chargebee/v1/orders.md
@@ -6,13 +6,18 @@ key: "orders"
name: "orders"
doc-link: "https://apidocs.chargebee.com/docs/api/orders"
singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/orders.json"
-description: "The `{{ table.name }}` table contains info about the orders in your {{ integration.display_name }} account. The **Order Management** feature must be enabled to sync this table. For more information, refer to the [{{ integration.display_name }} docs](https://www.chargebee.com/docs/orders.html)."
+description: |
+ The `{{ table.name }}` table contains info about the orders in your {{ integration.display_name }} account. The **Order Management** feature must be enabled to replicate this table. For more information, refer to the [{{ integration.display_name }} docs](https://www.chargebee.com/docs/orders.html).
+
+ {{ integration.table-type | flatify }}
replication-method: "Key-based Incremental"
api-method:
- name: "List orders"
- doc-link: "https://apidocs.chargebee.com/docs/api/orders#list_orders"
+ name: "List orders"
+ doc-link: "https://apidocs.chargebee.com/docs/api/orders#list_orders"
+
+product-catalog-version: "any"
attributes:
- name: "id"
@@ -434,7 +439,7 @@ attributes:
- name: "shipping_cut_off_date"
type: "date-time"
- description: "The time after an order becomes unservicable."
+ description: "The time after an order becomes unserviceable."
- name: "shipping_date"
type: "date-time"
@@ -473,4 +478,4 @@ attributes:
- name: "tracking_id"
type: "string"
description: "The tracking ID of the order."
----
+---
\ No newline at end of file
diff --git a/_integration-schemas/chargebee/payment_sources.md b/_integration-schemas/chargebee/v1/payment_sources.md
similarity index 97%
rename from _integration-schemas/chargebee/payment_sources.md
rename to _integration-schemas/chargebee/v1/payment_sources.md
index 0f8c92146..5e4023668 100644
--- a/_integration-schemas/chargebee/payment_sources.md
+++ b/_integration-schemas/chargebee/v1/payment_sources.md
@@ -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 customer payment sources.
+ {{ integration.table-type | flatify }}
+
replication-method: "Key-based Incremental"
api-method:
- name: "List payment sources"
- doc-link: "https://apidocs.chargebee.com/docs/api/payment_sources#list_payment_sources"
+ name: "List payment sources"
+ doc-link: "https://apidocs.chargebee.com/docs/api/payment_sources#list_payment_sources"
+
+product-catalog-version: "any"
attributes:
- name: "id"
diff --git a/_integration-schemas/chargebee/plans.md b/_integration-schemas/chargebee/v1/plans.md
similarity index 85%
rename from _integration-schemas/chargebee/plans.md
rename to _integration-schemas/chargebee/v1/plans.md
index 938d64350..20f104adf 100644
--- a/_integration-schemas/chargebee/plans.md
+++ b/_integration-schemas/chargebee/v1/plans.md
@@ -4,16 +4,20 @@ version: "1"
key: "plan"
name: "plans"
-doc-link: "https://apidocs.chargebee.com/docs/api/plans"
-singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/plans.json"
+doc-link: ""
+singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/plan_model/plans.json"
description: |
The `{{ table.name }}` table contains info about the plans in your {{ integration.display_name }} account. Plans are used to specify prices and billing frequencies for [`subscriptions`](#subscriptions).
+ {{ integration.table-type | flatify }}
+
replication-method: "Key-based Incremental"
api-method:
- name: "List plans"
- doc-link: "https://apidocs.chargebee.com/docs/api/plans#list_plans"
+ name: "List plans"
+ doc-link: "https://apidocs.chargebee.com/docs/api/plans?prod_cat_ver=1#list_plans"
+
+product-catalog-version: "v1"
attributes:
- name: "id"
@@ -52,10 +56,18 @@ attributes:
description: "The ID of the addon."
foreign-key-id: "addon-id"
+ - name: "quantity_in_decimal"
+ type: "string"
+ description: ""
+
- name: "archived_at"
type: "date-time"
description: "The time the plan was archived."
+ - name: "avalara_sale_type"
+ type: "string"
+ description: ""
+
- name: "avalara_service_type"
type: "integer"
description: ""
@@ -91,6 +103,14 @@ attributes:
type: "string"
description: "The description of the plan to show in hosted pages and the customer portal."
+ - name: "enabled_in_hosted_pages"
+ type: "boolean"
+ description: ""
+
+ - name: "enabled_in_portal"
+ type: "boolean"
+ description: ""
+
- name: "event_based_addons"
type: "array"
description: "IDs of the event-based addons associated with the plan."
@@ -116,6 +136,10 @@ attributes:
type: "integer"
description: "The free quantity the subscriptions of the plan will have. Only quantities more than this value will be charged for the subscription."
+ - name: "free_quantity_in_decimal"
+ type: "string"
+ description: ""
+
- name: "giftable"
type: "boolean"
description: ""
@@ -165,6 +189,10 @@ attributes:
type: "integer"
description: "The price of the plan."
+ - name: "price_in_decimal"
+ type: "string"
+ description: ""
+
- name: "redirect_url"
type: "string"
description: "The URL to redirect on successful checkout."
@@ -197,6 +225,10 @@ attributes:
- `active`
- `archived`
+ - name: "tax_code"
+ type: "string"
+ description: ""
+
- name: "tax_profile_id"
type: "string"
description: "The ID of the tax profile for the plan."
@@ -209,21 +241,29 @@ attributes:
type: "array"
description: ""
subattributes:
- - name: "starting_unit"
+ - name: "ending_unit"
type: "integer"
description: ""
- - name: "ending_unit"
- type: "integer"
+ - name: "ending_unit_in_decimal"
+ type: "string"
description: ""
- name: "price"
type: "integer"
description: ""
- - name: ""
- type:
- description: ""
+ - name: "price_in_decimal"
+ type: "string"
+ description: ""
+
+ - name: "starting_unit"
+ type: "integer"
+ description: ""
+
+ - name: "starting_unit_in_decimal"
+ type: "string"
+ description: ""
- name: "trial_period"
type: "integer"
@@ -242,5 +282,5 @@ attributes:
Possible values are:
- `day`
- - `month`
+ - `month`
---
\ No newline at end of file
diff --git a/_integration-schemas/chargebee/promotional_credits.md b/_integration-schemas/chargebee/v1/promotional_credit.md
similarity index 77%
rename from _integration-schemas/chargebee/promotional_credits.md
rename to _integration-schemas/chargebee/v1/promotional_credit.md
index a68c32c14..f8769d6aa 100644
--- a/_integration-schemas/chargebee/promotional_credits.md
+++ b/_integration-schemas/chargebee/v1/promotional_credit.md
@@ -5,22 +5,26 @@ key: "promotional-credit"
name: "promotional_credits"
doc-link: "https://apidocs.chargebee.com/docs/api/promotional_credits"
-singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/promotional_credits.json"
+singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/item_model/promotional_credits.json"
description: |
The `{{ table.name }}` table contains info about the promotional_credits in your {{ integration.display_name }} account.
+ {{ integration.table-type | flatify }}
+
replication-method: "Key-based Incremental"
api-method:
- name: "List promotional credits"
- doc-link: "https://apidocs.chargebee.com/docs/api/promotional_credits#list_promotional_credits"
+ name: "List promotional credits"
+ doc-link: "https://apidocs.chargebee.com/docs/api/promotional_credits#list_promotional_credits"
+
+product-catalog-version: "any"
attributes:
- name: "id"
type: "string"
primary-key: true
description: "The promotional credit ID."
- # foreign-key-id: "promotional-credit-id"
+ foreign-key-id: "promotional-credit-id"
- name: "created_at"
type: "date-time"
@@ -31,6 +35,10 @@ attributes:
type: "string"
description: "The amount of the promotional credit."
+ - name: "amount_in_decimal"
+ type: "string"
+ description: "{{ integration.product-catalog-v1 | flatify }}"
+
- name: "closing_balance"
type: "integer"
description: "The closing balance on the end date."
@@ -61,6 +69,10 @@ attributes:
type: "string"
description: "The user who added/deducted the credit."
+ - name: "reference"
+ type: "string"
+ description: ""
+
- name: "type"
type: "string"
description: |
diff --git a/_integration-schemas/chargebee/subscriptions.md b/_integration-schemas/chargebee/v1/subscriptions.md
similarity index 77%
rename from _integration-schemas/chargebee/subscriptions.md
rename to _integration-schemas/chargebee/v1/subscriptions.md
index c46c0ad90..2caf384c4 100644
--- a/_integration-schemas/chargebee/subscriptions.md
+++ b/_integration-schemas/chargebee/v1/subscriptions.md
@@ -5,7 +5,7 @@ key: "subscription"
name: "subscriptions"
doc-link: "https://apidocs.chargebee.com/docs/api/subscriptions"
-singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/subscriptions.json"
+singer-schema: "https://github.com/singer-io/tap-chargebee/blob/master/tap_chargebee/schemas/item_model/subscriptions.json"
description: |
The `{{ table.name }}` table contains info about the subscriptions your customers have subscribed to. A subscription is a recurring item that customers are billed for, such as a plan or addon. It may also contain discount items.
@@ -17,11 +17,15 @@ description: |
Because of this functionality and Stitch's use of this value as a [Replication Key]({{ link.replication.rep-keys | prepend: site.baseurl }}), updates made to subscriptions where only these attributes are modified may not be detected. You should ensure that another attribute on the subscription is also modified to ensure that the `updated_at` value is updated, which will allow Stitch to detect and replicate the record.
+ {{ integration.table-type | flatify }}
+
replication-method: "Key-based Incremental"
api-method:
- name: "List subscriptions"
- doc-link: "https://apidocs.chargebee.com/docs/api/subscriptions#list_subscriptions"
+ name: "List subscriptions"
+ doc-link: "https://apidocs.chargebee.com/docs/api/subscriptions#list_subscriptions"
+
+product-catalog-version: "any"
attributes:
- name: "id"
@@ -50,7 +54,10 @@ attributes:
- name: "addons"
type: "array"
- description: "Details about the addon(s) associated with the subscription."
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
+
+ Details about the addon(s) associated with the subscription.
subattributes:
- name: "id"
type: "string"
@@ -84,7 +91,10 @@ attributes:
- name: "affiliate_token"
type: "string"
- description: "A unique tracking token for the subscription."
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
+
+ A unique tracking token for the subscription.
- name: "auto_collection"
type: "string"
@@ -134,11 +144,14 @@ attributes:
- name: "cancelled_at"
type: "date-time"
- description: "The time at which subscription was cancelled or is set to be cancelled."
+ description: "The time at which subscription was canceled or is set to be canceled."
- name: "charged_event_based_addons"
type: "array"
- description: "A list of event-based addons that have already been charged."
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
+
+ A list of event-based addons that have already been charged.
subattributes:
- name: "id"
type: "string"
@@ -153,6 +166,20 @@ attributes:
type: "string"
description: ""
+ - name: "charged_items"
+ type: "array"
+ description: |
+ {{ integration.product-catalog-v2 | flatify }}
+ subattributes:
+ - name: "item_price_id"
+ type: "string"
+ description: ""
+ foreign-key-id: "item-price-id"
+
+ - name: "last_charged_at"
+ type: "date-time"
+ description: ""
+
- name: "coupon"
type: "string"
description: ""
@@ -204,7 +231,8 @@ attributes:
- name: "custom_fields"
type: "string"
- description: ""
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
- name: "customer_id"
type: "string"
@@ -225,7 +253,10 @@ attributes:
- name: "event_based_addons"
type: "array"
- description: "A list of non-recurring addons associated with the subscription that will be charged on the occurrence of a specified event."
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
+
+ A list of non-recurring addons associated with the subscription that will be charged on the occurrence of a specified event.
subattributes:
- name: "charge_once"
type: "boolean"
@@ -258,7 +289,10 @@ attributes:
- name: "gift_id"
type: "string"
- description: "The ID of the gift associated with the subscription."
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
+
+ The ID of the gift associated with the subscription.
foreign-key-id: "gift-id"
- name: "has_scheduled_changes"
@@ -269,6 +303,28 @@ attributes:
type: "string"
description: "The invoice notes for the subscription."
+ - name: "item_tiers"
+ type: "array"
+ description: |
+ {{ integration.product-catalog-v2 | flatify }}
+ subattributes:
+ - name: "ending_unit"
+ type: "integer"
+ description: ""
+
+ - name: "item_price_id"
+ type: "string"
+ description: ""
+ foreign-key-id: "item-price-id"
+
+ - name: "price"
+ type: "integer"
+ description: ""
+
+ - name: "starting_unit"
+ type: "integer"
+ description: ""
+
- name: "meta_data"
type: "string"
description: ""
@@ -296,24 +352,57 @@ attributes:
- name: "plan_amount"
type: "integer"
- description: ""
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
+
+ - name: "plan_amount_in_decimal"
+ type: "string"
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
- name: "plan_free_quantity"
type: "integer"
- description: "The units of the item that will be free with the plan associated with the subscription."
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
+
+ The units of the item that will be free with the plan associated with the subscription.
+
+ - name: "plan_free_quantity_in_decimal"
+ type: "string"
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
- name: "plan_id"
type: "string"
- description: "The ID of the plan associated with the subscription."
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
+
+ The ID of the plan associated with the subscription.
foreign-key-id: "plan-id"
- name: "plan_quantity"
type: "integer"
- description: "The plan quantity for the subscription."
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
+
+ The plan quantity for the subscription.
+
+ - name: "plan_quantity_in_decimal"
+ type: "string"
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
- name: "plan_unit_price"
type: "integer"
- description: "The amount that will override the plan's default price."
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
+
+ The amount that will override the plan's default price.
+
+ - name: "plan_unit_price_in_decimal"
+ type: "string"
+ description: |
+ {{ integration.product-catalog-v1 | flatify }}
- name: "po_number"
type: "string"
@@ -416,10 +505,6 @@ attributes:
type: "date-time"
description: ""
- - name: "setup_fee"
- type: "integer"
- description: ""
-
- name: "shipping_address"
type: "object"
description: "The shipping address for the subscription."
@@ -508,6 +593,64 @@ attributes:
- `paused`
- `cancelled`
+ - name: "subscription_items"
+ type: "array"
+ description: |
+ {{ integration.product-catalog-v2 | flatify }}
+ subattributes:
+ - name: "amount"
+ type: "integer"
+ description: ""
+
+ - name: "billing_cycles"
+ type: "integer"
+ description: ""
+
+ - name: "charge_on_event"
+ type: "string"
+ description: ""
+
+ - name: "charge_on_option"
+ type: "string"
+ description: ""
+
+ - name: "charge_once"
+ type: "boolean"
+ description: ""
+
+ - name: "free_quantity"
+ type: "integer"
+ description: ""
+
+ - name: "item_price_id"
+ type: "string"
+ description: ""
+ foreign-key-id: "item-price-id"
+
+ - name: "item_type"
+ type: "string"
+ description: ""
+
+ - name: "object"
+ type: "string"
+ description: ""
+
+ - name: "quantity"
+ type: "integer"
+ description: ""
+
+ - name: "service_period_days"
+ type: "integer"
+ description: ""
+
+ - name: "trial_end"
+ type: "date-time"
+ description: ""
+
+ - name: "unit_price"
+ type: "integer"
+ description: ""
+
- name: "total_dues"
type: "integer"
description: ""
@@ -520,5 +663,5 @@ attributes:
- name: "trial_start"
type: "date-time"
description: |
- The start of the trial period for the subscription. The presence of this value for future subscriptions (`status: future`) implies the subscription will move to `in_trial` when the subscription starts.
+ The start of the trial period for the subscription. The presence of this value for future subscriptions (`status: future`) implies the subscription will move to `in_trial` when the subscription starts.
---
\ No newline at end of file
diff --git a/_integration-schemas/chargebee/transactions.md b/_integration-schemas/chargebee/v1/transactions.md
similarity index 98%
rename from _integration-schemas/chargebee/transactions.md
rename to _integration-schemas/chargebee/v1/transactions.md
index 42eac5577..561de4d59 100644
--- a/_integration-schemas/chargebee/transactions.md
+++ b/_integration-schemas/chargebee/v1/transactions.md
@@ -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 transactions that have occurred in your {{ integration.display_name }} account.
+ {{ integration.table-type | flatify }}
+
replication-method: "Key-based Incremental"
api-method:
- name: "List transactions"
- doc-link: "https://apidocs.chargebee.com/docs/api/transactions#list_transactions"
+ name: "List transactions"
+ doc-link: "https://apidocs.chargebee.com/docs/api/transactions#list_transactions"
+
+product-catalog-version: "any"
attributes:
- name: "id"
diff --git a/_integration-schemas/chargebee/virtual_bank_accounts.md b/_integration-schemas/chargebee/v1/virtual_bank_accounts.md
similarity index 93%
rename from _integration-schemas/chargebee/virtual_bank_accounts.md
rename to _integration-schemas/chargebee/v1/virtual_bank_accounts.md
index 6d7798847..6707fbc1c 100644
--- a/_integration-schemas/chargebee/virtual_bank_accounts.md
+++ b/_integration-schemas/chargebee/v1/virtual_bank_accounts.md
@@ -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 virtual bank accounts in your {{ integration.display_name }} account. A virtual bank account is a unique account number that can be shared with your users while still protecting your sensitive bank account details.
+ {{ integration.table-type | flatify }}
+
replication-method: "Key-based Incremental"
api-method:
- name: "List virtual bank accounts"
- doc-link: "https://apidocs.chargebee.com/docs/api/virtual_bank_accounts#list_virtual_bank_accounts"
+ name: "List virtual bank accounts"
+ doc-link: "https://apidocs.chargebee.com/docs/api/virtual_bank_accounts#list_virtual_bank_accounts"
+
+product-catalog-version: "any"
attributes:
- name: "id"
diff --git a/_saas-integrations/chargebee/v1/chargebee-v1.md b/_saas-integrations/chargebee/v1/chargebee-v1.md
index f24284817..965f6bdc4 100644
--- a/_saas-integrations/chargebee/v1/chargebee-v1.md
+++ b/_saas-integrations/chargebee/v1/chargebee-v1.md
@@ -34,7 +34,7 @@ repo-url: https://github.com/singer-io/tap-chargebee
this-version: "1"
api: |
- [{{ integration.display_name }} API](https://apidocs.chargebee.com/docs/api){:target="new"}
+ [{{ integration.display_name }} v2 API](https://apidocs.chargebee.com/docs/api){:target="new"}
# -------------------------- #
# Stitch Details #
@@ -67,6 +67,8 @@ column-selection: true
feature-summary: |
Stitch's {{ integration.display_name }} integration replicates data using the {{ integration.api | flatify }}. Refer to the [Schema](#schema) section for a list of objects available for replication.
+ This integration supports {{ integration.display_name }} sites that use version 1.0 or version 2.0 of {{ integration.display_name }}'s Product Catalog. The Product Catalog version your site uses determines which tables and fields you can select for replication, however. Refer to the [Table and field availability and {{ integration.display_name }} product catalogs section](#product-catalog-versions) for more info.
+
# -------------------------- #
# Setup Instructions #
@@ -104,6 +106,7 @@ setup-steps:
{% include integrations/shared-setup/connection-setup.html %}
4. In the **API Key** field, paste the API key you generated in [Step 1](#generate-api-key).
5. In the **Site** field, enter the name of your {{ integration.display_name }} site. This can be found in the URL of your {{ integration.display_name }} site. For example: If the URL was `https://stitch.chargebee.com`, only `stitch` would be entered into this field.
+
- title: "Define the historical replication start date"
anchor: "define-historical-sync"
content: |
@@ -119,12 +122,90 @@ setup-steps:
content: |
{% include integrations/shared-setup/data-selection/object-selection.html %}
+
+# -------------------------- #
+# Integration Tables #
+# -------------------------- #
+
+replication-sections:
+ - content: |
+ {% for section in page.replication-sections %}
+ {% if section.title %}
+ - [{{ section.title | flatify }}](#{{ section.anchor }})
+ {% endif %}
+ {% endfor %}
+
+ - title: "Table and field availability and {{ integration.display_name }} product catalogs"
+ anchor: "product-catalog-versions"
+ content: |
+ The availability of some tables and fields is dependent on the {{ integration.display_name }} Product Catalog version your {{ integration.display_name }} site uses. Refer to [{{ integration.display_name }}'s documentation](https://www.chargebee.com/docs/2.0/product-catalog.html){:target="new"} for more info, including how to identify which Product Catalog version your site is using.
+
+ The following table contains a list of the tables included in this version of Stitch's {{ integration.display_name }} integration and the Product Catalog version required to replicate the table.
+
+ Additionally, some fields are also subject to Product Catalog version requirements. These fields are noted in the attribute documentation for individual tables.
+
+ **Note**: If your site is using a Product Catalog version that a table or field doesn't support, the table/field won't display in the **Tables to Replicate** tab in Stitch. For example: If the site is using v2.0 of the Product Catalog, tables/fields that require v1.0 won't display in Stitch.
+
+ {% assign all-integration-tables = site.integration-schemas | where:"tap",integration.name %}
+ {% assign integration-tables-this-version = all-integration-tables | where:"version",integration.this-version | sort_natural:"name" %}
+
+
+
+ |
+ Table name
+ |
+
+ Required Product Catalog version
+ |
+
+ {% for table in integration-tables-this-version %}
+
+ |
+
+ {{ table.name }}
+
+ |
+
+ {% case table.product-catalog-version %}
+ {% when 'any' %}
+ Any
+ {% else %}
+ {{ table.product-catalog-version | append: ".0 only" }}
+ {% endcase %}
+ |
+
+ {% endfor %}
+
+
+
# -------------------------- #
# Integration Tables #
# -------------------------- #
# Looking for the table schemas & info?
-# Each table has a its own .md file in /_integration-schemas/chargebee
+# Each table has a its own .md file in /_integration-schemas/chargebee/v1
+
+table-type: |
+ {% capture product-catalog-version %}
+ {% case table.product-catalog-version %}
+ {% when 'any' %}
+ for sites using **any {{ integration.display_name }} Product Catalog version**.
+
+ {% when 'v1' %}
+ for {{ integration.display_name }} sites using **v1.0 of {{ integration.display_name }}'s Product Catalog**.
+
+ {% when 'v2' %}
+ for {{ integration.display_name }} sites using **v2.0 of {{ integration.display_name }}'s Product Catalog**.
+ {% endcase %}
+ {% endcapture %}
+
+ **Note**: This table is available {{ product-catalog-version | flatify | strip_newlines }} Refer to the [Table and field availability and {{ integration.display_name }} Product Catalogs section](#product-catalog-versions) for more info.
+
+product-catalog-v2: |
+ This attribute will be present only if your {{ integration.display_name }} site uses v2.0 of {{ integration.display_name }}'s Product Catalog. Refer to the [Table and field availability and {{ integration.display_name }} Product Catalogs section](#product-catalog-versions) for more info.
+
+product-catalog-v1: |
+ This attribute will be present only if your {{ integration.display_name }} site uses v1.0 of {{ integration.display_name }}'s Product Catalog. Refer to the [Table and field availability and {{ integration.display_name }} Product Catalogs section](#product-catalog-versions) for more info.
---
{% assign integration = page %}
{% include misc/data-files.html %}
\ No newline at end of file