omnata-plugin-runtime 0.3.25a78__py3-none-any.whl → 0.3.26a79__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- omnata_plugin_runtime/omnata_plugin.py +21 -15
- {omnata_plugin_runtime-0.3.25a78.dist-info → omnata_plugin_runtime-0.3.26a79.dist-info}/METADATA +1 -1
- {omnata_plugin_runtime-0.3.25a78.dist-info → omnata_plugin_runtime-0.3.26a79.dist-info}/RECORD +5 -5
- {omnata_plugin_runtime-0.3.25a78.dist-info → omnata_plugin_runtime-0.3.26a79.dist-info}/LICENSE +0 -0
- {omnata_plugin_runtime-0.3.25a78.dist-info → omnata_plugin_runtime-0.3.26a79.dist-info}/WHEEL +0 -0
@@ -1415,6 +1415,10 @@ class MonthlyBillingEventRequest(BaseModel):
|
|
1415
1415
|
# below is deprecated
|
1416
1416
|
has_active_inbound: bool = False
|
1417
1417
|
has_active_outbound: bool = False
|
1418
|
+
# had to add these because the old version of the standard billing events assumed a daily billing event
|
1419
|
+
# TODO: deprecate all of these once the plugins are all on 0.3.26 or higher
|
1420
|
+
billable_connections_inbound: int = 0
|
1421
|
+
billable_connections_outbound: int = 0
|
1418
1422
|
|
1419
1423
|
|
1420
1424
|
BillingEventRequest = Annotated[Union[DailyBillingEventRequest,MonthlyBillingEventRequest],Field(discriminator='billing_schedule')]
|
@@ -1622,27 +1626,29 @@ class OmnataPlugin(ABC):
|
|
1622
1626
|
"""
|
1623
1627
|
sent_initial = False
|
1624
1628
|
events: List[SnowflakeBillingEvent] = []
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
SnowflakeBillingEvent(
|
1629
|
-
billing_class="DAILY_ACTIVE_INITIAL",
|
1630
|
-
billing_subclass="",
|
1631
|
-
timestamp=datetime.datetime.now(tz=datetime.timezone.utc),
|
1632
|
-
base_charge=initial_charge,
|
1633
|
-
)
|
1634
|
-
)
|
1635
|
-
sent_initial = True
|
1636
|
-
else:
|
1637
|
-
if additional_charge is not None and additional_charge > 0:
|
1629
|
+
if request.billing_schedule == "DAILY":
|
1630
|
+
for i in range(request.billable_connections_inbound + request.billable_connections_outbound):
|
1631
|
+
if sent_initial is False:
|
1638
1632
|
events.append(
|
1639
1633
|
SnowflakeBillingEvent(
|
1640
|
-
billing_class="
|
1634
|
+
billing_class="DAILY_ACTIVE_INITIAL",
|
1641
1635
|
billing_subclass="",
|
1642
1636
|
timestamp=datetime.datetime.now(tz=datetime.timezone.utc),
|
1643
|
-
base_charge=
|
1637
|
+
base_charge=initial_charge,
|
1644
1638
|
)
|
1645
1639
|
)
|
1640
|
+
sent_initial = True
|
1641
|
+
else:
|
1642
|
+
if additional_charge is not None and additional_charge > 0:
|
1643
|
+
events.append(
|
1644
|
+
SnowflakeBillingEvent(
|
1645
|
+
billing_class="DAILY_ACTIVE_ADDITIONAL",
|
1646
|
+
billing_subclass="",
|
1647
|
+
timestamp=datetime.datetime.now(tz=datetime.timezone.utc),
|
1648
|
+
base_charge=additional_charge,
|
1649
|
+
)
|
1650
|
+
)
|
1651
|
+
# handle monthly billing events inside the plugins for now
|
1646
1652
|
return events
|
1647
1653
|
|
1648
1654
|
def additional_loggers(self) -> List[str]:
|
{omnata_plugin_runtime-0.3.25a78.dist-info → omnata_plugin_runtime-0.3.26a79.dist-info}/RECORD
RENAMED
@@ -3,10 +3,10 @@ omnata_plugin_runtime/api.py,sha256=_N5ok5LN7GDO4J9n3yduXp3tpjmhpySY__U2baiygrs,
|
|
3
3
|
omnata_plugin_runtime/configuration.py,sha256=7cMekoY8CeZAJHpASU6tCMidF55Hzfr7CD74jtebqIY,35742
|
4
4
|
omnata_plugin_runtime/forms.py,sha256=pw_aKVsXSz47EP8PFBI3VDwdSN5IjvZxp8JTjO1V130,18421
|
5
5
|
omnata_plugin_runtime/logging.py,sha256=bn7eKoNWvtuyTk7RTwBS9UARMtqkiICtgMtzq3KA2V0,3272
|
6
|
-
omnata_plugin_runtime/omnata_plugin.py,sha256=
|
6
|
+
omnata_plugin_runtime/omnata_plugin.py,sha256=r0LtznaHkoPmWVUZGBdeaVtNZlm-eWQrUhDuvE4p_gQ,104272
|
7
7
|
omnata_plugin_runtime/plugin_entrypoints.py,sha256=D2f0Qih7KTJNXIDYkA-E55RTEK_7Jtv9ySqspWxERVA,28272
|
8
8
|
omnata_plugin_runtime/rate_limiting.py,sha256=se6MftQI5NrVHaLb1hByPCgAESPQhkAgIG7KIU1clDU,16562
|
9
|
-
omnata_plugin_runtime-0.3.
|
10
|
-
omnata_plugin_runtime-0.3.
|
11
|
-
omnata_plugin_runtime-0.3.
|
12
|
-
omnata_plugin_runtime-0.3.
|
9
|
+
omnata_plugin_runtime-0.3.26a79.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
|
10
|
+
omnata_plugin_runtime-0.3.26a79.dist-info/METADATA,sha256=1vRTfVxt5b69ZBQbI0a_ExmZ_fmTJUfxW1kFJnO5E1g,1604
|
11
|
+
omnata_plugin_runtime-0.3.26a79.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
12
|
+
omnata_plugin_runtime-0.3.26a79.dist-info/RECORD,,
|
{omnata_plugin_runtime-0.3.25a78.dist-info → omnata_plugin_runtime-0.3.26a79.dist-info}/LICENSE
RENAMED
File without changes
|
{omnata_plugin_runtime-0.3.25a78.dist-info → omnata_plugin_runtime-0.3.26a79.dist-info}/WHEEL
RENAMED
File without changes
|