Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source Stripe: fix schema #22312

Merged
merged 18 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
d1ad22b
#1141 source tiktok: chunk advertiser IDs
davydov-d Feb 2, 2023
dd4659c
#1141 source tiktok: upd changelog
davydov-d Feb 2, 2023
dc97c58
#1299 source stripe: fix Invoices schema
davydov-d Feb 2, 2023
95265e1
#1299 source stripe: upd changelog
davydov-d Feb 2, 2023
0bff217
#1299 source stripe: upd acceptance test config
davydov-d Feb 2, 2023
5be6831
Merge branch 'master' into ddavydov/#1299-source-stripe-fix-schema
davydov-d Feb 6, 2023
85f521f
source-stripe: no http url in openapi_spec.json
alafanechere Feb 13, 2023
06d9c8f
Merge branch 'master' into augustin/source-stripe/no-http-url
alafanechere Feb 14, 2023
c6311a7
Merge branch 'master' into ddavydov/#1299-source-stripe-fix-schema
davydov-d Feb 14, 2023
bb3bd1d
Merge branch 'master' into ddavydov/#1299-source-stripe-fix-schema
davydov-d Feb 14, 2023
9c126c4
#1299 source stripe: fix SAT config
davydov-d Feb 14, 2023
3c9feaf
Merge branch 'master' into ddavydov/#1299-source-stripe-fix-schema
davydov-d Feb 15, 2023
fc2cdce
#1299 source stripe: add allowedHosts
davydov-d Feb 15, 2023
9de61ce
Merge branch 'master' into ddavydov/#1299-source-stripe-fix-schema
davydov-d Feb 15, 2023
87f7198
Merge branch 'augustin/source-stripe/no-http-url' into ddavydov/#1299…
davydov-d Feb 15, 2023
36b4048
Merge branch 'master' into ddavydov/#1299-source-stripe-fix-schema
davydov-d Feb 15, 2023
f3ed1f0
auto-bump connector version
octavia-squidington-iii Feb 15, 2023
fd19c4b
Merge branch 'master' into ddavydov/#1299-source-stripe-fix-schema
davydov-d Feb 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1735,11 +1735,14 @@
- name: Stripe
sourceDefinitionId: e094cb9a-26de-4645-8761-65c0c425d1de
dockerRepository: airbyte/source-stripe
dockerImageTag: 1.0.1
dockerImageTag: 2.0.0
documentationUrl: https://docs.airbyte.com/integrations/sources/stripe
icon: stripe.svg
sourceType: api
releaseStage: generally_available
allowedHosts:
hosts:
- "api.stripe.com"
- name: SurveyCTO
sourceDefinitionId: dd4632f4-15e0-4649-9b71-41719fb1fdee
dockerRepository: airbyte/source-surveycto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14446,7 +14446,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-stripe:1.0.1"
- dockerImage: "airbyte/source-stripe:2.0.0"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/stripe"
connectionSpecification:
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-stripe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ COPY main.py ./
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=1.0.2
LABEL io.airbyte.version=2.0.0
LABEL io.airbyte.name=airbyte/source-stripe
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ tests:
discovery:
- config_path: "secrets/config.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.37"
disable_for_version: "1.0.2"
- config_path: "secrets/connected_account_config.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.37"
disable_for_version: "1.0.2"
basic_read:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/full_refresh_configured_catalog.json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#

import logging
from typing import Optional, Tuple

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,26 @@
"paid": {
"type": ["null", "boolean"]
},
"discount": {
"type": ["null", "string"]
},
"discounts": {
"type": ["null", "array"],
"items": {
"type": [
"null",
"string"
]
}
},
"discount": {
"type": ["null", "object"],
"properties": {
"end": {
"type": ["null", "integer"]
"id": {
"type": ["null", "string"]
},
"object": {
"type": ["null", "string"]
},
"checkout_session": {
"type": ["null", "string"]
},
"coupon": {
"type": ["null", "object"],
Expand All @@ -96,9 +108,6 @@
"duration_in_months": {
"type": ["null", "integer"]
},
"percent_off_precise": {
"type": ["null", "number"]
},
"max_redemptions": {
"type": ["null", "integer"]
},
Expand Down Expand Up @@ -131,11 +140,20 @@
"customer": {
"type": ["null", "string"]
},
"start": {
"end": {
"type": ["null", "integer"]
},
"object": {
"type": ["null", "string"]
"invoice": {
"type": ["null", "integer"]
},
"invoice_item": {
"type": ["null", "integer"]
},
"promotion_code": {
"type": ["null", "integer"]
},
"start": {
"type": ["null", "integer"]
},
"subscription": {
"type": ["null", "string"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@
"type": "string"
},
"timezone": {
"description": "The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones).",
"description": "The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](https://www.iana.org/time-zones).",
"maxLength": 5000,
"nullable": true,
"type": "string"
Expand Down Expand Up @@ -5948,7 +5948,7 @@
"type": "object"
},
"event": {
"description": "Events are our way of letting you know when something interesting happens in\nyour account. When an interesting event occurs, we create a new `Event`\nobject. For example, when a charge succeeds, we create a `charge.succeeded`\nevent; and when an invoice payment attempt fails, we create an\n`invoice.payment_failed` event. Note that many API requests may cause multiple\nevents to be created. For example, if you create a new subscription for a\ncustomer, you will receive both a `customer.subscription.created` event and a\n`charge.succeeded` event.\n\nEvents occur when the state of another API resource changes. The state of that\nresource at the time of the change is embedded in the event's data field. For\nexample, a `charge.succeeded` event will contain a charge, and an\n`invoice.payment_failed` event will contain an invoice.\n\nAs with other API resources, you can use endpoints to retrieve an\n[individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)\nfrom the API. We also have a separate\n[webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the\n`Event` objects directly to an endpoint on your server. Webhooks are managed\nin your\n[account settings](https://dashboard.stripe.com/account/webhooks),\nand our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up.\n\nWhen using [Connect](https://stripe.com/docs/connect), you can also receive notifications of\nevents that occur in connected accounts. For these events, there will be an\nadditional `account` attribute in the received `Event` object.\n\n**NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is\nguaranteed only for 30 days.",
"description": "Events are our way of letting you know when something interesting happens in\nyour account. When an interesting event occurs, we create a new `Event`\nobject. For example, when a charge succeeds, we create a `charge.succeeded`\nevent; and when an invoice payment attempt fails, we create an\n`invoice.payment_failed` event. Note that many API requests may cause multiple\nevents to be created. For example, if you create a new subscription for a\ncustomer, you will receive both a `customer.subscription.created` event and a\n`charge.succeeded` event.\n\nEvents occur when the state of another API resource changes. The state of that\nresource at the time of the change is embedded in the event's data field. For\nexample, a `charge.succeeded` event will contain a charge, and an\n`invoice.payment_failed` event will contain an invoice.\n\nAs with other API resources, you can use endpoints to retrieve an\n[individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)\nfrom the API. We also have a separate\n[webhooks](https://en.wikipedia.org/wiki/Webhook) system for sending the\n`Event` objects directly to an endpoint on your server. Webhooks are managed\nin your\n[account settings](https://dashboard.stripe.com/account/webhooks),\nand our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up.\n\nWhen using [Connect](https://stripe.com/docs/connect), you can also receive notifications of\nevents that occur in connected accounts. For these events, there will be an\nadditional `account` attribute in the received `Event` object.\n\n**NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is\nguaranteed only for 30 days.",
"properties": {
"account": {
"description": "The connected account that originated the event.",
Expand Down Expand Up @@ -6397,7 +6397,7 @@
"type": "string"
},
"timezone": {
"description": "Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.",
"description": "Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](https://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.",
"maxLength": 5000,
"type": "string"
}
Expand Down Expand Up @@ -19800,7 +19800,7 @@
"x-expandableFields": []
},
"sku": {
"description": "Stores representations of [stock keeping units](http://en.wikipedia.org/wiki/Stock_keeping_unit).\nSKUs describe specific product variations, taking into account any combination of: attributes,\ncurrency, and cost. For example, a product may be a T-shirt, whereas a specific SKU represents\nthe `size: large`, `color: red` version of that shirt.\n\nCan also be used to manage inventory.\n\nRelated guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders).",
"description": "Stores representations of [stock keeping units](https://en.wikipedia.org/wiki/Stock_keeping_unit).\nSKUs describe specific product variations, taking into account any combination of: attributes,\ncurrency, and cost. For example, a product may be a T-shirt, whereas a specific SKU represents\nthe `size: large`, `color: red` version of that shirt.\n\nCan also be used to manage inventory.\n\nRelated guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders).",
"properties": {
"active": {
"description": "Whether the SKU is available for purchase.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from airbyte_cdk.models import SyncMode
from airbyte_cdk.sources.streams.availability_strategy import AvailabilityStrategy
from airbyte_cdk.sources.streams.http import HttpStream

from source_stripe.availability_strategy import StripeSubStreamAvailabilityStrategy

STRIPE_ERROR_CODES: List = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#

import pendulum
from airbyte_cdk.sources.streams.http.availability_strategy import HttpAvailabilityStrategy

from source_stripe.availability_strategy import StripeSubStreamAvailabilityStrategy
from source_stripe.streams import InvoiceLineItems, Invoices

Expand Down
5 changes: 3 additions & 2 deletions docs/integrations/sources/stripe.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ The Stripe connector should not run into Stripe API limitations under normal usa

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------|
| 1.0.2 | 2023-02-09 | [22659](https://github.com/airbytehq/airbyte/pull/22659) | Set `AvailabilityStrategy` for all streams |
| 1.0.1 | 2023-01-27 | [22042](https://github.com/airbytehq/airbyte/pull/22042) | Set `AvailabilityStrategy` for streams explicitly to `None` |
| 2.0.0 | 2023-02-14 | [22312](https://github.com/airbytehq/airbyte/pull/22312) | Another fix of `Invoices` stream schema + Remove http urls from openapi_spec.json |
| 1.0.2 | 2023-02-09 | [22659](https://github.com/airbytehq/airbyte/pull/22659) | Set `AvailabilityStrategy` for all streams |
| 1.0.1 | 2023-01-27 | [22042](https://github.com/airbytehq/airbyte/pull/22042) | Set `AvailabilityStrategy` for streams explicitly to `None` |
| 1.0.0 | 2023-01-25 | [21858](https://github.com/airbytehq/airbyte/pull/21858) | Update the `Subscriptions` and `Invoices` stream schemas |
| 0.1.40 | 2022-10-20 | [18228](https://github.com/airbytehq/airbyte/pull/18228) | Update the `Payment Intents` stream schema |
| 0.1.39 | 2022-09-28 | [17304](https://github.com/airbytehq/airbyte/pull/17304) | Migrate to per-stream states. |
Expand Down