stigg-api-client 3.13.0__py3-none-any.whl → 5.99.0__py3-none-any.whl
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/client.py +10 -3
- stigg/generated/operations.py +347 -1
- stigg/generated/schema.py +1413 -155
- {stigg_api_client-3.13.0.dist-info → stigg_api_client-5.99.0.dist-info}/METADATA +3 -1
- stigg_api_client-5.99.0.dist-info/RECORD +9 -0
- stigg_api_client-3.13.0.dist-info/RECORD +0 -9
- {stigg_api_client-3.13.0.dist-info → stigg_api_client-5.99.0.dist-info}/LICENSE +0 -0
- {stigg_api_client-3.13.0.dist-info → stigg_api_client-5.99.0.dist-info}/WHEEL +0 -0
stigg/client.py
CHANGED
|
@@ -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:
|
stigg/generated/operations.py
CHANGED
|
@@ -56,6 +56,10 @@ def fragment_price_fragment():
|
|
|
56
56
|
_frag_price = _frag.price()
|
|
57
57
|
_frag_price.amount()
|
|
58
58
|
_frag_price.currency()
|
|
59
|
+
_frag_credit_rate = _frag.credit_rate()
|
|
60
|
+
_frag_credit_rate.amount()
|
|
61
|
+
_frag_credit_rate.custom_currency_id()
|
|
62
|
+
_frag_credit_rate.currency_id()
|
|
59
63
|
_frag.tiers_mode()
|
|
60
64
|
_frag_tiers = _frag.tiers()
|
|
61
65
|
_frag_tiers.__fragment__(fragment_price_tier_fragment())
|
|
@@ -112,6 +116,7 @@ def fragment_package_entitlement_fragment():
|
|
|
112
116
|
_frag.is_custom()
|
|
113
117
|
_frag.display_name_override()
|
|
114
118
|
_frag.enum_values()
|
|
119
|
+
_frag.is_granted()
|
|
115
120
|
_frag_feature = _frag.feature()
|
|
116
121
|
_frag_feature.feature_type()
|
|
117
122
|
_frag_feature.meter_type()
|
|
@@ -189,6 +194,7 @@ def fragment_plan_fragment():
|
|
|
189
194
|
_frag_default_trial_config_budget = _frag_default_trial_config.budget()
|
|
190
195
|
_frag_default_trial_config_budget.limit()
|
|
191
196
|
_frag_default_trial_config.trial_end_behavior()
|
|
197
|
+
_frag.aws_marketplace_plan_dimension()
|
|
192
198
|
return _frag
|
|
193
199
|
|
|
194
200
|
|
|
@@ -349,6 +355,7 @@ def fragment_subscription_invoice_fragment():
|
|
|
349
355
|
_frag.billing_id()
|
|
350
356
|
_frag.status()
|
|
351
357
|
_frag.created_at()
|
|
358
|
+
_frag.due_date()
|
|
352
359
|
_frag.updated_at()
|
|
353
360
|
_frag.error_message()
|
|
354
361
|
_frag.requires_action()
|
|
@@ -827,6 +834,10 @@ def fragment_entitlement_fragment():
|
|
|
827
834
|
_frag_reset_period_configuration.__fragment__(fragment_reset_period_configuration_fragment())
|
|
828
835
|
_frag_feature = _frag.feature()
|
|
829
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()
|
|
830
841
|
return _frag
|
|
831
842
|
|
|
832
843
|
|
|
@@ -889,6 +900,7 @@ def fragment_product_fragment():
|
|
|
889
900
|
_frag.display_name()
|
|
890
901
|
_frag.description()
|
|
891
902
|
_frag.additional_meta_data()
|
|
903
|
+
_frag.aws_marketplace_product_id()
|
|
892
904
|
_frag_product_settings = _frag.product_settings()
|
|
893
905
|
_frag_product_settings_downgrade_plan = _frag_product_settings.downgrade_plan()
|
|
894
906
|
_frag_product_settings_downgrade_plan.ref_id()
|
|
@@ -925,6 +937,25 @@ def fragment_package_published_payload():
|
|
|
925
937
|
return _frag
|
|
926
938
|
|
|
927
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
|
+
|
|
928
959
|
def fragment_customer_portal_fragment():
|
|
929
960
|
_frag = sgqlc.operation.Fragment(_schema.CustomerPortal, 'CustomerPortalFragment')
|
|
930
961
|
_frag_subscriptions = _frag.subscriptions()
|
|
@@ -945,6 +976,20 @@ def fragment_customer_portal_fragment():
|
|
|
945
976
|
return _frag
|
|
946
977
|
|
|
947
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
|
+
|
|
948
993
|
def fragment_checkout_state_fragment():
|
|
949
994
|
_frag = sgqlc.operation.Fragment(_schema.CheckoutState, 'CheckoutStateFragment')
|
|
950
995
|
_frag_configuration = _frag.configuration()
|
|
@@ -960,6 +1005,11 @@ def fragment_checkout_state_fragment():
|
|
|
960
1005
|
_frag_plan.__fragment__(fragment_plan_fragment())
|
|
961
1006
|
_frag_billing_integration = _frag.billing_integration()
|
|
962
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())
|
|
963
1013
|
_frag_billing_integration_credentials = _frag_billing_integration.credentials()
|
|
964
1014
|
_frag_billing_integration_credentials.account_id()
|
|
965
1015
|
_frag_billing_integration_credentials.public_key()
|
|
@@ -1009,6 +1059,9 @@ def fragment_customer_portal_subscription_price_fragment():
|
|
|
1009
1059
|
_frag_price = _frag.price()
|
|
1010
1060
|
_frag_price.amount()
|
|
1011
1061
|
_frag_price.currency()
|
|
1062
|
+
_frag_credit_rate = _frag.credit_rate()
|
|
1063
|
+
_frag_credit_rate.amount()
|
|
1064
|
+
_frag_credit_rate.currency_id()
|
|
1012
1065
|
_frag_feature = _frag.feature()
|
|
1013
1066
|
_frag_feature.id()
|
|
1014
1067
|
_frag_feature.ref_id()
|
|
@@ -1035,6 +1088,9 @@ def fragment_customer_portal_subscription_fragment():
|
|
|
1035
1088
|
_frag_pricing_price = _frag_pricing.price()
|
|
1036
1089
|
_frag_pricing_price.amount()
|
|
1037
1090
|
_frag_pricing_price.currency()
|
|
1091
|
+
_frag_pricing_credit_rate = _frag_pricing.credit_rate()
|
|
1092
|
+
_frag_pricing_credit_rate.amount()
|
|
1093
|
+
_frag_pricing_credit_rate.currency_id()
|
|
1038
1094
|
_frag_pricing_feature = _frag_pricing.feature()
|
|
1039
1095
|
_frag_pricing_feature.feature_units()
|
|
1040
1096
|
_frag_pricing_feature.feature_units_plural()
|
|
@@ -1171,6 +1227,7 @@ def fragment_mock_paywall_package_entitlement_fragment():
|
|
|
1171
1227
|
_frag.hidden_from_widgets()
|
|
1172
1228
|
_frag.display_name_override()
|
|
1173
1229
|
_frag.enum_values()
|
|
1230
|
+
_frag.is_granted()
|
|
1174
1231
|
_frag_feature = _frag.feature()
|
|
1175
1232
|
_frag_feature.feature_type()
|
|
1176
1233
|
_frag_feature.meter_type()
|
|
@@ -1194,6 +1251,9 @@ def fragment_mock_paywall_price_fragment():
|
|
|
1194
1251
|
_frag_price = _frag.price()
|
|
1195
1252
|
_frag_price.amount()
|
|
1196
1253
|
_frag_price.currency()
|
|
1254
|
+
_frag_credit_rate = _frag.credit_rate()
|
|
1255
|
+
_frag_credit_rate.amount()
|
|
1256
|
+
_frag_credit_rate.currency_id()
|
|
1197
1257
|
_frag.tiers_mode()
|
|
1198
1258
|
_frag_tiers = _frag.tiers()
|
|
1199
1259
|
_frag_tiers.__fragment__(fragment_price_tier_fragment())
|
|
@@ -1414,13 +1474,160 @@ def fragment_schedule_variables_fragment():
|
|
|
1414
1474
|
return _frag
|
|
1415
1475
|
|
|
1416
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
|
+
|
|
1501
|
+
def fragment_credit_grant_fragment():
|
|
1502
|
+
_frag = sgqlc.operation.Fragment(_schema.CreditGrant, 'CreditGrantFragment')
|
|
1503
|
+
_frag.grant_id()
|
|
1504
|
+
_frag.amount()
|
|
1505
|
+
_frag.comment()
|
|
1506
|
+
_frag.currency_id()
|
|
1507
|
+
_frag.customer_id()
|
|
1508
|
+
_frag.display_name()
|
|
1509
|
+
_frag.effective_at()
|
|
1510
|
+
_frag.expire_at()
|
|
1511
|
+
_frag.grant_type()
|
|
1512
|
+
_frag.priority()
|
|
1513
|
+
_frag.consumed_amount()
|
|
1514
|
+
_frag_cost = _frag.cost()
|
|
1515
|
+
_frag_cost.amount()
|
|
1516
|
+
_frag_cost.currency()
|
|
1517
|
+
_frag.created_at()
|
|
1518
|
+
_frag.updated_at()
|
|
1519
|
+
_frag.resource_id()
|
|
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()
|
|
1541
|
+
return _frag
|
|
1542
|
+
|
|
1543
|
+
|
|
1544
|
+
def fragment_credits_balance_summary_fragment():
|
|
1545
|
+
_frag = sgqlc.operation.Fragment(_schema.CreditBalanceSummary, 'CreditsBalanceSummaryFragment')
|
|
1546
|
+
_frag.customer_id()
|
|
1547
|
+
_frag_balances = _frag.balances()
|
|
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.current_monthly_spend()
|
|
1611
|
+
_frag.created_at()
|
|
1612
|
+
_frag.updated_at()
|
|
1613
|
+
return _frag
|
|
1614
|
+
|
|
1615
|
+
|
|
1417
1616
|
class Fragment:
|
|
1418
1617
|
addon_dependency_fragment = fragment_addon_dependency_fragment()
|
|
1419
1618
|
addon_fragment = fragment_addon_fragment()
|
|
1420
1619
|
apply_subscription_fragment = fragment_apply_subscription_fragment()
|
|
1620
|
+
auto_recharge_settings_fragment = fragment_auto_recharge_settings_fragment()
|
|
1421
1621
|
checkout_configuration_fragment = fragment_checkout_configuration_fragment()
|
|
1422
1622
|
checkout_state_fragment = fragment_checkout_state_fragment()
|
|
1423
1623
|
coupon_fragment = fragment_coupon_fragment()
|
|
1624
|
+
credit_balance_fragment = fragment_credit_balance_fragment()
|
|
1625
|
+
credit_balance_updated_payload = fragment_credit_balance_updated_payload()
|
|
1626
|
+
credit_grant_fragment = fragment_credit_grant_fragment()
|
|
1627
|
+
credit_grant_invoice_fragment = fragment_credit_grant_invoice_fragment()
|
|
1628
|
+
credit_ledger_fragment = fragment_credit_ledger_fragment()
|
|
1629
|
+
credit_usage_fragment = fragment_credit_usage_fragment()
|
|
1630
|
+
credits_balance_summary_fragment = fragment_credits_balance_summary_fragment()
|
|
1424
1631
|
customer_fragment = fragment_customer_fragment()
|
|
1425
1632
|
customer_portal_billing_information_fragment = fragment_customer_portal_billing_information_fragment()
|
|
1426
1633
|
customer_portal_configuration_fragment = fragment_customer_portal_configuration_fragment()
|
|
@@ -1451,6 +1658,7 @@ class Fragment:
|
|
|
1451
1658
|
package_entitlement_fragment = fragment_package_entitlement_fragment()
|
|
1452
1659
|
package_published_payload = fragment_package_published_payload()
|
|
1453
1660
|
page_info_fragment = fragment_page_info_fragment()
|
|
1661
|
+
payment_session_fragment = fragment_payment_session_fragment()
|
|
1454
1662
|
paywall_calculated_price_points_fragment = fragment_paywall_calculated_price_points_fragment()
|
|
1455
1663
|
paywall_configuration_fragment = fragment_paywall_configuration_fragment()
|
|
1456
1664
|
paywall_currency_fragment = fragment_paywall_currency_fragment()
|
|
@@ -1466,9 +1674,11 @@ class Fragment:
|
|
|
1466
1674
|
report_usage_fragment = fragment_report_usage_fragment()
|
|
1467
1675
|
reset_period_configuration_fragment = fragment_reset_period_configuration_fragment()
|
|
1468
1676
|
schedule_variables_fragment = fragment_schedule_variables_fragment()
|
|
1677
|
+
slim_custom_currency_fragment = fragment_slim_custom_currency_fragment()
|
|
1469
1678
|
slim_customer_fragment = fragment_slim_customer_fragment()
|
|
1470
1679
|
slim_subscription_fragment = fragment_slim_subscription_fragment()
|
|
1471
1680
|
slim_subscription_fragment_v2 = fragment_slim_subscription_fragment_v2()
|
|
1681
|
+
stripe_checkout_credentials_fragment = fragment_stripe_checkout_credentials_fragment()
|
|
1472
1682
|
subscription_fragment = fragment_subscription_fragment()
|
|
1473
1683
|
subscription_future_update_data = fragment_subscription_future_update_data()
|
|
1474
1684
|
subscription_invoice_fragment = fragment_subscription_invoice_fragment()
|
|
@@ -1484,6 +1694,7 @@ class Fragment:
|
|
|
1484
1694
|
usage_history_fragment = fragment_usage_history_fragment()
|
|
1485
1695
|
usage_history_v2_fragment = fragment_usage_history_v2_fragment()
|
|
1486
1696
|
usage_updated_fragment = fragment_usage_updated_fragment()
|
|
1697
|
+
zuora_checkout_credentials_fragment = fragment_zuora_checkout_credentials_fragment()
|
|
1487
1698
|
|
|
1488
1699
|
|
|
1489
1700
|
def mutation_provision_customer():
|
|
@@ -1677,17 +1888,77 @@ def mutation_transfer_subscription_to_resource():
|
|
|
1677
1888
|
return _op
|
|
1678
1889
|
|
|
1679
1890
|
|
|
1891
|
+
def mutation_grant_credits():
|
|
1892
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='GrantCredits', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.CreditGrantInput))))
|
|
1893
|
+
_op_create_credit_grant = _op.create_credit_grant(input=sgqlc.types.Variable('input'))
|
|
1894
|
+
_op_create_credit_grant.__fragment__(fragment_credit_grant_fragment())
|
|
1895
|
+
return _op
|
|
1896
|
+
|
|
1897
|
+
|
|
1898
|
+
def mutation_grant_promotional_entitlements_group():
|
|
1899
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='GrantPromotionalEntitlementsGroup', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.GrantPromotionalEntitlementsGroupInput))))
|
|
1900
|
+
_op_grant_promotional_entitlements_group = _op.grant_promotional_entitlements_group(input=sgqlc.types.Variable('input'))
|
|
1901
|
+
_op_grant_promotional_entitlements_group.__fragment__(fragment_promotional_entitlement_fragment())
|
|
1902
|
+
return _op
|
|
1903
|
+
|
|
1904
|
+
|
|
1905
|
+
def mutation_revoke_promotional_entitlements_group():
|
|
1906
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='RevokePromotionalEntitlementsGroup', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.RevokePromotionalEntitlementsGroupInput))))
|
|
1907
|
+
_op_revoke_promotional_entitlements_group = _op.revoke_promotional_entitlements_group(input=sgqlc.types.Variable('input'))
|
|
1908
|
+
_op_revoke_promotional_entitlements_group.__fragment__(fragment_promotional_entitlement_fragment())
|
|
1909
|
+
return _op
|
|
1910
|
+
|
|
1911
|
+
|
|
1912
|
+
def mutation_unlink_promotional_entitlements_group():
|
|
1913
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='UnlinkPromotionalEntitlementsGroup', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.UnlinkPromotionalEntitlementsGroupInput))))
|
|
1914
|
+
_op_unlink_promotional_entitlements_group = _op.unlink_promotional_entitlements_group(input=sgqlc.types.Variable('input'))
|
|
1915
|
+
_op_unlink_promotional_entitlements_group.__fragment__(fragment_promotional_entitlement_fragment())
|
|
1916
|
+
return _op
|
|
1917
|
+
|
|
1918
|
+
|
|
1919
|
+
def mutation_create_payment_session():
|
|
1920
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='CreatePaymentSession', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.PaymentSessionInput))))
|
|
1921
|
+
_op_create_payment_session = _op.create_payment_session(input=sgqlc.types.Variable('input'))
|
|
1922
|
+
_op_create_payment_session.__fragment__(fragment_payment_session_fragment())
|
|
1923
|
+
return _op
|
|
1924
|
+
|
|
1925
|
+
|
|
1926
|
+
def mutation_void_credit_grant():
|
|
1927
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='VoidCreditGrant', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.VoidCreditGrantInput))))
|
|
1928
|
+
_op_void_credit_grant = _op.void_credit_grant(input=sgqlc.types.Variable('input'))
|
|
1929
|
+
_op_void_credit_grant.__fragment__(fragment_credit_grant_fragment())
|
|
1930
|
+
return _op
|
|
1931
|
+
|
|
1932
|
+
|
|
1933
|
+
def mutation_create_coupon():
|
|
1934
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='CreateCoupon', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.CreateCouponInput))))
|
|
1935
|
+
_op_create_one_coupon = _op.create_one_coupon(input=sgqlc.types.Variable('input'))
|
|
1936
|
+
_op_create_one_coupon.__fragment__(fragment_coupon_fragment())
|
|
1937
|
+
return _op
|
|
1938
|
+
|
|
1939
|
+
|
|
1940
|
+
def mutation_save_automatic_recharge_configuration():
|
|
1941
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='SaveAutomaticRechargeConfiguration', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.SaveAutoRechargeSettingsInput))))
|
|
1942
|
+
_op_save_auto_recharge_settings = _op.save_auto_recharge_settings(input=sgqlc.types.Variable('input'))
|
|
1943
|
+
_op_save_auto_recharge_settings.__fragment__(fragment_auto_recharge_settings_fragment())
|
|
1944
|
+
return _op
|
|
1945
|
+
|
|
1946
|
+
|
|
1680
1947
|
class Mutation:
|
|
1681
1948
|
apply_subscription = mutation_apply_subscription()
|
|
1682
1949
|
archive_customer = mutation_archive_customer()
|
|
1683
1950
|
cancel_subscription = mutation_cancel_subscription()
|
|
1684
1951
|
cancel_subscription_updates = mutation_cancel_subscription_updates()
|
|
1952
|
+
create_coupon = mutation_create_coupon()
|
|
1953
|
+
create_payment_session = mutation_create_payment_session()
|
|
1685
1954
|
create_subscription = mutation_create_subscription()
|
|
1686
1955
|
delegate_subscription_to_customer = mutation_delegate_subscription_to_customer()
|
|
1687
1956
|
detach_customer_payment_method = mutation_detach_customer_payment_method()
|
|
1688
1957
|
estimate_subscription = mutation_estimate_subscription()
|
|
1689
1958
|
estimate_subscription_update = mutation_estimate_subscription_update()
|
|
1959
|
+
grant_credits = mutation_grant_credits()
|
|
1690
1960
|
grant_promotional_entitlements = mutation_grant_promotional_entitlements()
|
|
1961
|
+
grant_promotional_entitlements_group = mutation_grant_promotional_entitlements_group()
|
|
1691
1962
|
import_customer = mutation_import_customer()
|
|
1692
1963
|
import_customer_bulk = mutation_import_customer_bulk()
|
|
1693
1964
|
import_subscriptions_bulk = mutation_import_subscriptions_bulk()
|
|
@@ -1701,11 +1972,15 @@ class Mutation:
|
|
|
1701
1972
|
report_usage = mutation_report_usage()
|
|
1702
1973
|
report_usage_bulk = mutation_report_usage_bulk()
|
|
1703
1974
|
revoke_promotional_entitlement = mutation_revoke_promotional_entitlement()
|
|
1975
|
+
revoke_promotional_entitlements_group = mutation_revoke_promotional_entitlements_group()
|
|
1976
|
+
save_automatic_recharge_configuration = mutation_save_automatic_recharge_configuration()
|
|
1704
1977
|
transfer_subscription = mutation_transfer_subscription()
|
|
1705
1978
|
transfer_subscription_to_resource = mutation_transfer_subscription_to_resource()
|
|
1706
1979
|
unarchive_customer = mutation_unarchive_customer()
|
|
1980
|
+
unlink_promotional_entitlements_group = mutation_unlink_promotional_entitlements_group()
|
|
1707
1981
|
update_customer = mutation_update_customer()
|
|
1708
1982
|
update_subscription = mutation_update_subscription()
|
|
1983
|
+
void_credit_grant = mutation_void_credit_grant()
|
|
1709
1984
|
|
|
1710
1985
|
|
|
1711
1986
|
def query_get_customer_by_id():
|
|
@@ -1756,7 +2031,7 @@ def query_get_subscription():
|
|
|
1756
2031
|
|
|
1757
2032
|
def query_get_coupons():
|
|
1758
2033
|
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetCoupons')
|
|
1759
|
-
_op_coupons = _op.coupons(filter={'status': {'eq': 'ACTIVE'}}, paging={'first':
|
|
2034
|
+
_op_coupons = _op.coupons(filter={'status': {'eq': 'ACTIVE'}}, paging={'first': 25})
|
|
1760
2035
|
_op_coupons_edges = _op_coupons.edges()
|
|
1761
2036
|
_op_coupons_edges_node = _op_coupons_edges.node()
|
|
1762
2037
|
_op_coupons_edges_node.__fragment__(fragment_coupon_fragment())
|
|
@@ -1777,6 +2052,16 @@ def query_get_entitlements():
|
|
|
1777
2052
|
return _op
|
|
1778
2053
|
|
|
1779
2054
|
|
|
2055
|
+
def query_get_entitlements_state():
|
|
2056
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetEntitlementsState', variables=dict(query=sgqlc.types.Arg(sgqlc.types.non_null(_schema.FetchEntitlementsQuery))))
|
|
2057
|
+
_op_entitlements_state = _op.entitlements_state(query=sgqlc.types.Variable('query'))
|
|
2058
|
+
_op_entitlements_state.__typename__()
|
|
2059
|
+
_op_entitlements_state_entitlements = _op_entitlements_state.entitlements()
|
|
2060
|
+
_op_entitlements_state_entitlements.__fragment__(fragment_entitlement_fragment())
|
|
2061
|
+
_op_entitlements_state.access_denied_reason()
|
|
2062
|
+
return _op
|
|
2063
|
+
|
|
2064
|
+
|
|
1780
2065
|
def query_get_entitlement():
|
|
1781
2066
|
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetEntitlement', variables=dict(query=sgqlc.types.Arg(sgqlc.types.non_null(_schema.FetchEntitlementQuery))))
|
|
1782
2067
|
_op_entitlement = _op.entitlement(query=sgqlc.types.Variable('query'))
|
|
@@ -1798,6 +2083,7 @@ def query_get_sdk_configuration():
|
|
|
1798
2083
|
_op_sdk_configuration = _op.sdk_configuration()
|
|
1799
2084
|
_op_sdk_configuration.sentry_dsn()
|
|
1800
2085
|
_op_sdk_configuration.is_widget_watermark_enabled()
|
|
2086
|
+
_op_sdk_configuration.show_watermark()
|
|
1801
2087
|
return _op
|
|
1802
2088
|
|
|
1803
2089
|
|
|
@@ -1839,16 +2125,68 @@ def query_get_usage_history_v2():
|
|
|
1839
2125
|
return _op
|
|
1840
2126
|
|
|
1841
2127
|
|
|
2128
|
+
def query_get_credit_balance():
|
|
2129
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetCreditBalance', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.CreditBalanceSummaryInput))))
|
|
2130
|
+
_op_credit_balance_summary = _op.credit_balance_summary(input=sgqlc.types.Variable('input'))
|
|
2131
|
+
_op_credit_balance_summary.__fragment__(fragment_credits_balance_summary_fragment())
|
|
2132
|
+
return _op
|
|
2133
|
+
|
|
2134
|
+
|
|
2135
|
+
def query_get_credit_grants():
|
|
2136
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetCreditGrants', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.GetCreditGrantsInput))))
|
|
2137
|
+
_op_credit_grants = _op.credit_grants(input=sgqlc.types.Variable('input'))
|
|
2138
|
+
_op_credit_grants_page_info = _op_credit_grants.page_info()
|
|
2139
|
+
_op_credit_grants_page_info.__fragment__(fragment_page_info_fragment())
|
|
2140
|
+
_op_credit_grants_edges = _op_credit_grants.edges()
|
|
2141
|
+
_op_credit_grants_edges_node = _op_credit_grants_edges.node()
|
|
2142
|
+
_op_credit_grants_edges_node.__fragment__(fragment_credit_grant_fragment())
|
|
2143
|
+
_op_credit_grants.total_count()
|
|
2144
|
+
return _op
|
|
2145
|
+
|
|
2146
|
+
|
|
2147
|
+
def query_get_credit_ledger():
|
|
2148
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetCreditLedger', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.CreditLedgerInput))))
|
|
2149
|
+
_op_credits_ledger = _op.credits_ledger(input=sgqlc.types.Variable('input'))
|
|
2150
|
+
_op_credits_ledger_page_info = _op_credits_ledger.page_info()
|
|
2151
|
+
_op_credits_ledger_page_info.__fragment__(fragment_page_info_fragment())
|
|
2152
|
+
_op_credits_ledger_edges = _op_credits_ledger.edges()
|
|
2153
|
+
_op_credits_ledger_edges_node = _op_credits_ledger_edges.node()
|
|
2154
|
+
_op_credits_ledger_edges_node.__fragment__(fragment_credit_ledger_fragment())
|
|
2155
|
+
_op_credits_ledger_edges.cursor()
|
|
2156
|
+
_op_credits_ledger.total_count()
|
|
2157
|
+
return _op
|
|
2158
|
+
|
|
2159
|
+
|
|
2160
|
+
def query_get_credit_usage():
|
|
2161
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetCreditUsage', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.CreditUsageInput))))
|
|
2162
|
+
_op_credit_usage = _op.credit_usage(input=sgqlc.types.Variable('input'))
|
|
2163
|
+
_op_credit_usage.__fragment__(fragment_credit_usage_fragment())
|
|
2164
|
+
return _op
|
|
2165
|
+
|
|
2166
|
+
|
|
2167
|
+
def query_get_automatic_recharge_configuration():
|
|
2168
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetAutomaticRechargeConfiguration', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.GetAutoRechargeSettingsInput))))
|
|
2169
|
+
_op_get_auto_recharge_settings = _op.get_auto_recharge_settings(input=sgqlc.types.Variable('input'))
|
|
2170
|
+
_op_get_auto_recharge_settings.__fragment__(fragment_auto_recharge_settings_fragment())
|
|
2171
|
+
return _op
|
|
2172
|
+
|
|
2173
|
+
|
|
1842
2174
|
class Query:
|
|
1843
2175
|
get_active_subscriptions = query_get_active_subscriptions()
|
|
1844
2176
|
get_active_subscriptions_list = query_get_active_subscriptions_list()
|
|
2177
|
+
get_automatic_recharge_configuration = query_get_automatic_recharge_configuration()
|
|
1845
2178
|
get_checkout_state = query_get_checkout_state()
|
|
1846
2179
|
get_coupons = query_get_coupons()
|
|
2180
|
+
get_credit_balance = query_get_credit_balance()
|
|
2181
|
+
get_credit_grants = query_get_credit_grants()
|
|
2182
|
+
get_credit_ledger = query_get_credit_ledger()
|
|
2183
|
+
get_credit_usage = query_get_credit_usage()
|
|
1847
2184
|
get_customer_by_id = query_get_customer_by_id()
|
|
1848
2185
|
get_customer_portal_by_ref_id = query_get_customer_portal_by_ref_id()
|
|
1849
2186
|
get_customer_statistics = query_get_customer_statistics()
|
|
1850
2187
|
get_entitlement = query_get_entitlement()
|
|
1851
2188
|
get_entitlements = query_get_entitlements()
|
|
2189
|
+
get_entitlements_state = query_get_entitlements_state()
|
|
1852
2190
|
get_mock_paywall = query_get_mock_paywall()
|
|
1853
2191
|
get_paywall = query_get_paywall()
|
|
1854
2192
|
get_products = query_get_products()
|
|
@@ -1880,7 +2218,15 @@ def subscription_on_package_published():
|
|
|
1880
2218
|
return _op
|
|
1881
2219
|
|
|
1882
2220
|
|
|
2221
|
+
def subscription_on_credit_balance_updated():
|
|
2222
|
+
_op = sgqlc.operation.Operation(_schema_root.subscription_type, name='OnCreditBalanceUpdated')
|
|
2223
|
+
_op_credit_balance_updated = _op.credit_balance_updated()
|
|
2224
|
+
_op_credit_balance_updated.__fragment__(fragment_credit_balance_updated_payload())
|
|
2225
|
+
return _op
|
|
2226
|
+
|
|
2227
|
+
|
|
1883
2228
|
class Subscription:
|
|
2229
|
+
on_credit_balance_updated = subscription_on_credit_balance_updated()
|
|
1884
2230
|
on_entitlements_updated = subscription_on_entitlements_updated()
|
|
1885
2231
|
on_package_published = subscription_on_package_published()
|
|
1886
2232
|
on_usage_updated = subscription_on_usage_updated()
|