stigg-api-client 3.13.0__py3-none-any.whl → 5.109.3__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 +359 -1
- stigg/generated/schema.py +1413 -155
- {stigg_api_client-3.13.0.dist-info → stigg_api_client-5.109.3.dist-info}/METADATA +3 -1
- stigg_api_client-5.109.3.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.109.3.dist-info}/LICENSE +0 -0
- {stigg_api_client-3.13.0.dist-info → stigg_api_client-5.109.3.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
|
|
|
@@ -251,12 +257,17 @@ def fragment_slim_subscription_fragment_v2():
|
|
|
251
257
|
_frag.status()
|
|
252
258
|
_frag.pricing_type()
|
|
253
259
|
_frag.start_date()
|
|
260
|
+
_frag.end_date()
|
|
254
261
|
_frag.cancellation_date()
|
|
262
|
+
_frag.effective_end_date()
|
|
255
263
|
_frag.current_billing_period_end()
|
|
264
|
+
_frag.additional_meta_data()
|
|
256
265
|
_frag_customer = _frag.customer()
|
|
257
266
|
_frag_customer.customer_id()
|
|
267
|
+
_frag_customer.email()
|
|
258
268
|
_frag_paying_customer = _frag.paying_customer()
|
|
259
269
|
_frag_paying_customer.customer_id()
|
|
270
|
+
_frag_paying_customer.email()
|
|
260
271
|
_frag_resource = _frag.resource()
|
|
261
272
|
_frag_resource.resource_id()
|
|
262
273
|
_frag_plan = _frag.plan()
|
|
@@ -266,6 +277,13 @@ def fragment_slim_subscription_fragment_v2():
|
|
|
266
277
|
_frag_addons.quantity()
|
|
267
278
|
_frag_addons_addon = _frag_addons.addon()
|
|
268
279
|
_frag_addons_addon.ref_id(__alias__='addon_id')
|
|
280
|
+
_frag_prices = _frag.prices()
|
|
281
|
+
_frag_prices.billing_model()
|
|
282
|
+
_frag_prices_price = _frag_prices.price()
|
|
283
|
+
_frag_prices_price.billing_period()
|
|
284
|
+
_frag_prices_price_price = _frag_prices_price.price()
|
|
285
|
+
_frag_prices_price_price.amount()
|
|
286
|
+
_frag_prices_price_price.currency()
|
|
269
287
|
_frag_trial_configuration = _frag.trial_configuration()
|
|
270
288
|
_frag_trial_configuration.trial_end_behavior()
|
|
271
289
|
_frag.trial_end_date()
|
|
@@ -349,6 +367,7 @@ def fragment_subscription_invoice_fragment():
|
|
|
349
367
|
_frag.billing_id()
|
|
350
368
|
_frag.status()
|
|
351
369
|
_frag.created_at()
|
|
370
|
+
_frag.due_date()
|
|
352
371
|
_frag.updated_at()
|
|
353
372
|
_frag.error_message()
|
|
354
373
|
_frag.requires_action()
|
|
@@ -827,6 +846,10 @@ def fragment_entitlement_fragment():
|
|
|
827
846
|
_frag_reset_period_configuration.__fragment__(fragment_reset_period_configuration_fragment())
|
|
828
847
|
_frag_feature = _frag.feature()
|
|
829
848
|
_frag_feature.__fragment__(fragment_feature_fragment())
|
|
849
|
+
_frag_credit_rate = _frag.credit_rate()
|
|
850
|
+
_frag_credit_rate.amount()
|
|
851
|
+
_frag_credit_rate.currency_id()
|
|
852
|
+
_frag.valid_until()
|
|
830
853
|
return _frag
|
|
831
854
|
|
|
832
855
|
|
|
@@ -889,6 +912,7 @@ def fragment_product_fragment():
|
|
|
889
912
|
_frag.display_name()
|
|
890
913
|
_frag.description()
|
|
891
914
|
_frag.additional_meta_data()
|
|
915
|
+
_frag.aws_marketplace_product_id()
|
|
892
916
|
_frag_product_settings = _frag.product_settings()
|
|
893
917
|
_frag_product_settings_downgrade_plan = _frag_product_settings.downgrade_plan()
|
|
894
918
|
_frag_product_settings_downgrade_plan.ref_id()
|
|
@@ -925,6 +949,25 @@ def fragment_package_published_payload():
|
|
|
925
949
|
return _frag
|
|
926
950
|
|
|
927
951
|
|
|
952
|
+
def fragment_credit_balance_updated_payload():
|
|
953
|
+
_frag = sgqlc.operation.Fragment(_schema.CreditBalanceUpdated, 'CreditBalanceUpdatedPayload')
|
|
954
|
+
_frag_currency = _frag.currency()
|
|
955
|
+
_frag_currency.currency_id()
|
|
956
|
+
_frag_currency.display_name()
|
|
957
|
+
_frag_currency.symbol()
|
|
958
|
+
_frag_currency_units = _frag_currency.units()
|
|
959
|
+
_frag_currency_units.singular()
|
|
960
|
+
_frag_currency_units.plural()
|
|
961
|
+
_frag.currency_id()
|
|
962
|
+
_frag.current_balance()
|
|
963
|
+
_frag.customer_id()
|
|
964
|
+
_frag.valid_until()
|
|
965
|
+
_frag.resource_id()
|
|
966
|
+
_frag.total_consumed()
|
|
967
|
+
_frag.total_granted()
|
|
968
|
+
return _frag
|
|
969
|
+
|
|
970
|
+
|
|
928
971
|
def fragment_customer_portal_fragment():
|
|
929
972
|
_frag = sgqlc.operation.Fragment(_schema.CustomerPortal, 'CustomerPortalFragment')
|
|
930
973
|
_frag_subscriptions = _frag.subscriptions()
|
|
@@ -945,6 +988,20 @@ def fragment_customer_portal_fragment():
|
|
|
945
988
|
return _frag
|
|
946
989
|
|
|
947
990
|
|
|
991
|
+
def fragment_stripe_checkout_credentials_fragment():
|
|
992
|
+
_frag = sgqlc.operation.Fragment(_schema.StripeCheckoutCredentials, 'StripeCheckoutCredentialsFragment')
|
|
993
|
+
_frag.account_id()
|
|
994
|
+
_frag.setup_secret()
|
|
995
|
+
_frag.public_key()
|
|
996
|
+
return _frag
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
def fragment_zuora_checkout_credentials_fragment():
|
|
1000
|
+
_frag = sgqlc.operation.Fragment(_schema.ZuoraCheckoutCredentials, 'ZuoraCheckoutCredentialsFragment')
|
|
1001
|
+
_frag.publishable_key()
|
|
1002
|
+
return _frag
|
|
1003
|
+
|
|
1004
|
+
|
|
948
1005
|
def fragment_checkout_state_fragment():
|
|
949
1006
|
_frag = sgqlc.operation.Fragment(_schema.CheckoutState, 'CheckoutStateFragment')
|
|
950
1007
|
_frag_configuration = _frag.configuration()
|
|
@@ -960,6 +1017,11 @@ def fragment_checkout_state_fragment():
|
|
|
960
1017
|
_frag_plan.__fragment__(fragment_plan_fragment())
|
|
961
1018
|
_frag_billing_integration = _frag.billing_integration()
|
|
962
1019
|
_frag_billing_integration.billing_identifier()
|
|
1020
|
+
_frag_billing_integration_billing_credentials = _frag_billing_integration.billing_credentials()
|
|
1021
|
+
_frag_billing_integration_billing_credentials__as__StripeCheckoutCredentials = _frag_billing_integration_billing_credentials.__as__(_schema.StripeCheckoutCredentials)
|
|
1022
|
+
_frag_billing_integration_billing_credentials__as__StripeCheckoutCredentials.__fragment__(fragment_stripe_checkout_credentials_fragment())
|
|
1023
|
+
_frag_billing_integration_billing_credentials__as__ZuoraCheckoutCredentials = _frag_billing_integration_billing_credentials.__as__(_schema.ZuoraCheckoutCredentials)
|
|
1024
|
+
_frag_billing_integration_billing_credentials__as__ZuoraCheckoutCredentials.__fragment__(fragment_zuora_checkout_credentials_fragment())
|
|
963
1025
|
_frag_billing_integration_credentials = _frag_billing_integration.credentials()
|
|
964
1026
|
_frag_billing_integration_credentials.account_id()
|
|
965
1027
|
_frag_billing_integration_credentials.public_key()
|
|
@@ -1009,6 +1071,9 @@ def fragment_customer_portal_subscription_price_fragment():
|
|
|
1009
1071
|
_frag_price = _frag.price()
|
|
1010
1072
|
_frag_price.amount()
|
|
1011
1073
|
_frag_price.currency()
|
|
1074
|
+
_frag_credit_rate = _frag.credit_rate()
|
|
1075
|
+
_frag_credit_rate.amount()
|
|
1076
|
+
_frag_credit_rate.currency_id()
|
|
1012
1077
|
_frag_feature = _frag.feature()
|
|
1013
1078
|
_frag_feature.id()
|
|
1014
1079
|
_frag_feature.ref_id()
|
|
@@ -1035,6 +1100,9 @@ def fragment_customer_portal_subscription_fragment():
|
|
|
1035
1100
|
_frag_pricing_price = _frag_pricing.price()
|
|
1036
1101
|
_frag_pricing_price.amount()
|
|
1037
1102
|
_frag_pricing_price.currency()
|
|
1103
|
+
_frag_pricing_credit_rate = _frag_pricing.credit_rate()
|
|
1104
|
+
_frag_pricing_credit_rate.amount()
|
|
1105
|
+
_frag_pricing_credit_rate.currency_id()
|
|
1038
1106
|
_frag_pricing_feature = _frag_pricing.feature()
|
|
1039
1107
|
_frag_pricing_feature.feature_units()
|
|
1040
1108
|
_frag_pricing_feature.feature_units_plural()
|
|
@@ -1171,6 +1239,7 @@ def fragment_mock_paywall_package_entitlement_fragment():
|
|
|
1171
1239
|
_frag.hidden_from_widgets()
|
|
1172
1240
|
_frag.display_name_override()
|
|
1173
1241
|
_frag.enum_values()
|
|
1242
|
+
_frag.is_granted()
|
|
1174
1243
|
_frag_feature = _frag.feature()
|
|
1175
1244
|
_frag_feature.feature_type()
|
|
1176
1245
|
_frag_feature.meter_type()
|
|
@@ -1194,6 +1263,9 @@ def fragment_mock_paywall_price_fragment():
|
|
|
1194
1263
|
_frag_price = _frag.price()
|
|
1195
1264
|
_frag_price.amount()
|
|
1196
1265
|
_frag_price.currency()
|
|
1266
|
+
_frag_credit_rate = _frag.credit_rate()
|
|
1267
|
+
_frag_credit_rate.amount()
|
|
1268
|
+
_frag_credit_rate.currency_id()
|
|
1197
1269
|
_frag.tiers_mode()
|
|
1198
1270
|
_frag_tiers = _frag.tiers()
|
|
1199
1271
|
_frag_tiers.__fragment__(fragment_price_tier_fragment())
|
|
@@ -1414,13 +1486,160 @@ def fragment_schedule_variables_fragment():
|
|
|
1414
1486
|
return _frag
|
|
1415
1487
|
|
|
1416
1488
|
|
|
1489
|
+
def fragment_credit_grant_invoice_fragment():
|
|
1490
|
+
_frag = sgqlc.operation.Fragment(_schema.CreditGrantInvoice, 'CreditGrantInvoiceFragment')
|
|
1491
|
+
_frag.billing_id()
|
|
1492
|
+
_frag.status()
|
|
1493
|
+
_frag.created_at()
|
|
1494
|
+
_frag.due_date()
|
|
1495
|
+
_frag.updated_at()
|
|
1496
|
+
_frag.error_message()
|
|
1497
|
+
_frag.requires_action()
|
|
1498
|
+
_frag.payment_secret()
|
|
1499
|
+
_frag.payment_url()
|
|
1500
|
+
_frag.pdf_url()
|
|
1501
|
+
_frag.billing_reason()
|
|
1502
|
+
_frag.currency()
|
|
1503
|
+
_frag.sub_total()
|
|
1504
|
+
_frag.sub_total_excluding_tax()
|
|
1505
|
+
_frag.total()
|
|
1506
|
+
_frag.total_excluding_tax()
|
|
1507
|
+
_frag.tax()
|
|
1508
|
+
_frag.amount_due()
|
|
1509
|
+
_frag.attempt_count()
|
|
1510
|
+
return _frag
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
def fragment_credit_grant_fragment():
|
|
1514
|
+
_frag = sgqlc.operation.Fragment(_schema.CreditGrant, 'CreditGrantFragment')
|
|
1515
|
+
_frag.grant_id()
|
|
1516
|
+
_frag.amount()
|
|
1517
|
+
_frag.comment()
|
|
1518
|
+
_frag.currency_id()
|
|
1519
|
+
_frag.customer_id()
|
|
1520
|
+
_frag.display_name()
|
|
1521
|
+
_frag.effective_at()
|
|
1522
|
+
_frag.expire_at()
|
|
1523
|
+
_frag.grant_type()
|
|
1524
|
+
_frag.priority()
|
|
1525
|
+
_frag.consumed_amount()
|
|
1526
|
+
_frag_cost = _frag.cost()
|
|
1527
|
+
_frag_cost.amount()
|
|
1528
|
+
_frag_cost.currency()
|
|
1529
|
+
_frag.created_at()
|
|
1530
|
+
_frag.updated_at()
|
|
1531
|
+
_frag.resource_id()
|
|
1532
|
+
_frag.additional_meta_data()
|
|
1533
|
+
_frag.automatic_recharge_configuration_id()
|
|
1534
|
+
_frag.status()
|
|
1535
|
+
_frag.payment_collection()
|
|
1536
|
+
_frag.invoice_id()
|
|
1537
|
+
_frag_latest_invoice = _frag.latest_invoice()
|
|
1538
|
+
_frag_latest_invoice.__fragment__(fragment_credit_grant_invoice_fragment())
|
|
1539
|
+
return _frag
|
|
1540
|
+
|
|
1541
|
+
|
|
1542
|
+
def fragment_credit_ledger_fragment():
|
|
1543
|
+
_frag = sgqlc.operation.Fragment(_schema.CreditLedgerEvent, 'CreditLedgerFragment')
|
|
1544
|
+
_frag.timestamp()
|
|
1545
|
+
_frag.event_type()
|
|
1546
|
+
_frag.customer_id()
|
|
1547
|
+
_frag.resource_id()
|
|
1548
|
+
_frag.event_id()
|
|
1549
|
+
_frag.feature_id()
|
|
1550
|
+
_frag.amount()
|
|
1551
|
+
_frag.credit_grant_id()
|
|
1552
|
+
_frag.credit_currency_id()
|
|
1553
|
+
return _frag
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
def fragment_credits_balance_summary_fragment():
|
|
1557
|
+
_frag = sgqlc.operation.Fragment(_schema.CreditBalanceSummary, 'CreditsBalanceSummaryFragment')
|
|
1558
|
+
_frag.customer_id()
|
|
1559
|
+
_frag_balances = _frag.balances()
|
|
1560
|
+
_frag_balances.__fragment__(fragment_credit_balance_fragment())
|
|
1561
|
+
return _frag
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
def fragment_credit_balance_fragment():
|
|
1565
|
+
_frag = sgqlc.operation.Fragment(_schema.CreditBalance, 'CreditBalanceFragment')
|
|
1566
|
+
_frag.customer_id()
|
|
1567
|
+
_frag_currency = _frag.currency()
|
|
1568
|
+
_frag_currency.currency_id()
|
|
1569
|
+
_frag_currency.display_name()
|
|
1570
|
+
_frag_currency.symbol()
|
|
1571
|
+
_frag_currency_units = _frag_currency.units()
|
|
1572
|
+
_frag_currency_units.singular()
|
|
1573
|
+
_frag_currency_units.plural()
|
|
1574
|
+
_frag.current_balance()
|
|
1575
|
+
_frag.total_consumed()
|
|
1576
|
+
_frag.total_granted()
|
|
1577
|
+
_frag.resource_id()
|
|
1578
|
+
_frag.valid_until()
|
|
1579
|
+
return _frag
|
|
1580
|
+
|
|
1581
|
+
|
|
1582
|
+
def fragment_payment_session_fragment():
|
|
1583
|
+
_frag = sgqlc.operation.Fragment(_schema.PaymentSession, 'PaymentSessionFragment')
|
|
1584
|
+
_frag.token()
|
|
1585
|
+
return _frag
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
def fragment_slim_custom_currency_fragment():
|
|
1589
|
+
_frag = sgqlc.operation.Fragment(_schema.SlimCustomCurrency, 'SlimCustomCurrencyFragment')
|
|
1590
|
+
_frag.currency_id()
|
|
1591
|
+
_frag.display_name()
|
|
1592
|
+
_frag_units = _frag.units()
|
|
1593
|
+
_frag_units.singular()
|
|
1594
|
+
_frag_units.plural()
|
|
1595
|
+
return _frag
|
|
1596
|
+
|
|
1597
|
+
|
|
1598
|
+
def fragment_credit_usage_fragment():
|
|
1599
|
+
_frag = sgqlc.operation.Fragment(_schema.CreditUsage, 'CreditUsageFragment')
|
|
1600
|
+
_frag_series = _frag.series()
|
|
1601
|
+
_frag_series.feature_id()
|
|
1602
|
+
_frag_series.feature_name()
|
|
1603
|
+
_frag_series.total_credits()
|
|
1604
|
+
_frag_series_points = _frag_series.points()
|
|
1605
|
+
_frag_series_points.timestamp()
|
|
1606
|
+
_frag_series_points.value()
|
|
1607
|
+
_frag_currency = _frag.currency()
|
|
1608
|
+
_frag_currency.__fragment__(fragment_slim_custom_currency_fragment())
|
|
1609
|
+
return _frag
|
|
1610
|
+
|
|
1611
|
+
|
|
1612
|
+
def fragment_auto_recharge_settings_fragment():
|
|
1613
|
+
_frag = sgqlc.operation.Fragment(_schema.AutoRechargeSettingsDTO, 'AutoRechargeSettingsFragment')
|
|
1614
|
+
_frag.customer_id()
|
|
1615
|
+
_frag.currency_id()
|
|
1616
|
+
_frag.is_enabled()
|
|
1617
|
+
_frag.threshold_type()
|
|
1618
|
+
_frag.threshold_value()
|
|
1619
|
+
_frag.target_balance()
|
|
1620
|
+
_frag.max_spend_limit()
|
|
1621
|
+
_frag.grant_expiration_period()
|
|
1622
|
+
_frag.current_monthly_spend()
|
|
1623
|
+
_frag.created_at()
|
|
1624
|
+
_frag.updated_at()
|
|
1625
|
+
return _frag
|
|
1626
|
+
|
|
1627
|
+
|
|
1417
1628
|
class Fragment:
|
|
1418
1629
|
addon_dependency_fragment = fragment_addon_dependency_fragment()
|
|
1419
1630
|
addon_fragment = fragment_addon_fragment()
|
|
1420
1631
|
apply_subscription_fragment = fragment_apply_subscription_fragment()
|
|
1632
|
+
auto_recharge_settings_fragment = fragment_auto_recharge_settings_fragment()
|
|
1421
1633
|
checkout_configuration_fragment = fragment_checkout_configuration_fragment()
|
|
1422
1634
|
checkout_state_fragment = fragment_checkout_state_fragment()
|
|
1423
1635
|
coupon_fragment = fragment_coupon_fragment()
|
|
1636
|
+
credit_balance_fragment = fragment_credit_balance_fragment()
|
|
1637
|
+
credit_balance_updated_payload = fragment_credit_balance_updated_payload()
|
|
1638
|
+
credit_grant_fragment = fragment_credit_grant_fragment()
|
|
1639
|
+
credit_grant_invoice_fragment = fragment_credit_grant_invoice_fragment()
|
|
1640
|
+
credit_ledger_fragment = fragment_credit_ledger_fragment()
|
|
1641
|
+
credit_usage_fragment = fragment_credit_usage_fragment()
|
|
1642
|
+
credits_balance_summary_fragment = fragment_credits_balance_summary_fragment()
|
|
1424
1643
|
customer_fragment = fragment_customer_fragment()
|
|
1425
1644
|
customer_portal_billing_information_fragment = fragment_customer_portal_billing_information_fragment()
|
|
1426
1645
|
customer_portal_configuration_fragment = fragment_customer_portal_configuration_fragment()
|
|
@@ -1451,6 +1670,7 @@ class Fragment:
|
|
|
1451
1670
|
package_entitlement_fragment = fragment_package_entitlement_fragment()
|
|
1452
1671
|
package_published_payload = fragment_package_published_payload()
|
|
1453
1672
|
page_info_fragment = fragment_page_info_fragment()
|
|
1673
|
+
payment_session_fragment = fragment_payment_session_fragment()
|
|
1454
1674
|
paywall_calculated_price_points_fragment = fragment_paywall_calculated_price_points_fragment()
|
|
1455
1675
|
paywall_configuration_fragment = fragment_paywall_configuration_fragment()
|
|
1456
1676
|
paywall_currency_fragment = fragment_paywall_currency_fragment()
|
|
@@ -1466,9 +1686,11 @@ class Fragment:
|
|
|
1466
1686
|
report_usage_fragment = fragment_report_usage_fragment()
|
|
1467
1687
|
reset_period_configuration_fragment = fragment_reset_period_configuration_fragment()
|
|
1468
1688
|
schedule_variables_fragment = fragment_schedule_variables_fragment()
|
|
1689
|
+
slim_custom_currency_fragment = fragment_slim_custom_currency_fragment()
|
|
1469
1690
|
slim_customer_fragment = fragment_slim_customer_fragment()
|
|
1470
1691
|
slim_subscription_fragment = fragment_slim_subscription_fragment()
|
|
1471
1692
|
slim_subscription_fragment_v2 = fragment_slim_subscription_fragment_v2()
|
|
1693
|
+
stripe_checkout_credentials_fragment = fragment_stripe_checkout_credentials_fragment()
|
|
1472
1694
|
subscription_fragment = fragment_subscription_fragment()
|
|
1473
1695
|
subscription_future_update_data = fragment_subscription_future_update_data()
|
|
1474
1696
|
subscription_invoice_fragment = fragment_subscription_invoice_fragment()
|
|
@@ -1484,6 +1706,7 @@ class Fragment:
|
|
|
1484
1706
|
usage_history_fragment = fragment_usage_history_fragment()
|
|
1485
1707
|
usage_history_v2_fragment = fragment_usage_history_v2_fragment()
|
|
1486
1708
|
usage_updated_fragment = fragment_usage_updated_fragment()
|
|
1709
|
+
zuora_checkout_credentials_fragment = fragment_zuora_checkout_credentials_fragment()
|
|
1487
1710
|
|
|
1488
1711
|
|
|
1489
1712
|
def mutation_provision_customer():
|
|
@@ -1677,17 +1900,77 @@ def mutation_transfer_subscription_to_resource():
|
|
|
1677
1900
|
return _op
|
|
1678
1901
|
|
|
1679
1902
|
|
|
1903
|
+
def mutation_grant_credits():
|
|
1904
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='GrantCredits', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.CreditGrantInput))))
|
|
1905
|
+
_op_create_credit_grant = _op.create_credit_grant(input=sgqlc.types.Variable('input'))
|
|
1906
|
+
_op_create_credit_grant.__fragment__(fragment_credit_grant_fragment())
|
|
1907
|
+
return _op
|
|
1908
|
+
|
|
1909
|
+
|
|
1910
|
+
def mutation_grant_promotional_entitlements_group():
|
|
1911
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='GrantPromotionalEntitlementsGroup', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.GrantPromotionalEntitlementsGroupInput))))
|
|
1912
|
+
_op_grant_promotional_entitlements_group = _op.grant_promotional_entitlements_group(input=sgqlc.types.Variable('input'))
|
|
1913
|
+
_op_grant_promotional_entitlements_group.__fragment__(fragment_promotional_entitlement_fragment())
|
|
1914
|
+
return _op
|
|
1915
|
+
|
|
1916
|
+
|
|
1917
|
+
def mutation_revoke_promotional_entitlements_group():
|
|
1918
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='RevokePromotionalEntitlementsGroup', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.RevokePromotionalEntitlementsGroupInput))))
|
|
1919
|
+
_op_revoke_promotional_entitlements_group = _op.revoke_promotional_entitlements_group(input=sgqlc.types.Variable('input'))
|
|
1920
|
+
_op_revoke_promotional_entitlements_group.__fragment__(fragment_promotional_entitlement_fragment())
|
|
1921
|
+
return _op
|
|
1922
|
+
|
|
1923
|
+
|
|
1924
|
+
def mutation_unlink_promotional_entitlements_group():
|
|
1925
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='UnlinkPromotionalEntitlementsGroup', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.UnlinkPromotionalEntitlementsGroupInput))))
|
|
1926
|
+
_op_unlink_promotional_entitlements_group = _op.unlink_promotional_entitlements_group(input=sgqlc.types.Variable('input'))
|
|
1927
|
+
_op_unlink_promotional_entitlements_group.__fragment__(fragment_promotional_entitlement_fragment())
|
|
1928
|
+
return _op
|
|
1929
|
+
|
|
1930
|
+
|
|
1931
|
+
def mutation_create_payment_session():
|
|
1932
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='CreatePaymentSession', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.PaymentSessionInput))))
|
|
1933
|
+
_op_create_payment_session = _op.create_payment_session(input=sgqlc.types.Variable('input'))
|
|
1934
|
+
_op_create_payment_session.__fragment__(fragment_payment_session_fragment())
|
|
1935
|
+
return _op
|
|
1936
|
+
|
|
1937
|
+
|
|
1938
|
+
def mutation_void_credit_grant():
|
|
1939
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='VoidCreditGrant', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.VoidCreditGrantInput))))
|
|
1940
|
+
_op_void_credit_grant = _op.void_credit_grant(input=sgqlc.types.Variable('input'))
|
|
1941
|
+
_op_void_credit_grant.__fragment__(fragment_credit_grant_fragment())
|
|
1942
|
+
return _op
|
|
1943
|
+
|
|
1944
|
+
|
|
1945
|
+
def mutation_create_coupon():
|
|
1946
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='CreateCoupon', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.CreateCouponInput))))
|
|
1947
|
+
_op_create_one_coupon = _op.create_one_coupon(input=sgqlc.types.Variable('input'))
|
|
1948
|
+
_op_create_one_coupon.__fragment__(fragment_coupon_fragment())
|
|
1949
|
+
return _op
|
|
1950
|
+
|
|
1951
|
+
|
|
1952
|
+
def mutation_save_automatic_recharge_configuration():
|
|
1953
|
+
_op = sgqlc.operation.Operation(_schema_root.mutation_type, name='SaveAutomaticRechargeConfiguration', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.SaveAutoRechargeSettingsInput))))
|
|
1954
|
+
_op_save_auto_recharge_settings = _op.save_auto_recharge_settings(input=sgqlc.types.Variable('input'))
|
|
1955
|
+
_op_save_auto_recharge_settings.__fragment__(fragment_auto_recharge_settings_fragment())
|
|
1956
|
+
return _op
|
|
1957
|
+
|
|
1958
|
+
|
|
1680
1959
|
class Mutation:
|
|
1681
1960
|
apply_subscription = mutation_apply_subscription()
|
|
1682
1961
|
archive_customer = mutation_archive_customer()
|
|
1683
1962
|
cancel_subscription = mutation_cancel_subscription()
|
|
1684
1963
|
cancel_subscription_updates = mutation_cancel_subscription_updates()
|
|
1964
|
+
create_coupon = mutation_create_coupon()
|
|
1965
|
+
create_payment_session = mutation_create_payment_session()
|
|
1685
1966
|
create_subscription = mutation_create_subscription()
|
|
1686
1967
|
delegate_subscription_to_customer = mutation_delegate_subscription_to_customer()
|
|
1687
1968
|
detach_customer_payment_method = mutation_detach_customer_payment_method()
|
|
1688
1969
|
estimate_subscription = mutation_estimate_subscription()
|
|
1689
1970
|
estimate_subscription_update = mutation_estimate_subscription_update()
|
|
1971
|
+
grant_credits = mutation_grant_credits()
|
|
1690
1972
|
grant_promotional_entitlements = mutation_grant_promotional_entitlements()
|
|
1973
|
+
grant_promotional_entitlements_group = mutation_grant_promotional_entitlements_group()
|
|
1691
1974
|
import_customer = mutation_import_customer()
|
|
1692
1975
|
import_customer_bulk = mutation_import_customer_bulk()
|
|
1693
1976
|
import_subscriptions_bulk = mutation_import_subscriptions_bulk()
|
|
@@ -1701,11 +1984,15 @@ class Mutation:
|
|
|
1701
1984
|
report_usage = mutation_report_usage()
|
|
1702
1985
|
report_usage_bulk = mutation_report_usage_bulk()
|
|
1703
1986
|
revoke_promotional_entitlement = mutation_revoke_promotional_entitlement()
|
|
1987
|
+
revoke_promotional_entitlements_group = mutation_revoke_promotional_entitlements_group()
|
|
1988
|
+
save_automatic_recharge_configuration = mutation_save_automatic_recharge_configuration()
|
|
1704
1989
|
transfer_subscription = mutation_transfer_subscription()
|
|
1705
1990
|
transfer_subscription_to_resource = mutation_transfer_subscription_to_resource()
|
|
1706
1991
|
unarchive_customer = mutation_unarchive_customer()
|
|
1992
|
+
unlink_promotional_entitlements_group = mutation_unlink_promotional_entitlements_group()
|
|
1707
1993
|
update_customer = mutation_update_customer()
|
|
1708
1994
|
update_subscription = mutation_update_subscription()
|
|
1995
|
+
void_credit_grant = mutation_void_credit_grant()
|
|
1709
1996
|
|
|
1710
1997
|
|
|
1711
1998
|
def query_get_customer_by_id():
|
|
@@ -1756,7 +2043,7 @@ def query_get_subscription():
|
|
|
1756
2043
|
|
|
1757
2044
|
def query_get_coupons():
|
|
1758
2045
|
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetCoupons')
|
|
1759
|
-
_op_coupons = _op.coupons(filter={'status': {'eq': 'ACTIVE'}}, paging={'first':
|
|
2046
|
+
_op_coupons = _op.coupons(filter={'status': {'eq': 'ACTIVE'}}, paging={'first': 25})
|
|
1760
2047
|
_op_coupons_edges = _op_coupons.edges()
|
|
1761
2048
|
_op_coupons_edges_node = _op_coupons_edges.node()
|
|
1762
2049
|
_op_coupons_edges_node.__fragment__(fragment_coupon_fragment())
|
|
@@ -1777,6 +2064,16 @@ def query_get_entitlements():
|
|
|
1777
2064
|
return _op
|
|
1778
2065
|
|
|
1779
2066
|
|
|
2067
|
+
def query_get_entitlements_state():
|
|
2068
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetEntitlementsState', variables=dict(query=sgqlc.types.Arg(sgqlc.types.non_null(_schema.FetchEntitlementsQuery))))
|
|
2069
|
+
_op_entitlements_state = _op.entitlements_state(query=sgqlc.types.Variable('query'))
|
|
2070
|
+
_op_entitlements_state.__typename__()
|
|
2071
|
+
_op_entitlements_state_entitlements = _op_entitlements_state.entitlements()
|
|
2072
|
+
_op_entitlements_state_entitlements.__fragment__(fragment_entitlement_fragment())
|
|
2073
|
+
_op_entitlements_state.access_denied_reason()
|
|
2074
|
+
return _op
|
|
2075
|
+
|
|
2076
|
+
|
|
1780
2077
|
def query_get_entitlement():
|
|
1781
2078
|
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetEntitlement', variables=dict(query=sgqlc.types.Arg(sgqlc.types.non_null(_schema.FetchEntitlementQuery))))
|
|
1782
2079
|
_op_entitlement = _op.entitlement(query=sgqlc.types.Variable('query'))
|
|
@@ -1798,6 +2095,7 @@ def query_get_sdk_configuration():
|
|
|
1798
2095
|
_op_sdk_configuration = _op.sdk_configuration()
|
|
1799
2096
|
_op_sdk_configuration.sentry_dsn()
|
|
1800
2097
|
_op_sdk_configuration.is_widget_watermark_enabled()
|
|
2098
|
+
_op_sdk_configuration.show_watermark()
|
|
1801
2099
|
return _op
|
|
1802
2100
|
|
|
1803
2101
|
|
|
@@ -1839,16 +2137,68 @@ def query_get_usage_history_v2():
|
|
|
1839
2137
|
return _op
|
|
1840
2138
|
|
|
1841
2139
|
|
|
2140
|
+
def query_get_credit_balance():
|
|
2141
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetCreditBalance', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.CreditBalanceSummaryInput))))
|
|
2142
|
+
_op_credit_balance_summary = _op.credit_balance_summary(input=sgqlc.types.Variable('input'))
|
|
2143
|
+
_op_credit_balance_summary.__fragment__(fragment_credits_balance_summary_fragment())
|
|
2144
|
+
return _op
|
|
2145
|
+
|
|
2146
|
+
|
|
2147
|
+
def query_get_credit_grants():
|
|
2148
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetCreditGrants', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.GetCreditGrantsInput))))
|
|
2149
|
+
_op_credit_grants = _op.credit_grants(input=sgqlc.types.Variable('input'))
|
|
2150
|
+
_op_credit_grants_page_info = _op_credit_grants.page_info()
|
|
2151
|
+
_op_credit_grants_page_info.__fragment__(fragment_page_info_fragment())
|
|
2152
|
+
_op_credit_grants_edges = _op_credit_grants.edges()
|
|
2153
|
+
_op_credit_grants_edges_node = _op_credit_grants_edges.node()
|
|
2154
|
+
_op_credit_grants_edges_node.__fragment__(fragment_credit_grant_fragment())
|
|
2155
|
+
_op_credit_grants.total_count()
|
|
2156
|
+
return _op
|
|
2157
|
+
|
|
2158
|
+
|
|
2159
|
+
def query_get_credit_ledger():
|
|
2160
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetCreditLedger', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.CreditLedgerInput))))
|
|
2161
|
+
_op_credits_ledger = _op.credits_ledger(input=sgqlc.types.Variable('input'))
|
|
2162
|
+
_op_credits_ledger_page_info = _op_credits_ledger.page_info()
|
|
2163
|
+
_op_credits_ledger_page_info.__fragment__(fragment_page_info_fragment())
|
|
2164
|
+
_op_credits_ledger_edges = _op_credits_ledger.edges()
|
|
2165
|
+
_op_credits_ledger_edges_node = _op_credits_ledger_edges.node()
|
|
2166
|
+
_op_credits_ledger_edges_node.__fragment__(fragment_credit_ledger_fragment())
|
|
2167
|
+
_op_credits_ledger_edges.cursor()
|
|
2168
|
+
_op_credits_ledger.total_count()
|
|
2169
|
+
return _op
|
|
2170
|
+
|
|
2171
|
+
|
|
2172
|
+
def query_get_credit_usage():
|
|
2173
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetCreditUsage', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.CreditUsageInput))))
|
|
2174
|
+
_op_credit_usage = _op.credit_usage(input=sgqlc.types.Variable('input'))
|
|
2175
|
+
_op_credit_usage.__fragment__(fragment_credit_usage_fragment())
|
|
2176
|
+
return _op
|
|
2177
|
+
|
|
2178
|
+
|
|
2179
|
+
def query_get_automatic_recharge_configuration():
|
|
2180
|
+
_op = sgqlc.operation.Operation(_schema_root.query_type, name='GetAutomaticRechargeConfiguration', variables=dict(input=sgqlc.types.Arg(sgqlc.types.non_null(_schema.GetAutoRechargeSettingsInput))))
|
|
2181
|
+
_op_get_auto_recharge_settings = _op.get_auto_recharge_settings(input=sgqlc.types.Variable('input'))
|
|
2182
|
+
_op_get_auto_recharge_settings.__fragment__(fragment_auto_recharge_settings_fragment())
|
|
2183
|
+
return _op
|
|
2184
|
+
|
|
2185
|
+
|
|
1842
2186
|
class Query:
|
|
1843
2187
|
get_active_subscriptions = query_get_active_subscriptions()
|
|
1844
2188
|
get_active_subscriptions_list = query_get_active_subscriptions_list()
|
|
2189
|
+
get_automatic_recharge_configuration = query_get_automatic_recharge_configuration()
|
|
1845
2190
|
get_checkout_state = query_get_checkout_state()
|
|
1846
2191
|
get_coupons = query_get_coupons()
|
|
2192
|
+
get_credit_balance = query_get_credit_balance()
|
|
2193
|
+
get_credit_grants = query_get_credit_grants()
|
|
2194
|
+
get_credit_ledger = query_get_credit_ledger()
|
|
2195
|
+
get_credit_usage = query_get_credit_usage()
|
|
1847
2196
|
get_customer_by_id = query_get_customer_by_id()
|
|
1848
2197
|
get_customer_portal_by_ref_id = query_get_customer_portal_by_ref_id()
|
|
1849
2198
|
get_customer_statistics = query_get_customer_statistics()
|
|
1850
2199
|
get_entitlement = query_get_entitlement()
|
|
1851
2200
|
get_entitlements = query_get_entitlements()
|
|
2201
|
+
get_entitlements_state = query_get_entitlements_state()
|
|
1852
2202
|
get_mock_paywall = query_get_mock_paywall()
|
|
1853
2203
|
get_paywall = query_get_paywall()
|
|
1854
2204
|
get_products = query_get_products()
|
|
@@ -1880,7 +2230,15 @@ def subscription_on_package_published():
|
|
|
1880
2230
|
return _op
|
|
1881
2231
|
|
|
1882
2232
|
|
|
2233
|
+
def subscription_on_credit_balance_updated():
|
|
2234
|
+
_op = sgqlc.operation.Operation(_schema_root.subscription_type, name='OnCreditBalanceUpdated')
|
|
2235
|
+
_op_credit_balance_updated = _op.credit_balance_updated()
|
|
2236
|
+
_op_credit_balance_updated.__fragment__(fragment_credit_balance_updated_payload())
|
|
2237
|
+
return _op
|
|
2238
|
+
|
|
2239
|
+
|
|
1883
2240
|
class Subscription:
|
|
2241
|
+
on_credit_balance_updated = subscription_on_credit_balance_updated()
|
|
1884
2242
|
on_entitlements_updated = subscription_on_entitlements_updated()
|
|
1885
2243
|
on_package_published = subscription_on_package_published()
|
|
1886
2244
|
on_usage_updated = subscription_on_usage_updated()
|