Skip to content

Commit

Permalink
fix subscription and plans expand param (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
keyn4 authored Dec 11, 2023
1 parent 69f602a commit ecff7bd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tap_stripe/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,12 @@ class Subscriptions(stripeStream):
def path(self):
return "events" if self.get_from_events else "subscriptions"

@property
def expand(self):
if self.get_from_events:
return "discounts"
return ["discounts"]
else:
return "data.discounts"
return ["data.discounts"]

schema = th.PropertiesList(
th.Property("id", th.StringType),
Expand Down Expand Up @@ -362,11 +363,12 @@ class Plans(stripeStream):
event_filter = "plan.*"
object = "plan"

@property
def expand(self):
if self.get_from_events:
return "tiers"
return ["tiers"]
else:
return "data.tiers"
return ["data.tiers"]

@property
def path(self):
Expand Down

0 comments on commit ecff7bd

Please sign in to comment.