From f2cefa84bfbf7f6fa11689c8fde203c3b01875b3 Mon Sep 17 00:00:00 2001 From: marcosmarxm Date: Tue, 8 Aug 2023 14:31:07 -0300 Subject: [PATCH] fix chargify schema and spec --- .../connectors/source-chargify/Dockerfile | 2 +- .../acceptance-test-config.yml | 4 + .../connectors/source-chargify/metadata.yaml | 2 +- .../source_chargify/schemas/customers.json | 57 +-- .../schemas/subscriptions.json | 368 +++++++++--------- .../source-chargify/source_chargify/spec.json | 2 +- docs/integrations/sources/chargify.md | 1 + 7 files changed, 221 insertions(+), 215 deletions(-) diff --git a/airbyte-integrations/connectors/source-chargify/Dockerfile b/airbyte-integrations/connectors/source-chargify/Dockerfile index 8d9fd809b173f7..d34006e3b5b2a9 100644 --- a/airbyte-integrations/connectors/source-chargify/Dockerfile +++ b/airbyte-integrations/connectors/source-chargify/Dockerfile @@ -34,5 +34,5 @@ COPY source_chargify ./source_chargify ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.1.0 +LABEL io.airbyte.version=0.2.0 LABEL io.airbyte.name=airbyte/source-chargify diff --git a/airbyte-integrations/connectors/source-chargify/acceptance-test-config.yml b/airbyte-integrations/connectors/source-chargify/acceptance-test-config.yml index 4b7dd606b66680..972901489695b3 100644 --- a/airbyte-integrations/connectors/source-chargify/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-chargify/acceptance-test-config.yml @@ -4,6 +4,8 @@ connector_image: airbyte/source-chargify:dev tests: spec: - spec_path: "source_chargify/spec.json" + backward_compatibility_tests_config: + disable_for_version: "0.1.0" connection: - config_path: "secrets/config.json" status: "succeed" @@ -11,6 +13,8 @@ tests: status: "failed" discovery: - config_path: "secrets/config.json" + backward_compatibility_tests_config: + disable_for_version: "0.1.0" basic_read: - config_path: "secrets/config.json" configured_catalog_path: "integration_tests/configured_catalog.json" diff --git a/airbyte-integrations/connectors/source-chargify/metadata.yaml b/airbyte-integrations/connectors/source-chargify/metadata.yaml index f37f39d4723ecf..744e0417c96e99 100644 --- a/airbyte-integrations/connectors/source-chargify/metadata.yaml +++ b/airbyte-integrations/connectors/source-chargify/metadata.yaml @@ -2,7 +2,7 @@ data: connectorSubtype: api connectorType: source definitionId: 9b2d3607-7222-4709-9fa2-c2abdebbdd88 - dockerImageTag: 0.1.0 + dockerImageTag: 0.2.0 dockerRepository: airbyte/source-chargify githubIssueLabel: source-chargify icon: chargify.svg diff --git a/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/customers.json b/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/customers.json index 6b80d40740235e..21003d566321ec 100644 --- a/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/customers.json +++ b/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/customers.json @@ -1,58 +1,39 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", - "required": [ - "portal_invite_last_sent_at", - "email", - "created_at", - "zip", - "first_name", - "state", - "city", - "portal_customer_created_at", - "updated_at", - "country", - "tax_exempt", - "id", - "last_name", - "address_2", - "phone", - "organization", - "address", - "cc_emails" - ], + "additionalProperties": true, "properties": { "default_subscription_group_uid": { "type": ["null", "string"] }, "portal_invite_last_sent_at": { - "type": "string", + "type": ["null", "string"], "format": "date-time" }, "vat_number": { "type": ["null", "string"] }, "email": { - "type": "string" + "type": ["null", "string"] }, "created_at": { - "type": "string", + "type": ["null", "string"], "format": "date-time" }, "zip": { - "type": "string" + "type": ["null", "string"] }, "first_name": { - "type": "string" + "type": ["null", "string"] }, "country_name": { "type": ["null", "string"] }, "state": { - "type": "string" + "type": ["null", "string"] }, "city": { - "type": "string" + "type": ["null", "string"] }, "parent_id": { "type": ["null", "integer"] @@ -61,47 +42,47 @@ "type": ["null", "string"] }, "portal_customer_created_at": { - "type": "string" + "type": ["null", "string"] }, "updated_at": { - "type": "string", + "type": ["null", "string"], "format": "date-time" }, "country": { - "type": "string" + "type": ["null", "string"] }, "portal_invite_last_accepted_at": { "type": ["null", "string"] }, "tax_exempt": { - "type": "boolean" + "type": ["null", "boolean"] }, "id": { - "type": "integer" + "type": ["null", "integer"] }, "reference": { "type": ["null", "string"] }, "last_name": { - "type": "string" + "type": ["null", "string"] }, "address_2": { - "type": "string" + "type": ["null", "string"] }, "phone": { - "type": "string" + "type": ["null", "string"] }, "organization": { - "type": "string" + "type": ["null", "string"] }, "address": { - "type": "string" + "type": ["null", "string"] }, "verified": { "type": ["null", "string"] }, "cc_emails": { - "type": "string" + "type": ["null", "string"] }, "state_name": { "type": ["null", "string"] diff --git a/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/subscriptions.json b/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/subscriptions.json index b8a9eed74af3d6..0a3c44a610d387 100644 --- a/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/subscriptions.json +++ b/airbyte-integrations/connectors/source-chargify/source_chargify/schemas/subscriptions.json @@ -1,293 +1,298 @@ { "$schema": "http://json-schema.org/draft-07/schema", - "type": "object", + "type": ["null", "object"], + "additionalProperties": true, "properties": { "id": { - "type": "integer" + "type": ["null", "integer"] }, "state": { - "type": "string" + "type": ["null", "string"] }, "balance_in_cents": { - "type": "integer" + "type": ["null", "integer"] }, "total_revenue_in_cents": { - "type": "integer" + "type": ["null", "integer"] }, "product_price_in_cents": { - "type": "integer" + "type": ["null", "integer"] }, "product_version_number": { - "type": "integer" + "type": ["null", "integer"] }, "current_period_ends_at": { - "type": "string" + "type": ["null", "string"] }, "next_assessment_at": { - "type": "string" + "type": ["null", "string"] }, "trial_started_at": { - "type": "string" + "type": ["null", "string"] }, "trial_ended_at": { - "type": "string" + "type": ["null", "string"] }, "activated_at": { - "type": "string" + "type": ["null", "string"] }, "expires_at": { - "type": "string" + "type": ["null", "string"] }, "created_at": { - "type": "string" + "type": ["null", "string"] }, "updated_at": { - "type": "string" + "type": ["null", "string"] }, "cancellation_message": { - "type": "string" + "type": ["null", "string"] }, "cancellation_method": { - "type": "string" + "type": ["null", "string"] }, "cancel_at_end_of_period": { - "type": "boolean" + "type": ["null", "boolean"] }, "canceled_at": { - "type": "string" + "type": ["null", "string"] }, "current_period_started_at": { - "type": "string" + "type": ["null", "string"] }, "previous_state": { - "type": "string" + "type": ["null", "string"] }, "signup_payment_id": { - "type": "integer" + "type": ["null", "integer"] }, "signup_revenue": { - "type": "string" + "type": ["null", "string"] }, "delayed_cancel_at": { - "type": "string" + "type": ["null", "string"] }, "coupon_code": { - "type": "string" + "type": ["null", "string"] }, "snap_day": { - "type": "string" + "type": ["null", "string"] }, "payment_collection_method": { - "type": "string" + "type": ["null", "string"] }, "customer": { - "type": "object", + "type": ["null", "object"], + "additionalProperties": true, "properties": { "first_name": { - "type": "string" + "type": ["null", "string"] }, "last_name": { - "type": "string" + "type": ["null", "string"] }, "email": { - "type": "string" + "type": ["null", "string"] }, "cc_emails": { - "type": "string" + "type": ["null", "string"] }, "organization": { - "type": "string" + "type": ["null", "string"] }, "reference": { - "type": "string" + "type": ["null", "string"] }, "id": { - "type": "integer" + "type": ["null", "integer"] }, "created_at": { - "type": "string" + "type": ["null", "string"] }, "updated_at": { - "type": "string" + "type": ["null", "string"] }, "address": { - "type": "string" + "type": ["null", "string"] }, "address_2": { - "type": "string" + "type": ["null", "string"] }, "city": { - "type": "string" + "type": ["null", "string"] }, "state": { - "type": "string" + "type": ["null", "string"] }, "state_name": { - "type": "string" + "type": ["null", "string"] }, "zip": { - "type": "string" + "type": ["null", "string"] }, "country": { - "type": "string" + "type": ["null", "string"] }, "country_name": { - "type": "string" + "type": ["null", "string"] }, "phone": { - "type": "string" + "type": ["null", "string"] }, "verified": { - "type": "boolean" + "type": ["null", "boolean"] }, "portal_customer_created_at": { - "type": "string" + "type": ["null", "string"] }, "portal_invite_last_sent_at": { - "type": "string" + "type": ["null", "string"] }, "portal_invite_last_accepted_at": { "type": ["null", "string"] }, "tax_exempt": { - "type": "boolean" + "type": ["null", "boolean"] }, "vat_number": { - "type": "string" + "type": ["null", "string"] }, "parent_id": { - "type": "integer" + "type": ["null", "integer"] }, "locale": { - "type": "string" + "type": ["null", "string"] }, "default_subscription_group_uid": { - "type": "string" + "type": ["null", "string"] } } }, "product": { - "type": "object", + "type": ["null", "object"], + "additionalProperties": true, "properties": { "id": { - "type": "integer" + "type": ["null", "integer"] }, "name": { - "type": "string" + "type": ["null", "string"] }, "handle": { - "type": "string" + "type": ["null", "string"] }, "description": { - "type": "string" + "type": ["null", "string"] }, "accounting_code": { - "type": "string" + "type": ["null", "string"] }, "request_credit_card": { - "type": "boolean" + "type": ["null", "boolean"] }, "expiration_interval": { - "type": "integer" + "type": ["null", "integer"] }, "expiration_interval_unit": { - "type": "string" + "type": ["null", "string"] }, "created_at": { - "type": "string" + "type": ["null", "string"] }, "updated_at": { - "type": "string" + "type": ["null", "string"] }, "price_in_cents": { - "type": "integer" + "type": ["null", "integer"] }, "interval": { - "type": "integer" + "type": ["null", "integer"] }, "interval_unit": { - "type": "string" + "type": ["null", "string"] }, "initial_charge_in_cents": { - "type": "integer" + "type": ["null", "integer"] }, "trial_price_in_cents": { - "type": "integer" + "type": ["null", "integer"] }, "trial_interval": { - "type": "integer" + "type": ["null", "integer"] }, "trial_interval_unit": { - "type": "string" + "type": ["null", "string"] }, "archived_at": { - "type": "string" + "type": ["null", "string"] }, "require_credit_card": { - "type": "boolean" + "type": ["null", "boolean"] }, "return_params": { - "type": "string" + "type": ["null", "string"] }, "taxable": { - "type": "boolean" + "type": ["null", "boolean"] }, "update_return_url": { - "type": "string" + "type": ["null", "string"] }, "initial_charge_after_trial": { - "type": "boolean" + "type": ["null", "boolean"] }, "version_number": { - "type": "integer" + "type": ["null", "integer"] }, "update_return_params": { - "type": "string" + "type": ["null", "string"] }, "product_family": { - "type": "object", + "type": ["null", "object"], + "additionalProperties": true, "properties": { "id": { - "type": "integer" + "type": ["null", "integer"] }, "name": { - "type": "string" + "type": ["null", "string"] }, "handle": { - "type": "string" + "type": ["null", "string"] }, "accounting_code": { - "type": "null" + "type": ["null", "string"] }, "description": { - "type": "string" + "type": ["null", "string"] }, "created_at": { - "type": "string" + "type": ["null", "string"] }, "updated_at": { - "type": "string" + "type": ["null", "string"] } } }, "public_signup_pages": { - "type": "array", + "type": ["null", "array"], "items": { "anyOf": [ { - "type": "object", + "type": ["null", "object"], + "additionalProperties": true, "properties": { "id": { - "type": "integer" + "type": ["null", "integer"] }, "return_url": { - "type": "string" + "type": ["null", "string"] }, "return_params": { - "type": "string" + "type": ["null", "string"] }, "url": { - "type": "string" + "type": ["null", "string"] } } } @@ -295,244 +300,259 @@ } }, "product_price_point_name": { - "type": "string" + "type": ["null", "string"] }, "request_billing_address": { - "type": "boolean" + "type": ["null", "boolean"] }, "require_billing_address": { - "type": "boolean" + "type": ["null", "boolean"] }, "require_shipping_address": { - "type": "boolean" + "type": ["null", "boolean"] }, "tax_code": { - "type": "string" + "type": ["null", "string"] }, "default_product_price_point_id": { - "type": "integer" + "type": ["null", "integer"] } } }, "credit_card": { - "type": "object", + "type": ["null", "object"], + "additionalProperties": true, "properties": { "id": { - "type": "integer" + "type": ["null", "integer"] }, "first_name": { - "type": "string" + "type": ["null", "string"] }, "last_name": { - "type": "string" + "type": ["null", "string"] }, "masked_card_number": { - "type": "string" + "type": ["null", "string"] }, "card_type": { - "type": "string" + "type": ["null", "string"] }, "expiration_month": { - "type": "integer" + "type": ["null", "integer"] }, "expiration_year": { - "type": "integer" + "type": ["null", "integer"] }, "customer_id": { - "type": "integer" + "type": ["null", "integer"] }, "current_vault": { - "type": "string" + "type": ["null", "string"] }, "vault_token": { - "type": "string" + "type": ["null", "string"] }, "billing_address": { - "type": "string" + "type": ["null", "string"] }, "billing_city": { - "type": "string" + "type": ["null", "string"] }, "billing_state": { - "type": "string" + "type": ["null", "string"] }, "billing_zip": { - "type": "string" + "type": ["null", "string"] }, "billing_country": { - "type": "string" + "type": ["null", "string"] }, "customer_vault_token": { - "type": "string" + "type": ["null", "string"] }, "billing_address_2": { - "type": "string" + "type": ["null", "string"] }, "payment_type": { - "type": "string" + "type": ["null", "string"] }, "disabled": { - "type": "boolean" + "type": ["null", "boolean"] }, "chargify_token": { - "type": "string" + "type": ["null", "string"] }, "site_gateway_setting_id": { - "type": "integer" + "type": ["null", "integer"] }, "gateway_handle": { - "type": "string" + "type": ["null", "string"] } } }, "group": { - "type": "object", + "type": ["null", "object"], + "additionalProperties": true, "properties": { "uid": { - "type": "string" + "type": ["null", "string"] }, "scheme": { - "type": "string" + "type": ["null", "string"] }, "primary_subscription_id": { - "type": "string" + "type": ["null", "string"] }, "primary": { - "type": "string" + "type": ["null", "string"] } } }, "bank_account": { - "type": "object", + "type": ["null", "object"], + "additionalProperties": true, "properties": { "bank_account_holder_type": { - "type": "string" + "type": ["null", "string"] }, "bank_account_type": { - "type": "string" + "type": ["null", "string"] }, "bank_name": { - "type": "string" + "type": ["null", "string"] }, "billing_address": { - "type": "string" + "type": ["null", "string"] }, "billing_address_2": { - "type": "string" + "type": ["null", "string"] }, "billing_city": { - "type": "string" + "type": ["null", "string"] }, "billing_state": { - "type": "string" + "type": ["null", "string"] }, "billing_zip": { - "type": "string" + "type": ["null", "string"] }, "billing_country": { - "type": "string" + "type": ["null", "string"] }, "current_vault": { - "type": "string" + "type": ["null", "string"] }, "customer_id": { - "type": "integer" + "type": ["null", "integer"] }, "customer_vault_token": { - "type": "string" + "type": ["null", "string"] }, "first_name": { - "type": "string" + "type": ["null", "string"] }, "last_name": { - "type": "string" + "type": ["null", "string"] }, "id": { - "type": "integer" + "type": ["null", "integer"] }, "masked_bank_account_number": { - "type": "string" + "type": ["null", "string"] }, "masked_bank_routing_number": { - "type": "string" + "type": ["null", "string"] }, "vault_token": { - "type": "string" + "type": ["null", "string"] }, "chargify_token": { - "type": "string" + "type": ["null", "string"] }, "site_gateway_setting_id": { - "type": "integer" + "type": ["null", "integer"] }, "gateway_handle": { - "type": "string" + "type": ["null", "string"] } } }, "payment_type": { - "type": "string" + "type": ["null", "string"] }, "referral_code": { - "type": "string" + "type": ["null", "string"] }, "next_product_id": { - "type": "integer" + "type": ["null", "integer"] }, "next_product_handle": { - "type": "string" + "type": ["null", "string"] }, "coupon_use_count": { - "type": "integer" + "type": ["null", "integer"] }, "coupon_uses_allowed": { - "type": "integer" + "type": ["null", "integer"] + }, + "product_price_point_type": { + "type": ["null", "string"] + }, + "coupons": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "additionalProperties": true + } }, "reason_code": { - "type": "string" + "type": ["null", "string"] }, "automatically_resume_at": { - "type": "string" + "type": ["null", "string"] }, "coupon_codes": { - "type": "array", + "type": ["null", "array"], "items": { - "anyOf": [ - { - "type": "string" - } - ] + "type": ["null", "string"] } }, "offer_id": { - "type": "string" + "type": ["null", "integer"] }, "payer_id": { - "type": "integer" + "type": ["null", "integer"] }, "current_billing_amount_in_cents": { - "type": "integer" + "type": ["null", "integer"] }, "product_price_point_id": { - "type": "integer" + "type": ["null", "integer"] }, "next_product_price_point_id": { - "type": "integer" + "type": ["null", "integer"] }, "net_terms": { - "type": "integer" + "type": ["null", "integer"] }, "stored_credential_transaction_id": { - "type": "integer" + "type": ["null", "integer"] }, "reference": { - "type": "string" + "type": ["null", "string"] }, "on_hold_at": { - "type": "string" + "type": ["null", "string"] }, "prepaid_dunning": { - "type": "boolean" + "type": ["null", "boolean"] + }, + "dunning_communication_delay_enabled": { + "type": ["null", "boolean"] + }, + "dunning_communication_delay_time_zone": { + "type": ["null", "string"] } } } diff --git a/airbyte-integrations/connectors/source-chargify/source_chargify/spec.json b/airbyte-integrations/connectors/source-chargify/source_chargify/spec.json index 5e0f26fde6449c..fd4d46ddb7e6f2 100644 --- a/airbyte-integrations/connectors/source-chargify/source_chargify/spec.json +++ b/airbyte-integrations/connectors/source-chargify/source_chargify/spec.json @@ -5,7 +5,7 @@ "title": "Chargify Spec", "type": "object", "required": ["api_key", "domain"], - "additionalProperties": false, + "additionalProperties": true, "properties": { "api_key": { "type": "string", diff --git a/docs/integrations/sources/chargify.md b/docs/integrations/sources/chargify.md index e78fed1a4a95a2..cde3a738553643 100644 --- a/docs/integrations/sources/chargify.md +++ b/docs/integrations/sources/chargify.md @@ -42,5 +42,6 @@ Please follow the [Chargify documentation for generating an API key](https://dev | Version | Date | Pull Request | Subject | | :--- | :--- | :--- | :--- | +| 0.2.0 | 2023-08-08 | [x](https://github.com/airbytehq/airbyte/pull/x) | Fix schema | | 0.1.0 | 2022-03-16 | [10853](https://github.com/airbytehq/airbyte/pull/10853) | Initial release |