fix stripe cursor comparison bug and add dockerfile and build.gradle (#3096)
This commit is contained in:
@@ -112,6 +112,7 @@ public abstract class StandardSourceTest {
|
||||
"airbyte/source-braintree-singer",
|
||||
"airbyte/source-salesforce-singer",
|
||||
"airbyte/source-stripe-singer",
|
||||
"airbyte/source-stripe",
|
||||
"airbyte/source-github-singer",
|
||||
"airbyte/source-gitlab-singer",
|
||||
"airbyte/source-google-workspace-admin-reports",
|
||||
|
||||
16
airbyte-integrations/connectors/source-stripe/Dockerfile
Normal file
16
airbyte-integrations/connectors/source-stripe/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM airbyte/integration-base-python:0.1.5
|
||||
|
||||
# Bash is installed for more convenient debugging.
|
||||
RUN apt-get update && apt-get install -y bash && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV CODE_PATH="source_stripe"
|
||||
ENV AIRBYTE_IMPL_MODULE="source_stripe"
|
||||
ENV AIRBYTE_IMPL_PATH="SourceStripe"
|
||||
|
||||
WORKDIR /airbyte/integration_code
|
||||
COPY $CODE_PATH ./$CODE_PATH
|
||||
COPY setup.py ./
|
||||
RUN pip install .
|
||||
|
||||
LABEL io.airbyte.version=0.1.0
|
||||
LABEL io.airbyte.name=airbyte/source-stripe
|
||||
32
airbyte-integrations/connectors/source-stripe/build.gradle
Normal file
32
airbyte-integrations/connectors/source-stripe/build.gradle
Normal file
@@ -0,0 +1,32 @@
|
||||
plugins {
|
||||
id 'airbyte-python'
|
||||
id 'airbyte-docker'
|
||||
id 'airbyte-standard-source-test-file'
|
||||
}
|
||||
|
||||
airbytePython {
|
||||
moduleDirectory 'source_stripe'
|
||||
}
|
||||
|
||||
airbyteStandardSourceTestFile {
|
||||
// For more information on standard source tests, see https://docs.airbyte.io/contributing-to-airbyte/building-new-connector/testing-connectors
|
||||
|
||||
// All these input paths must live inside this connector's directory (or subdirectories)
|
||||
// TODO update the spec JSON file
|
||||
specPath = "source_stripe/spec.json"
|
||||
|
||||
// configPath points to a config file which matches the spec.json supplied above. secrets/ is gitignored by default, so place your config file
|
||||
// there (in case it contains any credentials)
|
||||
// TODO update the config file to contain actual credentials
|
||||
configPath = "secrets/config.json"
|
||||
// TODO update the sample configured_catalog JSON for use in testing
|
||||
// Note: If your source supports incremental syncing, then make sure that the catalog that is returned in the get_catalog method is configured
|
||||
// for incremental syncing (e.g. include cursor fields, etc).
|
||||
configuredCatalogPath = "sample_files/full_catalog.json"
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
implementation files(project(':airbyte-integrations:bases:base-standard-source-test-file').airbyteDocker.outputs)
|
||||
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
|
||||
}
|
||||
@@ -31,9 +31,10 @@ setup(
|
||||
author="Airbyte",
|
||||
author_email="contact@airbyte.io",
|
||||
packages=find_packages(),
|
||||
package_data={"": ["*.json"]},
|
||||
package_data={"": ["*.json", "schemas/*.json", "schemas/shared/*.json"]},
|
||||
install_requires=[
|
||||
"airbyte-protocol",
|
||||
"base-python",
|
||||
"stripe"
|
||||
],
|
||||
)
|
||||
|
||||
@@ -90,7 +90,7 @@ class IncrementalStripeStream(StripeStream, ABC):
|
||||
def request_params(self, stream_state=None, **kwargs):
|
||||
stream_state = stream_state or {}
|
||||
params = super().request_params(stream_state=stream_state, **kwargs)
|
||||
params['created'] = stream_state.get(self.cursor_field)
|
||||
params['created[gte]'] = stream_state.get(self.cursor_field)
|
||||
return params
|
||||
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ write_standard_creds source-shopify-singer "$SHOPIFY_INTEGRATION_TEST_CREDS"
|
||||
write_standard_creds source-slack-singer "$SLACK_TEST_CREDS"
|
||||
write_standard_creds source-smartsheets "$SMARTSHEETS_TEST_CREDS"
|
||||
write_standard_creds source-stripe-singer "$STRIPE_INTEGRATION_TEST_CREDS"
|
||||
write_standard_creds source-stripe "$STRIPE_INTEGRATION_TEST_CREDS"
|
||||
write_standard_creds source-tempo "$TEMPO_INTEGRATION_TEST_CREDS"
|
||||
write_standard_creds source-twilio-singer "$TWILIO_TEST_CREDS"
|
||||
write_standard_creds source-zendesk-support-singer "$ZENDESK_SECRETS_CREDS"
|
||||
|
||||
Reference in New Issue
Block a user