Skip to content

Commit

Permalink
🎉 Source Stripe: Add PaymentIntents stream (airbytehq#6004)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Zirochkaa authored Sep 14, 2021
1 parent 14ac554 commit 49d0f7e
Show file tree
Hide file tree
Showing 15 changed files with 1,361 additions and 288 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ data
.project
.settings

# Logs
acceptance_tests_logs/

# Secrets
secrets
!airbyte-integrations/connector-templates/**/secrets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"sourceDefinitionId": "e094cb9a-26de-4645-8761-65c0c425d1de",
"name": "Stripe",
"dockerRepository": "airbyte/source-stripe",
"dockerImageTag": "0.1.16",
"dockerImageTag": "0.1.17",
"documentationUrl": "https://docs.airbyte.io/integrations/sources/stripe",
"icon": "stripe.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
- sourceDefinitionId: e094cb9a-26de-4645-8761-65c0c425d1de
name: Stripe
dockerRepository: airbyte/source-stripe
dockerImageTag: 0.1.16
dockerImageTag: 0.1.17
documentationUrl: https://docs.airbyte.io/integrations/sources/stripe
icon: stripe.svg
- sourceDefinitionId: b03a9f3e-22a5-11eb-adc1-0242ac120002
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 @@ RUN pip install .
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.16
LABEL io.airbyte.version=0.1.17
LABEL io.airbyte.name=airbyte/source-stripe
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ tests:
- config_path: "secrets/connected_account_config.json"
basic_read:
# TEST 1 - Reading catalog without invoice_line_items
# Along with this test we expect subscriptions with status in ["active","canceled"]
# If this test fails for some reason, please check the expected_subscriptions_records.json for valid subset of data.
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/non_invoice_line_items_catalog.json"
timeout_seconds: 3600
expect_records:
path: "integration_tests/expected_subscriptions_records.txt"
# TEST 2 - Reading data from account that has no records for stream Disputes
- config_path: "secrets/connected_account_config.json"
configured_catalog_path: "integration_tests/non_disputes_events_catalog.json"
Expand All @@ -29,13 +25,9 @@ tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/non_invoice_line_items_catalog.json"
future_state_path: "integration_tests/abnormal_state.json"
cursor_paths:
charges: ["created"]
- config_path: "secrets/connected_account_config.json"
configured_catalog_path: "integration_tests/non_disputes_events_catalog.json"
future_state_path: "integration_tests/abnormal_state.json"
cursor_paths:
charges: ["created"]
full_refresh:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/non_invoice_line_items_catalog.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"payouts": { "created": 161706755600 },
"disputes": { "created": 161099630500 },
"products": { "created": 158551134100 },
"refunds": { "created": 161959562900 }
"refunds": { "created": 161959562900 },
"payment_intents": { "created": 161959562900 }
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@
"sync_mode": "incremental",
"destination_sync_mode": "overwrite",
"cursor_field": ["created"]
},
{
"stream": {
"name": "payment_intents",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["created"]
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
}
]
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"client_secret": "wrong-client-secret",
"client_secret": "sk_test_wrongClientSecret",
"account_id": "wrong-account-id",
"start_date": "2020-05-01T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@
"sync_mode": "incremental",
"destination_sync_mode": "overwrite",
"cursor_field": ["created"]
},
{
"stream": {
"name": "payment_intents",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["created"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
}
]
}
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-stripe/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

from setuptools import find_packages, setup

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

TEST_REQUIREMENTS = [
"pytest~=6.1",
Expand Down
Loading

0 comments on commit 49d0f7e

Please sign in to comment.