Skip to content

Commit

Permalink
source-chargebee: ensure inline schemas, updated cdk, poetry (where p…
Browse files Browse the repository at this point in the history
…ossible) (#36633)

Co-authored-by: Serhii Lazebnyi <53845333+lazebnyi@users.noreply.github.com>
Co-authored-by: Serhii Lazebnyi <serhii.lazebnyi@globallogic.com>
  • Loading branch information
3 people authored May 10, 2024
1 parent 2453122 commit f54b5d8
Show file tree
Hide file tree
Showing 32 changed files with 1,476 additions and 42 deletions.
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-chargebee/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ You've checked out the repo, implemented a million dollar feature, and you're re

1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-chargebee test`
2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)):
- bump the `dockerImageTag` value in in `metadata.yaml`
- bump the `dockerImageTag` value in `metadata.yaml`
- bump the `version` value in `pyproject.toml`
3. Make sure the `metadata.yaml` content is up to date.
4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/chargebee.md`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 686473f1-76d9-4994-9cc7-9b13da46147c
dockerImageTag: 0.5.0
dockerImageTag: 0.5.1
dockerRepository: airbyte/source-chargebee
documentationUrl: https://docs.airbyte.com/integrations/sources/chargebee
githubIssueLabel: source-chargebee
Expand Down
12 changes: 6 additions & 6 deletions airbyte-integrations/connectors/source-chargebee/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
version = "0.5.0"
version = "0.5.1"
name = "source-chargebee"
description = "Source implementation for Chargebee."
authors = [ "Airbyte <contact@airbyte.io>",]
Expand All @@ -17,7 +17,7 @@ include = "source_chargebee"

[tool.poetry.dependencies]
python = "^3.9,<3.12"
airbyte-cdk = "^0"
airbyte-cdk = "0.80.0"

[tool.poetry.scripts]
source-chargebee = "source_chargebee.run:run"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def observe(self, stream_slice: StreamSlice, record: Record) -> None:
if self.is_greater_than_or_equal(record, self._state):
self._cursor = record_cursor_value

def close_slice(self, stream_slice: StreamSlice) -> None:
def close_slice(self, stream_slice: StreamSlice, *args: Any) -> None:
cursor_field = self.cursor_field.eval(self.config)
self._state[cursor_field] = self._cursor

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,156 +4,205 @@
"type": "object",
"properties": {
"id": {
"description": "Unique identifier for the addon.",
"type": ["string", "null"]
},
"name": {
"description": "Name of the addon.",
"type": ["string", "null"]
},
"invoice_name": {
"description": "Name to be displayed on the invoice for the addon.",
"type": ["string", "null"]
},
"description": {
"description": "Description of the addon.",
"type": ["string", "null"]
},
"pricing_model": {
"description": "Model used for pricing the addon.",
"type": ["string", "null"]
},
"charge_type": {
"description": "Type of charge for the addon.",
"type": ["string", "null"]
},
"price": {
"description": "Price of the addon.",
"type": ["integer", "null"]
},
"currency_code": {
"description": "Currency code for the addon pricing.",
"type": ["string", "null"]
},
"period": {
"description": "Duration of the addon period.",
"type": ["integer", "null"]
},
"period_unit": {
"description": "Unit of duration for the addon period.",
"type": ["string", "null"]
},
"unit": {
"description": "Unit of the addon quantity.",
"type": ["string", "null"]
},
"status": {
"description": "Status of the addon.",
"type": ["string", "null"]
},
"archived_at": {
"description": "Timestamp indicating when the addon was archived.",
"type": ["integer", "null"]
},
"enabled_in_portal": {
"description": "Indicator for whether the addon is enabled in the customer portal.",
"type": ["boolean", "null"]
},
"tax_code": {
"description": "Tax code associated with the addon.",
"type": ["string", "null"]
},
"taxjar_product_code": {
"description": "TaxJar product code for tax calculation.",
"type": ["string", "null"]
},
"avalara_sale_type": {
"description": "Avalara sale type for tax calculation.",
"type": ["string", "null"]
},
"avalara_transaction_type": {
"description": "Avalara transaction type for tax calculation.",
"type": ["integer", "null"]
},
"avalara_service_type": {
"description": "Avalara service type for tax calculation.",
"type": ["integer", "null"]
},
"sku": {
"description": "Stock Keeping Unit (SKU) for the addon.",
"type": ["string", "null"]
},
"accounting_code": {
"description": "Accounting code for the addon.",
"type": ["string", "null"]
},
"accounting_category1": {
"description": "First accounting category for the addon.",
"type": ["string", "null"]
},
"accounting_category2": {
"description": "Second accounting category for the addon.",
"type": ["string", "null"]
},
"accounting_category3": {
"description": "Third accounting category for the addon.",
"type": ["string", "null"]
},
"accounting_category4": {
"description": "Fourth accounting category for the addon.",
"type": ["string", "null"]
},
"is_shippable": {
"description": "Indicator for whether the addon is shippable.",
"type": ["boolean", "null"]
},
"shipping_frequency_period": {
"description": "Frequency of shipping for the addon period.",
"type": ["integer", "null"]
},
"shipping_frequency_period_unit": {
"description": "Unit of frequency for shipping the addon.",
"type": ["string", "null"]
},
"resource_version": {
"description": "Version of the resource.",
"type": ["integer", "null"]
},
"updated_at": {
"description": "Timestamp of the last update to the addon data.",
"type": ["integer", "null"]
},
"price_in_decimal": {
"description": "Price of the addon in decimal format.",
"type": ["string", "null"]
},
"included_in_mrr": {
"description": "Indicator for whether the addon is included in Monthly Recurring Revenue (MRR).",
"type": ["boolean", "null"]
},
"invoice_notes": {
"description": "Additional notes to include on the invoice for the addon.",
"type": ["string", "null"]
},
"taxable": {
"description": "Indicator for whether the addon is taxable.",
"type": ["boolean", "null"]
},
"tax_profile_id": {
"description": "Tax profile identifier for the addon.",
"type": ["string", "null"]
},
"meta_data": {
"description": "Additional metadata associated with the addon.",
"type": ["object", "null"],
"properties": {}
},
"show_description_in_invoices": {
"description": "Indicator for whether the description should appear on invoices.",
"type": ["boolean", "null"]
},
"show_description_in_quotes": {
"description": "Indicator for whether the description should appear on quotes.",
"type": ["boolean", "null"]
},
"channel": {
"description": "Channel for which the addon is applicable.",
"type": ["string", "null"]
},
"object": {
"description": "Type of object, in this case, addon.",
"type": ["string", "null"]
},
"type": {
"description": "Type of addon.",
"type": ["string", "null"]
},
"tiers": {
"description": "Tiers with specific pricing for the addon.",
"type": ["array", "null"],
"items": {
"type": ["object", "null"],
"properties": {
"starting_unit": {
"description": "Starting unit quantity for the tier.",
"type": ["integer", "null"]
},
"ending_unit": {
"description": "Ending unit quantity for the tier.",
"type": ["integer", "null"]
},
"price": {
"description": "Price of the tier.",
"type": ["integer", "null"]
},
"starting_unit_in_decimal": {
"description": "Starting unit quantity in decimal for the tier.",
"type": ["string", "null"]
},
"ending_unit_in_decimal": {
"description": "Ending unit quantity in decimal for the tier.",
"type": ["string", "null"]
},
"price_in_decimal": {
"description": "Price of the tier in decimal format.",
"type": ["string", "null"]
}
}
}
},
"custom_fields": {
"description": "Custom fields associated with the addon.",
"$ref": "_definitions.json#/definitions/custom_fields"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,63 @@
"type": "object",
"properties": {
"id": {
"description": "Unique identifier for the attached item.",
"type": ["string", "null"]
},
"parent_item_id": {
"description": "Identifier of the parent item to which this attached item is attached.",
"type": ["string", "null"]
},
"item_id": {
"description": "Identifier of the item to which this attached item belongs.",
"type": ["string", "null"]
},
"type": {
"description": "Type of the attached item.",
"type": ["string", "null"]
},
"status": {
"description": "Current status of the attached item.",
"type": ["string", "null"]
},
"quantity": {
"description": "Quantity of the attached item included in the parent item.",
"type": ["integer", "null"]
},
"quantity_in_decimal": {
"description": "Quantity of the attached item in decimal format.",
"type": ["string", "null"]
},
"billing_cycles": {
"description": "Number of billing cycles associated with the attached item.",
"type": ["integer", "null"]
},
"charge_on_event": {
"description": "Indicates when the attached item should be charged.",
"type": ["string", "null"]
},
"charge_once": {
"description": "Flag to determine if the attached item should be charged only once.",
"type": ["boolean", "null"]
},
"created_at": {
"description": "Timestamp when the attached item was created.",
"type": ["integer", "null"]
},
"resource_version": {
"description": "Version of the attached item resource for tracking changes.",
"type": ["integer", "null"]
},
"updated_at": {
"description": "Timestamp when the attached item was last updated.",
"type": ["integer", "null"]
},
"object": {
"description": "Type of object representing the attached item.",
"type": ["string", "null"]
},
"custom_fields": {
"description": "Any additional custom fields associated with the attached item.",
"$ref": "_definitions.json#/definitions/custom_fields"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,39 @@
"type": "object",
"properties": {
"id": {
"description": "The unique identifier of the comment.",
"type": ["string", "null"]
},
"entity_type": {
"description": "The type of entity (e.g., customer, invoice) that the comment is related to.",
"type": ["string", "null"]
},
"added_by": {
"description": "The user who added the comment.",
"type": ["string", "null"]
},
"notes": {
"description": "The actual content of the comment or notes added.",
"type": ["string", "null"]
},
"created_at": {
"description": "The timestamp indicating when the comment was created.",
"type": ["integer", "null"]
},
"type": {
"description": "The type or category of the comment (e.g., general, issue).",
"type": ["string", "null"]
},
"entity_id": {
"description": "The unique identifier of the entity the comment is associated with.",
"type": ["string", "null"]
},
"object": {
"description": "The object to which the comment is attached.",
"type": ["string", "null"]
},
"custom_fields": {
"description": "Additional custom fields associated with the comment.",
"$ref": "_definitions.json#/definitions/custom_fields"
}
}
Expand Down
Loading

0 comments on commit f54b5d8

Please sign in to comment.