Skip to content

Commit

Permalink
Source Chargebee: Declare Unexpected Fields (#36037)
Browse files Browse the repository at this point in the history
  • Loading branch information
pnilan committed Mar 14, 2024
1 parent 8e15d88 commit 58eddcc
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 10 deletions.
@@ -1,6 +1,6 @@
data:
ab_internal:
ql: 200
ql: 400
sl: 200
allowedHosts:
hosts:
Expand All @@ -10,7 +10,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 686473f1-76d9-4994-9cc7-9b13da46147c
dockerImageTag: 0.4.1
dockerImageTag: 0.4.2
dockerRepository: airbyte/source-chargebee
documentationUrl: https://docs.airbyte.com/integrations/sources/chargebee
githubIssueLabel: source-chargebee
Expand Down
Expand Up @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
version = "0.4.1"
version = "0.4.2"
name = "source-chargebee"
description = "Source implementation for Chargebee."
authors = [ "Airbyte <contact@airbyte.io>",]
Expand Down
Expand Up @@ -47,7 +47,7 @@ def transform(
...
}
"""
record["custom_fields"] = [{"name": k, "value": v} for k, v in record.items() if k.startswith("cf_")]
record["custom_fields"] = [{"name": k, "value": record.pop(k)} for k in record.copy() if k.startswith("cf_")]
return record


Expand Down
Expand Up @@ -113,6 +113,23 @@
}
}
},
"coupon_constraints": {
"type": ["array", "null"],
"items": {
"type": ["object", "null"],
"properties": {
"entity_type": {
"type": ["string", "null"]
},
"type": {
"type": ["string", "null"]
},
"vlaue": {
"type": ["string", "null"]
}
}
}
},
"custom_fields": {
"$ref": "_definitions.json#/definitions/custom_fields"
}
Expand Down
Expand Up @@ -88,6 +88,9 @@
"billing_day_of_week_mode": {
"type": ["string", "null"]
},
"billing_month": {
"type": ["integer", "null"]
},
"pii_cleared": {
"type": ["string", "null"]
},
Expand Down
Expand Up @@ -66,9 +66,6 @@
"error_code": {
"type": ["string", "null"]
},
"error-text": {
"type": ["string", "null"]
},
"voided_at": {
"type": ["integer", "null"]
},
Expand Down Expand Up @@ -126,6 +123,9 @@
"error_text": {
"type": ["string", "null"]
},
"error_detail": {
"type": ["string", "null"]
},
"payment_method_details": {
"type": ["string", "null"]
},
Expand Down
Expand Up @@ -17,8 +17,6 @@
{
"pk": 1,
"name": "example",
"cf_field1": "val1",
"cf_field2": "val2",
"custom_fields": [{"name": "cf_field1", "value": "val1"}, {"name": "cf_field2", "value": "val2"}],
},
),
Expand Down
3 changes: 2 additions & 1 deletion docs/integrations/sources/chargebee.md
Expand Up @@ -99,7 +99,8 @@ The Chargebee connector should not run into [Chargebee API](https://apidocs.char

| Version | Date | Pull Request | Subject |
| :------ | :--------- | :------------------------------------------------------- | :-------------------------------------------------------------------------------------------------- |
| 0.4.1 | 2024-03-03 | [35509](https://github.com/airbytehq/airbyte/pull/35509) | Updates CDK version to latest (0.67.1), updates `site_migration_detail` record filtering |
| 0.4.2 | 2024-03-14 | [36037](https://github.com/airbytehq/airbyte/pull/36037) | Adds fields: `coupon_constraints` to `coupon` stream, `billing_month` to `customer stream`, and `error_detail` to `transaction` stream schemas |
| 0.4.1 | 2024-03-13 | [35509](https://github.com/airbytehq/airbyte/pull/35509) | Updates CDK version to latest (0.67.1), updates `site_migration_detail` record filtering |
| 0.4.0 | 2024-02-12 | [34053](https://github.com/airbytehq/airbyte/pull/34053) | Add missing fields to and cleans up schemas, adds incremental support for `gift`, `site_migration_detail`, and `unbilled_charge` streams.` |
| 0.3.1 | 2024-02-12 | [35169](https://github.com/airbytehq/airbyte/pull/35169) | Manage dependencies with Poetry. |
| 0.3.0 | 2023-12-26 | [33696](https://github.com/airbytehq/airbyte/pull/33696) | Add new stream, add fields to existing streams |
Expand Down

0 comments on commit 58eddcc

Please sign in to comment.