From a7ccb8d48497fb172a499b8ee4609eda05820311 Mon Sep 17 00:00:00 2001 From: marcos314 Date: Wed, 2 Aug 2023 09:47:51 -0300 Subject: [PATCH 1/2] feat(tap-suiteql): Create new stream SubscriptionLineRevision --- README.md | 1 + tap_suiteql/streams.py | 27 +++++++++++++++++++++++++++ tap_suiteql/tap.py | 2 ++ 3 files changed, 30 insertions(+) diff --git a/README.md b/README.md index 4a5b36b..01eb2de 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,7 @@ We extract the following entities with its respective method * Charge -> dynamically * CustomRecordGpyChangeOrderClassific -> dynamically * BillingAccount -> dynamically +* SubscriptionLineRevision -> static ### SDK Dev Guide diff --git a/tap_suiteql/streams.py b/tap_suiteql/streams.py index 6356727..e6e49f3 100644 --- a/tap_suiteql/streams.py +++ b/tap_suiteql/streams.py @@ -305,3 +305,30 @@ class BillingAccountStream(suiteqlStream): primary_keys = ["id"] skip_attributes = ["links"] replication_key = "lastmodifieddate" + + +class SubscriptionLineRevisionStream(suiteqlStream): + name = "SubscriptionLineRevision" + path = "/query/v1/suiteql" + primary_keys = ["id"] + schema = th.PropertiesList( + th.Property("id", th.StringType), + th.Property("appliedtochangeorder", th.StringType), + th.Property("changeorder", th.StringType), + th.Property("changeordereffectivedate", th.StringType), + th.Property("createdby", th.StringType), + th.Property("createdfromvoid", th.StringType), + th.Property("datecreated", th.DateTimeType), + th.Property("dateend", th.DateTimeType), + th.Property("deltaamount", th.StringType), + th.Property("deltaquantity", th.StringType), + th.Property("lastmodifieddate", th.DateTimeType), + th.Property("priceplan", th.StringType), + th.Property("quantity", th.StringType), + th.Property("recurringamount", th.StringType), + th.Property("subscription", th.StringType), + th.Property("subscriptionline", th.StringType), + th.Property("subscriptionrevision", th.StringType), + th.Property("subsidiary", th.StringType), + th.Property("totalcontractvalue", th.StringType), + ).to_dict() diff --git a/tap_suiteql/tap.py b/tap_suiteql/tap.py index 4fbabbb..b954814 100644 --- a/tap_suiteql/tap.py +++ b/tap_suiteql/tap.py @@ -26,6 +26,7 @@ SubscriptionPlanStream, SubscriptionPriceIntervalStream, SubscriptionStream, + SubscriptionLineRevisionStream, ) STREAM_TYPES = { @@ -46,6 +47,7 @@ "Item": ItemStream, "MonthlyRecurringRevenue": MonthlyRecurringRevenueStream, "BillingAccount": BillingAccountStream, + "SubscriptionLineRevision": SubscriptionLineRevisionStream, } From b32ab59527f526ddd15ee577780d352ed0342680 Mon Sep 17 00:00:00 2001 From: marcos314 Date: Wed, 2 Aug 2023 09:53:48 -0300 Subject: [PATCH 2/2] fix(tap-suiteql): Fix streams order --- tap_suiteql/tap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_suiteql/tap.py b/tap_suiteql/tap.py index b954814..5f28649 100644 --- a/tap_suiteql/tap.py +++ b/tap_suiteql/tap.py @@ -22,11 +22,11 @@ ItemStream, MonthlyRecurringRevenueStream, SubscriptionChangeOrderStream, + SubscriptionLineRevisionStream, SubscriptionLineStream, SubscriptionPlanStream, SubscriptionPriceIntervalStream, SubscriptionStream, - SubscriptionLineRevisionStream, ) STREAM_TYPES = {