@stigg/typescript-mcp 0.1.0-beta.33 → 0.1.0-beta.34
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.
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +112 -112
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +112 -112
- package/local-docs-search.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/local-docs-search.ts +119 -112
- package/src/server.ts +1 -1
package/local-docs-search.mjs
CHANGED
|
@@ -45,7 +45,7 @@ const EMBEDDED_METHODS = [
|
|
|
45
45
|
example: 'CustomerRetrieveParams parameters = new() { ID = "x" };\n\nvar customerResponse = await client.V1.Customers.Retrieve(parameters);\n\nConsole.WriteLine(customerResponse);',
|
|
46
46
|
},
|
|
47
47
|
http: {
|
|
48
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
48
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
51
|
},
|
|
@@ -104,7 +104,7 @@ const EMBEDDED_METHODS = [
|
|
|
104
104
|
example: 'CustomerUpdateParams parameters = new() { ID = "x" };\n\nvar customerResponse = await client.V1.Customers.Update(parameters);\n\nConsole.WriteLine(customerResponse);',
|
|
105
105
|
},
|
|
106
106
|
http: {
|
|
107
|
-
example: "curl https://api.stigg.io/api/v1/customers/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
107
|
+
example: "curl https://edge.api.stigg.io/api/v1/customers/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
108
108
|
},
|
|
109
109
|
},
|
|
110
110
|
},
|
|
@@ -158,7 +158,7 @@ const EMBEDDED_METHODS = [
|
|
|
158
158
|
example: 'CustomerListParams parameters = new();\n\nvar page = await client.V1.Customers.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
159
159
|
},
|
|
160
160
|
http: {
|
|
161
|
-
example: 'curl https://api.stigg.io/api/v1/customers \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
161
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
162
162
|
},
|
|
163
163
|
},
|
|
164
164
|
},
|
|
@@ -218,7 +218,7 @@ const EMBEDDED_METHODS = [
|
|
|
218
218
|
example: 'CustomerProvisionParams parameters = new() { ID = "id" };\n\nvar customerResponse = await client.V1.Customers.Provision(parameters);\n\nConsole.WriteLine(customerResponse);',
|
|
219
219
|
},
|
|
220
220
|
http: {
|
|
221
|
-
example: 'curl https://api.stigg.io/api/v1/customers \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id"\n }\'',
|
|
221
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id"\n }\'',
|
|
222
222
|
},
|
|
223
223
|
},
|
|
224
224
|
},
|
|
@@ -263,7 +263,7 @@ const EMBEDDED_METHODS = [
|
|
|
263
263
|
example: 'CustomerArchiveParams parameters = new() { ID = "x" };\n\nvar customerResponse = await client.V1.Customers.Archive(parameters);\n\nConsole.WriteLine(customerResponse);',
|
|
264
264
|
},
|
|
265
265
|
http: {
|
|
266
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
266
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
267
267
|
},
|
|
268
268
|
},
|
|
269
269
|
},
|
|
@@ -308,7 +308,7 @@ const EMBEDDED_METHODS = [
|
|
|
308
308
|
example: 'CustomerUnarchiveParams parameters = new() { ID = "x" };\n\nvar customerResponse = await client.V1.Customers.Unarchive(parameters);\n\nConsole.WriteLine(customerResponse);',
|
|
309
309
|
},
|
|
310
310
|
http: {
|
|
311
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
311
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
312
312
|
},
|
|
313
313
|
},
|
|
314
314
|
},
|
|
@@ -358,7 +358,7 @@ const EMBEDDED_METHODS = [
|
|
|
358
358
|
example: 'CustomerImportParams parameters = new()\n{\n Customers =\n [\n new()\n {\n ID = "id",\n Email = "dev@stainless.com",\n Name = "name",\n BillingID = "billingId",\n Metadata = new Dictionary<string, string>() { { "foo", "string" } },\n PaymentMethodID = "paymentMethodId",\n SalesforceID = "salesforceId",\n UpdatedAt = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),\n },\n ],\n};\n\nvar response = await client.V1.Customers.Import(parameters);\n\nConsole.WriteLine(response);',
|
|
359
359
|
},
|
|
360
360
|
http: {
|
|
361
|
-
example: 'curl https://api.stigg.io/api/v1/customers/import \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "customers": [\n {\n "id": "id",\n "email": "dev@stainless.com",\n "name": "name"\n }\n ]\n }\'',
|
|
361
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/import \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "customers": [\n {\n "id": "id",\n "email": "dev@stainless.com",\n "name": "name"\n }\n ]\n }\'',
|
|
362
362
|
},
|
|
363
363
|
},
|
|
364
364
|
},
|
|
@@ -410,7 +410,7 @@ const EMBEDDED_METHODS = [
|
|
|
410
410
|
example: 'CustomerListResourcesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Customers.ListResources(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
411
411
|
},
|
|
412
412
|
http: {
|
|
413
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/resources \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
413
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/resources \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
414
414
|
},
|
|
415
415
|
},
|
|
416
416
|
},
|
|
@@ -455,7 +455,7 @@ const EMBEDDED_METHODS = [
|
|
|
455
455
|
example: 'CustomerRetrieveEntitlementsParams parameters = new() { ID = "x" };\n\nvar response = await client.V1.Customers.RetrieveEntitlements(parameters);\n\nConsole.WriteLine(response);',
|
|
456
456
|
},
|
|
457
457
|
http: {
|
|
458
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
458
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
459
459
|
},
|
|
460
460
|
},
|
|
461
461
|
},
|
|
@@ -509,7 +509,7 @@ const EMBEDDED_METHODS = [
|
|
|
509
509
|
example: 'CustomerCheckEntitlementParams parameters = new() { ID = "x" };\n\nvar response = await client.V1.Customers.CheckEntitlement(parameters);\n\nConsole.WriteLine(response);',
|
|
510
510
|
},
|
|
511
511
|
http: {
|
|
512
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/entitlements/check \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
512
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/entitlements/check \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
513
513
|
},
|
|
514
514
|
},
|
|
515
515
|
},
|
|
@@ -562,7 +562,7 @@ const EMBEDDED_METHODS = [
|
|
|
562
562
|
example: 'PaymentMethodAttachParams parameters = new()\n{\n ID = "x",\n IntegrationID = "integrationId",\n PaymentMethodID = "paymentMethodId",\n VendorIdentifier = VendorIdentifier.Auth0,\n};\n\nvar customerResponse = await client.V1.Customers.PaymentMethod.Attach(parameters);\n\nConsole.WriteLine(customerResponse);',
|
|
563
563
|
},
|
|
564
564
|
http: {
|
|
565
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/payment-method \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "integrationId": "integrationId",\n "paymentMethodId": "paymentMethodId",\n "vendorIdentifier": "AUTH0"\n }\'',
|
|
565
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/payment-method \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "integrationId": "integrationId",\n "paymentMethodId": "paymentMethodId",\n "vendorIdentifier": "AUTH0"\n }\'',
|
|
566
566
|
},
|
|
567
567
|
},
|
|
568
568
|
},
|
|
@@ -607,7 +607,7 @@ const EMBEDDED_METHODS = [
|
|
|
607
607
|
example: 'PaymentMethodDetachParams parameters = new() { ID = "x" };\n\nvar customerResponse = await client.V1.Customers.PaymentMethod.Detach(parameters);\n\nConsole.WriteLine(customerResponse);',
|
|
608
608
|
},
|
|
609
609
|
http: {
|
|
610
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/payment-method \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
610
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/payment-method \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
611
611
|
},
|
|
612
612
|
},
|
|
613
613
|
},
|
|
@@ -661,7 +661,7 @@ const EMBEDDED_METHODS = [
|
|
|
661
661
|
example: 'PromotionalEntitlementListParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Customers.PromotionalEntitlements.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
662
662
|
},
|
|
663
663
|
http: {
|
|
664
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/promotional-entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
664
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/promotional-entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
665
665
|
},
|
|
666
666
|
},
|
|
667
667
|
},
|
|
@@ -711,7 +711,7 @@ const EMBEDDED_METHODS = [
|
|
|
711
711
|
example: 'PromotionalEntitlementCreateParams parameters = new()\n{\n ID = "x",\n PromotionalEntitlements =\n [\n new()\n {\n CustomEndDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),\n EnumValues =\n [\n "string"\n ],\n FeatureID = "featureId",\n HasSoftLimit = true,\n HasUnlimitedUsage = true,\n IsVisible = true,\n MonthlyResetPeriodConfiguration = new(\n AccordingTo.SubscriptionStart\n ),\n Period = Period.1Week,\n ResetPeriod = ResetPeriod.Year,\n UsageLimit = -9007199254740991,\n WeeklyResetPeriodConfiguration = new(AccordingTo.SubscriptionStart),\n YearlyResetPeriodConfiguration = new(AccordingTo.SubscriptionStart),\n },\n ],\n};\n\nvar promotionalEntitlement = await client.V1.Customers.PromotionalEntitlements.Create(parameters);\n\nConsole.WriteLine(promotionalEntitlement);',
|
|
712
712
|
},
|
|
713
713
|
http: {
|
|
714
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/promotional-entitlements \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "promotionalEntitlements": [\n {\n "customEndDate": "2019-12-27T18:11:19.117Z",\n "enumValues": [\n "string"\n ],\n "featureId": "featureId",\n "hasSoftLimit": true,\n "hasUnlimitedUsage": true,\n "isVisible": true,\n "monthlyResetPeriodConfiguration": {\n "accordingTo": "SubscriptionStart"\n },\n "period": "1 week",\n "resetPeriod": "YEAR",\n "usageLimit": -9007199254740991,\n "weeklyResetPeriodConfiguration": {\n "accordingTo": "SubscriptionStart"\n },\n "yearlyResetPeriodConfiguration": {\n "accordingTo": "SubscriptionStart"\n }\n }\n ]\n }\'',
|
|
714
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/promotional-entitlements \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "promotionalEntitlements": [\n {\n "customEndDate": "2019-12-27T18:11:19.117Z",\n "enumValues": [\n "string"\n ],\n "featureId": "featureId",\n "hasSoftLimit": true,\n "hasUnlimitedUsage": true,\n "isVisible": true,\n "monthlyResetPeriodConfiguration": {\n "accordingTo": "SubscriptionStart"\n },\n "period": "1 week",\n "resetPeriod": "YEAR",\n "usageLimit": -9007199254740991,\n "weeklyResetPeriodConfiguration": {\n "accordingTo": "SubscriptionStart"\n },\n "yearlyResetPeriodConfiguration": {\n "accordingTo": "SubscriptionStart"\n }\n }\n ]\n }\'',
|
|
715
715
|
},
|
|
716
716
|
},
|
|
717
717
|
},
|
|
@@ -756,7 +756,7 @@ const EMBEDDED_METHODS = [
|
|
|
756
756
|
example: 'PromotionalEntitlementRevokeParams parameters = new()\n{\n ID = "id",\n FeatureID = "featureId",\n};\n\nvar response = await client.V1.Customers.PromotionalEntitlements.Revoke(parameters);\n\nConsole.WriteLine(response);',
|
|
757
757
|
},
|
|
758
758
|
http: {
|
|
759
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/promotional-entitlements/$FEATURE_ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
759
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/promotional-entitlements/$FEATURE_ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
760
760
|
},
|
|
761
761
|
},
|
|
762
762
|
},
|
|
@@ -809,7 +809,7 @@ const EMBEDDED_METHODS = [
|
|
|
809
809
|
example: 'IntegrationListParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Customers.Integrations.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
810
810
|
},
|
|
811
811
|
http: {
|
|
812
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/integrations \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
812
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/integrations \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
813
813
|
},
|
|
814
814
|
},
|
|
815
815
|
},
|
|
@@ -861,7 +861,7 @@ const EMBEDDED_METHODS = [
|
|
|
861
861
|
example: 'IntegrationLinkParams parameters = new()\n{\n ID = "x",\n ID = "id",\n SyncedEntityID = "syncedEntityId",\n VendorIdentifier = VendorIdentifier.Auth0,\n};\n\nvar customerIntegrationResponse = await client.V1.Customers.Integrations.Link(parameters);\n\nConsole.WriteLine(customerIntegrationResponse);',
|
|
862
862
|
},
|
|
863
863
|
http: {
|
|
864
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/integrations \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "syncedEntityId": "syncedEntityId",\n "vendorIdentifier": "AUTH0"\n }\'',
|
|
864
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/integrations \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "syncedEntityId": "syncedEntityId",\n "vendorIdentifier": "AUTH0"\n }\'',
|
|
865
865
|
},
|
|
866
866
|
},
|
|
867
867
|
},
|
|
@@ -906,7 +906,7 @@ const EMBEDDED_METHODS = [
|
|
|
906
906
|
example: 'IntegrationRetrieveParams parameters = new()\n{\n ID = "id",\n IntegrationID = "integrationId",\n};\n\nvar customerIntegrationResponse = await client.V1.Customers.Integrations.Retrieve(parameters);\n\nConsole.WriteLine(customerIntegrationResponse);',
|
|
907
907
|
},
|
|
908
908
|
http: {
|
|
909
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/integrations/$INTEGRATION_ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
909
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/integrations/$INTEGRATION_ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
910
910
|
},
|
|
911
911
|
},
|
|
912
912
|
},
|
|
@@ -957,7 +957,7 @@ const EMBEDDED_METHODS = [
|
|
|
957
957
|
example: 'IntegrationUpdateParams parameters = new()\n{\n ID = "id",\n IntegrationID = "integrationId",\n SyncedEntityID = "syncedEntityId",\n};\n\nvar customerIntegrationResponse = await client.V1.Customers.Integrations.Update(parameters);\n\nConsole.WriteLine(customerIntegrationResponse);',
|
|
958
958
|
},
|
|
959
959
|
http: {
|
|
960
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/integrations/$INTEGRATION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "syncedEntityId": "syncedEntityId"\n }\'',
|
|
960
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/integrations/$INTEGRATION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "syncedEntityId": "syncedEntityId"\n }\'',
|
|
961
961
|
},
|
|
962
962
|
},
|
|
963
963
|
},
|
|
@@ -1002,7 +1002,7 @@ const EMBEDDED_METHODS = [
|
|
|
1002
1002
|
example: 'IntegrationUnlinkParams parameters = new()\n{\n ID = "id",\n IntegrationID = "integrationId",\n};\n\nvar customerIntegrationResponse = await client.V1.Customers.Integrations.Unlink(parameters);\n\nConsole.WriteLine(customerIntegrationResponse);',
|
|
1003
1003
|
},
|
|
1004
1004
|
http: {
|
|
1005
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID/integrations/$INTEGRATION_ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1005
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID/integrations/$INTEGRATION_ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1006
1006
|
},
|
|
1007
1007
|
},
|
|
1008
1008
|
},
|
|
@@ -1047,7 +1047,7 @@ const EMBEDDED_METHODS = [
|
|
|
1047
1047
|
example: 'SubscriptionRetrieveParams parameters = new() { ID = "x" };\n\nvar subscription = await client.V1.Subscriptions.Retrieve(parameters);\n\nConsole.WriteLine(subscription);',
|
|
1048
1048
|
},
|
|
1049
1049
|
http: {
|
|
1050
|
-
example: 'curl https://api.stigg.io/api/v1/subscriptions/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1050
|
+
example: 'curl https://edge.api.stigg.io/api/v1/subscriptions/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1051
1051
|
},
|
|
1052
1052
|
},
|
|
1053
1053
|
},
|
|
@@ -1104,7 +1104,7 @@ const EMBEDDED_METHODS = [
|
|
|
1104
1104
|
example: 'SubscriptionListParams parameters = new();\n\nvar page = await client.V1.Subscriptions.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
1105
1105
|
},
|
|
1106
1106
|
http: {
|
|
1107
|
-
example: 'curl https://api.stigg.io/api/v1/subscriptions \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1107
|
+
example: 'curl https://edge.api.stigg.io/api/v1/subscriptions \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1108
1108
|
},
|
|
1109
1109
|
},
|
|
1110
1110
|
},
|
|
@@ -1179,7 +1179,7 @@ const EMBEDDED_METHODS = [
|
|
|
1179
1179
|
example: 'SubscriptionProvisionParams parameters = new()\n{\n CustomerID = "customerId",\n PlanID = "planId",\n};\n\nvar response = await client.V1.Subscriptions.Provision(parameters);\n\nConsole.WriteLine(response);',
|
|
1180
1180
|
},
|
|
1181
1181
|
http: {
|
|
1182
|
-
example: 'curl https://api.stigg.io/api/v1/subscriptions \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "customerId": "customerId",\n "planId": "planId"\n }\'',
|
|
1182
|
+
example: 'curl https://edge.api.stigg.io/api/v1/subscriptions \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "customerId": "customerId",\n "planId": "planId"\n }\'',
|
|
1183
1183
|
},
|
|
1184
1184
|
},
|
|
1185
1185
|
},
|
|
@@ -1229,7 +1229,7 @@ const EMBEDDED_METHODS = [
|
|
|
1229
1229
|
example: 'SubscriptionTransferParams parameters = new()\n{\n ID = "x",\n DestinationResourceID = "destinationResourceId",\n};\n\nvar subscription = await client.V1.Subscriptions.Transfer(parameters);\n\nConsole.WriteLine(subscription);',
|
|
1230
1230
|
},
|
|
1231
1231
|
http: {
|
|
1232
|
-
example: 'curl https://api.stigg.io/api/v1/subscriptions/$ID/transfer \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "destinationResourceId": "destinationResourceId"\n }\'',
|
|
1232
|
+
example: 'curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/transfer \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "destinationResourceId": "destinationResourceId"\n }\'',
|
|
1233
1233
|
},
|
|
1234
1234
|
},
|
|
1235
1235
|
},
|
|
@@ -1279,7 +1279,7 @@ const EMBEDDED_METHODS = [
|
|
|
1279
1279
|
example: 'SubscriptionMigrateParams parameters = new() { ID = "x" };\n\nvar subscription = await client.V1.Subscriptions.Migrate(parameters);\n\nConsole.WriteLine(subscription);',
|
|
1280
1280
|
},
|
|
1281
1281
|
http: {
|
|
1282
|
-
example: "curl https://api.stigg.io/api/v1/subscriptions/$ID/migrate \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1282
|
+
example: "curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/migrate \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1283
1283
|
},
|
|
1284
1284
|
},
|
|
1285
1285
|
},
|
|
@@ -1329,7 +1329,7 @@ const EMBEDDED_METHODS = [
|
|
|
1329
1329
|
example: 'SubscriptionDelegateParams parameters = new()\n{\n ID = "x",\n TargetCustomerID = "targetCustomerId",\n};\n\nvar subscription = await client.V1.Subscriptions.Delegate(parameters);\n\nConsole.WriteLine(subscription);',
|
|
1330
1330
|
},
|
|
1331
1331
|
http: {
|
|
1332
|
-
example: 'curl https://api.stigg.io/api/v1/subscriptions/$ID/delegate \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "targetCustomerId": "targetCustomerId"\n }\'',
|
|
1332
|
+
example: 'curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/delegate \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "targetCustomerId": "targetCustomerId"\n }\'',
|
|
1333
1333
|
},
|
|
1334
1334
|
},
|
|
1335
1335
|
},
|
|
@@ -1393,7 +1393,7 @@ const EMBEDDED_METHODS = [
|
|
|
1393
1393
|
example: 'SubscriptionPreviewParams parameters = new()\n{\n CustomerID = "customerId",\n PlanID = "planId",\n};\n\nvar response = await client.V1.Subscriptions.Preview(parameters);\n\nConsole.WriteLine(response);',
|
|
1394
1394
|
},
|
|
1395
1395
|
http: {
|
|
1396
|
-
example: 'curl https://api.stigg.io/api/v1/subscriptions/preview \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "customerId": "customerId",\n "planId": "planId"\n }\'',
|
|
1396
|
+
example: 'curl https://edge.api.stigg.io/api/v1/subscriptions/preview \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "customerId": "customerId",\n "planId": "planId"\n }\'',
|
|
1397
1397
|
},
|
|
1398
1398
|
},
|
|
1399
1399
|
},
|
|
@@ -1459,7 +1459,7 @@ const EMBEDDED_METHODS = [
|
|
|
1459
1459
|
example: 'SubscriptionUpdateParams parameters = new() { ID = "x" };\n\nvar subscription = await client.V1.Subscriptions.Update(parameters);\n\nConsole.WriteLine(subscription);',
|
|
1460
1460
|
},
|
|
1461
1461
|
http: {
|
|
1462
|
-
example: "curl https://api.stigg.io/api/v1/subscriptions/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1462
|
+
example: "curl https://edge.api.stigg.io/api/v1/subscriptions/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1463
1463
|
},
|
|
1464
1464
|
},
|
|
1465
1465
|
},
|
|
@@ -1509,7 +1509,7 @@ const EMBEDDED_METHODS = [
|
|
|
1509
1509
|
example: 'SubscriptionImportParams parameters = new()\n{\n Subscriptions =\n [\n new()\n {\n ID = "id",\n CustomerID = "customerId",\n PlanID = "planId",\n Addons =\n [\n new()\n {\n ID = "id",\n Quantity = 0,\n },\n ],\n BillingID = "billingId",\n BillingPeriod = BillingPeriod.Monthly,\n Charges =\n [\n new()\n {\n ID = "id",\n Quantity = 0,\n Type = Type.Feature,\n },\n ],\n EndDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),\n Metadata = new Dictionary<string, string>() { { "foo", "string" } },\n ResourceID = "resourceId",\n StartDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),\n },\n ],\n};\n\nvar response = await client.V1.Subscriptions.Import(parameters);\n\nConsole.WriteLine(response);',
|
|
1510
1510
|
},
|
|
1511
1511
|
http: {
|
|
1512
|
-
example: 'curl https://api.stigg.io/api/v1/subscriptions/import \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "subscriptions": [\n {\n "id": "id",\n "customerId": "customerId",\n "planId": "planId"\n }\n ]\n }\'',
|
|
1512
|
+
example: 'curl https://edge.api.stigg.io/api/v1/subscriptions/import \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "subscriptions": [\n {\n "id": "id",\n "customerId": "customerId",\n "planId": "planId"\n }\n ]\n }\'',
|
|
1513
1513
|
},
|
|
1514
1514
|
},
|
|
1515
1515
|
},
|
|
@@ -1562,7 +1562,7 @@ const EMBEDDED_METHODS = [
|
|
|
1562
1562
|
example: 'SubscriptionCancelParams parameters = new() { ID = "x" };\n\nvar subscription = await client.V1.Subscriptions.Cancel(parameters);\n\nConsole.WriteLine(subscription);',
|
|
1563
1563
|
},
|
|
1564
1564
|
http: {
|
|
1565
|
-
example: "curl https://api.stigg.io/api/v1/subscriptions/$ID/cancel \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1565
|
+
example: "curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/cancel \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1566
1566
|
},
|
|
1567
1567
|
},
|
|
1568
1568
|
},
|
|
@@ -1607,7 +1607,7 @@ const EMBEDDED_METHODS = [
|
|
|
1607
1607
|
example: 'FutureUpdateCancelPendingPaymentParams parameters = new() { ID = "x" };\n\nvar cancelSubscription = await client.V1.Subscriptions.FutureUpdate.CancelPendingPayment(parameters);\n\nConsole.WriteLine(cancelSubscription);',
|
|
1608
1608
|
},
|
|
1609
1609
|
http: {
|
|
1610
|
-
example: 'curl https://api.stigg.io/api/v1/subscriptions/$ID/future-update/pending-payment \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1610
|
+
example: 'curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/future-update/pending-payment \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1611
1611
|
},
|
|
1612
1612
|
},
|
|
1613
1613
|
},
|
|
@@ -1652,7 +1652,7 @@ const EMBEDDED_METHODS = [
|
|
|
1652
1652
|
example: 'FutureUpdateCancelScheduleParams parameters = new() { ID = "x" };\n\nvar cancelSubscription = await client.V1.Subscriptions.FutureUpdate.CancelSchedule(parameters);\n\nConsole.WriteLine(cancelSubscription);',
|
|
1653
1653
|
},
|
|
1654
1654
|
http: {
|
|
1655
|
-
example: 'curl https://api.stigg.io/api/v1/subscriptions/$ID/future-update/schedule \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1655
|
+
example: 'curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/future-update/schedule \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1656
1656
|
},
|
|
1657
1657
|
},
|
|
1658
1658
|
},
|
|
@@ -1697,7 +1697,7 @@ const EMBEDDED_METHODS = [
|
|
|
1697
1697
|
example: 'UsageChargeUsageParams parameters = new() { ID = "x" };\n\nvar response = await client.V1.Subscriptions.Usage.ChargeUsage(parameters);\n\nConsole.WriteLine(response);',
|
|
1698
1698
|
},
|
|
1699
1699
|
http: {
|
|
1700
|
-
example: "curl https://api.stigg.io/api/v1/subscriptions/$ID/usage/charge \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1700
|
+
example: "curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/usage/charge \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1701
1701
|
},
|
|
1702
1702
|
},
|
|
1703
1703
|
},
|
|
@@ -1742,7 +1742,7 @@ const EMBEDDED_METHODS = [
|
|
|
1742
1742
|
example: 'UsageSyncParams parameters = new() { ID = "x" };\n\nvar response = await client.V1.Subscriptions.Usage.Sync(parameters);\n\nConsole.WriteLine(response);',
|
|
1743
1743
|
},
|
|
1744
1744
|
http: {
|
|
1745
|
-
example: 'curl https://api.stigg.io/api/v1/subscriptions/$ID/usage/sync \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1745
|
+
example: 'curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/usage/sync \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1746
1746
|
},
|
|
1747
1747
|
},
|
|
1748
1748
|
},
|
|
@@ -1787,7 +1787,7 @@ const EMBEDDED_METHODS = [
|
|
|
1787
1787
|
example: 'InvoiceMarkAsPaidParams parameters = new() { ID = "x" };\n\nvar response = await client.V1.Subscriptions.Invoice.MarkAsPaid(parameters);\n\nConsole.WriteLine(response);',
|
|
1788
1788
|
},
|
|
1789
1789
|
http: {
|
|
1790
|
-
example: 'curl https://api.stigg.io/api/v1/subscriptions/$ID/invoice/paid \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1790
|
+
example: 'curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/invoice/paid \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1791
1791
|
},
|
|
1792
1792
|
},
|
|
1793
1793
|
},
|
|
@@ -1842,7 +1842,7 @@ const EMBEDDED_METHODS = [
|
|
|
1842
1842
|
example: 'CouponCreateParams parameters = new()\n{\n ID = "id",\n AmountsOff =\n [\n new()\n {\n Amount = 0,\n Currency = Currency.Usd,\n },\n ],\n Description = "description",\n DurationInMonths = 1,\n Metadata = new Dictionary<string, string>() { { "foo", "string" } },\n Name = "name",\n PercentOff = 1,\n};\n\nvar coupon = await client.V1.Coupons.Create(parameters);\n\nConsole.WriteLine(coupon);',
|
|
1843
1843
|
},
|
|
1844
1844
|
http: {
|
|
1845
|
-
example: 'curl https://api.stigg.io/api/v1/coupons \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "amountsOff": [\n {\n "amount": 0,\n "currency": "usd"\n }\n ],\n "description": "description",\n "durationInMonths": 1,\n "metadata": {\n "foo": "string"\n },\n "name": "name",\n "percentOff": 1\n }\'',
|
|
1845
|
+
example: 'curl https://edge.api.stigg.io/api/v1/coupons \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "amountsOff": [\n {\n "amount": 0,\n "currency": "usd"\n }\n ],\n "description": "description",\n "durationInMonths": 1,\n "metadata": {\n "foo": "string"\n },\n "name": "name",\n "percentOff": 1\n }\'',
|
|
1846
1846
|
},
|
|
1847
1847
|
},
|
|
1848
1848
|
},
|
|
@@ -1897,7 +1897,7 @@ const EMBEDDED_METHODS = [
|
|
|
1897
1897
|
example: 'CouponListParams parameters = new();\n\nvar page = await client.V1.Coupons.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
1898
1898
|
},
|
|
1899
1899
|
http: {
|
|
1900
|
-
example: 'curl https://api.stigg.io/api/v1/coupons \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1900
|
+
example: 'curl https://edge.api.stigg.io/api/v1/coupons \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1901
1901
|
},
|
|
1902
1902
|
},
|
|
1903
1903
|
},
|
|
@@ -1942,7 +1942,7 @@ const EMBEDDED_METHODS = [
|
|
|
1942
1942
|
example: 'CouponRetrieveParams parameters = new() { ID = "x" };\n\nvar coupon = await client.V1.Coupons.Retrieve(parameters);\n\nConsole.WriteLine(coupon);',
|
|
1943
1943
|
},
|
|
1944
1944
|
http: {
|
|
1945
|
-
example: 'curl https://api.stigg.io/api/v1/coupons/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1945
|
+
example: 'curl https://edge.api.stigg.io/api/v1/coupons/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1946
1946
|
},
|
|
1947
1947
|
},
|
|
1948
1948
|
},
|
|
@@ -1994,7 +1994,7 @@ const EMBEDDED_METHODS = [
|
|
|
1994
1994
|
example: 'CouponUpdateCouponParams parameters = new() { ID = "x" };\n\nvar coupon = await client.V1.Coupons.UpdateCoupon(parameters);\n\nConsole.WriteLine(coupon);',
|
|
1995
1995
|
},
|
|
1996
1996
|
http: {
|
|
1997
|
-
example: "curl https://api.stigg.io/api/v1/coupons/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1997
|
+
example: "curl https://edge.api.stigg.io/api/v1/coupons/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1998
1998
|
},
|
|
1999
1999
|
},
|
|
2000
2000
|
},
|
|
@@ -2039,7 +2039,7 @@ const EMBEDDED_METHODS = [
|
|
|
2039
2039
|
example: 'CouponArchiveCouponParams parameters = new() { ID = "x" };\n\nvar coupon = await client.V1.Coupons.ArchiveCoupon(parameters);\n\nConsole.WriteLine(coupon);',
|
|
2040
2040
|
},
|
|
2041
2041
|
http: {
|
|
2042
|
-
example: 'curl https://api.stigg.io/api/v1/coupons/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2042
|
+
example: 'curl https://edge.api.stigg.io/api/v1/coupons/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2043
2043
|
},
|
|
2044
2044
|
},
|
|
2045
2045
|
},
|
|
@@ -2088,7 +2088,7 @@ const EMBEDDED_METHODS = [
|
|
|
2088
2088
|
example: 'EventReportParams parameters = new()\n{\n Events =\n [\n new()\n {\n CustomerID = "customerId",\n EventName = "x",\n IdempotencyKey = "x",\n Dimensions = new Dictionary<string, Dimension>()\n {\n { "foo", "string" }\n },\n ResourceID = "resourceId",\n Timestamp = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),\n },\n ],\n};\n\nvar response = await client.V1.Events.Report(parameters);\n\nConsole.WriteLine(response);',
|
|
2089
2089
|
},
|
|
2090
2090
|
http: {
|
|
2091
|
-
example: 'curl https://api.stigg.io/api/v1/events \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "events": [\n {\n "customerId": "customerId",\n "eventName": "x",\n "idempotencyKey": "x"\n }\n ]\n }\'',
|
|
2091
|
+
example: 'curl https://edge.api.stigg.io/api/v1/events \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "events": [\n {\n "customerId": "customerId",\n "eventName": "x",\n "idempotencyKey": "x"\n }\n ]\n }\'',
|
|
2092
2092
|
},
|
|
2093
2093
|
},
|
|
2094
2094
|
},
|
|
@@ -2133,7 +2133,7 @@ const EMBEDDED_METHODS = [
|
|
|
2133
2133
|
example: 'DataExportTriggerSyncParams parameters = new();\n\nvar response = await client.V1.Events.DataExport.TriggerSync(parameters);\n\nConsole.WriteLine(response);',
|
|
2134
2134
|
},
|
|
2135
2135
|
http: {
|
|
2136
|
-
example: "curl https://api.stigg.io/api/v1/data-export/sync \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
2136
|
+
example: "curl https://edge.api.stigg.io/api/v1/data-export/sync \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
2137
2137
|
},
|
|
2138
2138
|
},
|
|
2139
2139
|
},
|
|
@@ -2184,7 +2184,7 @@ const EMBEDDED_METHODS = [
|
|
|
2184
2184
|
example: 'DataExportMintScopedTokenParams parameters = new() { ApplicationOrigin = "x" };\n\nvar response = await client.V1.Events.DataExport.MintScopedToken(parameters);\n\nConsole.WriteLine(response);',
|
|
2185
2185
|
},
|
|
2186
2186
|
http: {
|
|
2187
|
-
example: 'curl https://api.stigg.io/api/v1/data-export/scoped-token \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "applicationOrigin": "x"\n }\'',
|
|
2187
|
+
example: 'curl https://edge.api.stigg.io/api/v1/data-export/scoped-token \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "applicationOrigin": "x"\n }\'',
|
|
2188
2188
|
},
|
|
2189
2189
|
},
|
|
2190
2190
|
},
|
|
@@ -2229,7 +2229,7 @@ const EMBEDDED_METHODS = [
|
|
|
2229
2229
|
example: 'DataExportListModelsParams parameters = new();\n\nvar response = await client.V1.Events.DataExport.ListModels(parameters);\n\nConsole.WriteLine(response);',
|
|
2230
2230
|
},
|
|
2231
2231
|
http: {
|
|
2232
|
-
example: 'curl https://api.stigg.io/api/v1/data-export/models \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2232
|
+
example: 'curl https://edge.api.stigg.io/api/v1/data-export/models \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2233
2233
|
},
|
|
2234
2234
|
},
|
|
2235
2235
|
},
|
|
@@ -2280,7 +2280,7 @@ const EMBEDDED_METHODS = [
|
|
|
2280
2280
|
example: 'DestinationCreateParams parameters = new()\n{\n DestinationID = "x",\n DestinationType = "x",\n};\n\nvar destination = await client.V1.Events.DataExport.Destinations.Create(parameters);\n\nConsole.WriteLine(destination);',
|
|
2281
2281
|
},
|
|
2282
2282
|
http: {
|
|
2283
|
-
example: 'curl https://api.stigg.io/api/v1/data-export/destinations \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "destinationId": "x",\n "destinationType": "x"\n }\'',
|
|
2283
|
+
example: 'curl https://edge.api.stigg.io/api/v1/data-export/destinations \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "destinationId": "x",\n "destinationType": "x"\n }\'',
|
|
2284
2284
|
},
|
|
2285
2285
|
},
|
|
2286
2286
|
},
|
|
@@ -2325,7 +2325,7 @@ const EMBEDDED_METHODS = [
|
|
|
2325
2325
|
example: 'DestinationDeleteParams parameters = new() { DestinationID = "x" };\n\nvar destination = await client.V1.Events.DataExport.Destinations.Delete(parameters);\n\nConsole.WriteLine(destination);',
|
|
2326
2326
|
},
|
|
2327
2327
|
http: {
|
|
2328
|
-
example: 'curl https://api.stigg.io/api/v1/data-export/destinations/$DESTINATION_ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2328
|
+
example: 'curl https://edge.api.stigg.io/api/v1/data-export/destinations/$DESTINATION_ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2329
2329
|
},
|
|
2330
2330
|
},
|
|
2331
2331
|
},
|
|
@@ -2376,7 +2376,7 @@ const EMBEDDED_METHODS = [
|
|
|
2376
2376
|
example: 'DestinationUpdateParams parameters = new()\n{\n DestinationID = "x",\n EnabledModels =\n [\n "x"\n ],\n IntegrationID = "x",\n};\n\nvar destination = await client.V1.Events.DataExport.Destinations.Update(parameters);\n\nConsole.WriteLine(destination);',
|
|
2377
2377
|
},
|
|
2378
2378
|
http: {
|
|
2379
|
-
example: 'curl https://api.stigg.io/api/v1/data-export/destinations/$DESTINATION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "enabledModels": [\n "x"\n ],\n "integrationId": "x"\n }\'',
|
|
2379
|
+
example: 'curl https://edge.api.stigg.io/api/v1/data-export/destinations/$DESTINATION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "enabledModels": [\n "x"\n ],\n "integrationId": "x"\n }\'',
|
|
2380
2380
|
},
|
|
2381
2381
|
},
|
|
2382
2382
|
},
|
|
@@ -2435,7 +2435,7 @@ const EMBEDDED_METHODS = [
|
|
|
2435
2435
|
example: 'CustomerRetrieveGovernanceParams parameters = new() { ID = "id" };\n\nvar response = await client.V1.Events.Beta.Customers.RetrieveGovernance(parameters);\n\nConsole.WriteLine(response);',
|
|
2436
2436
|
},
|
|
2437
2437
|
http: {
|
|
2438
|
-
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/governance \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2438
|
+
example: 'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/governance \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2439
2439
|
},
|
|
2440
2440
|
},
|
|
2441
2441
|
},
|
|
@@ -2493,7 +2493,7 @@ const EMBEDDED_METHODS = [
|
|
|
2493
2493
|
example: 'CreditGetUsageParams parameters = new() { CustomerID = "customerId" };\n\nvar response = await client.V1.Credits.GetUsage(parameters);\n\nConsole.WriteLine(response);',
|
|
2494
2494
|
},
|
|
2495
2495
|
http: {
|
|
2496
|
-
example: 'curl https://api.stigg.io/api/v1/credits/usage \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2496
|
+
example: 'curl https://edge.api.stigg.io/api/v1/credits/usage \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2497
2497
|
},
|
|
2498
2498
|
},
|
|
2499
2499
|
},
|
|
@@ -2543,7 +2543,7 @@ const EMBEDDED_METHODS = [
|
|
|
2543
2543
|
example: 'CreditGetAutoRechargeParams parameters = new()\n{\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n};\n\nvar response = await client.V1.Credits.GetAutoRecharge(parameters);\n\nConsole.WriteLine(response);',
|
|
2544
2544
|
},
|
|
2545
2545
|
http: {
|
|
2546
|
-
example: 'curl https://api.stigg.io/api/v1/credits/auto-recharge \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2546
|
+
example: 'curl https://edge.api.stigg.io/api/v1/credits/auto-recharge \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2547
2547
|
},
|
|
2548
2548
|
},
|
|
2549
2549
|
},
|
|
@@ -2597,7 +2597,7 @@ const EMBEDDED_METHODS = [
|
|
|
2597
2597
|
example: 'CreditListLedgerParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.Credits.ListLedger(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
2598
2598
|
},
|
|
2599
2599
|
http: {
|
|
2600
|
-
example: 'curl https://api.stigg.io/api/v1/credits/ledger \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2600
|
+
example: 'curl https://edge.api.stigg.io/api/v1/credits/ledger \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2601
2601
|
},
|
|
2602
2602
|
},
|
|
2603
2603
|
},
|
|
@@ -2652,7 +2652,7 @@ const EMBEDDED_METHODS = [
|
|
|
2652
2652
|
example: 'GrantListParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.Credits.Grants.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
2653
2653
|
},
|
|
2654
2654
|
http: {
|
|
2655
|
-
example: 'curl https://api.stigg.io/api/v1/credits/grants \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2655
|
+
example: 'curl https://edge.api.stigg.io/api/v1/credits/grants \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2656
2656
|
},
|
|
2657
2657
|
},
|
|
2658
2658
|
},
|
|
@@ -2715,7 +2715,7 @@ const EMBEDDED_METHODS = [
|
|
|
2715
2715
|
example: 'GrantCreateParams parameters = new()\n{\n Amount = 0,\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n DisplayName = "displayName",\n GrantType = GrantType.Paid,\n};\n\nvar creditGrantResponse = await client.V1.Credits.Grants.Create(parameters);\n\nConsole.WriteLine(creditGrantResponse);',
|
|
2716
2716
|
},
|
|
2717
2717
|
http: {
|
|
2718
|
-
example: 'curl https://api.stigg.io/api/v1/credits/grants \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "amount": 0,\n "currencyId": "currencyId",\n "customerId": "customerId",\n "displayName": "displayName",\n "grantType": "PAID"\n }\'',
|
|
2718
|
+
example: 'curl https://edge.api.stigg.io/api/v1/credits/grants \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "amount": 0,\n "currencyId": "currencyId",\n "customerId": "customerId",\n "displayName": "displayName",\n "grantType": "PAID"\n }\'',
|
|
2719
2719
|
},
|
|
2720
2720
|
},
|
|
2721
2721
|
},
|
|
@@ -2760,7 +2760,7 @@ const EMBEDDED_METHODS = [
|
|
|
2760
2760
|
example: 'GrantVoidParams parameters = new() { ID = "x" };\n\nvar creditGrantResponse = await client.V1.Credits.Grants.Void(parameters);\n\nConsole.WriteLine(creditGrantResponse);',
|
|
2761
2761
|
},
|
|
2762
2762
|
http: {
|
|
2763
|
-
example: 'curl https://api.stigg.io/api/v1/credits/grants/$ID/void \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2763
|
+
example: 'curl https://edge.api.stigg.io/api/v1/credits/grants/$ID/void \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2764
2764
|
},
|
|
2765
2765
|
},
|
|
2766
2766
|
},
|
|
@@ -2812,7 +2812,7 @@ const EMBEDDED_METHODS = [
|
|
|
2812
2812
|
example: 'CustomCurrencyListParams parameters = new();\n\nvar page = await client.V1.Credits.CustomCurrencies.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
2813
2813
|
},
|
|
2814
2814
|
http: {
|
|
2815
|
-
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2815
|
+
example: 'curl https://edge.api.stigg.io/api/v1/credits/custom-currencies \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2816
2816
|
},
|
|
2817
2817
|
},
|
|
2818
2818
|
},
|
|
@@ -2866,7 +2866,7 @@ const EMBEDDED_METHODS = [
|
|
|
2866
2866
|
example: 'CustomCurrencyCreateParams parameters = new()\n{\n ID = "id",\n DisplayName = "displayName",\n};\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Create(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
|
|
2867
2867
|
},
|
|
2868
2868
|
http: {
|
|
2869
|
-
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName"\n }\'',
|
|
2869
|
+
example: 'curl https://edge.api.stigg.io/api/v1/credits/custom-currencies \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName"\n }\'',
|
|
2870
2870
|
},
|
|
2871
2871
|
},
|
|
2872
2872
|
},
|
|
@@ -2920,7 +2920,7 @@ const EMBEDDED_METHODS = [
|
|
|
2920
2920
|
example: 'CustomCurrencyUpdateParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Update(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
|
|
2921
2921
|
},
|
|
2922
2922
|
http: {
|
|
2923
|
-
example: "curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
2923
|
+
example: "curl https://edge.api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
2924
2924
|
},
|
|
2925
2925
|
},
|
|
2926
2926
|
},
|
|
@@ -2965,7 +2965,7 @@ const EMBEDDED_METHODS = [
|
|
|
2965
2965
|
example: 'CustomCurrencyArchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Archive(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
|
|
2966
2966
|
},
|
|
2967
2967
|
http: {
|
|
2968
|
-
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2968
|
+
example: 'curl https://edge.api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2969
2969
|
},
|
|
2970
2970
|
},
|
|
2971
2971
|
},
|
|
@@ -3010,7 +3010,7 @@ const EMBEDDED_METHODS = [
|
|
|
3010
3010
|
example: 'CustomCurrencyUnarchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Unarchive(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
|
|
3011
3011
|
},
|
|
3012
3012
|
http: {
|
|
3013
|
-
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3013
|
+
example: 'curl https://edge.api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3014
3014
|
},
|
|
3015
3015
|
},
|
|
3016
3016
|
},
|
|
@@ -3055,7 +3055,7 @@ const EMBEDDED_METHODS = [
|
|
|
3055
3055
|
example: 'CustomCurrencyListAssociatedEntitiesParams parameters = new()\n{\n CurrencyID = "currencyId"\n};\n\nvar response = await client.V1.Credits.CustomCurrencies.ListAssociatedEntities(parameters);\n\nConsole.WriteLine(response);',
|
|
3056
3056
|
},
|
|
3057
3057
|
http: {
|
|
3058
|
-
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/associated-entities \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3058
|
+
example: 'curl https://edge.api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/associated-entities \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3059
3059
|
},
|
|
3060
3060
|
},
|
|
3061
3061
|
},
|
|
@@ -3100,7 +3100,7 @@ const EMBEDDED_METHODS = [
|
|
|
3100
3100
|
example: 'FeatureRetrieveFeatureParams parameters = new() { ID = "x" };\n\nvar feature = await client.V1.Features.RetrieveFeature(parameters);\n\nConsole.WriteLine(feature);',
|
|
3101
3101
|
},
|
|
3102
3102
|
http: {
|
|
3103
|
-
example: 'curl https://api.stigg.io/api/v1/features/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3103
|
+
example: 'curl https://edge.api.stigg.io/api/v1/features/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3104
3104
|
},
|
|
3105
3105
|
},
|
|
3106
3106
|
},
|
|
@@ -3157,7 +3157,7 @@ const EMBEDDED_METHODS = [
|
|
|
3157
3157
|
example: 'FeatureUpdateFeatureParams parameters = new() { ID = "x" };\n\nvar feature = await client.V1.Features.UpdateFeature(parameters);\n\nConsole.WriteLine(feature);',
|
|
3158
3158
|
},
|
|
3159
3159
|
http: {
|
|
3160
|
-
example: "curl https://api.stigg.io/api/v1/features/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
3160
|
+
example: "curl https://edge.api.stigg.io/api/v1/features/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
3161
3161
|
},
|
|
3162
3162
|
},
|
|
3163
3163
|
},
|
|
@@ -3216,7 +3216,7 @@ const EMBEDDED_METHODS = [
|
|
|
3216
3216
|
example: 'FeatureCreateFeatureParams parameters = new()\n{\n ID = "id",\n DisplayName = "displayName",\n FeatureType = FeatureType.Boolean,\n};\n\nvar feature = await client.V1.Features.CreateFeature(parameters);\n\nConsole.WriteLine(feature);',
|
|
3217
3217
|
},
|
|
3218
3218
|
http: {
|
|
3219
|
-
example: 'curl https://api.stigg.io/api/v1/features \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName",\n "featureType": "BOOLEAN"\n }\'',
|
|
3219
|
+
example: 'curl https://edge.api.stigg.io/api/v1/features \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName",\n "featureType": "BOOLEAN"\n }\'',
|
|
3220
3220
|
},
|
|
3221
3221
|
},
|
|
3222
3222
|
},
|
|
@@ -3272,7 +3272,7 @@ const EMBEDDED_METHODS = [
|
|
|
3272
3272
|
example: 'FeatureListFeaturesParams parameters = new();\n\nvar page = await client.V1.Features.ListFeatures(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
3273
3273
|
},
|
|
3274
3274
|
http: {
|
|
3275
|
-
example: 'curl https://api.stigg.io/api/v1/features \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3275
|
+
example: 'curl https://edge.api.stigg.io/api/v1/features \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3276
3276
|
},
|
|
3277
3277
|
},
|
|
3278
3278
|
},
|
|
@@ -3317,7 +3317,7 @@ const EMBEDDED_METHODS = [
|
|
|
3317
3317
|
example: 'FeatureArchiveFeatureParams parameters = new() { ID = "x" };\n\nvar feature = await client.V1.Features.ArchiveFeature(parameters);\n\nConsole.WriteLine(feature);',
|
|
3318
3318
|
},
|
|
3319
3319
|
http: {
|
|
3320
|
-
example: 'curl https://api.stigg.io/api/v1/features/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3320
|
+
example: 'curl https://edge.api.stigg.io/api/v1/features/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3321
3321
|
},
|
|
3322
3322
|
},
|
|
3323
3323
|
},
|
|
@@ -3362,7 +3362,7 @@ const EMBEDDED_METHODS = [
|
|
|
3362
3362
|
example: 'FeatureUnarchiveFeatureParams parameters = new() { ID = "x" };\n\nvar feature = await client.V1.Features.UnarchiveFeature(parameters);\n\nConsole.WriteLine(feature);',
|
|
3363
3363
|
},
|
|
3364
3364
|
http: {
|
|
3365
|
-
example: 'curl https://api.stigg.io/api/v1/features/$ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3365
|
+
example: 'curl https://edge.api.stigg.io/api/v1/features/$ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3366
3366
|
},
|
|
3367
3367
|
},
|
|
3368
3368
|
},
|
|
@@ -3416,7 +3416,7 @@ const EMBEDDED_METHODS = [
|
|
|
3416
3416
|
example: 'AddonListParams parameters = new();\n\nvar page = await client.V1.Addons.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
3417
3417
|
},
|
|
3418
3418
|
http: {
|
|
3419
|
-
example: 'curl https://api.stigg.io/api/v1/addons \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3419
|
+
example: 'curl https://edge.api.stigg.io/api/v1/addons \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3420
3420
|
},
|
|
3421
3421
|
},
|
|
3422
3422
|
},
|
|
@@ -3473,7 +3473,7 @@ const EMBEDDED_METHODS = [
|
|
|
3473
3473
|
example: 'AddonCreateParams parameters = new()\n{\n ID = "id",\n DisplayName = "displayName",\n ProductID = "productId",\n};\n\nvar addon = await client.V1.Addons.Create(parameters);\n\nConsole.WriteLine(addon);',
|
|
3474
3474
|
},
|
|
3475
3475
|
http: {
|
|
3476
|
-
example: 'curl https://api.stigg.io/api/v1/addons \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName",\n "productId": "productId"\n }\'',
|
|
3476
|
+
example: 'curl https://edge.api.stigg.io/api/v1/addons \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName",\n "productId": "productId"\n }\'',
|
|
3477
3477
|
},
|
|
3478
3478
|
},
|
|
3479
3479
|
},
|
|
@@ -3518,7 +3518,7 @@ const EMBEDDED_METHODS = [
|
|
|
3518
3518
|
example: 'AddonRetrieveParams parameters = new() { ID = "x" };\n\nvar addon = await client.V1.Addons.Retrieve(parameters);\n\nConsole.WriteLine(addon);',
|
|
3519
3519
|
},
|
|
3520
3520
|
http: {
|
|
3521
|
-
example: 'curl https://api.stigg.io/api/v1/addons/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3521
|
+
example: 'curl https://edge.api.stigg.io/api/v1/addons/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3522
3522
|
},
|
|
3523
3523
|
},
|
|
3524
3524
|
},
|
|
@@ -3575,7 +3575,7 @@ const EMBEDDED_METHODS = [
|
|
|
3575
3575
|
example: 'AddonUpdateParams parameters = new() { ID = "x" };\n\nvar addon = await client.V1.Addons.Update(parameters);\n\nConsole.WriteLine(addon);',
|
|
3576
3576
|
},
|
|
3577
3577
|
http: {
|
|
3578
|
-
example: "curl https://api.stigg.io/api/v1/addons/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
3578
|
+
example: "curl https://edge.api.stigg.io/api/v1/addons/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
3579
3579
|
},
|
|
3580
3580
|
},
|
|
3581
3581
|
},
|
|
@@ -3620,7 +3620,7 @@ const EMBEDDED_METHODS = [
|
|
|
3620
3620
|
example: 'AddonArchiveParams parameters = new() { ID = "x" };\n\nvar addon = await client.V1.Addons.Archive(parameters);\n\nConsole.WriteLine(addon);',
|
|
3621
3621
|
},
|
|
3622
3622
|
http: {
|
|
3623
|
-
example: 'curl https://api.stigg.io/api/v1/addons/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3623
|
+
example: 'curl https://edge.api.stigg.io/api/v1/addons/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3624
3624
|
},
|
|
3625
3625
|
},
|
|
3626
3626
|
},
|
|
@@ -3670,7 +3670,7 @@ const EMBEDDED_METHODS = [
|
|
|
3670
3670
|
example: 'AddonPublishParams parameters = new()\n{\n ID = "x",\n MigrationType = MigrationType.NewCustomers,\n};\n\nvar response = await client.V1.Addons.Publish(parameters);\n\nConsole.WriteLine(response);',
|
|
3671
3671
|
},
|
|
3672
3672
|
http: {
|
|
3673
|
-
example: 'curl https://api.stigg.io/api/v1/addons/$ID/publish \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "migrationType": "NEW_CUSTOMERS"\n }\'',
|
|
3673
|
+
example: 'curl https://edge.api.stigg.io/api/v1/addons/$ID/publish \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "migrationType": "NEW_CUSTOMERS"\n }\'',
|
|
3674
3674
|
},
|
|
3675
3675
|
},
|
|
3676
3676
|
},
|
|
@@ -3715,7 +3715,7 @@ const EMBEDDED_METHODS = [
|
|
|
3715
3715
|
example: 'AddonCreateDraftParams parameters = new() { ID = "x" };\n\nvar addon = await client.V1.Addons.CreateDraft(parameters);\n\nConsole.WriteLine(addon);',
|
|
3716
3716
|
},
|
|
3717
3717
|
http: {
|
|
3718
|
-
example: 'curl https://api.stigg.io/api/v1/addons/$ID/draft \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3718
|
+
example: 'curl https://edge.api.stigg.io/api/v1/addons/$ID/draft \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3719
3719
|
},
|
|
3720
3720
|
},
|
|
3721
3721
|
},
|
|
@@ -3760,7 +3760,7 @@ const EMBEDDED_METHODS = [
|
|
|
3760
3760
|
example: 'AddonRemoveDraftParams parameters = new() { ID = "x" };\n\nvar response = await client.V1.Addons.RemoveDraft(parameters);\n\nConsole.WriteLine(response);',
|
|
3761
3761
|
},
|
|
3762
3762
|
http: {
|
|
3763
|
-
example: 'curl https://api.stigg.io/api/v1/addons/$ID/draft \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3763
|
+
example: 'curl https://edge.api.stigg.io/api/v1/addons/$ID/draft \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3764
3764
|
},
|
|
3765
3765
|
},
|
|
3766
3766
|
},
|
|
@@ -3812,7 +3812,7 @@ const EMBEDDED_METHODS = [
|
|
|
3812
3812
|
example: 'AddonListChargesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Addons.ListCharges(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
3813
3813
|
},
|
|
3814
3814
|
http: {
|
|
3815
|
-
example: 'curl https://api.stigg.io/api/v1/addons/$ID/charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3815
|
+
example: 'curl https://edge.api.stigg.io/api/v1/addons/$ID/charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3816
3816
|
},
|
|
3817
3817
|
},
|
|
3818
3818
|
},
|
|
@@ -3857,7 +3857,7 @@ const EMBEDDED_METHODS = [
|
|
|
3857
3857
|
example: 'EntitlementListParams parameters = new() { AddonID = "addonId" };\n\nvar entitlements = await client.V1.Addons.Entitlements.List(parameters);\n\nConsole.WriteLine(entitlements);',
|
|
3858
3858
|
},
|
|
3859
3859
|
http: {
|
|
3860
|
-
example: 'curl https://api.stigg.io/api/v1/addons/$ADDON_ID/entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3860
|
+
example: 'curl https://edge.api.stigg.io/api/v1/addons/$ADDON_ID/entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3861
3861
|
},
|
|
3862
3862
|
},
|
|
3863
3863
|
},
|
|
@@ -3907,7 +3907,7 @@ const EMBEDDED_METHODS = [
|
|
|
3907
3907
|
example: 'EntitlementCreateParams parameters = new()\n{\n AddonID = "addonId",\n Entitlements =\n [\n new Feature()\n {\n ID = "id",\n Behavior = Behavior.Increment,\n Description = "description",\n DisplayNameOverride = "displayNameOverride",\n EnumValues =\n [\n "string"\n ],\n HasSoftLimit = true,\n HasUnlimitedUsage = true,\n HiddenFromWidgets =\n [\n HiddenFromWidget.Paywall\n ],\n IsCustom = true,\n IsGranted = true,\n MonthlyResetPeriodConfiguration = new(\n AccordingTo.SubscriptionStart\n ),\n Order = 0,\n ResetPeriod = ResetPeriod.Year,\n UsageLimit = 0,\n WeeklyResetPeriodConfiguration = new(AccordingTo.SubscriptionStart),\n YearlyResetPeriodConfiguration = new(AccordingTo.SubscriptionStart),\n },\n ],\n};\n\nvar entitlement = await client.V1.Addons.Entitlements.Create(parameters);\n\nConsole.WriteLine(entitlement);',
|
|
3908
3908
|
},
|
|
3909
3909
|
http: {
|
|
3910
|
-
example: 'curl https://api.stigg.io/api/v1/addons/$ADDON_ID/entitlements \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "entitlements": [\n {\n "id": "id",\n "type": "FEATURE"\n }\n ]\n }\'',
|
|
3910
|
+
example: 'curl https://edge.api.stigg.io/api/v1/addons/$ADDON_ID/entitlements \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "entitlements": [\n {\n "id": "id",\n "type": "FEATURE"\n }\n ]\n }\'',
|
|
3911
3911
|
},
|
|
3912
3912
|
},
|
|
3913
3913
|
},
|
|
@@ -3957,7 +3957,7 @@ const EMBEDDED_METHODS = [
|
|
|
3957
3957
|
example: 'EntitlementUpdateParams parameters = new()\n{\n AddonID = "addonId",\n ID = "id",\n Body = new Feature()\n {\n Behavior = Behavior.Increment,\n Description = "description",\n DisplayNameOverride = "displayNameOverride",\n EnumValues =\n [\n "string"\n ],\n HasSoftLimit = true,\n HasUnlimitedUsage = true,\n HiddenFromWidgets =\n [\n HiddenFromWidget.Paywall\n ],\n IsCustom = true,\n IsGranted = true,\n MonthlyResetPeriodConfiguration = new(AccordingTo.SubscriptionStart),\n Order = 0,\n ResetPeriod = ResetPeriod.Year,\n UsageLimit = 0,\n WeeklyResetPeriodConfiguration = new(AccordingTo.SubscriptionStart),\n YearlyResetPeriodConfiguration = new(AccordingTo.SubscriptionStart),\n },\n};\n\nvar addonPackageEntitlement = await client.V1.Addons.Entitlements.Update(parameters);\n\nConsole.WriteLine(addonPackageEntitlement);',
|
|
3958
3958
|
},
|
|
3959
3959
|
http: {
|
|
3960
|
-
example: 'curl https://api.stigg.io/api/v1/addons/$ADDON_ID/entitlements/$ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "type": "FEATURE"\n }\'',
|
|
3960
|
+
example: 'curl https://edge.api.stigg.io/api/v1/addons/$ADDON_ID/entitlements/$ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "type": "FEATURE"\n }\'',
|
|
3961
3961
|
},
|
|
3962
3962
|
},
|
|
3963
3963
|
},
|
|
@@ -4002,7 +4002,7 @@ const EMBEDDED_METHODS = [
|
|
|
4002
4002
|
example: 'EntitlementDeleteParams parameters = new()\n{\n AddonID = "addonId",\n ID = "id",\n};\n\nvar addonPackageEntitlement = await client.V1.Addons.Entitlements.Delete(parameters);\n\nConsole.WriteLine(addonPackageEntitlement);',
|
|
4003
4003
|
},
|
|
4004
4004
|
http: {
|
|
4005
|
-
example: 'curl https://api.stigg.io/api/v1/addons/$ADDON_ID/entitlements/$ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4005
|
+
example: 'curl https://edge.api.stigg.io/api/v1/addons/$ADDON_ID/entitlements/$ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4006
4006
|
},
|
|
4007
4007
|
},
|
|
4008
4008
|
},
|
|
@@ -4060,7 +4060,7 @@ const EMBEDDED_METHODS = [
|
|
|
4060
4060
|
example: 'PlanCreateParams parameters = new()\n{\n ID = "id",\n DisplayName = "displayName",\n ProductID = "productId",\n};\n\nvar plan = await client.V1.Plans.Create(parameters);\n\nConsole.WriteLine(plan);',
|
|
4061
4061
|
},
|
|
4062
4062
|
http: {
|
|
4063
|
-
example: 'curl https://api.stigg.io/api/v1/plans \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName",\n "productId": "productId"\n }\'',
|
|
4063
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName",\n "productId": "productId"\n }\'',
|
|
4064
4064
|
},
|
|
4065
4065
|
},
|
|
4066
4066
|
},
|
|
@@ -4114,7 +4114,7 @@ const EMBEDDED_METHODS = [
|
|
|
4114
4114
|
example: 'PlanListParams parameters = new();\n\nvar page = await client.V1.Plans.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
4115
4115
|
},
|
|
4116
4116
|
http: {
|
|
4117
|
-
example: 'curl https://api.stigg.io/api/v1/plans \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4117
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4118
4118
|
},
|
|
4119
4119
|
},
|
|
4120
4120
|
},
|
|
@@ -4159,7 +4159,7 @@ const EMBEDDED_METHODS = [
|
|
|
4159
4159
|
example: 'PlanRetrieveParams parameters = new() { ID = "x" };\n\nvar plan = await client.V1.Plans.Retrieve(parameters);\n\nConsole.WriteLine(plan);',
|
|
4160
4160
|
},
|
|
4161
4161
|
http: {
|
|
4162
|
-
example: 'curl https://api.stigg.io/api/v1/plans/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4162
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4163
4163
|
},
|
|
4164
4164
|
},
|
|
4165
4165
|
},
|
|
@@ -4216,7 +4216,7 @@ const EMBEDDED_METHODS = [
|
|
|
4216
4216
|
example: 'PlanUpdateParams parameters = new() { ID = "x" };\n\nvar plan = await client.V1.Plans.Update(parameters);\n\nConsole.WriteLine(plan);',
|
|
4217
4217
|
},
|
|
4218
4218
|
http: {
|
|
4219
|
-
example: "curl https://api.stigg.io/api/v1/plans/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
4219
|
+
example: "curl https://edge.api.stigg.io/api/v1/plans/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
4220
4220
|
},
|
|
4221
4221
|
},
|
|
4222
4222
|
},
|
|
@@ -4261,7 +4261,7 @@ const EMBEDDED_METHODS = [
|
|
|
4261
4261
|
example: 'PlanArchiveParams parameters = new() { ID = "x" };\n\nvar plan = await client.V1.Plans.Archive(parameters);\n\nConsole.WriteLine(plan);',
|
|
4262
4262
|
},
|
|
4263
4263
|
http: {
|
|
4264
|
-
example: 'curl https://api.stigg.io/api/v1/plans/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4264
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4265
4265
|
},
|
|
4266
4266
|
},
|
|
4267
4267
|
},
|
|
@@ -4311,7 +4311,7 @@ const EMBEDDED_METHODS = [
|
|
|
4311
4311
|
example: 'PlanPublishParams parameters = new()\n{\n ID = "x",\n MigrationType = MigrationType.NewCustomers,\n};\n\nvar response = await client.V1.Plans.Publish(parameters);\n\nConsole.WriteLine(response);',
|
|
4312
4312
|
},
|
|
4313
4313
|
http: {
|
|
4314
|
-
example: 'curl https://api.stigg.io/api/v1/plans/$ID/publish \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "migrationType": "NEW_CUSTOMERS"\n }\'',
|
|
4314
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans/$ID/publish \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "migrationType": "NEW_CUSTOMERS"\n }\'',
|
|
4315
4315
|
},
|
|
4316
4316
|
},
|
|
4317
4317
|
},
|
|
@@ -4356,7 +4356,7 @@ const EMBEDDED_METHODS = [
|
|
|
4356
4356
|
example: 'PlanCreateDraftParams parameters = new() { ID = "x" };\n\nvar plan = await client.V1.Plans.CreateDraft(parameters);\n\nConsole.WriteLine(plan);',
|
|
4357
4357
|
},
|
|
4358
4358
|
http: {
|
|
4359
|
-
example: 'curl https://api.stigg.io/api/v1/plans/$ID/draft \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4359
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans/$ID/draft \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4360
4360
|
},
|
|
4361
4361
|
},
|
|
4362
4362
|
},
|
|
@@ -4401,7 +4401,7 @@ const EMBEDDED_METHODS = [
|
|
|
4401
4401
|
example: 'PlanRemoveDraftParams parameters = new() { ID = "x" };\n\nvar response = await client.V1.Plans.RemoveDraft(parameters);\n\nConsole.WriteLine(response);',
|
|
4402
4402
|
},
|
|
4403
4403
|
http: {
|
|
4404
|
-
example: 'curl https://api.stigg.io/api/v1/plans/$ID/draft \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4404
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans/$ID/draft \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4405
4405
|
},
|
|
4406
4406
|
},
|
|
4407
4407
|
},
|
|
@@ -4453,7 +4453,7 @@ const EMBEDDED_METHODS = [
|
|
|
4453
4453
|
example: 'PlanListChargesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Plans.ListCharges(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
4454
4454
|
},
|
|
4455
4455
|
http: {
|
|
4456
|
-
example: 'curl https://api.stigg.io/api/v1/plans/$ID/charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4456
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans/$ID/charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4457
4457
|
},
|
|
4458
4458
|
},
|
|
4459
4459
|
},
|
|
@@ -4505,7 +4505,7 @@ const EMBEDDED_METHODS = [
|
|
|
4505
4505
|
example: 'PlanListOverageChargesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Plans.ListOverageCharges(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
4506
4506
|
},
|
|
4507
4507
|
http: {
|
|
4508
|
-
example: 'curl https://api.stigg.io/api/v1/plans/$ID/overage-charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4508
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans/$ID/overage-charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4509
4509
|
},
|
|
4510
4510
|
},
|
|
4511
4511
|
},
|
|
@@ -4550,7 +4550,7 @@ const EMBEDDED_METHODS = [
|
|
|
4550
4550
|
example: 'EntitlementListParams parameters = new() { PlanID = "planId" };\n\nvar entitlements = await client.V1.Plans.Entitlements.List(parameters);\n\nConsole.WriteLine(entitlements);',
|
|
4551
4551
|
},
|
|
4552
4552
|
http: {
|
|
4553
|
-
example: 'curl https://api.stigg.io/api/v1/plans/$PLAN_ID/entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4553
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans/$PLAN_ID/entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4554
4554
|
},
|
|
4555
4555
|
},
|
|
4556
4556
|
},
|
|
@@ -4600,7 +4600,7 @@ const EMBEDDED_METHODS = [
|
|
|
4600
4600
|
example: 'EntitlementCreateParams parameters = new()\n{\n PlanID = "planId",\n Entitlements =\n [\n new Feature()\n {\n ID = "id",\n Behavior = Behavior.Increment,\n Description = "description",\n DisplayNameOverride = "displayNameOverride",\n EnumValues =\n [\n "string"\n ],\n HasSoftLimit = true,\n HasUnlimitedUsage = true,\n HiddenFromWidgets =\n [\n HiddenFromWidget.Paywall\n ],\n IsCustom = true,\n IsGranted = true,\n MonthlyResetPeriodConfiguration = new(\n AccordingTo.SubscriptionStart\n ),\n Order = 0,\n ResetPeriod = ResetPeriod.Year,\n UsageLimit = 0,\n WeeklyResetPeriodConfiguration = new(AccordingTo.SubscriptionStart),\n YearlyResetPeriodConfiguration = new(AccordingTo.SubscriptionStart),\n },\n ],\n};\n\nvar entitlement = await client.V1.Plans.Entitlements.Create(parameters);\n\nConsole.WriteLine(entitlement);',
|
|
4601
4601
|
},
|
|
4602
4602
|
http: {
|
|
4603
|
-
example: 'curl https://api.stigg.io/api/v1/plans/$PLAN_ID/entitlements \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "entitlements": [\n {\n "id": "id",\n "type": "FEATURE"\n }\n ]\n }\'',
|
|
4603
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans/$PLAN_ID/entitlements \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "entitlements": [\n {\n "id": "id",\n "type": "FEATURE"\n }\n ]\n }\'',
|
|
4604
4604
|
},
|
|
4605
4605
|
},
|
|
4606
4606
|
},
|
|
@@ -4650,7 +4650,7 @@ const EMBEDDED_METHODS = [
|
|
|
4650
4650
|
example: 'EntitlementUpdateParams parameters = new()\n{\n PlanID = "planId",\n ID = "id",\n Body = new Feature()\n {\n Behavior = Behavior.Increment,\n Description = "description",\n DisplayNameOverride = "displayNameOverride",\n EnumValues =\n [\n "string"\n ],\n HasSoftLimit = true,\n HasUnlimitedUsage = true,\n HiddenFromWidgets =\n [\n HiddenFromWidget.Paywall\n ],\n IsCustom = true,\n IsGranted = true,\n MonthlyResetPeriodConfiguration = new(AccordingTo.SubscriptionStart),\n Order = 0,\n ResetPeriod = ResetPeriod.Year,\n UsageLimit = 0,\n WeeklyResetPeriodConfiguration = new(AccordingTo.SubscriptionStart),\n YearlyResetPeriodConfiguration = new(AccordingTo.SubscriptionStart),\n },\n};\n\nvar planEntitlement = await client.V1.Plans.Entitlements.Update(parameters);\n\nConsole.WriteLine(planEntitlement);',
|
|
4651
4651
|
},
|
|
4652
4652
|
http: {
|
|
4653
|
-
example: 'curl https://api.stigg.io/api/v1/plans/$PLAN_ID/entitlements/$ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "type": "FEATURE"\n }\'',
|
|
4653
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans/$PLAN_ID/entitlements/$ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "type": "FEATURE"\n }\'',
|
|
4654
4654
|
},
|
|
4655
4655
|
},
|
|
4656
4656
|
},
|
|
@@ -4695,7 +4695,7 @@ const EMBEDDED_METHODS = [
|
|
|
4695
4695
|
example: 'EntitlementDeleteParams parameters = new()\n{\n PlanID = "planId",\n ID = "id",\n};\n\nvar planEntitlement = await client.V1.Plans.Entitlements.Delete(parameters);\n\nConsole.WriteLine(planEntitlement);',
|
|
4696
4696
|
},
|
|
4697
4697
|
http: {
|
|
4698
|
-
example: 'curl https://api.stigg.io/api/v1/plans/$PLAN_ID/entitlements/$ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4698
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans/$PLAN_ID/entitlements/$ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4699
4699
|
},
|
|
4700
4700
|
},
|
|
4701
4701
|
},
|
|
@@ -4744,7 +4744,7 @@ const EMBEDDED_METHODS = [
|
|
|
4744
4744
|
example: 'UsageReportParams parameters = new()\n{\n Usages =\n [\n new()\n {\n CustomerID = "customerId",\n FeatureID = "featureId",\n Value = -9007199254740991,\n CreatedAt = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),\n Dimensions = new Dictionary<string, Dimension>()\n {\n { "foo", "string" }\n },\n ResourceID = "resourceId",\n UpdateBehavior = UpdateBehavior.Delta,\n },\n ],\n};\n\nvar response = await client.V1.Usage.Report(parameters);\n\nConsole.WriteLine(response);',
|
|
4745
4745
|
},
|
|
4746
4746
|
http: {
|
|
4747
|
-
example: 'curl https://api.stigg.io/api/v1/usage \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "usages": [\n {\n "customerId": "customerId",\n "featureId": "featureId",\n "value": -9007199254740991\n }\n ]\n }\'',
|
|
4747
|
+
example: 'curl https://edge.api.stigg.io/api/v1/usage \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "usages": [\n {\n "customerId": "customerId",\n "featureId": "featureId",\n "value": -9007199254740991\n }\n ]\n }\'',
|
|
4748
4748
|
},
|
|
4749
4749
|
},
|
|
4750
4750
|
},
|
|
@@ -4798,7 +4798,7 @@ const EMBEDDED_METHODS = [
|
|
|
4798
4798
|
example: 'UsageHistoryParams parameters = new()\n{\n CustomerID = "customerId",\n FeatureID = "featureId",\n StartDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),\n};\n\nvar response = await client.V1.Usage.History(parameters);\n\nConsole.WriteLine(response);',
|
|
4799
4799
|
},
|
|
4800
4800
|
http: {
|
|
4801
|
-
example: 'curl https://api.stigg.io/api/v1/usage/$CUSTOMER_ID/history/$FEATURE_ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4801
|
+
example: 'curl https://edge.api.stigg.io/api/v1/usage/$CUSTOMER_ID/history/$FEATURE_ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4802
4802
|
},
|
|
4803
4803
|
},
|
|
4804
4804
|
},
|
|
@@ -4852,7 +4852,7 @@ const EMBEDDED_METHODS = [
|
|
|
4852
4852
|
example: 'ProductListProductsParams parameters = new();\n\nvar page = await client.V1.Products.ListProducts(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
4853
4853
|
},
|
|
4854
4854
|
http: {
|
|
4855
|
-
example: 'curl https://api.stigg.io/api/v1/products \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4855
|
+
example: 'curl https://edge.api.stigg.io/api/v1/products \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4856
4856
|
},
|
|
4857
4857
|
},
|
|
4858
4858
|
},
|
|
@@ -4905,7 +4905,7 @@ const EMBEDDED_METHODS = [
|
|
|
4905
4905
|
example: 'ProductCreateProductParams parameters = new()\n{\n ID = "id",\n DisplayName = "displayName",\n};\n\nvar product = await client.V1.Products.CreateProduct(parameters);\n\nConsole.WriteLine(product);',
|
|
4906
4906
|
},
|
|
4907
4907
|
http: {
|
|
4908
|
-
example: 'curl https://api.stigg.io/api/v1/products \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName"\n }\'',
|
|
4908
|
+
example: 'curl https://edge.api.stigg.io/api/v1/products \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName"\n }\'',
|
|
4909
4909
|
},
|
|
4910
4910
|
},
|
|
4911
4911
|
},
|
|
@@ -4960,7 +4960,7 @@ const EMBEDDED_METHODS = [
|
|
|
4960
4960
|
example: 'ProductUpdateProductParams parameters = new() { ID = "x" };\n\nvar product = await client.V1.Products.UpdateProduct(parameters);\n\nConsole.WriteLine(product);',
|
|
4961
4961
|
},
|
|
4962
4962
|
http: {
|
|
4963
|
-
example: "curl https://api.stigg.io/api/v1/products/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
4963
|
+
example: "curl https://edge.api.stigg.io/api/v1/products/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
4964
4964
|
},
|
|
4965
4965
|
},
|
|
4966
4966
|
},
|
|
@@ -5005,7 +5005,7 @@ const EMBEDDED_METHODS = [
|
|
|
5005
5005
|
example: 'ProductArchiveProductParams parameters = new() { ID = "x" };\n\nvar product = await client.V1.Products.ArchiveProduct(parameters);\n\nConsole.WriteLine(product);',
|
|
5006
5006
|
},
|
|
5007
5007
|
http: {
|
|
5008
|
-
example: 'curl https://api.stigg.io/api/v1/products/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5008
|
+
example: 'curl https://edge.api.stigg.io/api/v1/products/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5009
5009
|
},
|
|
5010
5010
|
},
|
|
5011
5011
|
},
|
|
@@ -5050,7 +5050,7 @@ const EMBEDDED_METHODS = [
|
|
|
5050
5050
|
example: 'ProductUnarchiveProductParams parameters = new() { ID = "x" };\n\nvar product = await client.V1.Products.UnarchiveProduct(parameters);\n\nConsole.WriteLine(product);',
|
|
5051
5051
|
},
|
|
5052
5052
|
http: {
|
|
5053
|
-
example: 'curl https://api.stigg.io/api/v1/products/$ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5053
|
+
example: 'curl https://edge.api.stigg.io/api/v1/products/$ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5054
5054
|
},
|
|
5055
5055
|
},
|
|
5056
5056
|
},
|
|
@@ -5102,7 +5102,7 @@ const EMBEDDED_METHODS = [
|
|
|
5102
5102
|
example: 'ProductDuplicateProductParams parameters = new()\n{\n ID = "x",\n TargetID = "targetId",\n};\n\nvar product = await client.V1.Products.DuplicateProduct(parameters);\n\nConsole.WriteLine(product);',
|
|
5103
5103
|
},
|
|
5104
5104
|
http: {
|
|
5105
|
-
example: 'curl https://api.stigg.io/api/v1/products/$ID/duplicate \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "targetId": "targetId"\n }\'',
|
|
5105
|
+
example: 'curl https://edge.api.stigg.io/api/v1/products/$ID/duplicate \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "targetId": "targetId"\n }\'',
|
|
5106
5106
|
},
|
|
5107
5107
|
},
|
|
5108
5108
|
},
|
|
@@ -5157,7 +5157,7 @@ const EMBEDDED_METHODS = [
|
|
|
5157
5157
|
example: 'EntitlementCheckParams parameters = new() { ID = "x" };\n\nvar response = await client.V1Beta.Customers.Entitlements.Check(parameters);\n\nConsole.WriteLine(response);',
|
|
5158
5158
|
},
|
|
5159
5159
|
http: {
|
|
5160
|
-
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entitlements/check \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5160
|
+
example: 'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/entitlements/check \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5161
5161
|
},
|
|
5162
5162
|
},
|
|
5163
5163
|
},
|
|
@@ -5211,7 +5211,7 @@ const EMBEDDED_METHODS = [
|
|
|
5211
5211
|
example: 'EntityListParams parameters = new() { ID = "id" };\n\nvar page = await client.V1Beta.Customers.Entities.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
5212
5212
|
},
|
|
5213
5213
|
http: {
|
|
5214
|
-
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5214
|
+
example: 'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/entities \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5215
5215
|
},
|
|
5216
5216
|
},
|
|
5217
5217
|
},
|
|
@@ -5261,7 +5261,7 @@ const EMBEDDED_METHODS = [
|
|
|
5261
5261
|
example: 'EntityUpsertParams parameters = new()\n{\n ID = "id",\n Entities =\n [\n new()\n {\n ID = "user-7f3a0c1d",\n Metadata = new Dictionary<string, string>()\n {\n { "email", "jane@acme.com" }, { "role", "admin" }\n },\n TypeRefID = "user",\n },\n new()\n {\n ID = "user-c4d1b2e9",\n Metadata = new Dictionary<string, string>()\n {\n { "email", "john@acme.com" }\n },\n TypeRefID = "user",\n },\n ],\n};\n\nvar response = await client.V1Beta.Customers.Entities.Upsert(parameters);\n\nConsole.WriteLine(response);',
|
|
5262
5262
|
},
|
|
5263
5263
|
http: {
|
|
5264
|
-
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "entities": [\n {\n "id": "user-7f3a0c1d",\n "metadata": {\n "email": "jane@acme.com",\n "role": "admin"\n },\n "typeRefId": "user"\n },\n {\n "id": "user-c4d1b2e9",\n "metadata": {\n "email": "john@acme.com"\n },\n "typeRefId": "user"\n }\n ]\n }\'',
|
|
5264
|
+
example: 'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/entities \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "entities": [\n {\n "id": "user-7f3a0c1d",\n "metadata": {\n "email": "jane@acme.com",\n "role": "admin"\n },\n "typeRefId": "user"\n },\n {\n "id": "user-c4d1b2e9",\n "metadata": {\n "email": "john@acme.com"\n },\n "typeRefId": "user"\n }\n ]\n }\'',
|
|
5265
5265
|
},
|
|
5266
5266
|
},
|
|
5267
5267
|
},
|
|
@@ -5306,7 +5306,7 @@ const EMBEDDED_METHODS = [
|
|
|
5306
5306
|
example: 'EntityRetrieveParams parameters = new()\n{\n ID = "id",\n EntityID = "x",\n};\n\nvar entity = await client.V1Beta.Customers.Entities.Retrieve(parameters);\n\nConsole.WriteLine(entity);',
|
|
5307
5307
|
},
|
|
5308
5308
|
http: {
|
|
5309
|
-
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities/$ENTITY_ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5309
|
+
example: 'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/entities/$ENTITY_ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5310
5310
|
},
|
|
5311
5311
|
},
|
|
5312
5312
|
},
|
|
@@ -5351,7 +5351,7 @@ const EMBEDDED_METHODS = [
|
|
|
5351
5351
|
example: 'EntityArchiveParams parameters = new()\n{\n ID = "id",\n Ids =\n [\n "user-7f3a0c1d", "user-c4d1b2e9"\n ],\n};\n\nvar response = await client.V1Beta.Customers.Entities.Archive(parameters);\n\nConsole.WriteLine(response);',
|
|
5352
5352
|
},
|
|
5353
5353
|
http: {
|
|
5354
|
-
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities/archive \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "ids": [\n "user-7f3a0c1d",\n "user-c4d1b2e9"\n ]\n }\'',
|
|
5354
|
+
example: 'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/entities/archive \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "ids": [\n "user-7f3a0c1d",\n "user-c4d1b2e9"\n ]\n }\'',
|
|
5355
5355
|
},
|
|
5356
5356
|
},
|
|
5357
5357
|
},
|
|
@@ -5396,7 +5396,7 @@ const EMBEDDED_METHODS = [
|
|
|
5396
5396
|
example: 'EntityUnarchiveParams parameters = new()\n{\n ID = "id",\n Ids =\n [\n "user-7f3a0c1d", "user-c4d1b2e9"\n ],\n};\n\nvar response = await client.V1Beta.Customers.Entities.Unarchive(parameters);\n\nConsole.WriteLine(response);',
|
|
5397
5397
|
},
|
|
5398
5398
|
http: {
|
|
5399
|
-
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities/unarchive \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "ids": [\n "user-7f3a0c1d",\n "user-c4d1b2e9"\n ]\n }\'',
|
|
5399
|
+
example: 'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/entities/unarchive \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "ids": [\n "user-7f3a0c1d",\n "user-c4d1b2e9"\n ]\n }\'',
|
|
5400
5400
|
},
|
|
5401
5401
|
},
|
|
5402
5402
|
},
|
|
@@ -5450,7 +5450,7 @@ const EMBEDDED_METHODS = [
|
|
|
5450
5450
|
example: 'AssignmentListParams parameters = new() { ID = "id" };\n\nvar page = await client.V1Beta.Customers.Assignments.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
5451
5451
|
},
|
|
5452
5452
|
http: {
|
|
5453
|
-
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/assignments \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5453
|
+
example: 'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/assignments \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5454
5454
|
},
|
|
5455
5455
|
},
|
|
5456
5456
|
},
|
|
@@ -5500,7 +5500,7 @@ const EMBEDDED_METHODS = [
|
|
|
5500
5500
|
example: 'AssignmentUpsertParams parameters = new()\n{\n ID = "id",\n Assignments =\n [\n new()\n {\n EntityID = "workspace-001",\n Cadence = "P1M",\n CurrencyID = "currencyId",\n FeatureID = "compute-minutes",\n ParentID = "parentId",\n ScopeEntityIds =\n [\n "NxI"\n ],\n UsageLimit = 1000,\n },\n new()\n {\n EntityID = "workspace-002",\n Cadence = "P1M",\n CurrencyID = "cred-type-tokens",\n FeatureID = "featureId",\n ParentID = "workspace-001",\n ScopeEntityIds =\n [\n "user-1"\n ],\n UsageLimit = 2000,\n },\n ],\n};\n\nvar response = await client.V1Beta.Customers.Assignments.Upsert(parameters);\n\nConsole.WriteLine(response);',
|
|
5501
5501
|
},
|
|
5502
5502
|
http: {
|
|
5503
|
-
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/assignments \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "assignments": [\n {\n "entityId": "workspace-001",\n "cadence": "P1M",\n "featureId": "compute-minutes",\n "usageLimit": 1000\n },\n {\n "entityId": "workspace-002",\n "cadence": "P1M",\n "currencyId": "cred-type-tokens",\n "parentId": "workspace-001",\n "scopeEntityIds": [\n "user-1"\n ],\n "usageLimit": 2000\n }\n ]\n }\'',
|
|
5503
|
+
example: 'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/assignments \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "assignments": [\n {\n "entityId": "workspace-001",\n "cadence": "P1M",\n "featureId": "compute-minutes",\n "usageLimit": 1000\n },\n {\n "entityId": "workspace-002",\n "cadence": "P1M",\n "currencyId": "cred-type-tokens",\n "parentId": "workspace-001",\n "scopeEntityIds": [\n "user-1"\n ],\n "usageLimit": 2000\n }\n ]\n }\'',
|
|
5504
5504
|
},
|
|
5505
5505
|
},
|
|
5506
5506
|
},
|
|
@@ -5551,7 +5551,7 @@ const EMBEDDED_METHODS = [
|
|
|
5551
5551
|
example: 'EntityTypeListParams parameters = new();\n\nvar page = await client.V1Beta.EntityTypes.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
5552
5552
|
},
|
|
5553
5553
|
http: {
|
|
5554
|
-
example: 'curl https://api.stigg.io/api/v1-beta/entity-types \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5554
|
+
example: 'curl https://edge.api.stigg.io/api/v1-beta/entity-types \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5555
5555
|
},
|
|
5556
5556
|
},
|
|
5557
5557
|
},
|
|
@@ -5600,7 +5600,7 @@ const EMBEDDED_METHODS = [
|
|
|
5600
5600
|
example: 'EntityTypeUpsertParams parameters = new()\n{\n Types =\n [\n new()\n {\n ID = "org",\n AttributionKeys =\n [\n "organizationId"\n ],\n DisplayName = "Organization",\n },\n new()\n {\n ID = "team",\n AttributionKeys =\n [\n "teamId"\n ],\n DisplayName = "Team",\n },\n ],\n};\n\nvar response = await client.V1Beta.EntityTypes.Upsert(parameters);\n\nConsole.WriteLine(response);',
|
|
5601
5601
|
},
|
|
5602
5602
|
http: {
|
|
5603
|
-
example: 'curl https://api.stigg.io/api/v1-beta/entity-types \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "types": [\n {\n "id": "org",\n "attributionKeys": [\n "organizationId"\n ],\n "displayName": "Organization"\n },\n {\n "id": "team",\n "attributionKeys": [\n "teamId"\n ],\n "displayName": "Team"\n }\n ]\n }\'',
|
|
5603
|
+
example: 'curl https://edge.api.stigg.io/api/v1-beta/entity-types \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "types": [\n {\n "id": "org",\n "attributionKeys": [\n "organizationId"\n ],\n "displayName": "Organization"\n },\n {\n "id": "team",\n "attributionKeys": [\n "teamId"\n ],\n "displayName": "Team"\n }\n ]\n }\'',
|
|
5604
5604
|
},
|
|
5605
5605
|
},
|
|
5606
5606
|
},
|
|
@@ -5620,7 +5620,7 @@ const EMBEDDED_READMES = [
|
|
|
5620
5620
|
},
|
|
5621
5621
|
{
|
|
5622
5622
|
language: 'java',
|
|
5623
|
-
content: '# Stigg Java API Library\n\n<!-- x-release-please-start-version -->\n[](https://central.sonatype.com/artifact/io.stigg/stigg-java/0.0.1)\n[](https://javadoc.io/doc/io.stigg/stigg-java/0.0.1)\n<!-- x-release-please-end -->\n\nThe Stigg Java SDK provides convenient access to the Stigg REST API from applications written in Java.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Stigg MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[](https://cursor.com/en-US/install-mcp?name=%40stigg%2Ftypescript-mcp&config=eyJuYW1lIjoiQHN0aWdnL3R5cGVzY3JpcHQtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vc3RpZ2ctbWNwLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IlgtQVBJLUtFWSI6Ik15IEFQSSBLZXkifX0)\n[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40stigg%2Ftypescript-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fstigg-mcp.stlmcp.com%22%2C%22headers%22%3A%7B%22X-API-KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n<!-- x-release-please-start-version -->\n\nJavadocs are available on [javadoc.io](https://javadoc.io/doc/io.stigg/stigg-java/0.0.1).\n\n<!-- x-release-please-end -->\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n### Gradle\n\n~~~kotlin\nimplementation("io.stigg:stigg-java:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n<dependency>\n <groupId>io.stigg</groupId>\n <artifactId>stigg-java</artifactId>\n <version>0.0.1</version>\n</dependency>\n~~~\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClient client = StiggOkHttpClient.fromEnv();\n\nCustomerResponse customerResponse = client.v1().customers().retrieve("REPLACE_ME");\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClient client = StiggOkHttpClient.fromEnv();\n```\n\nOr manually:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .apiKey("My API Key")\n .build();\n```\n\nOr using a combination of the two approaches:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n // Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n // Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build();\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| --------- | --------------- | -------------------- | -------- | ------------------------ |\n| `apiKey` | `stigg.apiKey` | `STIGG_API_KEY` | true | - |\n| `baseUrl` | `stigg.baseUrl` | `STIGG_BASE_URL` | true | `"https://api.stigg.io"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```java\nimport io.stigg.client.StiggClient;\n\nStiggClient clientWithOptions = client.withOptions(optionsBuilder -> {\n optionsBuilder.baseUrl("https://example.com");\n optionsBuilder.maxRetries(42);\n});\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Stigg API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.\n\nFor example, `client.v1().customers().retrieve(...)` should be called with an instance of `CustomerRetrieveParams`, and it will return an instance of `CustomerResponse`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClient client = StiggOkHttpClient.fromEnv();\n\nCompletableFuture<CustomerResponse> customerResponse = client.async().v1().customers().retrieve("REPLACE_ME");\n```\n\nOr create an asynchronous client from the beginning:\n\n```java\nimport io.stigg.client.StiggClientAsync;\nimport io.stigg.client.okhttp.StiggOkHttpClientAsync;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClientAsync client = StiggOkHttpClientAsync.fromEnv();\n\nCompletableFuture<CustomerResponse> customerResponse = client.v1().customers().retrieve("REPLACE_ME");\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.\n\n\n\n\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Java classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```java\nimport io.stigg.core.http.Headers;\nimport io.stigg.core.http.HttpResponseFor;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nHttpResponseFor<CustomerResponse> customerResponse = client.v1().customers().withRawResponse().retrieve("REPLACE_ME");\n\nint statusCode = customerResponse.statusCode();\nHeaders headers = customerResponse.headers();\n```\n\nYou can still deserialize the response into an instance of a Java class if needed:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse parsedCustomerResponse = customerResponse.parse();\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`StiggServiceException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](stigg-java-core/src/main/kotlin/io/stigg/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](stigg-java-core/src/main/kotlin/io/stigg/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](stigg-java-core/src/main/kotlin/io/stigg/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](stigg-java-core/src/main/kotlin/io/stigg/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](stigg-java-core/src/main/kotlin/io/stigg/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](stigg-java-core/src/main/kotlin/io/stigg/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](stigg-java-core/src/main/kotlin/io/stigg/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](stigg-java-core/src/main/kotlin/io/stigg/errors/UnexpectedStatusCodeException.kt) |\n\n- [`StiggIoException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggIoException.kt): I/O networking errors.\n\n- [`StiggRetryableException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`StiggInvalidDataException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`StiggException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns an [`Iterable`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html)\n\n```java\nimport io.stigg.models.v1.customers.CustomerListPage;\nimport io.stigg.models.v1.customers.CustomerListResponse;\n\nCustomerListPage page = client.v1().customers().list();\n\n// Process as an Iterable\nfor (CustomerListResponse customer : page.autoPager()) {\n System.out.println(customer);\n}\n\n// Process as a Stream\npage.autoPager()\n .stream()\n .limit(50)\n .forEach(customer -> System.out.println(customer));\n```\n\nWhen using the asynchronous client, the method returns an [`AsyncStreamResponse`](stigg-java-core/src/main/kotlin/io/stigg/core/http/AsyncStreamResponse.kt):\n\n```java\nimport io.stigg.core.http.AsyncStreamResponse;\nimport io.stigg.models.v1.customers.CustomerListPageAsync;\nimport io.stigg.models.v1.customers.CustomerListResponse;\nimport java.util.Optional;\nimport java.util.concurrent.CompletableFuture;\n\nCompletableFuture<CustomerListPageAsync> pageFuture = client.async().v1().customers().list();\n\npageFuture.thenRun(page -> page.autoPager().subscribe(customer -> {\n System.out.println(customer);\n}));\n\n// If you need to handle errors or completion of the stream\npageFuture.thenRun(page -> page.autoPager().subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(CustomerListResponse customer) {\n System.out.println(customer);\n }\n\n @Override\n public void onComplete(Optional<Throwable> error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more!");\n }\n }\n}));\n\n// Or use futures\npageFuture.thenRun(page -> page.autoPager()\n .subscribe(customer -> {\n System.out.println(customer);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more!");\n }\n }));\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```java\nimport io.stigg.models.v1.customers.CustomerListPage;\nimport io.stigg.models.v1.customers.CustomerListResponse;\n\nCustomerListPage page = client.v1().customers().list();\nwhile (true) {\n for (CustomerListResponse customer : page.items()) {\n System.out.println(customer);\n }\n\n if (!page.hasNextPage()) {\n break;\n }\n\n page = page.nextPage();\n}\n```\n\n## Logging\n\nEnable logging by setting the `STIGG_LOG` environment variable to `info`:\n\n```sh\nexport STIGG_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport STIGG_LOG=debug\n```\n\nOr configure the client manually using the `logLevel` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.core.LogLevel;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .logLevel(LogLevel.INFO)\n .build();\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `stigg-java-core` is published with a [configuration file](stigg-java-core/src/main/resources/META-INF/proguard/stigg-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) or [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build();\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse customerResponse = client.v1().customers().retrieve(RequestOptions.builder().timeout(Duration.ofSeconds(30)).build());\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport java.time.Duration;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build();\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport java.net.InetSocketAddress;\nimport java.net.Proxy;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .proxy(new Proxy(\n Proxy.Type.HTTP, new InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build();\n```\n\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.core.http.ProxyAuthenticator;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\n .build();\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport java.time.Duration;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build();\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build();\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `stigg-java-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`StiggClient`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClient.kt), [`StiggClientAsync`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsync.kt), [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt), and [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), all of which can work with any HTTP client\n- `stigg-java-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) and [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt), which provide a way to construct [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt) and [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), respectively, using OkHttp\n- `stigg-java`\n - Depends on and exposes the APIs of both `stigg-java-core` and `stigg-java-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`stigg-java` dependency](#installation) with `stigg-java-core`\n2. Copy `stigg-java-client-okhttp`\'s [`OkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt) or [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), similarly to [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) or [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`stigg-java` dependency](#installation) with `stigg-java-core`\n2. Write a class that implements the [`HttpClient`](stigg-java-core/src/main/kotlin/io/stigg/core/http/HttpClient.kt) interface\n3. Construct [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt) or [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), similarly to [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) or [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```java\nimport io.stigg.core.JsonValue;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nCustomerRetrieveParams params = CustomerRetrieveParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build();\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set undocumented parameters on _nested_ headers, query params, or body classes, call the `putAdditionalProperty` method on the nested class:\n\n```java\nimport io.stigg.core.JsonValue;\nimport io.stigg.models.v1.customers.CustomerUpdateParams;\n\nCustomerUpdateParams params = CustomerUpdateParams.builder()\n .passthrough(CustomerUpdateParams.Passthrough.builder()\n .putAdditionalProperty("secretProperty", JsonValue.from("42"))\n .build())\n .build();\n```\n\nThese properties can be accessed on the nested built object later using the `_additionalProperties()` method.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](stigg-java-core/src/main/kotlin/io/stigg/core/Values.kt) object to its setter:\n\n```java\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nCustomerRetrieveParams params = CustomerRetrieveParams.builder().build();\n```\n\nThe most straightforward way to create a [`JsonValue`](stigg-java-core/src/main/kotlin/io/stigg/core/Values.kt) is using its `from(...)` method:\n\n```java\nimport io.stigg.core.JsonValue;\nimport java.util.List;\nimport java.util.Map;\n\n// Create primitive JSON values\nJsonValue nullValue = JsonValue.from(null);\nJsonValue booleanValue = JsonValue.from(true);\nJsonValue numberValue = JsonValue.from(42);\nJsonValue stringValue = JsonValue.from("Hello World!");\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nJsonValue arrayValue = JsonValue.from(List.of(\n "Hello", "World"\n));\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nJsonValue objectValue = JsonValue.from(Map.of(\n "a", 1,\n "b", 2\n));\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nJsonValue complexValue = JsonValue.from(Map.of(\n "a", List.of(\n 1, 2\n ),\n "b", List.of(\n 3, 4\n )\n));\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](stigg-java-core/src/main/kotlin/io/stigg/core/Values.kt):\n\n```java\nimport io.stigg.core.JsonMissing;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nCustomerRetrieveParams params = CustomerRetrieveParams.builder()\n .id(JsonMissing.of())\n .build();\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```java\nimport io.stigg.core.JsonValue;\nimport java.util.Map;\n\nMap<String, JsonValue> additionalProperties = client.v1().customers().retrieve(params)._additionalProperties();\nJsonValue secretPropertyValue = additionalProperties.get("secretProperty");\n\nString result = secretPropertyValue.accept(new JsonValue.Visitor<>() {\n @Override\n public String visitNull() {\n return "It\'s null!";\n }\n\n @Override\n public String visitBoolean(boolean value) {\n return "It\'s a boolean!";\n }\n\n @Override\n public String visitNumber(Number value) {\n return "It\'s a number!";\n }\n\n // Other methods include `visitMissing`, `visitString`, `visitArray`, and `visitObject`\n // The default implementation of each unimplemented method delegates to `visitDefault`, which throws by default, but can also be overridden\n});\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```java\nimport io.stigg.core.JsonField;\nimport java.util.Optional;\n\nJsonField<Object> field = client.v1().customers().retrieve(params)._field();\n\nif (field.isMissing()) {\n // The property is absent from the JSON response\n} else if (field.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n Optional<String> jsonString = field.asString();\n\n // Try to deserialize into a custom type\n MyClass myObject = field.asUnknown().orElseThrow().convert(MyClass.class);\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`StiggInvalidDataException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggInvalidDataException.kt) only if you directly access the property.\n\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse customerResponse = client.v1().customers().retrieve(params).validate();\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse customerResponse = client.v1().customers().retrieve(RequestOptions.builder().responseValidation(true).build());\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build();\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nJava `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField<T>` instead of just plain `T`?\n\nUsing `JsonField<T>` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/stiggio/stigg-java/issues) with questions, bugs, or suggestions.\n',
|
|
5623
|
+
content: '# Stigg Java API Library\n\n<!-- x-release-please-start-version -->\n[](https://central.sonatype.com/artifact/io.stigg/stigg-java/0.0.1)\n[](https://javadoc.io/doc/io.stigg/stigg-java/0.0.1)\n<!-- x-release-please-end -->\n\nThe Stigg Java SDK provides convenient access to the Stigg REST API from applications written in Java.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Stigg MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[](https://cursor.com/en-US/install-mcp?name=%40stigg%2Ftypescript-mcp&config=eyJuYW1lIjoiQHN0aWdnL3R5cGVzY3JpcHQtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vc3RpZ2ctbWNwLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IlgtQVBJLUtFWSI6Ik15IEFQSSBLZXkifX0)\n[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40stigg%2Ftypescript-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fstigg-mcp.stlmcp.com%22%2C%22headers%22%3A%7B%22X-API-KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n<!-- x-release-please-start-version -->\n\nJavadocs are available on [javadoc.io](https://javadoc.io/doc/io.stigg/stigg-java/0.0.1).\n\n<!-- x-release-please-end -->\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n### Gradle\n\n~~~kotlin\nimplementation("io.stigg:stigg-java:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n<dependency>\n <groupId>io.stigg</groupId>\n <artifactId>stigg-java</artifactId>\n <version>0.0.1</version>\n</dependency>\n~~~\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClient client = StiggOkHttpClient.fromEnv();\n\nCustomerResponse customerResponse = client.v1().customers().retrieve("REPLACE_ME");\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClient client = StiggOkHttpClient.fromEnv();\n```\n\nOr manually:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .apiKey("My API Key")\n .build();\n```\n\nOr using a combination of the two approaches:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n // Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n // Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build();\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| --------- | --------------- | -------------------- | -------- | ----------------------------- |\n| `apiKey` | `stigg.apiKey` | `STIGG_API_KEY` | true | - |\n| `baseUrl` | `stigg.baseUrl` | `STIGG_BASE_URL` | true | `"https://edge.api.stigg.io"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```java\nimport io.stigg.client.StiggClient;\n\nStiggClient clientWithOptions = client.withOptions(optionsBuilder -> {\n optionsBuilder.baseUrl("https://example.com");\n optionsBuilder.maxRetries(42);\n});\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Stigg API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.\n\nFor example, `client.v1().customers().retrieve(...)` should be called with an instance of `CustomerRetrieveParams`, and it will return an instance of `CustomerResponse`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClient client = StiggOkHttpClient.fromEnv();\n\nCompletableFuture<CustomerResponse> customerResponse = client.async().v1().customers().retrieve("REPLACE_ME");\n```\n\nOr create an asynchronous client from the beginning:\n\n```java\nimport io.stigg.client.StiggClientAsync;\nimport io.stigg.client.okhttp.StiggOkHttpClientAsync;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClientAsync client = StiggOkHttpClientAsync.fromEnv();\n\nCompletableFuture<CustomerResponse> customerResponse = client.v1().customers().retrieve("REPLACE_ME");\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.\n\n\n\n\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Java classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```java\nimport io.stigg.core.http.Headers;\nimport io.stigg.core.http.HttpResponseFor;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nHttpResponseFor<CustomerResponse> customerResponse = client.v1().customers().withRawResponse().retrieve("REPLACE_ME");\n\nint statusCode = customerResponse.statusCode();\nHeaders headers = customerResponse.headers();\n```\n\nYou can still deserialize the response into an instance of a Java class if needed:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse parsedCustomerResponse = customerResponse.parse();\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`StiggServiceException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](stigg-java-core/src/main/kotlin/io/stigg/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](stigg-java-core/src/main/kotlin/io/stigg/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](stigg-java-core/src/main/kotlin/io/stigg/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](stigg-java-core/src/main/kotlin/io/stigg/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](stigg-java-core/src/main/kotlin/io/stigg/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](stigg-java-core/src/main/kotlin/io/stigg/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](stigg-java-core/src/main/kotlin/io/stigg/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](stigg-java-core/src/main/kotlin/io/stigg/errors/UnexpectedStatusCodeException.kt) |\n\n- [`StiggIoException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggIoException.kt): I/O networking errors.\n\n- [`StiggRetryableException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`StiggInvalidDataException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`StiggException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns an [`Iterable`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html)\n\n```java\nimport io.stigg.models.v1.customers.CustomerListPage;\nimport io.stigg.models.v1.customers.CustomerListResponse;\n\nCustomerListPage page = client.v1().customers().list();\n\n// Process as an Iterable\nfor (CustomerListResponse customer : page.autoPager()) {\n System.out.println(customer);\n}\n\n// Process as a Stream\npage.autoPager()\n .stream()\n .limit(50)\n .forEach(customer -> System.out.println(customer));\n```\n\nWhen using the asynchronous client, the method returns an [`AsyncStreamResponse`](stigg-java-core/src/main/kotlin/io/stigg/core/http/AsyncStreamResponse.kt):\n\n```java\nimport io.stigg.core.http.AsyncStreamResponse;\nimport io.stigg.models.v1.customers.CustomerListPageAsync;\nimport io.stigg.models.v1.customers.CustomerListResponse;\nimport java.util.Optional;\nimport java.util.concurrent.CompletableFuture;\n\nCompletableFuture<CustomerListPageAsync> pageFuture = client.async().v1().customers().list();\n\npageFuture.thenRun(page -> page.autoPager().subscribe(customer -> {\n System.out.println(customer);\n}));\n\n// If you need to handle errors or completion of the stream\npageFuture.thenRun(page -> page.autoPager().subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(CustomerListResponse customer) {\n System.out.println(customer);\n }\n\n @Override\n public void onComplete(Optional<Throwable> error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more!");\n }\n }\n}));\n\n// Or use futures\npageFuture.thenRun(page -> page.autoPager()\n .subscribe(customer -> {\n System.out.println(customer);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more!");\n }\n }));\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```java\nimport io.stigg.models.v1.customers.CustomerListPage;\nimport io.stigg.models.v1.customers.CustomerListResponse;\n\nCustomerListPage page = client.v1().customers().list();\nwhile (true) {\n for (CustomerListResponse customer : page.items()) {\n System.out.println(customer);\n }\n\n if (!page.hasNextPage()) {\n break;\n }\n\n page = page.nextPage();\n}\n```\n\n## Logging\n\nEnable logging by setting the `STIGG_LOG` environment variable to `info`:\n\n```sh\nexport STIGG_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport STIGG_LOG=debug\n```\n\nOr configure the client manually using the `logLevel` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.core.LogLevel;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .logLevel(LogLevel.INFO)\n .build();\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `stigg-java-core` is published with a [configuration file](stigg-java-core/src/main/resources/META-INF/proguard/stigg-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) or [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build();\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse customerResponse = client.v1().customers().retrieve(RequestOptions.builder().timeout(Duration.ofSeconds(30)).build());\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport java.time.Duration;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build();\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport java.net.InetSocketAddress;\nimport java.net.Proxy;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .proxy(new Proxy(\n Proxy.Type.HTTP, new InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build();\n```\n\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.core.http.ProxyAuthenticator;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\n .build();\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport java.time.Duration;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build();\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build();\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `stigg-java-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`StiggClient`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClient.kt), [`StiggClientAsync`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsync.kt), [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt), and [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), all of which can work with any HTTP client\n- `stigg-java-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) and [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt), which provide a way to construct [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt) and [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), respectively, using OkHttp\n- `stigg-java`\n - Depends on and exposes the APIs of both `stigg-java-core` and `stigg-java-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`stigg-java` dependency](#installation) with `stigg-java-core`\n2. Copy `stigg-java-client-okhttp`\'s [`OkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt) or [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), similarly to [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) or [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`stigg-java` dependency](#installation) with `stigg-java-core`\n2. Write a class that implements the [`HttpClient`](stigg-java-core/src/main/kotlin/io/stigg/core/http/HttpClient.kt) interface\n3. Construct [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt) or [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), similarly to [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) or [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```java\nimport io.stigg.core.JsonValue;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nCustomerRetrieveParams params = CustomerRetrieveParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build();\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set undocumented parameters on _nested_ headers, query params, or body classes, call the `putAdditionalProperty` method on the nested class:\n\n```java\nimport io.stigg.core.JsonValue;\nimport io.stigg.models.v1.customers.CustomerUpdateParams;\n\nCustomerUpdateParams params = CustomerUpdateParams.builder()\n .passthrough(CustomerUpdateParams.Passthrough.builder()\n .putAdditionalProperty("secretProperty", JsonValue.from("42"))\n .build())\n .build();\n```\n\nThese properties can be accessed on the nested built object later using the `_additionalProperties()` method.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](stigg-java-core/src/main/kotlin/io/stigg/core/Values.kt) object to its setter:\n\n```java\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nCustomerRetrieveParams params = CustomerRetrieveParams.builder().build();\n```\n\nThe most straightforward way to create a [`JsonValue`](stigg-java-core/src/main/kotlin/io/stigg/core/Values.kt) is using its `from(...)` method:\n\n```java\nimport io.stigg.core.JsonValue;\nimport java.util.List;\nimport java.util.Map;\n\n// Create primitive JSON values\nJsonValue nullValue = JsonValue.from(null);\nJsonValue booleanValue = JsonValue.from(true);\nJsonValue numberValue = JsonValue.from(42);\nJsonValue stringValue = JsonValue.from("Hello World!");\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nJsonValue arrayValue = JsonValue.from(List.of(\n "Hello", "World"\n));\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nJsonValue objectValue = JsonValue.from(Map.of(\n "a", 1,\n "b", 2\n));\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nJsonValue complexValue = JsonValue.from(Map.of(\n "a", List.of(\n 1, 2\n ),\n "b", List.of(\n 3, 4\n )\n));\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](stigg-java-core/src/main/kotlin/io/stigg/core/Values.kt):\n\n```java\nimport io.stigg.core.JsonMissing;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nCustomerRetrieveParams params = CustomerRetrieveParams.builder()\n .id(JsonMissing.of())\n .build();\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```java\nimport io.stigg.core.JsonValue;\nimport java.util.Map;\n\nMap<String, JsonValue> additionalProperties = client.v1().customers().retrieve(params)._additionalProperties();\nJsonValue secretPropertyValue = additionalProperties.get("secretProperty");\n\nString result = secretPropertyValue.accept(new JsonValue.Visitor<>() {\n @Override\n public String visitNull() {\n return "It\'s null!";\n }\n\n @Override\n public String visitBoolean(boolean value) {\n return "It\'s a boolean!";\n }\n\n @Override\n public String visitNumber(Number value) {\n return "It\'s a number!";\n }\n\n // Other methods include `visitMissing`, `visitString`, `visitArray`, and `visitObject`\n // The default implementation of each unimplemented method delegates to `visitDefault`, which throws by default, but can also be overridden\n});\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```java\nimport io.stigg.core.JsonField;\nimport java.util.Optional;\n\nJsonField<Object> field = client.v1().customers().retrieve(params)._field();\n\nif (field.isMissing()) {\n // The property is absent from the JSON response\n} else if (field.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n Optional<String> jsonString = field.asString();\n\n // Try to deserialize into a custom type\n MyClass myObject = field.asUnknown().orElseThrow().convert(MyClass.class);\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`StiggInvalidDataException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggInvalidDataException.kt) only if you directly access the property.\n\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse customerResponse = client.v1().customers().retrieve(params).validate();\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse customerResponse = client.v1().customers().retrieve(RequestOptions.builder().responseValidation(true).build());\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build();\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nJava `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField<T>` instead of just plain `T`?\n\nUsing `JsonField<T>` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/stiggio/stigg-java/issues) with questions, bugs, or suggestions.\n',
|
|
5624
5624
|
},
|
|
5625
5625
|
{
|
|
5626
5626
|
language: 'python',
|