Skip to content

Commit

Permalink
Source Stripe: expand tiers when syncing plans (airbytehq#19906)
Browse files Browse the repository at this point in the history
* Expand tiers when syncing plans

* Update Plans stream schema

* Re-bump

* Bump

* Remove string as a plan schema

* bump

* Update changelog

---------

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
Co-authored-by: sh4sh <6833405+sh4sh@users.noreply.github.com>
Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com>
  • Loading branch information
4 people committed Jun 8, 2023
1 parent 7940737 commit e7a2c53
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-stripe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]


LABEL io.airbyte.version=3.0.5
LABEL io.airbyte.version=3.1.0
LABEL io.airbyte.name=airbyte/source-stripe
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": ["null", "object", "string"],
"type": ["null", "object"],
"properties": {
"nickname": {
"type": ["null", "string"]
Expand All @@ -12,9 +12,15 @@
"flat_amount": {
"type": ["null", "integer"]
},
"flat_amount_decimal": {
"type": ["null", "string"]
},
"unit_amount": {
"type": ["null", "integer"]
},
"unit_amount_decimal": {
"type": ["null", "string"]
},
"up_to": {
"type": ["null", "integer"]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,10 @@ class Plans(IncrementalStripeStream):
def path(self, **kwargs):
return "plans"

def request_params(self, stream_slice: Mapping[str, Any] = None, **kwargs):
params = super().request_params(stream_slice=stream_slice, **kwargs)
params["expand[]"] = ["data.tiers"]
return params

class Products(IncrementalStripeStream):
"""
Expand Down
3 changes: 2 additions & 1 deletion docs/integrations/sources/stripe.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ The Stripe connector should not run into Stripe API limitations under normal usa
## Changelog

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------|
| :------ | :--------- | :------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------- |
| 3.1.0 | 2023-03-10 | [19906](https://github.com/airbytehq/airbyte/pull/19906) | Expand `tiers` when syncing `Plans` streams |
| 3.0.5 | 2023-03-25 | [22866](https://github.com/airbytehq/airbyte/pull/22866) | Specified date formatting in specification |
| 3.0.4 | 2023-03-24 | [24471](https://github.com/airbytehq/airbyte/pull/24471) | Fix stream slices for single sliced streams |
| 3.0.3 | 2023-03-17 | [24179](https://github.com/airbytehq/airbyte/pull/24179) | Get customer's attributes safely |
Expand Down

0 comments on commit e7a2c53

Please sign in to comment.