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: add checkout_sessions stream, checkout_sessions_line_item stream and promotion_codes stream #7345

Conversation

vladimir-remar
Copy link
Contributor

What

Add new streams for checkout sessions and checkout session line items.

Pre-merge Checklist

Expand the relevant checklist and delete the others.

Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions
  • Connector version bumped like described here

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here

@github-actions github-actions bot added the area/connectors Connector related issues label Oct 25, 2021
data = response_json.get("data", [])
if data:
for e in data:
checkout_session_id = re.search(r'/sessions/(cs_[^/].+)/line_items', response.url)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the checkout_session_id is saved into the line_items response, since it is not included line_items response.

@marcosmarxm
Copy link
Member

thanks @vladimir-remar I asked the team to review your contribution.

@vladimir-remar vladimir-remar changed the title 🎉 Source Stripe: add checkout_sessions stream and checkout_sessions_line_item stream 🎉 Source Stripe: add checkout_sessions stream, checkout_sessions_line_item stream and promotion_codes stream Oct 27, 2021
Copy link
Contributor

@Zirochkaa Zirochkaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just a few comments
Also, could you please add these 3 new streams to integration tests?

  • CheckoutSessions and CheckoutSessionsLineItems to integration_tests/full_refresh_configured_catalog.json;
  • PromotionCodes to non_invoice_line_items_catalog file. Also please add data for PromotionCodes stream to integration_tests/abnormal_state.json file.

After doing this, could you please post here results of integration tests?

Also could you please add all 3 streams to integration_tests/configured_catalog.json file?

@Zirochkaa Zirochkaa self-assigned this Oct 27, 2021
@vladimir-remar
Copy link
Contributor Author

Hi! @Zirochkaa, thanks for the comments. I did the changes.
Integration log: stripe_integration_test.txt

Copy link
Contributor

@Zirochkaa Zirochkaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vladimir-remar nice work, just 2 comments and we are good to go.

@marcosmarxm marcosmarxm self-assigned this Nov 3, 2021
Copy link
Contributor

@Zirochkaa Zirochkaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm
I also run SAT locally and everything is working - 👍

@CLAassistant
Copy link

CLAassistant commented Nov 6, 2021

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added area/documentation Improvements or additions to documentation and removed normalization labels Nov 6, 2021
@marcosmarxm marcosmarxm temporarily deployed to more-secrets November 6, 2021 13:32 Inactive
@marcosmarxm marcosmarxm merged commit 1b08e30 into airbytehq:master Nov 6, 2021
schlattk pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
…_item stream and promotion_codes stream (airbytehq#7345)

* update: add checkout_sessions and checkout_sessions_line_item streams

* update: add discount object to checkout_session_line_items, update json schema and requests_params

* fix: checkout_session_line_items json schema

* update: add new stream promotion_codes

* fix: json schemas

* fix: checkout sessions line items json schema

* update: add new streams to integration tests

* format streams file

* fix type in checkout_sessions_line_items json schema

* update parse_response in CheckoutSessionsLineItems

* bump version + docs

* generate seed and format

Co-authored-by: Marcos Marx <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants