@stigg/typescript-mcp 0.1.0-beta.32 → 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/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +1 -0
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +1 -0
- package/code-tool-worker.mjs.map +1 -1
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +162 -111
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +162 -111
- package/local-docs-search.mjs.map +1 -1
- package/methods.d.mts.map +1 -1
- package/methods.d.ts.map +1 -1
- package/methods.js +6 -0
- package/methods.js.map +1 -1
- package/methods.mjs +6 -0
- package/methods.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool-worker.ts +1 -0
- package/src/local-docs-search.ts +180 -111
- package/src/methods.ts +6 -0
- 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,58 @@ 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
|
+
},
|
|
2330
|
+
},
|
|
2331
|
+
},
|
|
2332
|
+
{
|
|
2333
|
+
name: 'update',
|
|
2334
|
+
endpoint: '/api/v1/data-export/destinations/{destinationId}',
|
|
2335
|
+
httpMethod: 'patch',
|
|
2336
|
+
summary: 'Update data-export destination selection',
|
|
2337
|
+
description: "Update a destination's entity selection. Pushes the new enabled_models to the provider first, then persists the selection. Applies on the next scheduled transfer.",
|
|
2338
|
+
stainlessPath: '(resource) v1.events.data_export.destinations > (method) update',
|
|
2339
|
+
qualified: 'client.v1.events.dataExport.destinations.update',
|
|
2340
|
+
params: [
|
|
2341
|
+
'destinationId: string;',
|
|
2342
|
+
'enabledModels: string[];',
|
|
2343
|
+
'integrationId: string;',
|
|
2344
|
+
'X-ACCOUNT-ID?: string;',
|
|
2345
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
2346
|
+
],
|
|
2347
|
+
response: '{ data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; enabledModels?: string[]; lastSyncStatus?: object; }[]; }; }',
|
|
2348
|
+
markdown: "## update\n\n`client.v1.events.dataExport.destinations.update(destinationId: string, enabledModels: string[], integrationId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**patch** `/api/v1/data-export/destinations/{destinationId}`\n\nUpdate a destination's entity selection. Pushes the new enabled_models to the provider first, then persists the selection. Applies on the next scheduled transfer.\n\n### Parameters\n\n- `destinationId: string`\n\n- `enabledModels: string[]`\n\n- `integrationId: string`\n Target integration row hosting the destination\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; enabledModels?: string[]; lastSyncStatus?: object; }[]; }; }`\n Response object\n\n - `data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; enabledModels?: string[]; lastSyncStatus?: { finishedAt: string; status: string; transferId: string; blamedParty?: string; failureMessage?: string; rowsTransferred?: number; }; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst destination = await client.v1.events.dataExport.destinations.update('x', { enabledModels: ['x'], integrationId: 'x' });\n\nconsole.log(destination);\n```",
|
|
2349
|
+
perLanguage: {
|
|
2350
|
+
typescript: {
|
|
2351
|
+
method: 'client.v1.events.dataExport.destinations.update',
|
|
2352
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst destination = await client.v1.events.dataExport.destinations.update('x', {\n enabledModels: ['x'],\n integrationId: 'x',\n});\n\nconsole.log(destination.data);",
|
|
2353
|
+
},
|
|
2354
|
+
python: {
|
|
2355
|
+
method: 'v1.events.data_export.destinations.update',
|
|
2356
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ndestination = client.v1.events.data_export.destinations.update(\n destination_id="x",\n enabled_models=["x"],\n integration_id="x",\n)\nprint(destination.data)',
|
|
2357
|
+
},
|
|
2358
|
+
java: {
|
|
2359
|
+
method: 'v1().events().dataExport().destinations().update',
|
|
2360
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.dataexport.destinations.DestinationUpdateParams;\nimport io.stigg.models.v1.events.dataexport.destinations.DestinationUpdateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n DestinationUpdateParams params = DestinationUpdateParams.builder()\n .destinationId("x")\n .addEnabledModel("x")\n .integrationId("x")\n .build();\n DestinationUpdateResponse destination = client.v1().events().dataExport().destinations().update(params);\n }\n}',
|
|
2361
|
+
},
|
|
2362
|
+
go: {
|
|
2363
|
+
method: 'client.V1.Events.DataExport.Destinations.Update',
|
|
2364
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdestination, err := client.V1.Events.DataExport.Destinations.Update(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1EventDataExportDestinationUpdateParams{\n\t\t\tEnabledModels: []string{"x"},\n\t\t\tIntegrationID: "x",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", destination.Data)\n}\n',
|
|
2365
|
+
},
|
|
2366
|
+
ruby: {
|
|
2367
|
+
method: 'v1.events.data_export.destinations.update',
|
|
2368
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ndestination = stigg.v1.events.data_export.destinations.update("x", enabled_models: ["x"], integration_id: "x")\n\nputs(destination)',
|
|
2369
|
+
},
|
|
2370
|
+
cli: {
|
|
2371
|
+
method: 'destinations update',
|
|
2372
|
+
example: "stigg v1:events:data-export:destinations update \\\n --api-key 'My API Key' \\\n --destination-id x \\\n --enabled-model x \\\n --integration-id x",
|
|
2373
|
+
},
|
|
2374
|
+
csharp: {
|
|
2375
|
+
method: 'V1.Events.DataExport.Destinations.Update',
|
|
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
|
+
},
|
|
2378
|
+
http: {
|
|
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 }\'',
|
|
2329
2380
|
},
|
|
2330
2381
|
},
|
|
2331
2382
|
},
|
|
@@ -2384,7 +2435,7 @@ const EMBEDDED_METHODS = [
|
|
|
2384
2435
|
example: 'CustomerRetrieveGovernanceParams parameters = new() { ID = "id" };\n\nvar response = await client.V1.Events.Beta.Customers.RetrieveGovernance(parameters);\n\nConsole.WriteLine(response);',
|
|
2385
2436
|
},
|
|
2386
2437
|
http: {
|
|
2387
|
-
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"',
|
|
2388
2439
|
},
|
|
2389
2440
|
},
|
|
2390
2441
|
},
|
|
@@ -2442,7 +2493,7 @@ const EMBEDDED_METHODS = [
|
|
|
2442
2493
|
example: 'CreditGetUsageParams parameters = new() { CustomerID = "customerId" };\n\nvar response = await client.V1.Credits.GetUsage(parameters);\n\nConsole.WriteLine(response);',
|
|
2443
2494
|
},
|
|
2444
2495
|
http: {
|
|
2445
|
-
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"',
|
|
2446
2497
|
},
|
|
2447
2498
|
},
|
|
2448
2499
|
},
|
|
@@ -2492,7 +2543,7 @@ const EMBEDDED_METHODS = [
|
|
|
2492
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);',
|
|
2493
2544
|
},
|
|
2494
2545
|
http: {
|
|
2495
|
-
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"',
|
|
2496
2547
|
},
|
|
2497
2548
|
},
|
|
2498
2549
|
},
|
|
@@ -2546,7 +2597,7 @@ const EMBEDDED_METHODS = [
|
|
|
2546
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}',
|
|
2547
2598
|
},
|
|
2548
2599
|
http: {
|
|
2549
|
-
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"',
|
|
2550
2601
|
},
|
|
2551
2602
|
},
|
|
2552
2603
|
},
|
|
@@ -2601,7 +2652,7 @@ const EMBEDDED_METHODS = [
|
|
|
2601
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}',
|
|
2602
2653
|
},
|
|
2603
2654
|
http: {
|
|
2604
|
-
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"',
|
|
2605
2656
|
},
|
|
2606
2657
|
},
|
|
2607
2658
|
},
|
|
@@ -2664,7 +2715,7 @@ const EMBEDDED_METHODS = [
|
|
|
2664
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);',
|
|
2665
2716
|
},
|
|
2666
2717
|
http: {
|
|
2667
|
-
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 }\'',
|
|
2668
2719
|
},
|
|
2669
2720
|
},
|
|
2670
2721
|
},
|
|
@@ -2709,7 +2760,7 @@ const EMBEDDED_METHODS = [
|
|
|
2709
2760
|
example: 'GrantVoidParams parameters = new() { ID = "x" };\n\nvar creditGrantResponse = await client.V1.Credits.Grants.Void(parameters);\n\nConsole.WriteLine(creditGrantResponse);',
|
|
2710
2761
|
},
|
|
2711
2762
|
http: {
|
|
2712
|
-
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"',
|
|
2713
2764
|
},
|
|
2714
2765
|
},
|
|
2715
2766
|
},
|
|
@@ -2761,7 +2812,7 @@ const EMBEDDED_METHODS = [
|
|
|
2761
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}',
|
|
2762
2813
|
},
|
|
2763
2814
|
http: {
|
|
2764
|
-
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"',
|
|
2765
2816
|
},
|
|
2766
2817
|
},
|
|
2767
2818
|
},
|
|
@@ -2815,7 +2866,7 @@ const EMBEDDED_METHODS = [
|
|
|
2815
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);',
|
|
2816
2867
|
},
|
|
2817
2868
|
http: {
|
|
2818
|
-
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 }\'',
|
|
2819
2870
|
},
|
|
2820
2871
|
},
|
|
2821
2872
|
},
|
|
@@ -2869,7 +2920,7 @@ const EMBEDDED_METHODS = [
|
|
|
2869
2920
|
example: 'CustomCurrencyUpdateParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Update(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
|
|
2870
2921
|
},
|
|
2871
2922
|
http: {
|
|
2872
|
-
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 '{}'",
|
|
2873
2924
|
},
|
|
2874
2925
|
},
|
|
2875
2926
|
},
|
|
@@ -2914,7 +2965,7 @@ const EMBEDDED_METHODS = [
|
|
|
2914
2965
|
example: 'CustomCurrencyArchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Archive(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
|
|
2915
2966
|
},
|
|
2916
2967
|
http: {
|
|
2917
|
-
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"',
|
|
2918
2969
|
},
|
|
2919
2970
|
},
|
|
2920
2971
|
},
|
|
@@ -2959,7 +3010,7 @@ const EMBEDDED_METHODS = [
|
|
|
2959
3010
|
example: 'CustomCurrencyUnarchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Unarchive(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
|
|
2960
3011
|
},
|
|
2961
3012
|
http: {
|
|
2962
|
-
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"',
|
|
2963
3014
|
},
|
|
2964
3015
|
},
|
|
2965
3016
|
},
|
|
@@ -3004,7 +3055,7 @@ const EMBEDDED_METHODS = [
|
|
|
3004
3055
|
example: 'CustomCurrencyListAssociatedEntitiesParams parameters = new()\n{\n CurrencyID = "currencyId"\n};\n\nvar response = await client.V1.Credits.CustomCurrencies.ListAssociatedEntities(parameters);\n\nConsole.WriteLine(response);',
|
|
3005
3056
|
},
|
|
3006
3057
|
http: {
|
|
3007
|
-
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"',
|
|
3008
3059
|
},
|
|
3009
3060
|
},
|
|
3010
3061
|
},
|
|
@@ -3049,7 +3100,7 @@ const EMBEDDED_METHODS = [
|
|
|
3049
3100
|
example: 'FeatureRetrieveFeatureParams parameters = new() { ID = "x" };\n\nvar feature = await client.V1.Features.RetrieveFeature(parameters);\n\nConsole.WriteLine(feature);',
|
|
3050
3101
|
},
|
|
3051
3102
|
http: {
|
|
3052
|
-
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"',
|
|
3053
3104
|
},
|
|
3054
3105
|
},
|
|
3055
3106
|
},
|
|
@@ -3106,7 +3157,7 @@ const EMBEDDED_METHODS = [
|
|
|
3106
3157
|
example: 'FeatureUpdateFeatureParams parameters = new() { ID = "x" };\n\nvar feature = await client.V1.Features.UpdateFeature(parameters);\n\nConsole.WriteLine(feature);',
|
|
3107
3158
|
},
|
|
3108
3159
|
http: {
|
|
3109
|
-
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 '{}'",
|
|
3110
3161
|
},
|
|
3111
3162
|
},
|
|
3112
3163
|
},
|
|
@@ -3165,7 +3216,7 @@ const EMBEDDED_METHODS = [
|
|
|
3165
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);',
|
|
3166
3217
|
},
|
|
3167
3218
|
http: {
|
|
3168
|
-
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 }\'',
|
|
3169
3220
|
},
|
|
3170
3221
|
},
|
|
3171
3222
|
},
|
|
@@ -3221,7 +3272,7 @@ const EMBEDDED_METHODS = [
|
|
|
3221
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}',
|
|
3222
3273
|
},
|
|
3223
3274
|
http: {
|
|
3224
|
-
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"',
|
|
3225
3276
|
},
|
|
3226
3277
|
},
|
|
3227
3278
|
},
|
|
@@ -3266,7 +3317,7 @@ const EMBEDDED_METHODS = [
|
|
|
3266
3317
|
example: 'FeatureArchiveFeatureParams parameters = new() { ID = "x" };\n\nvar feature = await client.V1.Features.ArchiveFeature(parameters);\n\nConsole.WriteLine(feature);',
|
|
3267
3318
|
},
|
|
3268
3319
|
http: {
|
|
3269
|
-
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"',
|
|
3270
3321
|
},
|
|
3271
3322
|
},
|
|
3272
3323
|
},
|
|
@@ -3311,7 +3362,7 @@ const EMBEDDED_METHODS = [
|
|
|
3311
3362
|
example: 'FeatureUnarchiveFeatureParams parameters = new() { ID = "x" };\n\nvar feature = await client.V1.Features.UnarchiveFeature(parameters);\n\nConsole.WriteLine(feature);',
|
|
3312
3363
|
},
|
|
3313
3364
|
http: {
|
|
3314
|
-
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"',
|
|
3315
3366
|
},
|
|
3316
3367
|
},
|
|
3317
3368
|
},
|
|
@@ -3365,7 +3416,7 @@ const EMBEDDED_METHODS = [
|
|
|
3365
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}',
|
|
3366
3417
|
},
|
|
3367
3418
|
http: {
|
|
3368
|
-
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"',
|
|
3369
3420
|
},
|
|
3370
3421
|
},
|
|
3371
3422
|
},
|
|
@@ -3422,7 +3473,7 @@ const EMBEDDED_METHODS = [
|
|
|
3422
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);',
|
|
3423
3474
|
},
|
|
3424
3475
|
http: {
|
|
3425
|
-
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 }\'',
|
|
3426
3477
|
},
|
|
3427
3478
|
},
|
|
3428
3479
|
},
|
|
@@ -3467,7 +3518,7 @@ const EMBEDDED_METHODS = [
|
|
|
3467
3518
|
example: 'AddonRetrieveParams parameters = new() { ID = "x" };\n\nvar addon = await client.V1.Addons.Retrieve(parameters);\n\nConsole.WriteLine(addon);',
|
|
3468
3519
|
},
|
|
3469
3520
|
http: {
|
|
3470
|
-
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"',
|
|
3471
3522
|
},
|
|
3472
3523
|
},
|
|
3473
3524
|
},
|
|
@@ -3524,7 +3575,7 @@ const EMBEDDED_METHODS = [
|
|
|
3524
3575
|
example: 'AddonUpdateParams parameters = new() { ID = "x" };\n\nvar addon = await client.V1.Addons.Update(parameters);\n\nConsole.WriteLine(addon);',
|
|
3525
3576
|
},
|
|
3526
3577
|
http: {
|
|
3527
|
-
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 '{}'",
|
|
3528
3579
|
},
|
|
3529
3580
|
},
|
|
3530
3581
|
},
|
|
@@ -3569,7 +3620,7 @@ const EMBEDDED_METHODS = [
|
|
|
3569
3620
|
example: 'AddonArchiveParams parameters = new() { ID = "x" };\n\nvar addon = await client.V1.Addons.Archive(parameters);\n\nConsole.WriteLine(addon);',
|
|
3570
3621
|
},
|
|
3571
3622
|
http: {
|
|
3572
|
-
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"',
|
|
3573
3624
|
},
|
|
3574
3625
|
},
|
|
3575
3626
|
},
|
|
@@ -3619,7 +3670,7 @@ const EMBEDDED_METHODS = [
|
|
|
3619
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);',
|
|
3620
3671
|
},
|
|
3621
3672
|
http: {
|
|
3622
|
-
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 }\'',
|
|
3623
3674
|
},
|
|
3624
3675
|
},
|
|
3625
3676
|
},
|
|
@@ -3664,7 +3715,7 @@ const EMBEDDED_METHODS = [
|
|
|
3664
3715
|
example: 'AddonCreateDraftParams parameters = new() { ID = "x" };\n\nvar addon = await client.V1.Addons.CreateDraft(parameters);\n\nConsole.WriteLine(addon);',
|
|
3665
3716
|
},
|
|
3666
3717
|
http: {
|
|
3667
|
-
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"',
|
|
3668
3719
|
},
|
|
3669
3720
|
},
|
|
3670
3721
|
},
|
|
@@ -3709,7 +3760,7 @@ const EMBEDDED_METHODS = [
|
|
|
3709
3760
|
example: 'AddonRemoveDraftParams parameters = new() { ID = "x" };\n\nvar response = await client.V1.Addons.RemoveDraft(parameters);\n\nConsole.WriteLine(response);',
|
|
3710
3761
|
},
|
|
3711
3762
|
http: {
|
|
3712
|
-
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"',
|
|
3713
3764
|
},
|
|
3714
3765
|
},
|
|
3715
3766
|
},
|
|
@@ -3761,7 +3812,7 @@ const EMBEDDED_METHODS = [
|
|
|
3761
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}',
|
|
3762
3813
|
},
|
|
3763
3814
|
http: {
|
|
3764
|
-
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"',
|
|
3765
3816
|
},
|
|
3766
3817
|
},
|
|
3767
3818
|
},
|
|
@@ -3806,7 +3857,7 @@ const EMBEDDED_METHODS = [
|
|
|
3806
3857
|
example: 'EntitlementListParams parameters = new() { AddonID = "addonId" };\n\nvar entitlements = await client.V1.Addons.Entitlements.List(parameters);\n\nConsole.WriteLine(entitlements);',
|
|
3807
3858
|
},
|
|
3808
3859
|
http: {
|
|
3809
|
-
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"',
|
|
3810
3861
|
},
|
|
3811
3862
|
},
|
|
3812
3863
|
},
|
|
@@ -3856,7 +3907,7 @@ const EMBEDDED_METHODS = [
|
|
|
3856
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);',
|
|
3857
3908
|
},
|
|
3858
3909
|
http: {
|
|
3859
|
-
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 }\'',
|
|
3860
3911
|
},
|
|
3861
3912
|
},
|
|
3862
3913
|
},
|
|
@@ -3906,7 +3957,7 @@ const EMBEDDED_METHODS = [
|
|
|
3906
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);',
|
|
3907
3958
|
},
|
|
3908
3959
|
http: {
|
|
3909
|
-
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 }\'',
|
|
3910
3961
|
},
|
|
3911
3962
|
},
|
|
3912
3963
|
},
|
|
@@ -3951,7 +4002,7 @@ const EMBEDDED_METHODS = [
|
|
|
3951
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);',
|
|
3952
4003
|
},
|
|
3953
4004
|
http: {
|
|
3954
|
-
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"',
|
|
3955
4006
|
},
|
|
3956
4007
|
},
|
|
3957
4008
|
},
|
|
@@ -4009,7 +4060,7 @@ const EMBEDDED_METHODS = [
|
|
|
4009
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);',
|
|
4010
4061
|
},
|
|
4011
4062
|
http: {
|
|
4012
|
-
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 }\'',
|
|
4013
4064
|
},
|
|
4014
4065
|
},
|
|
4015
4066
|
},
|
|
@@ -4063,7 +4114,7 @@ const EMBEDDED_METHODS = [
|
|
|
4063
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}',
|
|
4064
4115
|
},
|
|
4065
4116
|
http: {
|
|
4066
|
-
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"',
|
|
4067
4118
|
},
|
|
4068
4119
|
},
|
|
4069
4120
|
},
|
|
@@ -4108,7 +4159,7 @@ const EMBEDDED_METHODS = [
|
|
|
4108
4159
|
example: 'PlanRetrieveParams parameters = new() { ID = "x" };\n\nvar plan = await client.V1.Plans.Retrieve(parameters);\n\nConsole.WriteLine(plan);',
|
|
4109
4160
|
},
|
|
4110
4161
|
http: {
|
|
4111
|
-
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"',
|
|
4112
4163
|
},
|
|
4113
4164
|
},
|
|
4114
4165
|
},
|
|
@@ -4165,7 +4216,7 @@ const EMBEDDED_METHODS = [
|
|
|
4165
4216
|
example: 'PlanUpdateParams parameters = new() { ID = "x" };\n\nvar plan = await client.V1.Plans.Update(parameters);\n\nConsole.WriteLine(plan);',
|
|
4166
4217
|
},
|
|
4167
4218
|
http: {
|
|
4168
|
-
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 '{}'",
|
|
4169
4220
|
},
|
|
4170
4221
|
},
|
|
4171
4222
|
},
|
|
@@ -4210,7 +4261,7 @@ const EMBEDDED_METHODS = [
|
|
|
4210
4261
|
example: 'PlanArchiveParams parameters = new() { ID = "x" };\n\nvar plan = await client.V1.Plans.Archive(parameters);\n\nConsole.WriteLine(plan);',
|
|
4211
4262
|
},
|
|
4212
4263
|
http: {
|
|
4213
|
-
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"',
|
|
4214
4265
|
},
|
|
4215
4266
|
},
|
|
4216
4267
|
},
|
|
@@ -4260,7 +4311,7 @@ const EMBEDDED_METHODS = [
|
|
|
4260
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);',
|
|
4261
4312
|
},
|
|
4262
4313
|
http: {
|
|
4263
|
-
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 }\'',
|
|
4264
4315
|
},
|
|
4265
4316
|
},
|
|
4266
4317
|
},
|
|
@@ -4305,7 +4356,7 @@ const EMBEDDED_METHODS = [
|
|
|
4305
4356
|
example: 'PlanCreateDraftParams parameters = new() { ID = "x" };\n\nvar plan = await client.V1.Plans.CreateDraft(parameters);\n\nConsole.WriteLine(plan);',
|
|
4306
4357
|
},
|
|
4307
4358
|
http: {
|
|
4308
|
-
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"',
|
|
4309
4360
|
},
|
|
4310
4361
|
},
|
|
4311
4362
|
},
|
|
@@ -4350,7 +4401,7 @@ const EMBEDDED_METHODS = [
|
|
|
4350
4401
|
example: 'PlanRemoveDraftParams parameters = new() { ID = "x" };\n\nvar response = await client.V1.Plans.RemoveDraft(parameters);\n\nConsole.WriteLine(response);',
|
|
4351
4402
|
},
|
|
4352
4403
|
http: {
|
|
4353
|
-
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"',
|
|
4354
4405
|
},
|
|
4355
4406
|
},
|
|
4356
4407
|
},
|
|
@@ -4402,7 +4453,7 @@ const EMBEDDED_METHODS = [
|
|
|
4402
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}',
|
|
4403
4454
|
},
|
|
4404
4455
|
http: {
|
|
4405
|
-
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"',
|
|
4406
4457
|
},
|
|
4407
4458
|
},
|
|
4408
4459
|
},
|
|
@@ -4454,7 +4505,7 @@ const EMBEDDED_METHODS = [
|
|
|
4454
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}',
|
|
4455
4506
|
},
|
|
4456
4507
|
http: {
|
|
4457
|
-
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"',
|
|
4458
4509
|
},
|
|
4459
4510
|
},
|
|
4460
4511
|
},
|
|
@@ -4499,7 +4550,7 @@ const EMBEDDED_METHODS = [
|
|
|
4499
4550
|
example: 'EntitlementListParams parameters = new() { PlanID = "planId" };\n\nvar entitlements = await client.V1.Plans.Entitlements.List(parameters);\n\nConsole.WriteLine(entitlements);',
|
|
4500
4551
|
},
|
|
4501
4552
|
http: {
|
|
4502
|
-
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"',
|
|
4503
4554
|
},
|
|
4504
4555
|
},
|
|
4505
4556
|
},
|
|
@@ -4549,7 +4600,7 @@ const EMBEDDED_METHODS = [
|
|
|
4549
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);',
|
|
4550
4601
|
},
|
|
4551
4602
|
http: {
|
|
4552
|
-
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 }\'',
|
|
4553
4604
|
},
|
|
4554
4605
|
},
|
|
4555
4606
|
},
|
|
@@ -4599,7 +4650,7 @@ const EMBEDDED_METHODS = [
|
|
|
4599
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);',
|
|
4600
4651
|
},
|
|
4601
4652
|
http: {
|
|
4602
|
-
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 }\'',
|
|
4603
4654
|
},
|
|
4604
4655
|
},
|
|
4605
4656
|
},
|
|
@@ -4644,7 +4695,7 @@ const EMBEDDED_METHODS = [
|
|
|
4644
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);',
|
|
4645
4696
|
},
|
|
4646
4697
|
http: {
|
|
4647
|
-
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"',
|
|
4648
4699
|
},
|
|
4649
4700
|
},
|
|
4650
4701
|
},
|
|
@@ -4693,7 +4744,7 @@ const EMBEDDED_METHODS = [
|
|
|
4693
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);',
|
|
4694
4745
|
},
|
|
4695
4746
|
http: {
|
|
4696
|
-
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 }\'',
|
|
4697
4748
|
},
|
|
4698
4749
|
},
|
|
4699
4750
|
},
|
|
@@ -4747,7 +4798,7 @@ const EMBEDDED_METHODS = [
|
|
|
4747
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);',
|
|
4748
4799
|
},
|
|
4749
4800
|
http: {
|
|
4750
|
-
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"',
|
|
4751
4802
|
},
|
|
4752
4803
|
},
|
|
4753
4804
|
},
|
|
@@ -4801,7 +4852,7 @@ const EMBEDDED_METHODS = [
|
|
|
4801
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}',
|
|
4802
4853
|
},
|
|
4803
4854
|
http: {
|
|
4804
|
-
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"',
|
|
4805
4856
|
},
|
|
4806
4857
|
},
|
|
4807
4858
|
},
|
|
@@ -4854,7 +4905,7 @@ const EMBEDDED_METHODS = [
|
|
|
4854
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);',
|
|
4855
4906
|
},
|
|
4856
4907
|
http: {
|
|
4857
|
-
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 }\'',
|
|
4858
4909
|
},
|
|
4859
4910
|
},
|
|
4860
4911
|
},
|
|
@@ -4909,7 +4960,7 @@ const EMBEDDED_METHODS = [
|
|
|
4909
4960
|
example: 'ProductUpdateProductParams parameters = new() { ID = "x" };\n\nvar product = await client.V1.Products.UpdateProduct(parameters);\n\nConsole.WriteLine(product);',
|
|
4910
4961
|
},
|
|
4911
4962
|
http: {
|
|
4912
|
-
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 '{}'",
|
|
4913
4964
|
},
|
|
4914
4965
|
},
|
|
4915
4966
|
},
|
|
@@ -4954,7 +5005,7 @@ const EMBEDDED_METHODS = [
|
|
|
4954
5005
|
example: 'ProductArchiveProductParams parameters = new() { ID = "x" };\n\nvar product = await client.V1.Products.ArchiveProduct(parameters);\n\nConsole.WriteLine(product);',
|
|
4955
5006
|
},
|
|
4956
5007
|
http: {
|
|
4957
|
-
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"',
|
|
4958
5009
|
},
|
|
4959
5010
|
},
|
|
4960
5011
|
},
|
|
@@ -4999,7 +5050,7 @@ const EMBEDDED_METHODS = [
|
|
|
4999
5050
|
example: 'ProductUnarchiveProductParams parameters = new() { ID = "x" };\n\nvar product = await client.V1.Products.UnarchiveProduct(parameters);\n\nConsole.WriteLine(product);',
|
|
5000
5051
|
},
|
|
5001
5052
|
http: {
|
|
5002
|
-
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"',
|
|
5003
5054
|
},
|
|
5004
5055
|
},
|
|
5005
5056
|
},
|
|
@@ -5051,7 +5102,7 @@ const EMBEDDED_METHODS = [
|
|
|
5051
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);',
|
|
5052
5103
|
},
|
|
5053
5104
|
http: {
|
|
5054
|
-
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 }\'',
|
|
5055
5106
|
},
|
|
5056
5107
|
},
|
|
5057
5108
|
},
|
|
@@ -5106,7 +5157,7 @@ const EMBEDDED_METHODS = [
|
|
|
5106
5157
|
example: 'EntitlementCheckParams parameters = new() { ID = "x" };\n\nvar response = await client.V1Beta.Customers.Entitlements.Check(parameters);\n\nConsole.WriteLine(response);',
|
|
5107
5158
|
},
|
|
5108
5159
|
http: {
|
|
5109
|
-
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"',
|
|
5110
5161
|
},
|
|
5111
5162
|
},
|
|
5112
5163
|
},
|
|
@@ -5160,7 +5211,7 @@ const EMBEDDED_METHODS = [
|
|
|
5160
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}',
|
|
5161
5212
|
},
|
|
5162
5213
|
http: {
|
|
5163
|
-
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"',
|
|
5164
5215
|
},
|
|
5165
5216
|
},
|
|
5166
5217
|
},
|
|
@@ -5210,7 +5261,7 @@ const EMBEDDED_METHODS = [
|
|
|
5210
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);',
|
|
5211
5262
|
},
|
|
5212
5263
|
http: {
|
|
5213
|
-
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 }\'',
|
|
5214
5265
|
},
|
|
5215
5266
|
},
|
|
5216
5267
|
},
|
|
@@ -5255,7 +5306,7 @@ const EMBEDDED_METHODS = [
|
|
|
5255
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);',
|
|
5256
5307
|
},
|
|
5257
5308
|
http: {
|
|
5258
|
-
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"',
|
|
5259
5310
|
},
|
|
5260
5311
|
},
|
|
5261
5312
|
},
|
|
@@ -5300,7 +5351,7 @@ const EMBEDDED_METHODS = [
|
|
|
5300
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);',
|
|
5301
5352
|
},
|
|
5302
5353
|
http: {
|
|
5303
|
-
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 }\'',
|
|
5304
5355
|
},
|
|
5305
5356
|
},
|
|
5306
5357
|
},
|
|
@@ -5345,7 +5396,7 @@ const EMBEDDED_METHODS = [
|
|
|
5345
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);',
|
|
5346
5397
|
},
|
|
5347
5398
|
http: {
|
|
5348
|
-
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 }\'',
|
|
5349
5400
|
},
|
|
5350
5401
|
},
|
|
5351
5402
|
},
|
|
@@ -5399,7 +5450,7 @@ const EMBEDDED_METHODS = [
|
|
|
5399
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}',
|
|
5400
5451
|
},
|
|
5401
5452
|
http: {
|
|
5402
|
-
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"',
|
|
5403
5454
|
},
|
|
5404
5455
|
},
|
|
5405
5456
|
},
|
|
@@ -5449,7 +5500,7 @@ const EMBEDDED_METHODS = [
|
|
|
5449
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);',
|
|
5450
5501
|
},
|
|
5451
5502
|
http: {
|
|
5452
|
-
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 }\'',
|
|
5453
5504
|
},
|
|
5454
5505
|
},
|
|
5455
5506
|
},
|
|
@@ -5500,7 +5551,7 @@ const EMBEDDED_METHODS = [
|
|
|
5500
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}',
|
|
5501
5552
|
},
|
|
5502
5553
|
http: {
|
|
5503
|
-
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"',
|
|
5504
5555
|
},
|
|
5505
5556
|
},
|
|
5506
5557
|
},
|
|
@@ -5549,7 +5600,7 @@ const EMBEDDED_METHODS = [
|
|
|
5549
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);',
|
|
5550
5601
|
},
|
|
5551
5602
|
http: {
|
|
5552
|
-
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 }\'',
|
|
5553
5604
|
},
|
|
5554
5605
|
},
|
|
5555
5606
|
},
|
|
@@ -5569,7 +5620,7 @@ const EMBEDDED_READMES = [
|
|
|
5569
5620
|
},
|
|
5570
5621
|
{
|
|
5571
5622
|
language: 'java',
|
|
5572
|
-
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',
|
|
5573
5624
|
},
|
|
5574
5625
|
{
|
|
5575
5626
|
language: 'python',
|