Skip to content

Commit

Permalink
Added tax rates stream (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
xacadil authored Dec 20, 2023
1 parent 747577b commit 15af3d1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
25 changes: 25 additions & 0 deletions tap_stripe/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,5 +683,30 @@ def validate_response(self, response: requests.Response) -> None:
msg = self.response_error_message(response)
raise RetriableAPIError(msg, response)

class TaxRatesStream(stripeStream):

name = "tax_rates"
path = "tax_rates"
object = "tax_rate"
replication_key = "created"

schema = th.PropertiesList(
th.Property("id", th.StringType),
th.Property("object", th.StringType),
th.Property("created", th.DateTimeType),
th.Property("active", th.BooleanType),
th.Property("country", th.StringType),
th.Property("description", th.StringType),
th.Property("display_name", th.StringType),
th.Property("inclusive", th.BooleanType),
th.Property("jurisdiction", th.StringType),
th.Property("metadata", th.CustomType({"type": ["object", "string"]})),
th.Property("percentage", th.NumberType),
th.Property("state", th.StringType),
th.Property("state", th.StringType),
th.Property("tax_type", th.StringType),

).to_dict()



6 changes: 4 additions & 2 deletions tap_stripe/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
Subscriptions,
SubscriptionItemStream,
SubscriptionSchedulesStream,
UsageRecordsStream
UsageRecordsStream,
TaxRatesStream,
)

STREAM_TYPES = [
Expand All @@ -34,7 +35,8 @@
Subscriptions,
SubscriptionItemStream,
SubscriptionSchedulesStream,
UsageRecordsStream
UsageRecordsStream,
TaxRatesStream
]


Expand Down

0 comments on commit 15af3d1

Please sign in to comment.