Skip to content

Commit 49d0f7e

Browse files
authored
🎉 Source Stripe: Add PaymentIntents stream (#6004)
* Add `PaymentIntents` stream * Update docs * Implement change request + few updates Split `source.py` file into `source.py` and `streams.py` files. Update `payment_intents.json` file. * Bump connectors version + update docs
1 parent 14ac554 commit 49d0f7e

File tree

15 files changed

+1361
-288
lines changed

15 files changed

+1361
-288
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ data
1010
.project
1111
.settings
1212

13+
# Logs
14+
acceptance_tests_logs/
15+
1316
# Secrets
1417
secrets
1518
!airbyte-integrations/connector-templates/**/secrets

airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/e094cb9a-26de-4645-8761-65c0c425d1de.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"sourceDefinitionId": "e094cb9a-26de-4645-8761-65c0c425d1de",
33
"name": "Stripe",
44
"dockerRepository": "airbyte/source-stripe",
5-
"dockerImageTag": "0.1.16",
5+
"dockerImageTag": "0.1.17",
66
"documentationUrl": "https://docs.airbyte.io/integrations/sources/stripe",
77
"icon": "stripe.svg"
88
}

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
- sourceDefinitionId: e094cb9a-26de-4645-8761-65c0c425d1de
114114
name: Stripe
115115
dockerRepository: airbyte/source-stripe
116-
dockerImageTag: 0.1.16
116+
dockerImageTag: 0.1.17
117117
documentationUrl: https://docs.airbyte.io/integrations/sources/stripe
118118
icon: stripe.svg
119119
- sourceDefinitionId: b03a9f3e-22a5-11eb-adc1-0242ac120002

airbyte-integrations/connectors/source-stripe/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ RUN pip install .
1212
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
1313
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
1414

15-
LABEL io.airbyte.version=0.1.16
15+
LABEL io.airbyte.version=0.1.17
1616
LABEL io.airbyte.name=airbyte/source-stripe

airbyte-integrations/connectors/source-stripe/acceptance-test-config.yml

-8
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@ tests:
1414
- config_path: "secrets/connected_account_config.json"
1515
basic_read:
1616
# TEST 1 - Reading catalog without invoice_line_items
17-
# Along with this test we expect subscriptions with status in ["active","canceled"]
18-
# If this test fails for some reason, please check the expected_subscriptions_records.json for valid subset of data.
1917
- config_path: "secrets/config.json"
2018
configured_catalog_path: "integration_tests/non_invoice_line_items_catalog.json"
2119
timeout_seconds: 3600
22-
expect_records:
23-
path: "integration_tests/expected_subscriptions_records.txt"
2420
# TEST 2 - Reading data from account that has no records for stream Disputes
2521
- config_path: "secrets/connected_account_config.json"
2622
configured_catalog_path: "integration_tests/non_disputes_events_catalog.json"
@@ -29,13 +25,9 @@ tests:
2925
- config_path: "secrets/config.json"
3026
configured_catalog_path: "integration_tests/non_invoice_line_items_catalog.json"
3127
future_state_path: "integration_tests/abnormal_state.json"
32-
cursor_paths:
33-
charges: ["created"]
3428
- config_path: "secrets/connected_account_config.json"
3529
configured_catalog_path: "integration_tests/non_disputes_events_catalog.json"
3630
future_state_path: "integration_tests/abnormal_state.json"
37-
cursor_paths:
38-
charges: ["created"]
3931
full_refresh:
4032
- config_path: "secrets/config.json"
4133
configured_catalog_path: "integration_tests/non_invoice_line_items_catalog.json"

airbyte-integrations/connectors/source-stripe/integration_tests/abnormal_state.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
"payouts": { "created": 161706755600 },
1313
"disputes": { "created": 161099630500 },
1414
"products": { "created": 158551134100 },
15-
"refunds": { "created": 161959562900 }
15+
"refunds": { "created": 161959562900 },
16+
"payment_intents": { "created": 161959562900 }
1617
}

airbyte-integrations/connectors/source-stripe/integration_tests/configured_catalog.json

+11
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@
1212
"sync_mode": "incremental",
1313
"destination_sync_mode": "overwrite",
1414
"cursor_field": ["created"]
15+
},
16+
{
17+
"stream": {
18+
"name": "payment_intents",
19+
"json_schema": {},
20+
"supported_sync_modes": ["full_refresh", "incremental"],
21+
"source_defined_cursor": true,
22+
"default_cursor_field": ["created"]
23+
},
24+
"sync_mode": "incremental",
25+
"destination_sync_mode": "append"
1526
}
1627
]
1728
}

airbyte-integrations/connectors/source-stripe/integration_tests/expected_subscriptions_records.txt

-25
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"client_secret": "wrong-client-secret",
2+
"client_secret": "sk_test_wrongClientSecret",
33
"account_id": "wrong-account-id",
44
"start_date": "2020-05-01T00:00:00Z"
55
}

airbyte-integrations/connectors/source-stripe/integration_tests/non_disputes_events_catalog.json

+12
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@
2525
"sync_mode": "incremental",
2626
"destination_sync_mode": "overwrite",
2727
"cursor_field": ["created"]
28+
},
29+
{
30+
"stream": {
31+
"name": "payment_intents",
32+
"json_schema": {},
33+
"supported_sync_modes": ["full_refresh", "incremental"],
34+
"source_defined_cursor": true,
35+
"default_cursor_field": ["created"],
36+
"source_defined_primary_key": [["id"]]
37+
},
38+
"sync_mode": "incremental",
39+
"destination_sync_mode": "append"
2840
}
2941
]
3042
}

airbyte-integrations/connectors/source-stripe/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
from setuptools import find_packages, setup
2727

28-
MAIN_REQUIREMENTS = ["airbyte-cdk", "stripe"]
28+
MAIN_REQUIREMENTS = ["airbyte-cdk~=0.1", "stripe==2.56.0"]
2929

3030
TEST_REQUIREMENTS = [
3131
"pytest~=6.1",

0 commit comments

Comments
 (0)