Skip to content

Commit

Permalink
Added item_family stream
Browse files Browse the repository at this point in the history
  • Loading branch information
pnilan committed Dec 29, 2023
1 parent 96a8a06 commit 08a7015
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,19 @@
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["created_at"]
},
{
"stream": {
"name": "item_family",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["updated_at"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["updated_at"]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@
{"stream": "credit_note", "data": {"id": "TEST-CN-7", "customer_id": "cbdemo_simon", "subscription_id": "AzZTZgTTHmX8Gc1", "reference_invoice_id": "128", "type": "refundable", "reason_code": "product_unsatisfactory", "status": "refunded", "date": 1676371655, "price_type": "tax_exclusive", "exchange_rate": 1.0, "total": 100, "amount_allocated": 100, "amount_refunded": 0, "amount_available": 0, "refunded_at": 1676456650, "generated_at": 1676371655, "updated_at": 1676456650, "channel": "web", "resource_version": 1676456650518, "deleted": false, "object": "credit_note", "create_reason_code": "Product Unsatisfactory", "currency_code": "USD", "round_off_amount": 0, "fractional_correction": 0, "base_currency_code": "USD", "sub_total": 100, "line_items": [{"id": "li_AzZTODTVpkcu827U", "date_from": 1676371655, "date_to": 1676371655, "unit_amount": 100, "quantity": 1, "amount": 100, "pricing_model": "flat_fee", "is_taxed": false, "tax_amount": 0, "object": "line_item", "subscription_id": "AzZTZgTTHmX8Gc1", "customer_id": "cbdemo_simon", "description": "Test Plan 1", "entity_type": "plan_item_price", "entity_id": "Test-Plan-1-USD-Daily", "entity_description": "Test", "reference_line_item_id": "li_16CR6XTVdxgpUH1gi", "metered": false, "tax_exempt_reason": "tax_not_configured", "discount_amount": 0, "item_level_discount_amount": 0}], "taxes": [], "line_item_taxes": [], "line_item_discounts": [], "linked_refunds": [], "allocations": [{"allocated_amount": 100, "allocated_at": 1676456650, "invoice_id": "140", "invoice_date": 1676456648, "invoice_status": "paid"}], "billing_address": {"first_name": "Simon", "last_name": "Masrani", "company": "Openlane Ltd", "validation_status": "not_validated", "object": "billing_address"}, "customer_notes": "", "custom_fields": []}, "emitted_at": 1703612727293}
{"stream":"comment","data":{"id":"cmt_16CM7mTTHULGY1hj","entity_type":"credit_note","entity_id":"TEST-CN-5","notes":"Test","added_by":"[email protected]","created_at":1674033113,"type":"user","object":"comment","custom_fields":[]},"emitted_at":1703800968922}
{"stream":"comment","data":{"id":"cmt_AzZTZgTTHaxTnJV","entity_type":"subscription","entity_id":"cbdemo_trial_sub","notes":"Test PO 0000001","added_by":"[email protected]","created_at":1674034690,"type":"user","object":"comment","custom_fields":[]},"emitted_at":1703800968925}
{"stream":"comment","data":{"id":"cmt_AzZTZgTTHbgGdKK","entity_type":"transaction","entity_id":"txn_AzZTZgTTHbgFlKJ","notes":"Test cash payment","added_by":"[email protected]","created_at":1674034862,"type":"user","object":"comment","custom_fields":[]},"emitted_at":1703800968928}
{"stream":"comment","data":{"id":"cmt_AzZTZgTTHbgGdKK","entity_type":"transaction","entity_id":"txn_AzZTZgTTHbgFlKJ","notes":"Test cash payment","added_by":"[email protected]","created_at":1674034862,"type":"user","object":"comment","custom_fields":[]},"emitted_at":1703800968928}
{"stream":"item_family","data":{"id":"cbdemo_pf_analytics","name":"Analytics","description":"Reporting and analytics for your business.","status":"active","resource_version":1627671463249,"updated_at":1627671463,"object":"item_family","custom_fields":[]},"emitted_at":1703880848793}
{"stream":"item_family","data":{"id":"cbdemo_pf_crm","name":"CRM","description":"Turn your leads into paying customers.","status":"active","resource_version":1627671463158,"updated_at":1627671463,"object":"item_family","custom_fields":[]},"emitted_at":1703880848797}
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,12 @@
"stream_state": { "created_at": 2147483647 },
"stream_descriptor": { "name": "comment" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "updated_at": 2147483647 },
"stream_descriptor": { "name": "item_family" }
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,22 @@
{
"type": "STREAM",
"stream": {
"stream_state": { "updated_at": 1625596058 },
"stream_state": { "migrated_at": 1625596058 },
"stream_descriptor": { "name": "site_migration_detail" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "updated_at": 1625596058 },
"stream_state": { "created_at": 1625596058 },
"stream_descriptor": { "name": "comment" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "updated_at": 1625596058 },
"stream_descriptor": { "name": "item_family" }
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,13 @@ definitions:
primary_key: "id"
path: "/comments"
stream_cursor_field: "created_at"
item_family_stream:
$ref: "#/definitions/base_incremental_stream"
$parameters:
name: "item_family"
primary_key: "id"
path: "/item_families"
stream_cursor_field: "updated_at"

streams:
- "#/definitions/addon_stream"
Expand All @@ -375,6 +382,7 @@ streams:
- "#/definitions/quote_line_group_stream"
- "#/definitions/site_migration_detail_stream"
- "#/definitions/comment_stream"
- "#/definitions/item_family_stream"

check:
stream_names:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
},
"object": {
"type": ["string", "null"]
},
"custom_fields": {
"type": ["array", "null"]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"name": "Item Families",
"type": "object",
"properties": {
"id": {
"type": ["string", "null"]
},
"name": {
"type": ["string", "null"]
},
"description": {
"type": ["string", "null"]
},
"status": {
"type": ["string", "null"]
},
"resource_version": {
"type": ["integer", "null"]
},
"updated_at": {
"type": ["integer", "null"]
},
"channel": {
"type": ["string", "null"]
},
"object": {
"type": ["string", "null"]
},
"custom_fields": {
"type": ["array", "null"]
}
}
}
3 changes: 3 additions & 0 deletions docs/integrations/sources/chargebee.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Most streams are supported regardless of your Chargebee site's [Product Catalog
| ------------------------------------------------------------------------------------------------------ | ------------------- | ------------------- |
| [Addons](https://apidocs.chargebee.com/docs/api/addons?prod_cat_ver=1) || |
| [Attached Items](https://apidocs.chargebee.com/docs/api/attached_items?prod_cat_ver=2) | ||
| [Comments](https://apidocs.chargebee.com/docs/api/comments?prod_cat_ver=2) |||
| [Contacts](https://apidocs.chargebee.com/docs/api/customers?lang=curl#list_of_contacts_for_a_customer) |||
| [Coupons](https://apidocs.chargebee.com/docs/api/coupons) |||
| [Credit Notes](https://apidocs.chargebee.com/docs/api/credit_notes) |||
Expand All @@ -48,12 +49,14 @@ Most streams are supported regardless of your Chargebee site's [Product Catalog
| [Invoices](https://apidocs.chargebee.com/docs/api/invoices) |||
| [Items](https://apidocs.chargebee.com/docs/api/items?prod_cat_ver=2) | ||
| [Item Prices](https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver=2) | ||
| [Item Families](https://apidocs.chargebee.com/docs/api/item_families?prod_cat_ver=2) | ||
| [Orders](https://apidocs.chargebee.com/docs/api/orders) |||
| [Payment Sources](https://apidocs.chargebee.com/docs/api/payment_sources) |||
| [Plans](https://apidocs.chargebee.com/docs/api/plans?prod_cat_ver=1) || |
| [Promotional Credits](https://apidocs.chargebee.com/docs/api/promotional_credits) |||
| [Quotes](https://apidocs.chargebee.com/docs/api/quotes) |||
| [Quote Line Groups](https://apidocs.chargebee.com/docs/api/quote_line_groups) |||
| [Site Migration Details](https://apidocs.chargebee.com/docs/api/site_migration_details) |||
| [Subscriptions](https://apidocs.chargebee.com/docs/api/subscriptions) |||
| [Transactions](https://apidocs.chargebee.com/docs/api/transactions) |||
| [Unbilled Charges](https://apidocs.chargebee.com/docs/api/unbilled_charges) |||
Expand Down

0 comments on commit 08a7015

Please sign in to comment.