stigg-api-client 3.53.4__tar.gz → 5.71.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stigg_api_client-3.53.4 → stigg_api_client-5.71.0}/PKG-INFO +1 -1
- {stigg_api_client-3.53.4 → stigg_api_client-5.71.0}/pyproject.toml +1 -1
- {stigg_api_client-3.53.4 → stigg_api_client-5.71.0}/stigg/client.py +10 -3
- {stigg_api_client-3.53.4 → stigg_api_client-5.71.0}/stigg/generated/operations.py +279 -12
- {stigg_api_client-3.53.4 → stigg_api_client-5.71.0}/stigg/generated/schema.py +1114 -97
- {stigg_api_client-3.53.4 → stigg_api_client-5.71.0}/LICENSE +0 -0
- {stigg_api_client-3.53.4 → stigg_api_client-5.71.0}/README.md +0 -0
- {stigg_api_client-3.53.4 → stigg_api_client-5.71.0}/stigg/__init__.py +0 -0
- {stigg_api_client-3.53.4 → stigg_api_client-5.71.0}/stigg/generated/__init__.py +0 -0
|
@@ -29,18 +29,19 @@ class StiggClient:
|
|
|
29
29
|
|
|
30
30
|
self._EDGE_QUERIES: Dict[Operation, Callable[[Dict], Dict]] = {
|
|
31
31
|
Operations.query.get_entitlements: self.get_entitlements,
|
|
32
|
+
Operations.query.get_entitlements_state: self.get_entitlements_state,
|
|
32
33
|
Operations.query.get_paywall: self.get_paywall,
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
@retry(**RETRY_KWARGS)
|
|
36
|
-
def _get_entitlements(self, variables: Dict[str, Dict]) -> Dict:
|
|
37
|
+
def _get_entitlements(self, variables: Dict[str, Dict], endpoint: str) -> Dict:
|
|
37
38
|
params = variables.get("query")
|
|
38
39
|
if params is None:
|
|
39
40
|
raise ValueError('Variables do not include required key "query".')
|
|
40
41
|
|
|
41
42
|
customer_id = params.pop("customerId")
|
|
42
43
|
|
|
43
|
-
url = f"{self._edge_url}/v1/c/{customer_id}/
|
|
44
|
+
url = f"{self._edge_url}/v1/c/{customer_id}/{endpoint}"
|
|
44
45
|
|
|
45
46
|
data = requests.get(url, headers=self._endpoint.base_headers, params=params, timeout=self._endpoint.timeout)
|
|
46
47
|
data.raise_for_status()
|
|
@@ -51,7 +52,13 @@ class StiggClient:
|
|
|
51
52
|
if self._enable_edge is False:
|
|
52
53
|
return self.request(Operations.query.get_entitlements, variables, raw_response=True)
|
|
53
54
|
|
|
54
|
-
return self._get_entitlements(variables)
|
|
55
|
+
return self._get_entitlements(variables, endpoint="entitlements.json")
|
|
56
|
+
|
|
57
|
+
def get_entitlements_state(self, variables: Dict[str, Dict]) -> Dict:
|
|
58
|
+
if self._enable_edge is False:
|
|
59
|
+
return self.request(Operations.query.get_entitlements_state, variables, raw_response=True)
|
|
60
|
+
|
|
61
|
+
return self._get_entitlements(variables, endpoint="entitlements-state.json")
|
|
55
62
|
|
|
56
63
|
@retry(**RETRY_KWARGS)
|
|
57
64
|
def _get_paywall(self,variables: Dict[str, Dict]) -> Dict:
|
|
@@ -59,6 +59,7 @@ def fragment_price_fragment():
|
|
|
59
59
|
_frag_credit_rate = _frag.credit_rate()
|
|
60
60
|
_frag_credit_rate.amount()
|
|
61
61
|
_frag_credit_rate.custom_currency_id()
|
|
62
|
+
_frag_credit_rate.currency_id()
|
|
62
63
|
_frag.tiers_mode()
|
|
63
64
|
_frag_tiers = _frag.tiers()
|
|
64
65
|
_frag_tiers.__fragment__(fragment_price_tier_fragment())
|
|
@@ -193,6 +194,7 @@ def fragment_plan_fragment():
|
|
|
193
194
|
_frag_default_trial_config_budget = _frag_default_trial_config.budget()
|
|
194
195
|
_frag_default_trial_config_budget.limit()
|
|
195
196
|
_frag_default_trial_config.trial_end_behavior()
|
|
197
|
+
_frag.aws_marketplace_plan_dimension()
|
|
196
198
|
return _frag
|
|
197
199
|
|
|
198
200
|
|
|
@@ -832,6 +834,10 @@ def fragment_entitlement_fragment():
|
|
|
832
834
|
_frag_reset_period_configuration.__fragment__(fragment_reset_period_configuration_fragment())
|
|
833
835
|
_frag_feature = _frag.feature()
|
|
834
836
|
_frag_feature.__fragment__(fragment_feature_fragment())
|
|
837
|
+
_frag_credit_rate = _frag.credit_rate()
|
|
838
|
+
_frag_credit_rate.amount()
|
|
839
|
+
_frag_credit_rate.currency_id()
|
|
840
|
+
_frag.valid_until()
|
|
835
841
|
return _frag
|
|
836
842
|
|
|
837
843
|
|
|
@@ -894,6 +900,7 @@ def fragment_product_fragment():
|
|
|
894
900
|
_frag.display_name()
|
|
895
901
|
_frag.description()
|
|
896
902
|
_frag.additional_meta_data()
|
|
903
|
+
_frag.aws_marketplace_product_id()
|
|
897
904
|
_frag_product_settings = _frag.product_settings()
|
|
898
905
|
_frag_product_settings_downgrade_plan = _frag_product_settings.downgrade_plan()
|
|
899
906
|
_frag_product_settings_downgrade_plan.ref_id()
|
|
@@ -930,6 +937,25 @@ def fragment_package_published_payload():
|
|
|
930
937
|
return _frag
|
|
931
938
|
|
|
932
939
|
|
|
940
|
+
def fragment_credit_balance_updated_payload():
|
|
941
|
+
_frag = sgqlc.operation.Fragment(_schema.CreditBalanceUpdated, 'CreditBalanceUpdatedPayload')
|
|
942
|
+
_frag_currency = _frag.currency()
|
|
943
|
+
_frag_currency.currency_id()
|
|
944
|
+
_frag_currency.display_name()
|
|
945
|
+
_frag_currency.symbol()
|
|
946
|
+
_frag_currency_units = _frag_currency.units()
|
|
947
|
+
_frag_currency_units.singular()
|
|
948
|
+
_frag_currency_units.plural()
|
|
949
|
+
_frag.currency_id()
|
|
950
|
+
_frag.current_balance()
|
|
951
|
+
_frag.customer_id()
|
|
952
|
+
_frag.valid_until()
|
|
953
|
+
_frag.resource_id()
|
|
954
|
+
_frag.total_consumed()
|
|
955
|
+
_frag.total_granted()
|
|
956
|
+
return _frag
|
|
957
|
+
|
|
958
|
+
|
|
933
959
|
def fragment_customer_portal_fragment():
|
|
934
960
|
_frag = sgqlc.operation.Fragment(_schema.CustomerPortal, 'CustomerPortalFragment')
|
|
935
961
|
_frag_subscriptions = _frag.subscriptions()
|
|
@@ -950,6 +976,20 @@ def fragment_customer_portal_fragment():
|
|
|
950
976
|
return _frag
|
|
951
977
|
|
|
952
978
|
|
|
979
|
+
def fragment_stripe_checkout_credentials_fragment():
|
|
980
|
+
_frag = sgqlc.operation.Fragment(_schema.StripeCheckoutCredentials, 'StripeCheckoutCredentialsFragment')
|
|
981
|
+
_frag.account_id()
|
|
982
|
+
_frag.setup_secret()
|
|
983
|
+
_frag.public_key()
|
|
984
|
+
return _frag
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
def fragment_zuora_checkout_credentials_fragment():
|
|
988
|
+
_frag = sgqlc.operation.Fragment(_schema.ZuoraCheckoutCredentials, 'ZuoraCheckoutCredentialsFragment')
|
|
989
|
+
_frag.publishable_key()
|
|
990
|
+
return _frag
|
|
991
|
+
|
|
992
|
+
|
|
953
993
|
def fragment_checkout_state_fragment():
|
|
954
994
|
_frag = sgqlc.operation.Fragment(_schema.CheckoutState, 'CheckoutStateFragment')
|
|
955
995
|
_frag_configuration = _frag.configuration()
|
|
@@ -965,6 +1005,11 @@ def fragment_checkout_state_fragment():
|
|
|
965
1005
|
_frag_plan.__fragment__(fragment_plan_fragment())
|
|
966
1006
|
_frag_billing_integration = _frag.billing_integration()
|
|
967
1007
|
_frag_billing_integration.billing_identifier()
|
|
1008
|
+
_frag_billing_integration_billing_credentials = _frag_billing_integration.billing_credentials()
|
|
1009
|
+
_frag_billing_integration_billing_credentials__as__StripeCheckoutCredentials = _frag_billing_integration_billing_credentials.__as__(_schema.StripeCheckoutCredentials)
|
|
1010
|
+
_frag_billing_integration_billing_credentials__as__StripeCheckoutCredentials.__fragment__(fragment_stripe_checkout_credentials_fragment())
|
|
1011
|
+
_frag_billing_integration_billing_credentials__as__ZuoraCheckoutCredentials = _frag_billing_integration_billing_credentials.__as__(_schema.ZuoraCheckoutCredentials)
|
|
1012
|
+
_frag_billing_integration_billing_credentials__as__ZuoraCheckoutCredentials.__fragment__(fragment_zuora_checkout_credentials_fragment())
|
|
968
1013
|
_frag_billing_integration_credentials = _frag_billing_integration.credentials()
|
|
969
1014
|
_frag_billing_integration_credentials.account_id()
|
|
970
1015
|
_frag_billing_integration_credentials.public_key()
|
|
@@ -1016,7 +1061,7 @@ def fragment_customer_portal_subscription_price_fragment():
|
|
|
1016
1061
|
_frag_price.currency()
|
|
1017
1062
|
_frag_credit_rate = _frag.credit_rate()
|
|
1018
1063
|
_frag_credit_rate.amount()
|
|
1019
|
-
_frag_credit_rate.
|
|
1064
|
+
_frag_credit_rate.currency_id()
|
|
1020
1065
|
_frag_feature = _frag.feature()
|
|
1021
1066
|
_frag_feature.id()
|
|
1022
1067
|
_frag_feature.ref_id()
|
|
@@ -1045,7 +1090,7 @@ def fragment_customer_portal_subscription_fragment():
|
|
|
1045
1090
|
_frag_pricing_price.currency()
|
|
1046
1091
|
_frag_pricing_credit_rate = _frag_pricing.credit_rate()
|
|
1047
1092
|
_frag_pricing_credit_rate.amount()
|
|
1048
|
-
_frag_pricing_credit_rate.
|
|
1093
|
+
_frag_pricing_credit_rate.currency_id()
|
|
1049
1094
|
_frag_pricing_feature = _frag_pricing.feature()
|
|
1050
1095
|
_frag_pricing_feature.feature_units()
|
|
1051
1096
|
_frag_pricing_feature.feature_units_plural()
|
|
@@ -1208,7 +1253,7 @@ def fragment_mock_paywall_price_fragment():
|
|
|
1208
1253
|
_frag_price.currency()
|
|
1209
1254
|
_frag_credit_rate = _frag.credit_rate()
|
|
1210
1255
|
_frag_credit_rate.amount()
|
|
1211
|
-
_frag_credit_rate.
|
|
1256
|
+
_frag_credit_rate.currency_id()
|
|
1212
1257
|
_frag.tiers_mode()
|
|
1213
1258
|
_frag_tiers = _frag.tiers()
|
|
1214
1259
|
_frag_tiers.__fragment__(fragment_price_tier_fragment())
|
|
@@ -1429,6 +1474,30 @@ def fragment_schedule_variables_fragment():
|
|
|
1429
1474
|
return _frag
|
|
1430
1475
|
|
|
1431
1476
|
|
|
1477
|
+
def fragment_credit_grant_invoice_fragment():
|
|
1478
|
+
_frag = sgqlc.operation.Fragment(_schema.CreditGrantInvoice, 'CreditGrantInvoiceFragment')
|
|
1479
|
+
_frag.billing_id()
|
|
1480
|
+
_frag.status()
|
|
1481
|
+
_frag.created_at()
|
|
1482
|
+
_frag.due_date()
|
|
1483
|
+
_frag.updated_at()
|
|
1484
|
+
_frag.error_message()
|
|
1485
|
+
_frag.requires_action()
|
|
1486
|
+
_frag.payment_secret()
|
|
1487
|
+
_frag.payment_url()
|
|
1488
|
+
_frag.pdf_url()
|
|
1489
|
+
_frag.billing_reason()
|
|
1490
|
+
_frag.currency()
|
|
1491
|
+
_frag.sub_total()
|
|
1492
|
+
_frag.sub_total_excluding_tax()
|
|
1493
|
+
_frag.total()
|
|
1494
|
+
_frag.total_excluding_tax()
|
|
1495
|
+
_frag.tax()
|
|
1496
|
+
_frag.amount_due()
|
|
1497
|
+
_frag.attempt_count()
|
|
1498
|
+
return _frag
|
|
1499
|
+
|
|
1500
|
+
|
|
1432
1501
|
def fragment_credit_grant_fragment():
|
|
1433
1502
|
_frag = sgqlc.operation.Fragment(_schema.CreditGrant, 'CreditGrantFragment')
|
|
1434
1503
|
_frag.grant_id()
|
|
@@ -1449,6 +1518,26 @@ def fragment_credit_grant_fragment():
|
|
|
1449
1518
|
_frag.updated_at()
|
|
1450
1519
|
_frag.resource_id()
|
|
1451
1520
|
_frag.additional_meta_data()
|
|
1521
|
+
_frag.automatic_recharge_configuration_id()
|
|
1522
|
+
_frag.status()
|
|
1523
|
+
_frag.payment_collection()
|
|
1524
|
+
_frag.invoice_id()
|
|
1525
|
+
_frag_latest_invoice = _frag.latest_invoice()
|
|
1526
|
+
_frag_latest_invoice.__fragment__(fragment_credit_grant_invoice_fragment())
|
|
1527
|
+
return _frag
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
def fragment_credit_ledger_fragment():
|
|
1531
|
+
_frag = sgqlc.operation.Fragment(_schema.CreditLedgerEvent, 'CreditLedgerFragment')
|
|
1532
|
+
_frag.timestamp()
|
|
1533
|
+
_frag.event_type()
|
|
1534
|
+
_frag.customer_id()
|
|
1535
|
+
_frag.resource_id()
|
|
1536
|
+
_frag.event_id()
|
|
1537
|
+
_frag.feature_id()
|
|
1538
|
+
_frag.amount()
|
|
1539
|
+
_frag.credit_grant_id()
|
|
1540
|
+
_frag.credit_currency_id()
|
|
1452
1541
|
return _frag
|
|
1453
1542
|
|
|
1454
1543
|
|
|
@@ -1456,13 +1545,70 @@ def fragment_credits_balance_summary_fragment():
|
|
|
1456
1545
|
_frag = sgqlc.operation.Fragment(_schema.CreditBalanceSummary, 'CreditsBalanceSummaryFragment')
|
|
1457
1546
|
_frag.customer_id()
|
|
1458
1547
|
_frag_balances = _frag.balances()
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1548
|
+
_frag_balances.__fragment__(fragment_credit_balance_fragment())
|
|
1549
|
+
return _frag
|
|
1550
|
+
|
|
1551
|
+
|
|
1552
|
+
def fragment_credit_balance_fragment():
|
|
1553
|
+
_frag = sgqlc.operation.Fragment(_schema.CreditBalance, 'CreditBalanceFragment')
|
|
1554
|
+
_frag.customer_id()
|
|
1555
|
+
_frag_currency = _frag.currency()
|
|
1556
|
+
_frag_currency.currency_id()
|
|
1557
|
+
_frag_currency.display_name()
|
|
1558
|
+
_frag_currency.symbol()
|
|
1559
|
+
_frag_currency_units = _frag_currency.units()
|
|
1560
|
+
_frag_currency_units.singular()
|
|
1561
|
+
_frag_currency_units.plural()
|
|
1562
|
+
_frag.current_balance()
|
|
1563
|
+
_frag.total_consumed()
|
|
1564
|
+
_frag.total_granted()
|
|
1565
|
+
_frag.resource_id()
|
|
1566
|
+
_frag.valid_until()
|
|
1567
|
+
return _frag
|
|
1568
|
+
|
|
1569
|
+
|
|
1570
|
+
def fragment_payment_session_fragment():
|
|
1571
|
+
_frag = sgqlc.operation.Fragment(_schema.PaymentSession, 'PaymentSessionFragment')
|
|
1572
|
+
_frag.token()
|
|
1573
|
+
return _frag
|
|
1574
|
+
|
|
1575
|
+
|
|
1576
|
+
def fragment_slim_custom_currency_fragment():
|
|
1577
|
+
_frag = sgqlc.operation.Fragment(_schema.SlimCustomCurrency, 'SlimCustomCurrencyFragment')
|
|
1578
|
+
_frag.currency_id()
|
|
1579
|
+
_frag.display_name()
|
|
1580
|
+
_frag_units = _frag.units()
|
|
1581
|
+
_frag_units.singular()
|
|
1582
|
+
_frag_units.plural()
|
|
1583
|
+
return _frag
|
|
1584
|
+
|
|
1585
|
+
|
|
1586
|
+
def fragment_credit_usage_fragment():
|
|
1587
|
+
_frag = sgqlc.operation.Fragment(_schema.CreditUsage, 'CreditUsageFragment')
|
|
1588
|
+
_frag_series = _frag.series()
|
|
1589
|
+
_frag_series.feature_id()
|
|
1590
|
+
_frag_series.feature_name()
|
|
1591
|
+
_frag_series.total_credits()
|
|
1592
|
+
_frag_series_points = _frag_series.points()
|
|
1593
|
+
_frag_series_points.timestamp()
|
|
1594
|
+
_frag_series_points.value()
|
|
1595
|
+
_frag_currency = _frag.currency()
|
|
1596
|
+
_frag_currency.__fragment__(fragment_slim_custom_currency_fragment())
|
|
1597
|
+
return _frag
|
|
1598
|
+
|
|
1599
|
+
|
|
1600
|
+
def fragment_auto_recharge_settings_fragment():
|
|
1601
|
+
_frag = sgqlc.operation.Fragment(_schema.AutoRechargeSettingsDTO, 'AutoRechargeSettingsFragment')
|
|
1602
|
+
_frag.customer_id()
|
|
1603
|
+
_frag.currency_id()
|
|
1604
|
+
_frag.is_enabled()
|
|
1605
|
+
_frag.threshold_type()
|
|
1606
|
+
_frag.threshold_value()
|
|
1607
|
+
_frag.target_balance()
|
|
1608
|
+
_frag.max_spend_limit()
|
|
1609
|
+
_frag.grant_expiration_period()
|
|
1610
|
+
_frag.created_at()
|
|
1611
|
+
_frag.updated_at()
|
|
1466
1612
|
return _frag
|
|
1467
1613
|
|
|
1468
1614
|
|
|
@@ -1470,10 +1616,16 @@ class Fragment:
|
|
|
1470
1616
|
addon_dependency_fragment = fragment_addon_dependency_fragment()
|
|
1471
1617
|
addon_fragment = fragment_addon_fragment()
|
|
1472
1618
|
apply_subscription_fragment = fragment_apply_subscription_fragment()
|
|
1619
|
+
auto_recharge_settings_fragment = fragment_auto_recharge_settings_fragment()
|
|
1473
1620
|
checkout_configuration_fragment = fragment_checkout_configuration_fragment()
|
|
1474
1621
|
checkout_state_fragment = fragment_checkout_state_fragment()
|
|
1475
1622
|
coupon_fragment = fragment_coupon_fragment()
|
|
1623
|
+
credit_balance_fragment = fragment_credit_balance_fragment()
|
|
1624
|
+
credit_balance_updated_payload = fragment_credit_balance_updated_payload()
|
|
1476
1625
|
credit_grant_fragment = fragment_credit_grant_fragment()
|
|
1626
|
+
credit_grant_invoice_fragment = fragment_credit_grant_invoice_fragment()
|
|
1627
|
+
credit_ledger_fragment = fragment_credit_ledger_fragment()
|
|
1628
|
+
credit_usage_fragment = fragment_credit_usage_fragment()
|
|
1477
1629
|
credits_balance_summary_fragment = fragment_credits_balance_summary_fragment()
|
|
1478
1630
|
customer_fragment = fragment_customer_fragment()
|
|
1479
1631
|
customer_portal_billing_information_fragment = fragment_customer_portal_billing_information_fragment()
|
|
@@ -1505,6 +1657,7 @@ class Fragment:
|
|
|
1505
1657
|
package_entitlement_fragment = fragment_package_entitlement_fragment()
|
|
1506
1658
|
package_published_payload = fragment_package_published_payload()
|
|
1507
1659
|
page_info_fragment = fragment_page_info_fragment()
|
|
1660
|
+
payment_session_fragment = fragment_payment_session_fragment()
|
|
1508
1661
|
paywall_calculated_price_points_fragment = fragment_paywall_calculated_price_points_fragment()
|
|
1509
1662
|
paywall_configuration_fragment = fragment_paywall_configuration_fragment()
|
|
1510
1663
|
paywall_currency_fragment = fragment_paywall_currency_fragment()
|
|
@@ -1520,9 +1673,11 @@ class Fragment:
|
|
|
1520
1673
|
report_usage_fragment = fragment_report_usage_fragment()
|
|
1521
1674
|
reset_period_configuration_fragment = fragment_reset_period_configuration_fragment()
|
|
1522
1675
|
schedule_variables_fragment = fragment_schedule_variables_fragment()
|
|
1676
|
+
slim_custom_currency_fragment = fragment_slim_custom_currency_fragment()
|
|
1523
1677
|
slim_customer_fragment = fragment_slim_customer_fragment()
|
|
1524
1678
|
slim_subscription_fragment = fragment_slim_subscription_fragment()
|
|
1525
1679
|
slim_subscription_fragment_v2 = fragment_slim_subscription_fragment_v2()
|
|
1680
|
+
stripe_checkout_credentials_fragment = fragment_stripe_checkout_credentials_fragment()
|
|
1526
1681
|
subscription_fragment = fragment_subscription_fragment()
|
|
1527
1682
|
subscription_future_update_data = fragment_subscription_future_update_data()
|
|
1528
1683
|
subscription_invoice_fragment = fragment_subscription_invoice_fragment()
|
|
@@ -1538,6 +1693,7 @@ class Fragment:
|
|
|
1538
1693
|
usage_history_fragment = fragment_usage_history_fragment()
|
|
1539
1694
|
usage_history_v2_fragment = fragment_usage_history_v2_fragment()
|
|
1540
1695
|
usage_updated_fragment = fragment_usage_updated_fragment()
|
|
1696
|
+
zuora_checkout_credentials_fragment = fragment_zuora_checkout_credentials_fragment()
|
|
1541
1697
|
|
|
1542
1698
|
|
|
1543
1699
|
def mutation_provision_customer():
|
|
@@ -1738,11 +1894,62 @@ def mutation_grant_credits():
|
|
|
1738
1894
|
return _op
|
|
1739
1895
|
|
|
1740
1896
|
|
|
1897
|
+
def mutation_grant_promotional_entitlements_group():
|
|
1898
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='GrantPromotionalEntitlementsGroup', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.GrantPromotionalEntitlementsGroupInput))))
|
|
1899
|
+
_op_grant_promotional_entitlements_group = _op.grant_promotional_entitlements_group(input=sgqlc.types.Variable('input'))
|
|
1900
|
+
_op_grant_promotional_entitlements_group.__fragment__(fragment_promotional_entitlement_fragment())
|
|
1901
|
+
return _op
|
|
1902
|
+
|
|
1903
|
+
|
|
1904
|
+
def mutation_revoke_promotional_entitlements_group():
|
|
1905
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='RevokePromotionalEntitlementsGroup', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.RevokePromotionalEntitlementsGroupInput))))
|
|
1906
|
+
_op_revoke_promotional_entitlements_group = _op.revoke_promotional_entitlements_group(input=sgqlc.types.Variable('input'))
|
|
1907
|
+
_op_revoke_promotional_entitlements_group.__fragment__(fragment_promotional_entitlement_fragment())
|
|
1908
|
+
return _op
|
|
1909
|
+
|
|
1910
|
+
|
|
1911
|
+
def mutation_unlink_promotional_entitlements_group():
|
|
1912
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='UnlinkPromotionalEntitlementsGroup', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.UnlinkPromotionalEntitlementsGroupInput))))
|
|
1913
|
+
_op_unlink_promotional_entitlements_group = _op.unlink_promotional_entitlements_group(input=sgqlc.types.Variable('input'))
|
|
1914
|
+
_op_unlink_promotional_entitlements_group.__fragment__(fragment_promotional_entitlement_fragment())
|
|
1915
|
+
return _op
|
|
1916
|
+
|
|
1917
|
+
|
|
1918
|
+
def mutation_create_payment_session():
|
|
1919
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='CreatePaymentSession', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.PaymentSessionInput))))
|
|
1920
|
+
_op_create_payment_session = _op.create_payment_session(input=sgqlc.types.Variable('input'))
|
|
1921
|
+
_op_create_payment_session.__fragment__(fragment_payment_session_fragment())
|
|
1922
|
+
return _op
|
|
1923
|
+
|
|
1924
|
+
|
|
1925
|
+
def mutation_void_credit_grant():
|
|
1926
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='VoidCreditGrant', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.VoidCreditGrantInput))))
|
|
1927
|
+
_op_void_credit_grant = _op.void_credit_grant(input=sgqlc.types.Variable('input'))
|
|
1928
|
+
_op_void_credit_grant.__fragment__(fragment_credit_grant_fragment())
|
|
1929
|
+
return _op
|
|
1930
|
+
|
|
1931
|
+
|
|
1932
|
+
def mutation_create_coupon():
|
|
1933
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='CreateCoupon', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.CreateCouponInput))))
|
|
1934
|
+
_op_create_one_coupon = _op.create_one_coupon(input=sgqlc.types.Variable('input'))
|
|
1935
|
+
_op_create_one_coupon.__fragment__(fragment_coupon_fragment())
|
|
1936
|
+
return _op
|
|
1937
|
+
|
|
1938
|
+
|
|
1939
|
+
def mutation_save_automatic_recharge_configuration():
|
|
1940
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='SaveAutomaticRechargeConfiguration', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.SaveAutoRechargeSettingsInput))))
|
|
1941
|
+
_op_save_auto_recharge_settings = _op.save_auto_recharge_settings(input=sgqlc.types.Variable('input'))
|
|
1942
|
+
_op_save_auto_recharge_settings.__fragment__(fragment_auto_recharge_settings_fragment())
|
|
1943
|
+
return _op
|
|
1944
|
+
|
|
1945
|
+
|
|
1741
1946
|
class Mutation:
|
|
1742
1947
|
apply_subscription = mutation_apply_subscription()
|
|
1743
1948
|
archive_customer = mutation_archive_customer()
|
|
1744
1949
|
cancel_subscription = mutation_cancel_subscription()
|
|
1745
1950
|
cancel_subscription_updates = mutation_cancel_subscription_updates()
|
|
1951
|
+
create_coupon = mutation_create_coupon()
|
|
1952
|
+
create_payment_session = mutation_create_payment_session()
|
|
1746
1953
|
create_subscription = mutation_create_subscription()
|
|
1747
1954
|
delegate_subscription_to_customer = mutation_delegate_subscription_to_customer()
|
|
1748
1955
|
detach_customer_payment_method = mutation_detach_customer_payment_method()
|
|
@@ -1750,6 +1957,7 @@ class Mutation:
|
|
|
1750
1957
|
estimate_subscription_update = mutation_estimate_subscription_update()
|
|
1751
1958
|
grant_credits = mutation_grant_credits()
|
|
1752
1959
|
grant_promotional_entitlements = mutation_grant_promotional_entitlements()
|
|
1960
|
+
grant_promotional_entitlements_group = mutation_grant_promotional_entitlements_group()
|
|
1753
1961
|
import_customer = mutation_import_customer()
|
|
1754
1962
|
import_customer_bulk = mutation_import_customer_bulk()
|
|
1755
1963
|
import_subscriptions_bulk = mutation_import_subscriptions_bulk()
|
|
@@ -1763,11 +1971,15 @@ class Mutation:
|
|
|
1763
1971
|
report_usage = mutation_report_usage()
|
|
1764
1972
|
report_usage_bulk = mutation_report_usage_bulk()
|
|
1765
1973
|
revoke_promotional_entitlement = mutation_revoke_promotional_entitlement()
|
|
1974
|
+
revoke_promotional_entitlements_group = mutation_revoke_promotional_entitlements_group()
|
|
1975
|
+
save_automatic_recharge_configuration = mutation_save_automatic_recharge_configuration()
|
|
1766
1976
|
transfer_subscription = mutation_transfer_subscription()
|
|
1767
1977
|
transfer_subscription_to_resource = mutation_transfer_subscription_to_resource()
|
|
1768
1978
|
unarchive_customer = mutation_unarchive_customer()
|
|
1979
|
+
unlink_promotional_entitlements_group = mutation_unlink_promotional_entitlements_group()
|
|
1769
1980
|
update_customer = mutation_update_customer()
|
|
1770
1981
|
update_subscription = mutation_update_subscription()
|
|
1982
|
+
void_credit_grant = mutation_void_credit_grant()
|
|
1771
1983
|
|
|
1772
1984
|
|
|
1773
1985
|
def query_get_customer_by_id():
|
|
@@ -1818,7 +2030,7 @@ def query_get_subscription():
|
|
|
1818
2030
|
|
|
1819
2031
|
def query_get_coupons():
|
|
1820
2032
|
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetCoupons')
|
|
1821
|
-
_op_coupons = _op.coupons(filter={'status': {'eq': 'ACTIVE'}}, paging={'first':
|
|
2033
|
+
_op_coupons = _op.coupons(filter={'status': {'eq': 'ACTIVE'}}, paging={'first': 25})
|
|
1822
2034
|
_op_coupons_edges = _op_coupons.edges()
|
|
1823
2035
|
_op_coupons_edges_node = _op_coupons_edges.node()
|
|
1824
2036
|
_op_coupons_edges_node.__fragment__(fragment_coupon_fragment())
|
|
@@ -1839,6 +2051,16 @@ def query_get_entitlements():
|
|
|
1839
2051
|
return _op
|
|
1840
2052
|
|
|
1841
2053
|
|
|
2054
|
+
def query_get_entitlements_state():
|
|
2055
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetEntitlementsState', variables=dict(query=sgqlc.types.Arg(sgqlc.types.non_null(_schema.FetchEntitlementsQuery))))
|
|
2056
|
+
_op_entitlements_state = _op.entitlements_state(query=sgqlc.types.Variable('query'))
|
|
2057
|
+
_op_entitlements_state.__typename__()
|
|
2058
|
+
_op_entitlements_state_entitlements = _op_entitlements_state.entitlements()
|
|
2059
|
+
_op_entitlements_state_entitlements.__fragment__(fragment_entitlement_fragment())
|
|
2060
|
+
_op_entitlements_state.access_denied_reason()
|
|
2061
|
+
return _op
|
|
2062
|
+
|
|
2063
|
+
|
|
1842
2064
|
def query_get_entitlement():
|
|
1843
2065
|
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetEntitlement', variables=dict(query=sgqlc.types.Arg(sgqlc.types.non_null(_schema.FetchEntitlementQuery))))
|
|
1844
2066
|
_op_entitlement = _op.entitlement(query=sgqlc.types.Variable('query'))
|
|
@@ -1860,6 +2082,7 @@ def query_get_sdk_configuration():
|
|
|
1860
2082
|
_op_sdk_configuration = _op.sdk_configuration()
|
|
1861
2083
|
_op_sdk_configuration.sentry_dsn()
|
|
1862
2084
|
_op_sdk_configuration.is_widget_watermark_enabled()
|
|
2085
|
+
_op_sdk_configuration.show_watermark()
|
|
1863
2086
|
return _op
|
|
1864
2087
|
|
|
1865
2088
|
|
|
@@ -1911,22 +2134,58 @@ def query_get_credit_balance():
|
|
|
1911
2134
|
def query_get_credit_grants():
|
|
1912
2135
|
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetCreditGrants', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.GetCreditGrantsInput))))
|
|
1913
2136
|
_op_credit_grants = _op.credit_grants(input=sgqlc.types.Variable('input'))
|
|
1914
|
-
_op_credit_grants.
|
|
2137
|
+
_op_credit_grants_page_info = _op_credit_grants.page_info()
|
|
2138
|
+
_op_credit_grants_page_info.__fragment__(fragment_page_info_fragment())
|
|
2139
|
+
_op_credit_grants_edges = _op_credit_grants.edges()
|
|
2140
|
+
_op_credit_grants_edges_node = _op_credit_grants_edges.node()
|
|
2141
|
+
_op_credit_grants_edges_node.__fragment__(fragment_credit_grant_fragment())
|
|
2142
|
+
_op_credit_grants.total_count()
|
|
2143
|
+
return _op
|
|
2144
|
+
|
|
2145
|
+
|
|
2146
|
+
def query_get_credit_ledger():
|
|
2147
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetCreditLedger', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.CreditLedgerInput))))
|
|
2148
|
+
_op_credits_ledger = _op.credits_ledger(input=sgqlc.types.Variable('input'))
|
|
2149
|
+
_op_credits_ledger_page_info = _op_credits_ledger.page_info()
|
|
2150
|
+
_op_credits_ledger_page_info.__fragment__(fragment_page_info_fragment())
|
|
2151
|
+
_op_credits_ledger_edges = _op_credits_ledger.edges()
|
|
2152
|
+
_op_credits_ledger_edges_node = _op_credits_ledger_edges.node()
|
|
2153
|
+
_op_credits_ledger_edges_node.__fragment__(fragment_credit_ledger_fragment())
|
|
2154
|
+
_op_credits_ledger_edges.cursor()
|
|
2155
|
+
_op_credits_ledger.total_count()
|
|
2156
|
+
return _op
|
|
2157
|
+
|
|
2158
|
+
|
|
2159
|
+
def query_get_credit_usage():
|
|
2160
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetCreditUsage', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.CreditUsageInput))))
|
|
2161
|
+
_op_credit_usage = _op.credit_usage(input=sgqlc.types.Variable('input'))
|
|
2162
|
+
_op_credit_usage.__fragment__(fragment_credit_usage_fragment())
|
|
2163
|
+
return _op
|
|
2164
|
+
|
|
2165
|
+
|
|
2166
|
+
def query_get_automatic_recharge_configuration():
|
|
2167
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetAutomaticRechargeConfiguration', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.GetAutoRechargeSettingsInput))))
|
|
2168
|
+
_op_get_auto_recharge_settings = _op.get_auto_recharge_settings(input=sgqlc.types.Variable('input'))
|
|
2169
|
+
_op_get_auto_recharge_settings.__fragment__(fragment_auto_recharge_settings_fragment())
|
|
1915
2170
|
return _op
|
|
1916
2171
|
|
|
1917
2172
|
|
|
1918
2173
|
class Query:
|
|
1919
2174
|
get_active_subscriptions = query_get_active_subscriptions()
|
|
1920
2175
|
get_active_subscriptions_list = query_get_active_subscriptions_list()
|
|
2176
|
+
get_automatic_recharge_configuration = query_get_automatic_recharge_configuration()
|
|
1921
2177
|
get_checkout_state = query_get_checkout_state()
|
|
1922
2178
|
get_coupons = query_get_coupons()
|
|
1923
2179
|
get_credit_balance = query_get_credit_balance()
|
|
1924
2180
|
get_credit_grants = query_get_credit_grants()
|
|
2181
|
+
get_credit_ledger = query_get_credit_ledger()
|
|
2182
|
+
get_credit_usage = query_get_credit_usage()
|
|
1925
2183
|
get_customer_by_id = query_get_customer_by_id()
|
|
1926
2184
|
get_customer_portal_by_ref_id = query_get_customer_portal_by_ref_id()
|
|
1927
2185
|
get_customer_statistics = query_get_customer_statistics()
|
|
1928
2186
|
get_entitlement = query_get_entitlement()
|
|
1929
2187
|
get_entitlements = query_get_entitlements()
|
|
2188
|
+
get_entitlements_state = query_get_entitlements_state()
|
|
1930
2189
|
get_mock_paywall = query_get_mock_paywall()
|
|
1931
2190
|
get_paywall = query_get_paywall()
|
|
1932
2191
|
get_products = query_get_products()
|
|
@@ -1958,7 +2217,15 @@ def subscription_on_package_published():
|
|
|
1958
2217
|
return _op
|
|
1959
2218
|
|
|
1960
2219
|
|
|
2220
|
+
def subscription_on_credit_balance_updated():
|
|
2221
|
+
_op = sgqlc.operation.Operation(_schema_root.subscription_type, name='OnCreditBalanceUpdated')
|
|
2222
|
+
_op_credit_balance_updated = _op.credit_balance_updated()
|
|
2223
|
+
_op_credit_balance_updated.__fragment__(fragment_credit_balance_updated_payload())
|
|
2224
|
+
return _op
|
|
2225
|
+
|
|
2226
|
+
|
|
1961
2227
|
class Subscription:
|
|
2228
|
+
on_credit_balance_updated = subscription_on_credit_balance_updated()
|
|
1962
2229
|
on_entitlements_updated = subscription_on_entitlements_updated()
|
|
1963
2230
|
on_package_published = subscription_on_package_published()
|
|
1964
2231
|
on_usage_updated = subscription_on_usage_updated()
|