@stigg/typescript-mcp 0.1.0-beta.20 → 0.1.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +421 -222
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +421 -222
- package/local-docs-search.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/local-docs-search.ts +421 -222
- package/src/server.ts +1 -1
package/local-docs-search.mjs
CHANGED
|
@@ -12,9 +12,9 @@ const EMBEDDED_METHODS = [
|
|
|
12
12
|
description: 'Retrieves a customer by their unique identifier, including billing information and subscription status.',
|
|
13
13
|
stainlessPath: '(resource) v1.customers > (method) retrieve',
|
|
14
14
|
qualified: 'client.v1.customers.retrieve',
|
|
15
|
-
params: ['id: string;'],
|
|
15
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
16
16
|
response: "{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }",
|
|
17
|
-
markdown: "## retrieve\n\n`client.v1.customers.retrieve(id: string): { data: object; }`\n\n**get** `/api/v1/customers/{id}`\n\nRetrieves a customer by their unique identifier, including billing information and subscription status.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerResponse = await client.v1.customers.retrieve('x');\n\nconsole.log(customerResponse);\n```",
|
|
17
|
+
markdown: "## retrieve\n\n`client.v1.customers.retrieve(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1/customers/{id}`\n\nRetrieves a customer by their unique identifier, including billing information and subscription status.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerResponse = await client.v1.customers.retrieve('x');\n\nconsole.log(customerResponse);\n```",
|
|
18
18
|
perLanguage: {
|
|
19
19
|
typescript: {
|
|
20
20
|
method: 'client.v1.customers.retrieve',
|
|
@@ -22,7 +22,7 @@ const EMBEDDED_METHODS = [
|
|
|
22
22
|
},
|
|
23
23
|
python: {
|
|
24
24
|
method: 'v1.customers.retrieve',
|
|
25
|
-
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)\ncustomer_response = client.v1.customers.retrieve(\n "x",\n)\nprint(customer_response.data)',
|
|
25
|
+
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)\ncustomer_response = client.v1.customers.retrieve(\n id="x",\n)\nprint(customer_response.data)',
|
|
26
26
|
},
|
|
27
27
|
java: {
|
|
28
28
|
method: 'v1().customers().retrieve',
|
|
@@ -30,7 +30,7 @@ const EMBEDDED_METHODS = [
|
|
|
30
30
|
},
|
|
31
31
|
go: {
|
|
32
32
|
method: 'client.V1.Customers.Get',
|
|
33
|
-
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\tcustomerResponse, err := client.V1.Customers.Get(
|
|
33
|
+
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\tcustomerResponse, err := client.V1.Customers.Get(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1CustomerGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customerResponse.Data)\n}\n',
|
|
34
34
|
},
|
|
35
35
|
ruby: {
|
|
36
36
|
method: 'v1.customers.retrieve',
|
|
@@ -69,9 +69,11 @@ const EMBEDDED_METHODS = [
|
|
|
69
69
|
'name?: string;',
|
|
70
70
|
'passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; };',
|
|
71
71
|
'timezone?: string;',
|
|
72
|
+
'X-ACCOUNT-ID?: string;',
|
|
73
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
72
74
|
],
|
|
73
75
|
response: "{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }",
|
|
74
|
-
markdown: "## update\n\n`client.v1.customers.update(id: string, billingCurrency?: string, billingId?: string, couponId?: string | '', email?: string, integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[], language?: string, metadata?: object, name?: string, passthrough?: { stripe?: { billingAddress?: object; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: object; taxIds?: object[]; }; zuora?: { billingAddress?: object; currency?: string; metadata?: object; paymentMethodId?: string; }; }, timezone?: string): { data: object; }`\n\n**patch** `/api/v1/customers/{id}`\n\nUpdates an existing customer's properties such as name, email, and billing information.\n\n### Parameters\n\n- `id: string`\n\n- `billingCurrency?: string`\n The billing currency of the customer\n\n- `billingId?: string`\n The unique identifier for the entity in the billing provider\n\n- `couponId?: string | ''`\n Customer level coupon\n\n- `email?: string`\n The email of the customer\n\n- `integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]`\n List of integrations\n\n- `language?: string`\n Language to use for this customer\n\n- `metadata?: object`\n Additional metadata\n\n- `name?: string`\n The name of the customer\n\n- `passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }`\n Vendor-specific billing passthrough fields.\n - `stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }`\n Stripe-specific billing fields for the customer.\n - `zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }`\n Zuora-specific billing fields for the customer.\n\n- `timezone?: string`\n Timezone to use for this customer\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerResponse = await client.v1.customers.update('x');\n\nconsole.log(customerResponse);\n```",
|
|
76
|
+
markdown: "## update\n\n`client.v1.customers.update(id: string, billingCurrency?: string, billingId?: string, couponId?: string | '', email?: string, integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[], language?: string, metadata?: object, name?: string, passthrough?: { stripe?: { billingAddress?: object; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: object; taxIds?: object[]; }; zuora?: { billingAddress?: object; currency?: string; metadata?: object; paymentMethodId?: string; }; }, timezone?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**patch** `/api/v1/customers/{id}`\n\nUpdates an existing customer's properties such as name, email, and billing information.\n\n### Parameters\n\n- `id: string`\n\n- `billingCurrency?: string`\n The billing currency of the customer\n\n- `billingId?: string`\n The unique identifier for the entity in the billing provider\n\n- `couponId?: string | ''`\n Customer level coupon\n\n- `email?: string`\n The email of the customer\n\n- `integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]`\n List of integrations\n\n- `language?: string`\n Language to use for this customer\n\n- `metadata?: object`\n Additional metadata\n\n- `name?: string`\n The name of the customer\n\n- `passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }`\n Vendor-specific billing passthrough fields.\n - `stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }`\n Stripe-specific billing fields for the customer.\n - `zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }`\n Zuora-specific billing fields for the customer.\n\n- `timezone?: string`\n Timezone to use for this customer\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerResponse = await client.v1.customers.update('x');\n\nconsole.log(customerResponse);\n```",
|
|
75
77
|
perLanguage: {
|
|
76
78
|
typescript: {
|
|
77
79
|
method: 'client.v1.customers.update',
|
|
@@ -121,9 +123,11 @@ const EMBEDDED_METHODS = [
|
|
|
121
123
|
'email?: string;',
|
|
122
124
|
'limit?: number;',
|
|
123
125
|
'name?: string;',
|
|
126
|
+
'X-ACCOUNT-ID?: string;',
|
|
127
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
124
128
|
],
|
|
125
129
|
response: "{ id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: object; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: object; taxIds?: object[]; }; zuora?: { billingAddress?: object; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }",
|
|
126
|
-
markdown: "## list\n\n`client.v1.customers.list(after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, email?: string, limit?: number, name?: string): { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: object; email?: string; integrations?: object[]; language?: string; metadata?: object; name?: string; passthrough?: object; timezone?: string; }`\n\n**get** `/api/v1/customers`\n\nRetrieves a paginated list of customers in the environment.\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `email?: string`\n Filter by exact customer email address\n\n- `limit?: number`\n Maximum number of items to return\n\n- `name?: string`\n Filter by exact customer name\n\n### Returns\n\n- `{ id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: object; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: object; taxIds?: object[]; }; zuora?: { billingAddress?: object; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n A customer can be either an organization or an individual\n\n - `id: string`\n - `archivedAt: string`\n - `createdAt: string`\n - `updatedAt: string`\n - `billingCurrency?: string`\n - `billingId?: string`\n - `couponId?: string | ''`\n - `defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }`\n - `email?: string`\n - `integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]`\n - `language?: string`\n - `metadata?: object`\n - `name?: string`\n - `passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }`\n - `timezone?: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const customerListResponse of client.v1.customers.list()) {\n console.log(customerListResponse);\n}\n```",
|
|
130
|
+
markdown: "## list\n\n`client.v1.customers.list(after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, email?: string, limit?: number, name?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: object; email?: string; integrations?: object[]; language?: string; metadata?: object; name?: string; passthrough?: object; timezone?: string; }`\n\n**get** `/api/v1/customers`\n\nRetrieves a paginated list of customers in the environment.\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `email?: string`\n Filter by exact customer email address\n\n- `limit?: number`\n Maximum number of items to return\n\n- `name?: string`\n Filter by exact customer name\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: object; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: object; taxIds?: object[]; }; zuora?: { billingAddress?: object; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n A customer can be either an organization or an individual\n\n - `id: string`\n - `archivedAt: string`\n - `createdAt: string`\n - `updatedAt: string`\n - `billingCurrency?: string`\n - `billingId?: string`\n - `couponId?: string | ''`\n - `defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }`\n - `email?: string`\n - `integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]`\n - `language?: string`\n - `metadata?: object`\n - `name?: string`\n - `passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }`\n - `timezone?: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const customerListResponse of client.v1.customers.list()) {\n console.log(customerListResponse);\n}\n```",
|
|
127
131
|
perLanguage: {
|
|
128
132
|
typescript: {
|
|
129
133
|
method: 'client.v1.customers.list',
|
|
@@ -179,9 +183,11 @@ const EMBEDDED_METHODS = [
|
|
|
179
183
|
'name?: string;',
|
|
180
184
|
'passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; };',
|
|
181
185
|
'timezone?: string;',
|
|
186
|
+
'X-ACCOUNT-ID?: string;',
|
|
187
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
182
188
|
],
|
|
183
189
|
response: "{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }",
|
|
184
|
-
markdown: "## provision\n\n`client.v1.customers.provision(id: string, billingCurrency?: string, billingId?: string, couponId?: string | '', defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }, email?: string, integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[], language?: string, metadata?: object, name?: string, passthrough?: { stripe?: { billingAddress?: object; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: object; taxIds?: object[]; }; zuora?: { billingAddress?: object; currency?: string; metadata?: object; paymentMethodId?: string; }; }, timezone?: string): { data: object; }`\n\n**post** `/api/v1/customers`\n\nCreates a new customer and optionally provisions an initial subscription in a single operation.\n\n### Parameters\n\n- `id: string`\n Customer slug\n\n- `billingCurrency?: string`\n The billing currency of the customer\n\n- `billingId?: string`\n The unique identifier for the entity in the billing provider\n\n- `couponId?: string | ''`\n Customer level coupon\n\n- `defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }`\n The default payment method details\n - `billingId: string`\n The default payment method id\n - `cardExpiryMonth: number`\n The expiration month of the default payment method\n - `cardExpiryYear: number`\n The expiration year of the default payment method\n - `cardLast4Digits: string`\n The last 4 digits of the default payment method\n - `type: 'CARD' | 'BANK' | 'CASH_APP'`\n The default payment method type\n\n- `email?: string`\n The email of the customer\n\n- `integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]`\n List of integrations\n\n- `language?: string`\n Language to use for this customer\n\n- `metadata?: object`\n Additional metadata\n\n- `name?: string`\n The name of the customer\n\n- `passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }`\n Vendor-specific billing passthrough fields.\n - `stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }`\n Stripe-specific billing fields for the customer.\n - `zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }`\n Zuora-specific billing fields for the customer.\n\n- `timezone?: string`\n Timezone to use for this customer\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerResponse = await client.v1.customers.provision({ id: 'id' });\n\nconsole.log(customerResponse);\n```",
|
|
190
|
+
markdown: "## provision\n\n`client.v1.customers.provision(id: string, billingCurrency?: string, billingId?: string, couponId?: string | '', defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }, email?: string, integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[], language?: string, metadata?: object, name?: string, passthrough?: { stripe?: { billingAddress?: object; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: object; taxIds?: object[]; }; zuora?: { billingAddress?: object; currency?: string; metadata?: object; paymentMethodId?: string; }; }, timezone?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/customers`\n\nCreates a new customer and optionally provisions an initial subscription in a single operation.\n\n### Parameters\n\n- `id: string`\n Customer slug\n\n- `billingCurrency?: string`\n The billing currency of the customer\n\n- `billingId?: string`\n The unique identifier for the entity in the billing provider\n\n- `couponId?: string | ''`\n Customer level coupon\n\n- `defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }`\n The default payment method details\n - `billingId: string`\n The default payment method id\n - `cardExpiryMonth: number`\n The expiration month of the default payment method\n - `cardExpiryYear: number`\n The expiration year of the default payment method\n - `cardLast4Digits: string`\n The last 4 digits of the default payment method\n - `type: 'CARD' | 'BANK' | 'CASH_APP'`\n The default payment method type\n\n- `email?: string`\n The email of the customer\n\n- `integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]`\n List of integrations\n\n- `language?: string`\n Language to use for this customer\n\n- `metadata?: object`\n Additional metadata\n\n- `name?: string`\n The name of the customer\n\n- `passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }`\n Vendor-specific billing passthrough fields.\n - `stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }`\n Stripe-specific billing fields for the customer.\n - `zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }`\n Zuora-specific billing fields for the customer.\n\n- `timezone?: string`\n Timezone to use for this customer\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerResponse = await client.v1.customers.provision({ id: 'id' });\n\nconsole.log(customerResponse);\n```",
|
|
185
191
|
perLanguage: {
|
|
186
192
|
typescript: {
|
|
187
193
|
method: 'client.v1.customers.provision',
|
|
@@ -224,9 +230,9 @@ const EMBEDDED_METHODS = [
|
|
|
224
230
|
description: 'Archives a customer, preventing new subscriptions. Optionally cancels existing subscriptions.',
|
|
225
231
|
stainlessPath: '(resource) v1.customers > (method) archive',
|
|
226
232
|
qualified: 'client.v1.customers.archive',
|
|
227
|
-
params: ['id: string;'],
|
|
233
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
228
234
|
response: "{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }",
|
|
229
|
-
markdown: "## archive\n\n`client.v1.customers.archive(id: string): { data: object; }`\n\n**post** `/api/v1/customers/{id}/archive`\n\nArchives a customer, preventing new subscriptions. Optionally cancels existing subscriptions.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerResponse = await client.v1.customers.archive('x');\n\nconsole.log(customerResponse);\n```",
|
|
235
|
+
markdown: "## archive\n\n`client.v1.customers.archive(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/customers/{id}/archive`\n\nArchives a customer, preventing new subscriptions. Optionally cancels existing subscriptions.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerResponse = await client.v1.customers.archive('x');\n\nconsole.log(customerResponse);\n```",
|
|
230
236
|
perLanguage: {
|
|
231
237
|
typescript: {
|
|
232
238
|
method: 'client.v1.customers.archive',
|
|
@@ -234,7 +240,7 @@ const EMBEDDED_METHODS = [
|
|
|
234
240
|
},
|
|
235
241
|
python: {
|
|
236
242
|
method: 'v1.customers.archive',
|
|
237
|
-
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)\ncustomer_response = client.v1.customers.archive(\n "x",\n)\nprint(customer_response.data)',
|
|
243
|
+
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)\ncustomer_response = client.v1.customers.archive(\n id="x",\n)\nprint(customer_response.data)',
|
|
238
244
|
},
|
|
239
245
|
java: {
|
|
240
246
|
method: 'v1().customers().archive',
|
|
@@ -242,7 +248,7 @@ const EMBEDDED_METHODS = [
|
|
|
242
248
|
},
|
|
243
249
|
go: {
|
|
244
250
|
method: 'client.V1.Customers.Archive',
|
|
245
|
-
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\tcustomerResponse, err := client.V1.Customers.Archive(
|
|
251
|
+
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\tcustomerResponse, err := client.V1.Customers.Archive(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1CustomerArchiveParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customerResponse.Data)\n}\n',
|
|
246
252
|
},
|
|
247
253
|
ruby: {
|
|
248
254
|
method: 'v1.customers.archive',
|
|
@@ -269,9 +275,9 @@ const EMBEDDED_METHODS = [
|
|
|
269
275
|
description: 'Restores an archived customer, allowing them to create new subscriptions again.',
|
|
270
276
|
stainlessPath: '(resource) v1.customers > (method) unarchive',
|
|
271
277
|
qualified: 'client.v1.customers.unarchive',
|
|
272
|
-
params: ['id: string;'],
|
|
278
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
273
279
|
response: "{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }",
|
|
274
|
-
markdown: "## unarchive\n\n`client.v1.customers.unarchive(id: string): { data: object; }`\n\n**post** `/api/v1/customers/{id}/unarchive`\n\nRestores an archived customer, allowing them to create new subscriptions again.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerResponse = await client.v1.customers.unarchive('x');\n\nconsole.log(customerResponse);\n```",
|
|
280
|
+
markdown: "## unarchive\n\n`client.v1.customers.unarchive(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/customers/{id}/unarchive`\n\nRestores an archived customer, allowing them to create new subscriptions again.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerResponse = await client.v1.customers.unarchive('x');\n\nconsole.log(customerResponse);\n```",
|
|
275
281
|
perLanguage: {
|
|
276
282
|
typescript: {
|
|
277
283
|
method: 'client.v1.customers.unarchive',
|
|
@@ -279,7 +285,7 @@ const EMBEDDED_METHODS = [
|
|
|
279
285
|
},
|
|
280
286
|
python: {
|
|
281
287
|
method: 'v1.customers.unarchive',
|
|
282
|
-
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)\ncustomer_response = client.v1.customers.unarchive(\n "x",\n)\nprint(customer_response.data)',
|
|
288
|
+
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)\ncustomer_response = client.v1.customers.unarchive(\n id="x",\n)\nprint(customer_response.data)',
|
|
283
289
|
},
|
|
284
290
|
java: {
|
|
285
291
|
method: 'v1().customers().unarchive',
|
|
@@ -287,7 +293,7 @@ const EMBEDDED_METHODS = [
|
|
|
287
293
|
},
|
|
288
294
|
go: {
|
|
289
295
|
method: 'client.V1.Customers.Unarchive',
|
|
290
|
-
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\tcustomerResponse, err := client.V1.Customers.Unarchive(
|
|
296
|
+
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\tcustomerResponse, err := client.V1.Customers.Unarchive(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1CustomerUnarchiveParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customerResponse.Data)\n}\n',
|
|
291
297
|
},
|
|
292
298
|
ruby: {
|
|
293
299
|
method: 'v1.customers.unarchive',
|
|
@@ -317,9 +323,11 @@ const EMBEDDED_METHODS = [
|
|
|
317
323
|
params: [
|
|
318
324
|
'customers: { id: string; email: string; name: string; billingId?: string; metadata?: object; paymentMethodId?: string; salesforceId?: string; updatedAt?: string; }[];',
|
|
319
325
|
'integrationId?: string;',
|
|
326
|
+
'X-ACCOUNT-ID?: string;',
|
|
327
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
320
328
|
],
|
|
321
329
|
response: '{ data: { newCustomers: string[]; }; }',
|
|
322
|
-
markdown: "## import\n\n`client.v1.customers.import(customers: { id: string; email: string; name: string; billingId?: string; metadata?: object; paymentMethodId?: string; salesforceId?: string; updatedAt?: string; }[], integrationId?: string): { data: object; }`\n\n**post** `/api/v1/customers/import`\n\nImports multiple customers in bulk. Used for migrating customer data from external systems.\n\n### Parameters\n\n- `customers: { id: string; email: string; name: string; billingId?: string; metadata?: object; paymentMethodId?: string; salesforceId?: string; updatedAt?: string; }[]`\n List of customer objects to import\n\n- `integrationId?: string`\n Integration details\n\n### Returns\n\n- `{ data: { newCustomers: string[]; }; }`\n Response object\n\n - `data: { newCustomers: string[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.customers.import({ customers: [{\n id: 'id',\n email: 'dev@stainless.com',\n name: 'name',\n}] });\n\nconsole.log(response);\n```",
|
|
330
|
+
markdown: "## import\n\n`client.v1.customers.import(customers: { id: string; email: string; name: string; billingId?: string; metadata?: object; paymentMethodId?: string; salesforceId?: string; updatedAt?: string; }[], integrationId?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/customers/import`\n\nImports multiple customers in bulk. Used for migrating customer data from external systems.\n\n### Parameters\n\n- `customers: { id: string; email: string; name: string; billingId?: string; metadata?: object; paymentMethodId?: string; salesforceId?: string; updatedAt?: string; }[]`\n List of customer objects to import\n\n- `integrationId?: string`\n Integration details\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { newCustomers: string[]; }; }`\n Response object\n\n - `data: { newCustomers: string[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.customers.import({ customers: [{\n id: 'id',\n email: 'dev@stainless.com',\n name: 'name',\n}] });\n\nconsole.log(response);\n```",
|
|
323
331
|
perLanguage: {
|
|
324
332
|
typescript: {
|
|
325
333
|
method: 'client.v1.customers.import',
|
|
@@ -362,9 +370,16 @@ const EMBEDDED_METHODS = [
|
|
|
362
370
|
description: 'Retrieves a paginated list of resources within the same customer.',
|
|
363
371
|
stainlessPath: '(resource) v1.customers > (method) list_resources',
|
|
364
372
|
qualified: 'client.v1.customers.listResources',
|
|
365
|
-
params: [
|
|
373
|
+
params: [
|
|
374
|
+
'id: string;',
|
|
375
|
+
'after?: string;',
|
|
376
|
+
'before?: string;',
|
|
377
|
+
'limit?: number;',
|
|
378
|
+
'X-ACCOUNT-ID?: string;',
|
|
379
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
380
|
+
],
|
|
366
381
|
response: '{ id: string; createdAt: string; updatedAt: string; }',
|
|
367
|
-
markdown: "## list_resources\n\n`client.v1.customers.listResources(id: string, after?: string, before?: string, limit?: number): { id: string; createdAt: string; updatedAt: string; }`\n\n**get** `/api/v1/customers/{id}/resources`\n\nRetrieves a paginated list of resources within the same customer.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; createdAt: string; updatedAt: string; }`\n Resource object that belongs to a customer\n\n - `id: string`\n - `createdAt: string`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const customerListResourcesResponse of client.v1.customers.listResources('x')) {\n console.log(customerListResourcesResponse);\n}\n```",
|
|
382
|
+
markdown: "## list_resources\n\n`client.v1.customers.listResources(id: string, after?: string, before?: string, limit?: number, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; createdAt: string; updatedAt: string; }`\n\n**get** `/api/v1/customers/{id}/resources`\n\nRetrieves a paginated list of resources within the same customer.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; createdAt: string; updatedAt: string; }`\n Resource object that belongs to a customer\n\n - `id: string`\n - `createdAt: string`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const customerListResourcesResponse of client.v1.customers.listResources('x')) {\n console.log(customerListResourcesResponse);\n}\n```",
|
|
368
383
|
perLanguage: {
|
|
369
384
|
typescript: {
|
|
370
385
|
method: 'client.v1.customers.listResources',
|
|
@@ -407,9 +422,9 @@ const EMBEDDED_METHODS = [
|
|
|
407
422
|
description: 'Retrieves the effective entitlements for a customer or resource, including feature and credit entitlements.\n\n**Warning:** This REST API endpoint lacks built-in client-side caching, fallback mechanisms, and low-latency guarantees. It is not recommended for hot-path entitlement checks. For production use, consider using the Stigg Node Server SDK with caching or the Sidecar for low-latency cached responses.',
|
|
408
423
|
stainlessPath: '(resource) v1.customers > (method) retrieve_entitlements',
|
|
409
424
|
qualified: 'client.v1.customers.retrieveEntitlements',
|
|
410
|
-
params: ['id: string;', 'resourceId?: string;'],
|
|
425
|
+
params: ['id: string;', 'resourceId?: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
411
426
|
response: "{ data: { accessDeniedReason: 'CustomerNotFound' | 'NoActiveSubscription' | 'CustomerIsArchived'; entitlements: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: object; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: object; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }[]; }; }",
|
|
412
|
-
markdown: "## retrieve_entitlements\n\n`client.v1.customers.retrieveEntitlements(id: string, resourceId?: string): { data: object; }`\n\n**get** `/api/v1/customers/{id}/entitlements`\n\nRetrieves the effective entitlements for a customer or resource, including feature and credit entitlements.\n\n**Warning:** This REST API endpoint lacks built-in client-side caching, fallback mechanisms, and low-latency guarantees. It is not recommended for hot-path entitlement checks. For production use, consider using the Stigg Node Server SDK with caching or the Sidecar for low-latency cached responses.\n\n### Parameters\n\n- `id: string`\n\n- `resourceId?: string`\n Resource ID to scope entitlements to a specific resource\n\n### Returns\n\n- `{ data: { accessDeniedReason: 'CustomerNotFound' | 'NoActiveSubscription' | 'CustomerIsArchived'; entitlements: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: object; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: object; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }[]; }; }`\n Response object\n\n - `data: { accessDeniedReason: 'CustomerNotFound' | 'NoActiveSubscription' | 'CustomerIsArchived'; entitlements: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.customers.retrieveEntitlements('x');\n\nconsole.log(response);\n```",
|
|
427
|
+
markdown: "## retrieve_entitlements\n\n`client.v1.customers.retrieveEntitlements(id: string, resourceId?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1/customers/{id}/entitlements`\n\nRetrieves the effective entitlements for a customer or resource, including feature and credit entitlements.\n\n**Warning:** This REST API endpoint lacks built-in client-side caching, fallback mechanisms, and low-latency guarantees. It is not recommended for hot-path entitlement checks. For production use, consider using the Stigg Node Server SDK with caching or the Sidecar for low-latency cached responses.\n\n### Parameters\n\n- `id: string`\n\n- `resourceId?: string`\n Resource ID to scope entitlements to a specific resource\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { accessDeniedReason: 'CustomerNotFound' | 'NoActiveSubscription' | 'CustomerIsArchived'; entitlements: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: object; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: object; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }[]; }; }`\n Response object\n\n - `data: { accessDeniedReason: 'CustomerNotFound' | 'NoActiveSubscription' | 'CustomerIsArchived'; entitlements: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.customers.retrieveEntitlements('x');\n\nconsole.log(response);\n```",
|
|
413
428
|
perLanguage: {
|
|
414
429
|
typescript: {
|
|
415
430
|
method: 'client.v1.customers.retrieveEntitlements',
|
|
@@ -459,9 +474,11 @@ const EMBEDDED_METHODS = [
|
|
|
459
474
|
'requestedUsage?: number;',
|
|
460
475
|
'requestedValues?: string[];',
|
|
461
476
|
'resourceId?: string;',
|
|
477
|
+
'X-ACCOUNT-ID?: string;',
|
|
478
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
462
479
|
],
|
|
463
480
|
response: "{ data: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }; }",
|
|
464
|
-
markdown: "## check_entitlement\n\n`client.v1.customers.checkEntitlement(id: string, currencyId?: string, featureId?: string, requestedUsage?: number, requestedValues?: string[], resourceId?: string): { data: object | object; }`\n\n**get** `/api/v1/customers/{id}/entitlements/check`\n\nChecks a single entitlement (feature or credit) for a customer or resource. Supports `requestedUsage` and `requestedValues` to evaluate against limits or enum values.\n\n**Warning:** This REST API endpoint lacks built-in client-side caching, fallback mechanisms, and low-latency guarantees. It is not recommended for hot-path entitlement checks. For production use, consider using the Stigg Node Server SDK with caching or the Sidecar for low-latency cached responses.\n\n### Parameters\n\n- `id: string`\n\n- `currencyId?: string`\n Currency ID (refId) to check for credit entitlements. Mutually exclusive with `featureId`.\n\n- `featureId?: string`\n Feature ID (refId) to check. Mutually exclusive with `currencyId`.\n\n- `requestedUsage?: number`\n Requested usage amount to evaluate against the entitlement limit (numeric features only)\n\n- `requestedValues?: string[]`\n Requested values to evaluate against allowed values (enum features only)\n\n- `resourceId?: string`\n Resource ID to scope the entitlement check to a specific resource\n\n### Returns\n\n- `{ data: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }; }`\n Response object\n\n - `data: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.customers.checkEntitlement('x');\n\nconsole.log(response);\n```",
|
|
481
|
+
markdown: "## check_entitlement\n\n`client.v1.customers.checkEntitlement(id: string, currencyId?: string, featureId?: string, requestedUsage?: number, requestedValues?: string[], resourceId?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object | object; }`\n\n**get** `/api/v1/customers/{id}/entitlements/check`\n\nChecks a single entitlement (feature or credit) for a customer or resource. Supports `requestedUsage` and `requestedValues` to evaluate against limits or enum values.\n\n**Warning:** This REST API endpoint lacks built-in client-side caching, fallback mechanisms, and low-latency guarantees. It is not recommended for hot-path entitlement checks. For production use, consider using the Stigg Node Server SDK with caching or the Sidecar for low-latency cached responses.\n\n### Parameters\n\n- `id: string`\n\n- `currencyId?: string`\n Currency ID (refId) to check for credit entitlements. Mutually exclusive with `featureId`.\n\n- `featureId?: string`\n Feature ID (refId) to check. Mutually exclusive with `currencyId`.\n\n- `requestedUsage?: number`\n Requested usage amount to evaluate against the entitlement limit (numeric features only)\n\n- `requestedValues?: string[]`\n Requested values to evaluate against allowed values (enum features only)\n\n- `resourceId?: string`\n Resource ID to scope the entitlement check to a specific resource\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }; }`\n Response object\n\n - `data: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.customers.checkEntitlement('x');\n\nconsole.log(response);\n```",
|
|
465
482
|
perLanguage: {
|
|
466
483
|
typescript: {
|
|
467
484
|
method: 'client.v1.customers.checkEntitlement',
|
|
@@ -510,9 +527,11 @@ const EMBEDDED_METHODS = [
|
|
|
510
527
|
'paymentMethodId: string;',
|
|
511
528
|
'vendorIdentifier: string;',
|
|
512
529
|
'billingCurrency?: string;',
|
|
530
|
+
'X-ACCOUNT-ID?: string;',
|
|
531
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
513
532
|
],
|
|
514
533
|
response: "{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }",
|
|
515
|
-
markdown: "## attach\n\n`client.v1.customers.paymentMethod.attach(id: string, integrationId: string, paymentMethodId: string, vendorIdentifier: string, billingCurrency?: string): { data: object; }`\n\n**post** `/api/v1/customers/{id}/payment-method`\n\nAttaches a payment method to a customer for billing. Required for paid subscriptions when integrated with a billing provider.\n\n### Parameters\n\n- `id: string`\n\n- `integrationId: string`\n Integration details\n\n- `paymentMethodId: string`\n Billing provider payment method id\n\n- `vendorIdentifier: string`\n The vendor identifier of integration\n\n- `billingCurrency?: string`\n Customers selected currency\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerResponse = await client.v1.customers.paymentMethod.attach('x', {\n integrationId: 'integrationId',\n paymentMethodId: 'paymentMethodId',\n vendorIdentifier: 'AUTH0',\n});\n\nconsole.log(customerResponse);\n```",
|
|
534
|
+
markdown: "## attach\n\n`client.v1.customers.paymentMethod.attach(id: string, integrationId: string, paymentMethodId: string, vendorIdentifier: string, billingCurrency?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/customers/{id}/payment-method`\n\nAttaches a payment method to a customer for billing. Required for paid subscriptions when integrated with a billing provider.\n\n### Parameters\n\n- `id: string`\n\n- `integrationId: string`\n Integration details\n\n- `paymentMethodId: string`\n Billing provider payment method id\n\n- `vendorIdentifier: string`\n The vendor identifier of integration\n\n- `billingCurrency?: string`\n Customers selected currency\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerResponse = await client.v1.customers.paymentMethod.attach('x', {\n integrationId: 'integrationId',\n paymentMethodId: 'paymentMethodId',\n vendorIdentifier: 'AUTH0',\n});\n\nconsole.log(customerResponse);\n```",
|
|
516
535
|
perLanguage: {
|
|
517
536
|
typescript: {
|
|
518
537
|
method: 'client.v1.customers.paymentMethod.attach',
|
|
@@ -555,9 +574,9 @@ const EMBEDDED_METHODS = [
|
|
|
555
574
|
description: 'Removes the payment method from a customer. Ensure active paid subscriptions have an alternative payment method.',
|
|
556
575
|
stainlessPath: '(resource) v1.customers.payment_method > (method) detach',
|
|
557
576
|
qualified: 'client.v1.customers.paymentMethod.detach',
|
|
558
|
-
params: ['id: string;'],
|
|
577
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
559
578
|
response: "{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }",
|
|
560
|
-
markdown: "## detach\n\n`client.v1.customers.paymentMethod.detach(id: string): { data: object; }`\n\n**delete** `/api/v1/customers/{id}/payment-method`\n\nRemoves the payment method from a customer. Ensure active paid subscriptions have an alternative payment method.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerResponse = await client.v1.customers.paymentMethod.detach('x');\n\nconsole.log(customerResponse);\n```",
|
|
579
|
+
markdown: "## detach\n\n`client.v1.customers.paymentMethod.detach(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**delete** `/api/v1/customers/{id}/payment-method`\n\nRemoves the payment method from a customer. Ensure active paid subscriptions have an alternative payment method.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: object; zuora?: object; }; timezone?: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; updatedAt: string; billingCurrency?: string; billingId?: string; couponId?: string | ''; defaultPaymentMethod?: { billingId: string; cardExpiryMonth: number; cardExpiryYear: number; cardLast4Digits: string; type: 'CARD' | 'BANK' | 'CASH_APP'; }; email?: string; integrations?: { id: string; syncedEntityId: string; vendorIdentifier: string; }[]; language?: string; metadata?: object; name?: string; passthrough?: { stripe?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; customerName?: string; invoiceCustomFields?: object; metadata?: object; paymentMethodId?: string; shippingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; taxIds?: { type: string; value: string; }[]; }; zuora?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; currency?: string; metadata?: object; paymentMethodId?: string; }; }; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerResponse = await client.v1.customers.paymentMethod.detach('x');\n\nconsole.log(customerResponse);\n```",
|
|
561
580
|
perLanguage: {
|
|
562
581
|
typescript: {
|
|
563
582
|
method: 'client.v1.customers.paymentMethod.detach',
|
|
@@ -565,7 +584,7 @@ const EMBEDDED_METHODS = [
|
|
|
565
584
|
},
|
|
566
585
|
python: {
|
|
567
586
|
method: 'v1.customers.payment_method.detach',
|
|
568
|
-
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)\ncustomer_response = client.v1.customers.payment_method.detach(\n "x",\n)\nprint(customer_response.data)',
|
|
587
|
+
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)\ncustomer_response = client.v1.customers.payment_method.detach(\n id="x",\n)\nprint(customer_response.data)',
|
|
569
588
|
},
|
|
570
589
|
java: {
|
|
571
590
|
method: 'v1().customers().paymentMethod().detach',
|
|
@@ -573,7 +592,7 @@ const EMBEDDED_METHODS = [
|
|
|
573
592
|
},
|
|
574
593
|
go: {
|
|
575
594
|
method: 'client.V1.Customers.PaymentMethod.Detach',
|
|
576
|
-
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\tcustomerResponse, err := client.V1.Customers.PaymentMethod.Detach(
|
|
595
|
+
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\tcustomerResponse, err := client.V1.Customers.PaymentMethod.Detach(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1CustomerPaymentMethodDetachParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customerResponse.Data)\n}\n',
|
|
577
596
|
},
|
|
578
597
|
ruby: {
|
|
579
598
|
method: 'v1.customers.payment_method.detach',
|
|
@@ -607,9 +626,11 @@ const EMBEDDED_METHODS = [
|
|
|
607
626
|
'createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; };',
|
|
608
627
|
'limit?: number;',
|
|
609
628
|
"status?: 'Active' | 'Expired' | 'Paused'[];",
|
|
629
|
+
'X-ACCOUNT-ID?: string;',
|
|
630
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
610
631
|
],
|
|
611
632
|
response: "{ id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }",
|
|
612
|
-
markdown: "## list\n\n`client.v1.customers.promotionalEntitlements.list(id: string, after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, limit?: number, status?: 'Active' | 'Expired' | 'Paused'[]): { id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: object | object | object; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }`\n\n**get** `/api/v1/customers/{id}/promotional-entitlements`\n\nRetrieves a paginated list of a customer's promotional entitlements.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `limit?: number`\n Maximum number of items to return\n\n- `status?: 'Active' | 'Expired' | 'Paused'[]`\n Filter by promotional entitlement status. Supports comma-separated values for multiple statuses\n\n### Returns\n\n- `{ id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }`\n Granted feature entitlement\n\n - `id: string`\n - `createdAt: string`\n - `description: string`\n - `endDate: string`\n - `enumValues: string[]`\n - `environmentId: string`\n - `featureGroupIds: string[]`\n - `featureId: string`\n - `hasSoftLimit: boolean`\n - `hasUnlimitedUsage: boolean`\n - `isVisible: boolean`\n - `period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'`\n - `resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'`\n - `resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }`\n - `startDate: string`\n - `status: 'Active' | 'Expired' | 'Paused'`\n - `updatedAt: string`\n - `usageLimit: number`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const promotionalEntitlementListResponse of client.v1.customers.promotionalEntitlements.list('x')) {\n console.log(promotionalEntitlementListResponse);\n}\n```",
|
|
633
|
+
markdown: "## list\n\n`client.v1.customers.promotionalEntitlements.list(id: string, after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, limit?: number, status?: 'Active' | 'Expired' | 'Paused'[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: object | object | object; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }`\n\n**get** `/api/v1/customers/{id}/promotional-entitlements`\n\nRetrieves a paginated list of a customer's promotional entitlements.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `limit?: number`\n Maximum number of items to return\n\n- `status?: 'Active' | 'Expired' | 'Paused'[]`\n Filter by promotional entitlement status. Supports comma-separated values for multiple statuses\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }`\n Granted feature entitlement\n\n - `id: string`\n - `createdAt: string`\n - `description: string`\n - `endDate: string`\n - `enumValues: string[]`\n - `environmentId: string`\n - `featureGroupIds: string[]`\n - `featureId: string`\n - `hasSoftLimit: boolean`\n - `hasUnlimitedUsage: boolean`\n - `isVisible: boolean`\n - `period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'`\n - `resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'`\n - `resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }`\n - `startDate: string`\n - `status: 'Active' | 'Expired' | 'Paused'`\n - `updatedAt: string`\n - `usageLimit: number`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const promotionalEntitlementListResponse of client.v1.customers.promotionalEntitlements.list('x')) {\n console.log(promotionalEntitlementListResponse);\n}\n```",
|
|
613
634
|
perLanguage: {
|
|
614
635
|
typescript: {
|
|
615
636
|
method: 'client.v1.customers.promotionalEntitlements.list',
|
|
@@ -655,9 +676,11 @@ const EMBEDDED_METHODS = [
|
|
|
655
676
|
params: [
|
|
656
677
|
'id: string;',
|
|
657
678
|
"promotionalEntitlements: { customEndDate: string; enumValues: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; monthlyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit: number; weeklyResetPeriodConfiguration: { accordingTo: string; }; yearlyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; }; }[];",
|
|
679
|
+
'X-ACCOUNT-ID?: string;',
|
|
680
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
658
681
|
],
|
|
659
682
|
response: "{ data: { id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }[]; }",
|
|
660
|
-
markdown: "## create\n\n`client.v1.customers.promotionalEntitlements.create(id: string, promotionalEntitlements: { customEndDate: string; enumValues: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; monthlyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit: number; weeklyResetPeriodConfiguration: { accordingTo: string; }; yearlyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; }; }[]): { data: object[]; }`\n\n**post** `/api/v1/customers/{id}/promotional-entitlements`\n\nGrants promotional entitlements to a customer, providing feature access outside their subscription. Entitlements can be time-limited or permanent.\n\n### Parameters\n\n- `id: string`\n\n- `promotionalEntitlements: { customEndDate: string; enumValues: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; monthlyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit: number; weeklyResetPeriodConfiguration: { accordingTo: string; }; yearlyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; }; }[]`\n Promotional entitlements to grant\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }[]; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst promotionalEntitlement = await client.v1.customers.promotionalEntitlements.create('x', { promotionalEntitlements: [{\n customEndDate: '2019-12-27T18:11:19.117Z',\n enumValues: ['string'],\n featureId: 'featureId',\n hasSoftLimit: true,\n hasUnlimitedUsage: true,\n isVisible: true,\n monthlyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart' },\n period: '1 week',\n resetPeriod: 'YEAR',\n usageLimit: -9007199254740991,\n weeklyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart' },\n yearlyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart' },\n}] });\n\nconsole.log(promotionalEntitlement);\n```",
|
|
683
|
+
markdown: "## create\n\n`client.v1.customers.promotionalEntitlements.create(id: string, promotionalEntitlements: { customEndDate: string; enumValues: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; monthlyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit: number; weeklyResetPeriodConfiguration: { accordingTo: string; }; yearlyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; }; }[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object[]; }`\n\n**post** `/api/v1/customers/{id}/promotional-entitlements`\n\nGrants promotional entitlements to a customer, providing feature access outside their subscription. Entitlements can be time-limited or permanent.\n\n### Parameters\n\n- `id: string`\n\n- `promotionalEntitlements: { customEndDate: string; enumValues: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; monthlyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit: number; weeklyResetPeriodConfiguration: { accordingTo: string; }; yearlyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; }; }[]`\n Promotional entitlements to grant\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }[]; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst promotionalEntitlement = await client.v1.customers.promotionalEntitlements.create('x', { promotionalEntitlements: [{\n customEndDate: '2019-12-27T18:11:19.117Z',\n enumValues: ['string'],\n featureId: 'featureId',\n hasSoftLimit: true,\n hasUnlimitedUsage: true,\n isVisible: true,\n monthlyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart' },\n period: '1 week',\n resetPeriod: 'YEAR',\n usageLimit: -9007199254740991,\n weeklyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart' },\n yearlyResetPeriodConfiguration: { accordingTo: 'SubscriptionStart' },\n}] });\n\nconsole.log(promotionalEntitlement);\n```",
|
|
661
684
|
perLanguage: {
|
|
662
685
|
typescript: {
|
|
663
686
|
method: 'client.v1.customers.promotionalEntitlements.create',
|
|
@@ -700,9 +723,9 @@ const EMBEDDED_METHODS = [
|
|
|
700
723
|
description: 'Revokes a previously granted promotional entitlement from a customer for a specific feature.',
|
|
701
724
|
stainlessPath: '(resource) v1.customers.promotional_entitlements > (method) revoke',
|
|
702
725
|
qualified: 'client.v1.customers.promotionalEntitlements.revoke',
|
|
703
|
-
params: ['id: string;', 'featureId: string;'],
|
|
726
|
+
params: ['id: string;', 'featureId: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
704
727
|
response: "{ data: { id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }; }",
|
|
705
|
-
markdown: "## revoke\n\n`client.v1.customers.promotionalEntitlements.revoke(id: string, featureId: string): { data: object; }`\n\n**delete** `/api/v1/customers/{id}/promotional-entitlements/{featureId}`\n\nRevokes a previously granted promotional entitlement from a customer for a specific feature.\n\n### Parameters\n\n- `id: string`\n\n- `featureId: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.customers.promotionalEntitlements.revoke('featureId', { id: 'id' });\n\nconsole.log(response);\n```",
|
|
728
|
+
markdown: "## revoke\n\n`client.v1.customers.promotionalEntitlements.revoke(id: string, featureId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**delete** `/api/v1/customers/{id}/promotional-entitlements/{featureId}`\n\nRevokes a previously granted promotional entitlement from a customer for a specific feature.\n\n### Parameters\n\n- `id: string`\n\n- `featureId: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; endDate: string; enumValues: string[]; environmentId: string; featureGroupIds: string[]; featureId: string; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; isVisible: boolean; period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom'; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; startDate: string; status: 'Active' | 'Expired' | 'Paused'; updatedAt: string; usageLimit: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.customers.promotionalEntitlements.revoke('featureId', { id: 'id' });\n\nconsole.log(response);\n```",
|
|
706
729
|
perLanguage: {
|
|
707
730
|
typescript: {
|
|
708
731
|
method: 'client.v1.customers.promotionalEntitlements.revoke',
|
|
@@ -751,9 +774,11 @@ const EMBEDDED_METHODS = [
|
|
|
751
774
|
'before?: string;',
|
|
752
775
|
'limit?: number;',
|
|
753
776
|
'vendorIdentifier?: string[];',
|
|
777
|
+
'X-ACCOUNT-ID?: string;',
|
|
778
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
754
779
|
],
|
|
755
780
|
response: '{ id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }',
|
|
756
|
-
markdown: "## list\n\n`client.v1.customers.integrations.list(id: string, after?: string, before?: string, limit?: number, vendorIdentifier?: string[]): { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: object | object | object; }`\n\n**get** `/api/v1/customers/{id}/integrations`\n\nRetrieves a paginated list of a customer's external integrations (billing, CRM, etc.).\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n- `vendorIdentifier?: string[]`\n Filter by vendor identifier. Supports comma-separated values for multiple vendors (e.g., STRIPE,HUBSPOT)\n\n### Returns\n\n- `{ id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }`\n External billing or CRM integration link\n\n - `id: string`\n - `syncedEntityId: string`\n - `vendorIdentifier: string`\n - `syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const integrationListResponse of client.v1.customers.integrations.list('x')) {\n console.log(integrationListResponse);\n}\n```",
|
|
781
|
+
markdown: "## list\n\n`client.v1.customers.integrations.list(id: string, after?: string, before?: string, limit?: number, vendorIdentifier?: string[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: object | object | object; }`\n\n**get** `/api/v1/customers/{id}/integrations`\n\nRetrieves a paginated list of a customer's external integrations (billing, CRM, etc.).\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n- `vendorIdentifier?: string[]`\n Filter by vendor identifier. Supports comma-separated values for multiple vendors (e.g., STRIPE,HUBSPOT)\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }`\n External billing or CRM integration link\n\n - `id: string`\n - `syncedEntityId: string`\n - `vendorIdentifier: string`\n - `syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const integrationListResponse of client.v1.customers.integrations.list('x')) {\n console.log(integrationListResponse);\n}\n```",
|
|
757
782
|
perLanguage: {
|
|
758
783
|
typescript: {
|
|
759
784
|
method: 'client.v1.customers.integrations.list',
|
|
@@ -796,9 +821,16 @@ const EMBEDDED_METHODS = [
|
|
|
796
821
|
description: 'Links a customer to an external integration by specifying the vendor and external entity ID.',
|
|
797
822
|
stainlessPath: '(resource) v1.customers.integrations > (method) link',
|
|
798
823
|
qualified: 'client.v1.customers.integrations.link',
|
|
799
|
-
params: [
|
|
824
|
+
params: [
|
|
825
|
+
'id: string;',
|
|
826
|
+
'id: string;',
|
|
827
|
+
'syncedEntityId: string;',
|
|
828
|
+
'vendorIdentifier: string;',
|
|
829
|
+
'X-ACCOUNT-ID?: string;',
|
|
830
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
831
|
+
],
|
|
800
832
|
response: '{ data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }; }',
|
|
801
|
-
markdown: "## link\n\n`client.v1.customers.integrations.link(id: string, id: string, syncedEntityId: string, vendorIdentifier: string): { data: object; }`\n\n**post** `/api/v1/customers/{id}/integrations`\n\nLinks a customer to an external integration by specifying the vendor and external entity ID.\n\n### Parameters\n\n- `id: string`\n\n- `id: string`\n Integration details\n\n- `syncedEntityId: string`\n Synced entity id\n\n- `vendorIdentifier: string`\n The vendor identifier of integration\n\n### Returns\n\n- `{ data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }; }`\n Response object\n\n - `data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerIntegrationResponse = await client.v1.customers.integrations.link('x', {\n id: 'id',\n syncedEntityId: 'syncedEntityId',\n vendorIdentifier: 'AUTH0',\n});\n\nconsole.log(customerIntegrationResponse);\n```",
|
|
833
|
+
markdown: "## link\n\n`client.v1.customers.integrations.link(id: string, id: string, syncedEntityId: string, vendorIdentifier: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/customers/{id}/integrations`\n\nLinks a customer to an external integration by specifying the vendor and external entity ID.\n\n### Parameters\n\n- `id: string`\n\n- `id: string`\n Integration details\n\n- `syncedEntityId: string`\n Synced entity id\n\n- `vendorIdentifier: string`\n The vendor identifier of integration\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }; }`\n Response object\n\n - `data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerIntegrationResponse = await client.v1.customers.integrations.link('x', {\n id: 'id',\n syncedEntityId: 'syncedEntityId',\n vendorIdentifier: 'AUTH0',\n});\n\nconsole.log(customerIntegrationResponse);\n```",
|
|
802
834
|
perLanguage: {
|
|
803
835
|
typescript: {
|
|
804
836
|
method: 'client.v1.customers.integrations.link',
|
|
@@ -841,9 +873,9 @@ const EMBEDDED_METHODS = [
|
|
|
841
873
|
description: 'Retrieves a specific integration for a customer by integration ID.',
|
|
842
874
|
stainlessPath: '(resource) v1.customers.integrations > (method) retrieve',
|
|
843
875
|
qualified: 'client.v1.customers.integrations.retrieve',
|
|
844
|
-
params: ['id: string;', 'integrationId: string;'],
|
|
876
|
+
params: ['id: string;', 'integrationId: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
845
877
|
response: '{ data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }; }',
|
|
846
|
-
markdown: "## retrieve\n\n`client.v1.customers.integrations.retrieve(id: string, integrationId: string): { data: object; }`\n\n**get** `/api/v1/customers/{id}/integrations/{integrationId}`\n\nRetrieves a specific integration for a customer by integration ID.\n\n### Parameters\n\n- `id: string`\n\n- `integrationId: string`\n\n### Returns\n\n- `{ data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }; }`\n Response object\n\n - `data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerIntegrationResponse = await client.v1.customers.integrations.retrieve('integrationId', { id: 'id' });\n\nconsole.log(customerIntegrationResponse);\n```",
|
|
878
|
+
markdown: "## retrieve\n\n`client.v1.customers.integrations.retrieve(id: string, integrationId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1/customers/{id}/integrations/{integrationId}`\n\nRetrieves a specific integration for a customer by integration ID.\n\n### Parameters\n\n- `id: string`\n\n- `integrationId: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }; }`\n Response object\n\n - `data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerIntegrationResponse = await client.v1.customers.integrations.retrieve('integrationId', { id: 'id' });\n\nconsole.log(customerIntegrationResponse);\n```",
|
|
847
879
|
perLanguage: {
|
|
848
880
|
typescript: {
|
|
849
881
|
method: 'client.v1.customers.integrations.retrieve',
|
|
@@ -886,9 +918,15 @@ const EMBEDDED_METHODS = [
|
|
|
886
918
|
description: "Updates a customer's integration link, such as changing the synced external entity ID.",
|
|
887
919
|
stainlessPath: '(resource) v1.customers.integrations > (method) update',
|
|
888
920
|
qualified: 'client.v1.customers.integrations.update',
|
|
889
|
-
params: [
|
|
921
|
+
params: [
|
|
922
|
+
'id: string;',
|
|
923
|
+
'integrationId: string;',
|
|
924
|
+
'syncedEntityId: string;',
|
|
925
|
+
'X-ACCOUNT-ID?: string;',
|
|
926
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
927
|
+
],
|
|
890
928
|
response: '{ data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }; }',
|
|
891
|
-
markdown: "## update\n\n`client.v1.customers.integrations.update(id: string, integrationId: string, syncedEntityId: string): { data: object; }`\n\n**patch** `/api/v1/customers/{id}/integrations/{integrationId}`\n\nUpdates a customer's integration link, such as changing the synced external entity ID.\n\n### Parameters\n\n- `id: string`\n\n- `integrationId: string`\n\n- `syncedEntityId: string`\n Synced entity id\n\n### Returns\n\n- `{ data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }; }`\n Response object\n\n - `data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerIntegrationResponse = await client.v1.customers.integrations.update('integrationId', { id: 'id', syncedEntityId: 'syncedEntityId' });\n\nconsole.log(customerIntegrationResponse);\n```",
|
|
929
|
+
markdown: "## update\n\n`client.v1.customers.integrations.update(id: string, integrationId: string, syncedEntityId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**patch** `/api/v1/customers/{id}/integrations/{integrationId}`\n\nUpdates a customer's integration link, such as changing the synced external entity ID.\n\n### Parameters\n\n- `id: string`\n\n- `integrationId: string`\n\n- `syncedEntityId: string`\n Synced entity id\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }; }`\n Response object\n\n - `data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerIntegrationResponse = await client.v1.customers.integrations.update('integrationId', { id: 'id', syncedEntityId: 'syncedEntityId' });\n\nconsole.log(customerIntegrationResponse);\n```",
|
|
892
930
|
perLanguage: {
|
|
893
931
|
typescript: {
|
|
894
932
|
method: 'client.v1.customers.integrations.update',
|
|
@@ -931,9 +969,9 @@ const EMBEDDED_METHODS = [
|
|
|
931
969
|
description: 'Removes the link between a customer and an external integration.',
|
|
932
970
|
stainlessPath: '(resource) v1.customers.integrations > (method) unlink',
|
|
933
971
|
qualified: 'client.v1.customers.integrations.unlink',
|
|
934
|
-
params: ['id: string;', 'integrationId: string;'],
|
|
972
|
+
params: ['id: string;', 'integrationId: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
935
973
|
response: '{ data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }; }',
|
|
936
|
-
markdown: "## unlink\n\n`client.v1.customers.integrations.unlink(id: string, integrationId: string): { data: object; }`\n\n**delete** `/api/v1/customers/{id}/integrations/{integrationId}`\n\nRemoves the link between a customer and an external integration.\n\n### Parameters\n\n- `id: string`\n\n- `integrationId: string`\n\n### Returns\n\n- `{ data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }; }`\n Response object\n\n - `data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerIntegrationResponse = await client.v1.customers.integrations.unlink('integrationId', { id: 'id' });\n\nconsole.log(customerIntegrationResponse);\n```",
|
|
974
|
+
markdown: "## unlink\n\n`client.v1.customers.integrations.unlink(id: string, integrationId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**delete** `/api/v1/customers/{id}/integrations/{integrationId}`\n\nRemoves the link between a customer and an external integration.\n\n### Parameters\n\n- `id: string`\n\n- `integrationId: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }; }`\n Response object\n\n - `data: { id: string; syncedEntityId: string; vendorIdentifier: string; syncData?: { billingId: string; billingLinkUrl: string; priceGroupPackageBillingId: string; } | { billingId: string; billingLinkUrl: string; } | { dimensions: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customerIntegrationResponse = await client.v1.customers.integrations.unlink('integrationId', { id: 'id' });\n\nconsole.log(customerIntegrationResponse);\n```",
|
|
937
975
|
perLanguage: {
|
|
938
976
|
typescript: {
|
|
939
977
|
method: 'client.v1.customers.integrations.unlink',
|
|
@@ -976,9 +1014,9 @@ const EMBEDDED_METHODS = [
|
|
|
976
1014
|
description: 'Retrieves a subscription by its unique identifier, including plan details, billing period, status, and add-ons.',
|
|
977
1015
|
stainlessPath: '(resource) v1.subscriptions > (method) retrieve',
|
|
978
1016
|
qualified: 'client.v1.subscriptions.retrieve',
|
|
979
|
-
params: ['id: string;'],
|
|
1017
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
980
1018
|
response: "{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: object[]; billingCycleAnchor?: string; budget?: object; cancellationDate?: string; cancelReason?: string; coupons?: object[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: object[]; latestInvoice?: object; metadata?: object; minimumSpend?: object; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: object[]; resourceId?: string; subscriptionEntitlements?: object[]; trial?: object; trialEndDate?: string; }; }",
|
|
981
|
-
markdown: "## retrieve\n\n`client.v1.subscriptions.retrieve(id: string): { data: object; }`\n\n**get** `/api/v1/subscriptions/{id}`\n\nRetrieves a subscription by its unique identifier, including plan details, billing period, status, and add-ons.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: object[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: object; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: object[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst subscription = await client.v1.subscriptions.retrieve('x');\n\nconsole.log(subscription);\n```",
|
|
1019
|
+
markdown: "## retrieve\n\n`client.v1.subscriptions.retrieve(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1/subscriptions/{id}`\n\nRetrieves a subscription by its unique identifier, including plan details, billing period, status, and add-ons.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: object[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: object; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: object[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst subscription = await client.v1.subscriptions.retrieve('x');\n\nconsole.log(subscription);\n```",
|
|
982
1020
|
perLanguage: {
|
|
983
1021
|
typescript: {
|
|
984
1022
|
method: 'client.v1.subscriptions.retrieve',
|
|
@@ -986,7 +1024,7 @@ const EMBEDDED_METHODS = [
|
|
|
986
1024
|
},
|
|
987
1025
|
python: {
|
|
988
1026
|
method: 'v1.subscriptions.retrieve',
|
|
989
|
-
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)\nsubscription = client.v1.subscriptions.retrieve(\n "x",\n)\nprint(subscription.data)',
|
|
1027
|
+
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)\nsubscription = client.v1.subscriptions.retrieve(\n id="x",\n)\nprint(subscription.data)',
|
|
990
1028
|
},
|
|
991
1029
|
java: {
|
|
992
1030
|
method: 'v1().subscriptions().retrieve',
|
|
@@ -994,7 +1032,7 @@ const EMBEDDED_METHODS = [
|
|
|
994
1032
|
},
|
|
995
1033
|
go: {
|
|
996
1034
|
method: 'client.V1.Subscriptions.Get',
|
|
997
|
-
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\tsubscription, err := client.V1.Subscriptions.Get(
|
|
1035
|
+
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\tsubscription, err := client.V1.Subscriptions.Get(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1SubscriptionGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", subscription.Data)\n}\n',
|
|
998
1036
|
},
|
|
999
1037
|
ruby: {
|
|
1000
1038
|
method: 'v1.subscriptions.retrieve',
|
|
@@ -1031,9 +1069,11 @@ const EMBEDDED_METHODS = [
|
|
|
1031
1069
|
"pricingType?: 'FREE' | 'PAID' | 'CUSTOM'[];",
|
|
1032
1070
|
'resourceId?: string;',
|
|
1033
1071
|
"status?: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'[];",
|
|
1072
|
+
'X-ACCOUNT-ID?: string;',
|
|
1073
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
1034
1074
|
],
|
|
1035
1075
|
response: "{ id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: object[]; billingCycleAnchor?: string; budget?: object; cancellationDate?: string; cancelReason?: string; coupons?: object[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: object[]; latestInvoice?: object; metadata?: object; minimumSpend?: object; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: object[]; resourceId?: string; subscriptionEntitlements?: object[]; trial?: object; trialEndDate?: string; }",
|
|
1036
|
-
markdown: "## list\n\n`client.v1.subscriptions.list(after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, customerId?: string, limit?: number, planId?: string, pricingType?: 'FREE' | 'PAID' | 'CUSTOM'[], resourceId?: string, status?: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'[]): { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: object[]; billingCycleAnchor?: string; budget?: object; cancellationDate?: string; cancelReason?: string; coupons?: object[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: object[]; latestInvoice?: object; metadata?: object; minimumSpend?: object; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: object[]; resourceId?: string; subscriptionEntitlements?: object[]; trial?: object; trialEndDate?: string; }`\n\n**get** `/api/v1/subscriptions`\n\nRetrieves a paginated list of subscriptions, with optional filters for customer, status, and plan.\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `customerId?: string`\n Filter by customer ID\n\n- `limit?: number`\n Maximum number of items to return\n\n- `planId?: string`\n Filter by plan ID\n\n- `pricingType?: 'FREE' | 'PAID' | 'CUSTOM'[]`\n Filter by pricing type. Supports comma-separated values for multiple types\n\n- `resourceId?: string`\n Filter by resource ID\n\n- `status?: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'[]`\n Filter by subscription status. Supports comma-separated values for multiple statuses\n\n### Returns\n\n- `{ id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n Customer subscription to a plan\n\n - `id: string`\n - `billingId: string`\n - `createdAt: string`\n - `customerId: string`\n - `paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'`\n - `planId: string`\n - `pricingType: 'FREE' | 'PAID' | 'CUSTOM'`\n - `startDate: string`\n - `status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'`\n - `addons?: { id: string; quantity: number; }[]`\n - `billingCycleAnchor?: string`\n - `budget?: { hasSoftLimit: boolean; limit: number; }`\n - `cancellationDate?: string`\n - `cancelReason?: string`\n - `coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]`\n - `currentBillingPeriodEnd?: string`\n - `currentBillingPeriodStart?: string`\n - `effectiveEndDate?: string`\n - `endDate?: string`\n - `futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]`\n - `latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }`\n - `metadata?: object`\n - `minimumSpend?: { amount?: number; currency?: string; }`\n - `payingCustomerId?: string`\n - `paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'`\n - `prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]`\n - `resourceId?: string`\n - `subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]`\n - `trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }`\n - `trialEndDate?: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const subscriptionListResponse of client.v1.subscriptions.list()) {\n console.log(subscriptionListResponse);\n}\n```",
|
|
1076
|
+
markdown: "## list\n\n`client.v1.subscriptions.list(after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, customerId?: string, limit?: number, planId?: string, pricingType?: 'FREE' | 'PAID' | 'CUSTOM'[], resourceId?: string, status?: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: object[]; billingCycleAnchor?: string; budget?: object; cancellationDate?: string; cancelReason?: string; coupons?: object[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: object[]; latestInvoice?: object; metadata?: object; minimumSpend?: object; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: object[]; resourceId?: string; subscriptionEntitlements?: object[]; trial?: object; trialEndDate?: string; }`\n\n**get** `/api/v1/subscriptions`\n\nRetrieves a paginated list of subscriptions, with optional filters for customer, status, and plan.\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `customerId?: string`\n Filter by customer ID\n\n- `limit?: number`\n Maximum number of items to return\n\n- `planId?: string`\n Filter by plan ID\n\n- `pricingType?: 'FREE' | 'PAID' | 'CUSTOM'[]`\n Filter by pricing type. Supports comma-separated values for multiple types\n\n- `resourceId?: string`\n Filter by resource ID\n\n- `status?: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'[]`\n Filter by subscription status. Supports comma-separated values for multiple statuses\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n Customer subscription to a plan\n\n - `id: string`\n - `billingId: string`\n - `createdAt: string`\n - `customerId: string`\n - `paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'`\n - `planId: string`\n - `pricingType: 'FREE' | 'PAID' | 'CUSTOM'`\n - `startDate: string`\n - `status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'`\n - `addons?: { id: string; quantity: number; }[]`\n - `billingCycleAnchor?: string`\n - `budget?: { hasSoftLimit: boolean; limit: number; }`\n - `cancellationDate?: string`\n - `cancelReason?: string`\n - `coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]`\n - `currentBillingPeriodEnd?: string`\n - `currentBillingPeriodStart?: string`\n - `effectiveEndDate?: string`\n - `endDate?: string`\n - `futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]`\n - `latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }`\n - `metadata?: object`\n - `minimumSpend?: { amount?: number; currency?: string; }`\n - `payingCustomerId?: string`\n - `paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'`\n - `prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]`\n - `resourceId?: string`\n - `subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]`\n - `trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }`\n - `trialEndDate?: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const subscriptionListResponse of client.v1.subscriptions.list()) {\n console.log(subscriptionListResponse);\n}\n```",
|
|
1037
1077
|
perLanguage: {
|
|
1038
1078
|
typescript: {
|
|
1039
1079
|
method: 'client.v1.subscriptions.list',
|
|
@@ -1104,9 +1144,11 @@ const EMBEDDED_METHODS = [
|
|
|
1104
1144
|
'startDate?: string;',
|
|
1105
1145
|
"trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; };",
|
|
1106
1146
|
'unitQuantity?: number;',
|
|
1147
|
+
'X-ACCOUNT-ID?: string;',
|
|
1148
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
1107
1149
|
],
|
|
1108
1150
|
response: "{ data: { id: string; entitlements: object | object[]; status: 'SUCCESS' | 'PAYMENT_REQUIRED'; subscription: object; checkoutBillingId?: string; checkoutUrl?: string; isScheduled?: boolean; }; }",
|
|
1109
|
-
markdown: "## provision\n\n`client.v1.subscriptions.provision(customerId: string, planId: string, id?: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, awaitPaymentConfirmation?: boolean, billingCountryCode?: string, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingId?: string, billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', budget?: { hasSoftLimit: boolean; limit: number; }, cancellationDate?: string, charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[], checkoutOptions?: { cancelUrl: string; successUrl: string; allowPromoCodes?: boolean; allowTaxIdCollection?: boolean; collectBillingAddress?: boolean; collectPhoneNumber?: boolean; referenceId?: string; }, entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[], metadata?: object, minimumSpend?: { amount?: number; currency?: string; }, payingCustomerId?: string, paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE', priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; currency?: string; featureId?: string; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[], resourceId?: string, salesforceId?: string, scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE', startDate?: string, trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }, unitQuantity?: number): { data: object; }`\n\n**post** `/api/v1/subscriptions`\n\nCreates a new subscription for an existing customer. When payment is required and no payment method exists, returns a checkout URL.\n\n### Parameters\n\n- `customerId: string`\n Customer ID to provision the subscription for\n\n- `planId: string`\n Plan ID to provision\n\n- `id?: string`\n Unique identifier for the subscription\n\n- `addons?: { id: string; quantity: number; }[]`\n\n- `appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }`\n Coupon configuration\n - `billingCouponId?: string`\n Billing provider coupon ID\n - `configuration?: { startDate?: string; }`\n Coupon timing configuration\n - `couponId?: string`\n Stigg coupon ID\n - `discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }`\n Ad-hoc discount configuration\n - `promotionCode?: string`\n Promotion code to apply\n\n- `awaitPaymentConfirmation?: boolean`\n Whether to wait for payment confirmation before returning the subscription\n\n- `billingCountryCode?: string`\n The ISO 3166-1 alpha-2 country code for billing\n\n- `billingCycleAnchor?: 'UNCHANGED' | 'NOW'`\n Billing cycle anchor behavior for the subscription\n\n- `billingId?: string`\n External billing system identifier\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }`\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n Billing address for the subscription\n - `chargeOnBehalfOfAccount?: string`\n Stripe Connect account to charge on behalf of\n - `integrationId?: string`\n Billing integration identifier\n - `invoiceDaysUntilDue?: number`\n Number of days until invoice is due\n - `isBackdated?: boolean`\n Whether the subscription is backdated\n - `isInvoicePaid?: boolean`\n Whether the invoice is marked as paid\n - `metadata?: object`\n Additional metadata for the subscription\n - `prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'`\n How to handle proration for billing changes\n - `taxIds?: { type: string; value: string; }[]`\n Customer tax identification numbers\n - `taxPercentage?: number`\n Tax percentage (0-100)\n - `taxRateIds?: string[]`\n Tax rate identifiers to apply\n\n- `billingPeriod?: 'MONTHLY' | 'ANNUALLY'`\n Billing period (MONTHLY or ANNUALLY)\n\n- `budget?: { hasSoftLimit: boolean; limit: number; }`\n - `hasSoftLimit: boolean`\n Whether the budget is a soft limit\n - `limit: number`\n Maximum spending limit\n\n- `cancellationDate?: string`\n Subscription cancellation date\n\n- `charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]`\n\n- `checkoutOptions?: { cancelUrl: string; successUrl: string; allowPromoCodes?: boolean; allowTaxIdCollection?: boolean; collectBillingAddress?: boolean; collectPhoneNumber?: boolean; referenceId?: string; }`\n Checkout page configuration for payment collection\n - `cancelUrl: string`\n URL to redirect to if checkout is canceled\n - `successUrl: string`\n URL to redirect to after successful checkout\n - `allowPromoCodes?: boolean`\n Allow promotional codes during checkout\n - `allowTaxIdCollection?: boolean`\n Allow tax ID collection during checkout\n - `collectBillingAddress?: boolean`\n Collect billing address during checkout\n - `collectPhoneNumber?: boolean`\n Collect phone number during checkout\n - `referenceId?: string`\n Optional reference ID for the checkout session\n\n- `entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[]`\n\n- `metadata?: object`\n Additional metadata for the subscription\n\n- `minimumSpend?: { amount?: number; currency?: string; }`\n Minimum spend amount\n - `amount?: number`\n The price amount\n - `currency?: string`\n The price currency\n\n- `payingCustomerId?: string`\n Optional paying customer ID for split billing scenarios\n\n- `paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'`\n How payments should be collected for this subscription\n\n- `priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]`\n\n- `resourceId?: string`\n Optional resource ID for multi-instance subscriptions\n\n- `salesforceId?: string`\n Salesforce ID\n\n- `scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE'`\n Strategy for scheduling subscription changes\n\n- `startDate?: string`\n Subscription start date\n\n- `trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }`\n Trial period override settings\n - `isTrial: boolean`\n Whether the subscription should start with a trial period\n - `trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'`\n Behavior when trial ends: CONVERT_TO_PAID or CANCEL_SUBSCRIPTION\n - `trialEndDate?: string`\n Custom trial end date\n\n- `unitQuantity?: number`\n Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).\n\n### Returns\n\n- `{ data: { id: string; entitlements: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: object; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: object; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }[]; status: 'SUCCESS' | 'PAYMENT_REQUIRED'; subscription: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: object[]; billingCycleAnchor?: string; budget?: object; cancellationDate?: string; cancelReason?: string; coupons?: object[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: object[]; latestInvoice?: object; metadata?: object; minimumSpend?: object; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: object[]; resourceId?: string; subscriptionEntitlements?: object[]; trial?: object; trialEndDate?: string; }; checkoutBillingId?: string; checkoutUrl?: string; isScheduled?: boolean; }; }`\n Response object\n\n - `data: { id: string; entitlements: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }[]; status: 'SUCCESS' | 'PAYMENT_REQUIRED'; subscription: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; checkoutBillingId?: string; checkoutUrl?: string; isScheduled?: boolean; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.provision({ customerId: 'customerId', planId: 'planId' });\n\nconsole.log(response);\n```",
|
|
1151
|
+
markdown: "## provision\n\n`client.v1.subscriptions.provision(customerId: string, planId: string, id?: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, awaitPaymentConfirmation?: boolean, billingCountryCode?: string, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingId?: string, billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', budget?: { hasSoftLimit: boolean; limit: number; }, cancellationDate?: string, charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[], checkoutOptions?: { cancelUrl: string; successUrl: string; allowPromoCodes?: boolean; allowTaxIdCollection?: boolean; collectBillingAddress?: boolean; collectPhoneNumber?: boolean; referenceId?: string; }, entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[], metadata?: object, minimumSpend?: { amount?: number; currency?: string; }, payingCustomerId?: string, paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE', priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; currency?: string; featureId?: string; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[], resourceId?: string, salesforceId?: string, scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE', startDate?: string, trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }, unitQuantity?: number, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/subscriptions`\n\nCreates a new subscription for an existing customer. When payment is required and no payment method exists, returns a checkout URL.\n\n### Parameters\n\n- `customerId: string`\n Customer ID to provision the subscription for\n\n- `planId: string`\n Plan ID to provision\n\n- `id?: string`\n Unique identifier for the subscription\n\n- `addons?: { id: string; quantity: number; }[]`\n\n- `appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }`\n Coupon configuration\n - `billingCouponId?: string`\n Billing provider coupon ID\n - `configuration?: { startDate?: string; }`\n Coupon timing configuration\n - `couponId?: string`\n Stigg coupon ID\n - `discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }`\n Ad-hoc discount configuration\n - `promotionCode?: string`\n Promotion code to apply\n\n- `awaitPaymentConfirmation?: boolean`\n Whether to wait for payment confirmation before returning the subscription\n\n- `billingCountryCode?: string`\n The ISO 3166-1 alpha-2 country code for billing\n\n- `billingCycleAnchor?: 'UNCHANGED' | 'NOW'`\n Billing cycle anchor behavior for the subscription\n\n- `billingId?: string`\n External billing system identifier\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }`\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n Billing address for the subscription\n - `chargeOnBehalfOfAccount?: string`\n Stripe Connect account to charge on behalf of\n - `integrationId?: string`\n Billing integration identifier\n - `invoiceDaysUntilDue?: number`\n Number of days until invoice is due\n - `isBackdated?: boolean`\n Whether the subscription is backdated\n - `isInvoicePaid?: boolean`\n Whether the invoice is marked as paid\n - `metadata?: object`\n Additional metadata for the subscription\n - `prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'`\n How to handle proration for billing changes\n - `taxIds?: { type: string; value: string; }[]`\n Customer tax identification numbers\n - `taxPercentage?: number`\n Tax percentage (0-100)\n - `taxRateIds?: string[]`\n Tax rate identifiers to apply\n\n- `billingPeriod?: 'MONTHLY' | 'ANNUALLY'`\n Billing period (MONTHLY or ANNUALLY)\n\n- `budget?: { hasSoftLimit: boolean; limit: number; }`\n - `hasSoftLimit: boolean`\n Whether the budget is a soft limit\n - `limit: number`\n Maximum spending limit\n\n- `cancellationDate?: string`\n Subscription cancellation date\n\n- `charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]`\n\n- `checkoutOptions?: { cancelUrl: string; successUrl: string; allowPromoCodes?: boolean; allowTaxIdCollection?: boolean; collectBillingAddress?: boolean; collectPhoneNumber?: boolean; referenceId?: string; }`\n Checkout page configuration for payment collection\n - `cancelUrl: string`\n URL to redirect to if checkout is canceled\n - `successUrl: string`\n URL to redirect to after successful checkout\n - `allowPromoCodes?: boolean`\n Allow promotional codes during checkout\n - `allowTaxIdCollection?: boolean`\n Allow tax ID collection during checkout\n - `collectBillingAddress?: boolean`\n Collect billing address during checkout\n - `collectPhoneNumber?: boolean`\n Collect phone number during checkout\n - `referenceId?: string`\n Optional reference ID for the checkout session\n\n- `entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[]`\n\n- `metadata?: object`\n Additional metadata for the subscription\n\n- `minimumSpend?: { amount?: number; currency?: string; }`\n Minimum spend amount\n - `amount?: number`\n The price amount\n - `currency?: string`\n The price currency\n\n- `payingCustomerId?: string`\n Optional paying customer ID for split billing scenarios\n\n- `paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'`\n How payments should be collected for this subscription\n\n- `priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]`\n\n- `resourceId?: string`\n Optional resource ID for multi-instance subscriptions\n\n- `salesforceId?: string`\n Salesforce ID\n\n- `scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE'`\n Strategy for scheduling subscription changes\n\n- `startDate?: string`\n Subscription start date\n\n- `trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }`\n Trial period override settings\n - `isTrial: boolean`\n Whether the subscription should start with a trial period\n - `trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'`\n Behavior when trial ends: CONVERT_TO_PAID or CANCEL_SUBSCRIPTION\n - `trialEndDate?: string`\n Custom trial end date\n\n- `unitQuantity?: number`\n Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; entitlements: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: object; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: object; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }[]; status: 'SUCCESS' | 'PAYMENT_REQUIRED'; subscription: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: object[]; billingCycleAnchor?: string; budget?: object; cancellationDate?: string; cancelReason?: string; coupons?: object[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: object[]; latestInvoice?: object; metadata?: object; minimumSpend?: object; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: object[]; resourceId?: string; subscriptionEntitlements?: object[]; trial?: object; trialEndDate?: string; }; checkoutBillingId?: string; checkoutUrl?: string; isScheduled?: boolean; }; }`\n Response object\n\n - `data: { id: string; entitlements: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }[]; status: 'SUCCESS' | 'PAYMENT_REQUIRED'; subscription: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; checkoutBillingId?: string; checkoutUrl?: string; isScheduled?: boolean; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.provision({ customerId: 'customerId', planId: 'planId' });\n\nconsole.log(response);\n```",
|
|
1110
1152
|
perLanguage: {
|
|
1111
1153
|
typescript: {
|
|
1112
1154
|
method: 'client.v1.subscriptions.provision',
|
|
@@ -1149,9 +1191,14 @@ const EMBEDDED_METHODS = [
|
|
|
1149
1191
|
description: 'Transfers a subscription to a different resource ID. Used for multi-resource products where subscriptions apply to specific entities like websites or apps.',
|
|
1150
1192
|
stainlessPath: '(resource) v1.subscriptions > (method) transfer',
|
|
1151
1193
|
qualified: 'client.v1.subscriptions.transfer',
|
|
1152
|
-
params: [
|
|
1194
|
+
params: [
|
|
1195
|
+
'id: string;',
|
|
1196
|
+
'destinationResourceId: string;',
|
|
1197
|
+
'X-ACCOUNT-ID?: string;',
|
|
1198
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
1199
|
+
],
|
|
1153
1200
|
response: "{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: object[]; billingCycleAnchor?: string; budget?: object; cancellationDate?: string; cancelReason?: string; coupons?: object[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: object[]; latestInvoice?: object; metadata?: object; minimumSpend?: object; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: object[]; resourceId?: string; subscriptionEntitlements?: object[]; trial?: object; trialEndDate?: string; }; }",
|
|
1154
|
-
markdown: "## transfer\n\n`client.v1.subscriptions.transfer(id: string, destinationResourceId: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/{id}/transfer`\n\nTransfers a subscription to a different resource ID. Used for multi-resource products where subscriptions apply to specific entities like websites or apps.\n\n### Parameters\n\n- `id: string`\n\n- `destinationResourceId: string`\n Resource ID to transfer the subscription to\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: object[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: object; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: object[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst subscription = await client.v1.subscriptions.transfer('x', { destinationResourceId: 'destinationResourceId' });\n\nconsole.log(subscription);\n```",
|
|
1201
|
+
markdown: "## transfer\n\n`client.v1.subscriptions.transfer(id: string, destinationResourceId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/{id}/transfer`\n\nTransfers a subscription to a different resource ID. Used for multi-resource products where subscriptions apply to specific entities like websites or apps.\n\n### Parameters\n\n- `id: string`\n\n- `destinationResourceId: string`\n Resource ID to transfer the subscription to\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: object[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: object; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: object[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst subscription = await client.v1.subscriptions.transfer('x', { destinationResourceId: 'destinationResourceId' });\n\nconsole.log(subscription);\n```",
|
|
1155
1202
|
perLanguage: {
|
|
1156
1203
|
typescript: {
|
|
1157
1204
|
method: 'client.v1.subscriptions.transfer',
|
|
@@ -1194,9 +1241,14 @@ const EMBEDDED_METHODS = [
|
|
|
1194
1241
|
description: 'Migrates a subscription to the latest published version of its plan or add-ons. Handles prorated charges or credits automatically.',
|
|
1195
1242
|
stainlessPath: '(resource) v1.subscriptions > (method) migrate',
|
|
1196
1243
|
qualified: 'client.v1.subscriptions.migrate',
|
|
1197
|
-
params: [
|
|
1244
|
+
params: [
|
|
1245
|
+
'id: string;',
|
|
1246
|
+
"subscriptionMigrationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE';",
|
|
1247
|
+
'X-ACCOUNT-ID?: string;',
|
|
1248
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
1249
|
+
],
|
|
1198
1250
|
response: "{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: object[]; billingCycleAnchor?: string; budget?: object; cancellationDate?: string; cancelReason?: string; coupons?: object[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: object[]; latestInvoice?: object; metadata?: object; minimumSpend?: object; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: object[]; resourceId?: string; subscriptionEntitlements?: object[]; trial?: object; trialEndDate?: string; }; }",
|
|
1199
|
-
markdown: "## migrate\n\n`client.v1.subscriptions.migrate(id: string, subscriptionMigrationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE'): { data: object; }`\n\n**post** `/api/v1/subscriptions/{id}/migrate`\n\nMigrates a subscription to the latest published version of its plan or add-ons. Handles prorated charges or credits automatically.\n\n### Parameters\n\n- `id: string`\n\n- `subscriptionMigrationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE'`\n When to migrate (immediate or period end)\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: object[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: object; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: object[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst subscription = await client.v1.subscriptions.migrate('x');\n\nconsole.log(subscription);\n```",
|
|
1251
|
+
markdown: "## migrate\n\n`client.v1.subscriptions.migrate(id: string, subscriptionMigrationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE', X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/{id}/migrate`\n\nMigrates a subscription to the latest published version of its plan or add-ons. Handles prorated charges or credits automatically.\n\n### Parameters\n\n- `id: string`\n\n- `subscriptionMigrationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE'`\n When to migrate (immediate or period end)\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: object[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: object; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: object[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst subscription = await client.v1.subscriptions.migrate('x');\n\nconsole.log(subscription);\n```",
|
|
1200
1252
|
perLanguage: {
|
|
1201
1253
|
typescript: {
|
|
1202
1254
|
method: 'client.v1.subscriptions.migrate',
|
|
@@ -1239,9 +1291,14 @@ const EMBEDDED_METHODS = [
|
|
|
1239
1291
|
description: 'Delegates the payment responsibility of a subscription to a different customer. The delegated customer will be billed for this subscription.',
|
|
1240
1292
|
stainlessPath: '(resource) v1.subscriptions > (method) delegate',
|
|
1241
1293
|
qualified: 'client.v1.subscriptions.delegate',
|
|
1242
|
-
params: [
|
|
1294
|
+
params: [
|
|
1295
|
+
'id: string;',
|
|
1296
|
+
'targetCustomerId: string;',
|
|
1297
|
+
'X-ACCOUNT-ID?: string;',
|
|
1298
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
1299
|
+
],
|
|
1243
1300
|
response: "{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: object[]; billingCycleAnchor?: string; budget?: object; cancellationDate?: string; cancelReason?: string; coupons?: object[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: object[]; latestInvoice?: object; metadata?: object; minimumSpend?: object; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: object[]; resourceId?: string; subscriptionEntitlements?: object[]; trial?: object; trialEndDate?: string; }; }",
|
|
1244
|
-
markdown: "## delegate\n\n`client.v1.subscriptions.delegate(id: string, targetCustomerId: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/{id}/delegate`\n\nDelegates the payment responsibility of a subscription to a different customer. The delegated customer will be billed for this subscription.\n\n### Parameters\n\n- `id: string`\n\n- `targetCustomerId: string`\n The unique identifier of the customer who will assume payment responsibility for this subscription. This customer must already exist in your Stigg account and have a valid payment method if the subscription requires payment.\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: object[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: object; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: object[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst subscription = await client.v1.subscriptions.delegate('x', { targetCustomerId: 'targetCustomerId' });\n\nconsole.log(subscription);\n```",
|
|
1301
|
+
markdown: "## delegate\n\n`client.v1.subscriptions.delegate(id: string, targetCustomerId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/{id}/delegate`\n\nDelegates the payment responsibility of a subscription to a different customer. The delegated customer will be billed for this subscription.\n\n### Parameters\n\n- `id: string`\n\n- `targetCustomerId: string`\n The unique identifier of the customer who will assume payment responsibility for this subscription. This customer must already exist in your Stigg account and have a valid payment method if the subscription requires payment.\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: object[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: object; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: object[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst subscription = await client.v1.subscriptions.delegate('x', { targetCustomerId: 'targetCustomerId' });\n\nconsole.log(subscription);\n```",
|
|
1245
1302
|
perLanguage: {
|
|
1246
1303
|
typescript: {
|
|
1247
1304
|
method: 'client.v1.subscriptions.delegate',
|
|
@@ -1301,9 +1358,11 @@ const EMBEDDED_METHODS = [
|
|
|
1301
1358
|
'startDate?: string;',
|
|
1302
1359
|
"trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; };",
|
|
1303
1360
|
'unitQuantity?: number;',
|
|
1361
|
+
'X-ACCOUNT-ID?: string;',
|
|
1362
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
1304
1363
|
],
|
|
1305
1364
|
response: '{ data: { immediateInvoice: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; billingPeriodRange?: { end?: string; start?: string; }; freeItems?: { id: string; quantity: number; }[]; hasScheduledUpdates?: boolean; isPlanDowngrade?: boolean; recurringInvoice?: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; }; }',
|
|
1306
|
-
markdown: "## preview\n\n`client.v1.subscriptions.preview(customerId: string, planId: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, billableFeatures?: { featureId: string; quantity: number; }[], billingCountryCode?: string, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[], payingCustomerId?: string, resourceId?: string, scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE', startDate?: string, trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }, unitQuantity?: number): { data: object; }`\n\n**post** `/api/v1/subscriptions/preview`\n\nPreviews the pricing impact of creating or updating a subscription without making changes. Returns estimated costs, taxes, and proration details.\n\n### Parameters\n\n- `customerId: string`\n Customer ID\n\n- `planId: string`\n Plan ID\n\n- `addons?: { id: string; quantity: number; }[]`\n Addons to include\n\n- `appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }`\n Coupon or discount to apply\n - `billingCouponId?: string`\n Billing provider coupon ID\n - `configuration?: { startDate?: string; }`\n Coupon timing configuration\n - `couponId?: string`\n Stigg coupon ID\n - `discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }`\n Ad-hoc discount configuration\n - `promotionCode?: string`\n Promotion code to apply\n\n- `billableFeatures?: { featureId: string; quantity: number; }[]`\n Billable features with quantities\n\n- `billingCountryCode?: string`\n ISO 3166-1 country code for localization\n\n- `billingCycleAnchor?: 'UNCHANGED' | 'NOW'`\n Billing cycle anchor behavior for the subscription\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }`\n Billing and tax configuration\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n Billing address\n - `chargeOnBehalfOfAccount?: string`\n Connected account ID for platform billing\n - `integrationId?: string`\n Billing integration ID\n - `invoiceDaysUntilDue?: number`\n Days until invoice is due\n - `isBackdated?: boolean`\n Whether subscription is backdated\n - `isInvoicePaid?: boolean`\n Whether invoice is already paid\n - `metadata?: object`\n Additional billing metadata\n - `prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'`\n Proration behavior\n - `taxIds?: { type: string; value: string; }[]`\n Customer tax IDs\n - `taxPercentage?: number`\n Tax percentage to apply\n - `taxRateIds?: string[]`\n Tax rate IDs from billing provider\n\n- `billingPeriod?: 'MONTHLY' | 'ANNUALLY'`\n Billing period (MONTHLY or ANNUALLY)\n\n- `charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]`\n One-time or recurring charges\n\n- `payingCustomerId?: string`\n Paying customer ID for delegated billing\n\n- `resourceId?: string`\n Resource ID for multi-instance subscriptions\n\n- `scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE'`\n When to apply subscription changes\n\n- `startDate?: string`\n Subscription start date\n\n- `trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }`\n Trial period override settings\n - `isTrial: boolean`\n Whether to start as trial\n - `trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'`\n Behavior when trial ends\n - `trialEndDate?: string`\n Trial end date\n\n- `unitQuantity?: number`\n Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).\n\n### Returns\n\n- `{ data: { immediateInvoice: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; billingPeriodRange?: { end?: string; start?: string; }; freeItems?: { id: string; quantity: number; }[]; hasScheduledUpdates?: boolean; isPlanDowngrade?: boolean; recurringInvoice?: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; }; }`\n Response object\n\n - `data: { immediateInvoice: { subTotal: number; total: number; billingPeriodRange?: { end: string; start: string; }; currency?: string; discount?: number; discountDetails?: { code?: string; fixedAmount?: number; percentage?: number; }; discounts?: { amount: number; currency: string; description: string; }[]; lines?: { currency: string; description: string; subTotal: number; unitPrice: number; quantity?: number; }[]; tax?: number; }; billingPeriodRange?: { end?: string; start?: string; }; freeItems?: { id: string; quantity: number; }[]; hasScheduledUpdates?: boolean; isPlanDowngrade?: boolean; recurringInvoice?: { subTotal: number; total: number; billingPeriodRange?: { end: string; start: string; }; currency?: string; discount?: number; discountDetails?: { code?: string; fixedAmount?: number; percentage?: number; }; discounts?: { amount: number; currency: string; description: string; }[]; lines?: { currency: string; description: string; subTotal: number; unitPrice: number; quantity?: number; }[]; tax?: number; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.preview({ customerId: 'customerId', planId: 'planId' });\n\nconsole.log(response);\n```",
|
|
1365
|
+
markdown: "## preview\n\n`client.v1.subscriptions.preview(customerId: string, planId: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, billableFeatures?: { featureId: string; quantity: number; }[], billingCountryCode?: string, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[], payingCustomerId?: string, resourceId?: string, scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE', startDate?: string, trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }, unitQuantity?: number, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/preview`\n\nPreviews the pricing impact of creating or updating a subscription without making changes. Returns estimated costs, taxes, and proration details.\n\n### Parameters\n\n- `customerId: string`\n Customer ID\n\n- `planId: string`\n Plan ID\n\n- `addons?: { id: string; quantity: number; }[]`\n Addons to include\n\n- `appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }`\n Coupon or discount to apply\n - `billingCouponId?: string`\n Billing provider coupon ID\n - `configuration?: { startDate?: string; }`\n Coupon timing configuration\n - `couponId?: string`\n Stigg coupon ID\n - `discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }`\n Ad-hoc discount configuration\n - `promotionCode?: string`\n Promotion code to apply\n\n- `billableFeatures?: { featureId: string; quantity: number; }[]`\n Billable features with quantities\n\n- `billingCountryCode?: string`\n ISO 3166-1 country code for localization\n\n- `billingCycleAnchor?: 'UNCHANGED' | 'NOW'`\n Billing cycle anchor behavior for the subscription\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }`\n Billing and tax configuration\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n Billing address\n - `chargeOnBehalfOfAccount?: string`\n Connected account ID for platform billing\n - `integrationId?: string`\n Billing integration ID\n - `invoiceDaysUntilDue?: number`\n Days until invoice is due\n - `isBackdated?: boolean`\n Whether subscription is backdated\n - `isInvoicePaid?: boolean`\n Whether invoice is already paid\n - `metadata?: object`\n Additional billing metadata\n - `prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'`\n Proration behavior\n - `taxIds?: { type: string; value: string; }[]`\n Customer tax IDs\n - `taxPercentage?: number`\n Tax percentage to apply\n - `taxRateIds?: string[]`\n Tax rate IDs from billing provider\n\n- `billingPeriod?: 'MONTHLY' | 'ANNUALLY'`\n Billing period (MONTHLY or ANNUALLY)\n\n- `charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]`\n One-time or recurring charges\n\n- `payingCustomerId?: string`\n Paying customer ID for delegated billing\n\n- `resourceId?: string`\n Resource ID for multi-instance subscriptions\n\n- `scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE'`\n When to apply subscription changes\n\n- `startDate?: string`\n Subscription start date\n\n- `trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }`\n Trial period override settings\n - `isTrial: boolean`\n Whether to start as trial\n - `trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'`\n Behavior when trial ends\n - `trialEndDate?: string`\n Trial end date\n\n- `unitQuantity?: number`\n Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { immediateInvoice: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; billingPeriodRange?: { end?: string; start?: string; }; freeItems?: { id: string; quantity: number; }[]; hasScheduledUpdates?: boolean; isPlanDowngrade?: boolean; recurringInvoice?: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; }; }`\n Response object\n\n - `data: { immediateInvoice: { subTotal: number; total: number; billingPeriodRange?: { end: string; start: string; }; currency?: string; discount?: number; discountDetails?: { code?: string; fixedAmount?: number; percentage?: number; }; discounts?: { amount: number; currency: string; description: string; }[]; lines?: { currency: string; description: string; subTotal: number; unitPrice: number; quantity?: number; }[]; tax?: number; }; billingPeriodRange?: { end?: string; start?: string; }; freeItems?: { id: string; quantity: number; }[]; hasScheduledUpdates?: boolean; isPlanDowngrade?: boolean; recurringInvoice?: { subTotal: number; total: number; billingPeriodRange?: { end: string; start: string; }; currency?: string; discount?: number; discountDetails?: { code?: string; fixedAmount?: number; percentage?: number; }; discounts?: { amount: number; currency: string; description: string; }[]; lines?: { currency: string; description: string; subTotal: number; unitPrice: number; quantity?: number; }[]; tax?: number; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.preview({ customerId: 'customerId', planId: 'planId' });\n\nconsole.log(response);\n```",
|
|
1307
1366
|
perLanguage: {
|
|
1308
1367
|
typescript: {
|
|
1309
1368
|
method: 'client.v1.subscriptions.preview',
|
|
@@ -1364,9 +1423,11 @@ const EMBEDDED_METHODS = [
|
|
|
1364
1423
|
'promotionCode?: string;',
|
|
1365
1424
|
"scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE';",
|
|
1366
1425
|
'trialEndDate?: string;',
|
|
1426
|
+
'X-ACCOUNT-ID?: string;',
|
|
1427
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
1367
1428
|
],
|
|
1368
1429
|
response: "{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: object[]; billingCycleAnchor?: string; budget?: object; cancellationDate?: string; cancelReason?: string; coupons?: object[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: object[]; latestInvoice?: object; metadata?: object; minimumSpend?: object; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: object[]; resourceId?: string; subscriptionEntitlements?: object[]; trial?: object; trialEndDate?: string; }; }",
|
|
1369
|
-
markdown: "## update\n\n`client.v1.subscriptions.update(id: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, awaitPaymentConfirmation?: boolean, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; couponId?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', budget?: { hasSoftLimit: boolean; limit: number; }, cancellationDate?: string, charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[], entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[], metadata?: object, minimumSpend?: { amount?: number; currency?: string; }, priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; currency?: string; currencyId?: string; featureId?: string; }[], promotionCode?: string, scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE', trialEndDate?: string): { data: object; }`\n\n**patch** `/api/v1/subscriptions/{id}`\n\nUpdates an active subscription's properties including billing period, add-ons, unit quantities, and discounts.\n\n### Parameters\n\n- `id: string`\n\n- `addons?: { id: string; quantity: number; }[]`\n\n- `appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }`\n - `billingCouponId?: string`\n - `configuration?: { startDate?: string; }`\n - `couponId?: string`\n Stigg coupon ID\n - `discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }`\n - `promotionCode?: string`\n\n- `awaitPaymentConfirmation?: boolean`\n Await payment confirmation\n\n- `billingCycleAnchor?: 'UNCHANGED' | 'NOW'`\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; couponId?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }`\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n Physical address\n - `chargeOnBehalfOfAccount?: string`\n - `couponId?: string`\n - `integrationId?: string`\n - `invoiceDaysUntilDue?: number`\n - `isBackdated?: boolean`\n - `isInvoicePaid?: boolean`\n - `metadata?: object`\n Additional metadata for the subscription\n - `prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'`\n - `taxIds?: { type: string; value: string; }[]`\n - `taxPercentage?: number`\n - `taxRateIds?: string[]`\n\n- `billingPeriod?: 'MONTHLY' | 'ANNUALLY'`\n\n- `budget?: { hasSoftLimit: boolean; limit: number; }`\n - `hasSoftLimit: boolean`\n Whether the budget is a soft limit\n - `limit: number`\n Maximum spending limit\n\n- `cancellationDate?: string`\n Subscription cancellation date\n\n- `charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]`\n\n- `entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[]`\n\n- `metadata?: object`\n Additional metadata for the subscription\n\n- `minimumSpend?: { amount?: number; currency?: string; }`\n Minimum spend amount\n - `amount?: number`\n The price amount\n - `currency?: string`\n The price currency\n\n- `priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; currency?: string; currencyId?: string; featureId?: string; }[]`\n\n- `promotionCode?: string`\n Promotion code\n\n- `scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE'`\n\n- `trialEndDate?: string`\n Subscription trial end date\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: object[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: object; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: object[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst subscription = await client.v1.subscriptions.update('x');\n\nconsole.log(subscription);\n```",
|
|
1430
|
+
markdown: "## update\n\n`client.v1.subscriptions.update(id: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, awaitPaymentConfirmation?: boolean, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; couponId?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', budget?: { hasSoftLimit: boolean; limit: number; }, cancellationDate?: string, charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[], entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[], metadata?: object, minimumSpend?: { amount?: number; currency?: string; }, priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; currency?: string; currencyId?: string; featureId?: string; }[], promotionCode?: string, scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE', trialEndDate?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**patch** `/api/v1/subscriptions/{id}`\n\nUpdates an active subscription's properties including billing period, add-ons, unit quantities, and discounts.\n\n### Parameters\n\n- `id: string`\n\n- `addons?: { id: string; quantity: number; }[]`\n\n- `appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }`\n - `billingCouponId?: string`\n - `configuration?: { startDate?: string; }`\n - `couponId?: string`\n Stigg coupon ID\n - `discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }`\n - `promotionCode?: string`\n\n- `awaitPaymentConfirmation?: boolean`\n Await payment confirmation\n\n- `billingCycleAnchor?: 'UNCHANGED' | 'NOW'`\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; couponId?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }`\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n Physical address\n - `chargeOnBehalfOfAccount?: string`\n - `couponId?: string`\n - `integrationId?: string`\n - `invoiceDaysUntilDue?: number`\n - `isBackdated?: boolean`\n - `isInvoicePaid?: boolean`\n - `metadata?: object`\n Additional metadata for the subscription\n - `prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'`\n - `taxIds?: { type: string; value: string; }[]`\n - `taxPercentage?: number`\n - `taxRateIds?: string[]`\n\n- `billingPeriod?: 'MONTHLY' | 'ANNUALLY'`\n\n- `budget?: { hasSoftLimit: boolean; limit: number; }`\n - `hasSoftLimit: boolean`\n Whether the budget is a soft limit\n - `limit: number`\n Maximum spending limit\n\n- `cancellationDate?: string`\n Subscription cancellation date\n\n- `charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]`\n\n- `entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[]`\n\n- `metadata?: object`\n Additional metadata for the subscription\n\n- `minimumSpend?: { amount?: number; currency?: string; }`\n Minimum spend amount\n - `amount?: number`\n The price amount\n - `currency?: string`\n The price currency\n\n- `priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; currency?: string; currencyId?: string; featureId?: string; }[]`\n\n- `promotionCode?: string`\n Promotion code\n\n- `scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE'`\n\n- `trialEndDate?: string`\n Subscription trial end date\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: object[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: object; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: object[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst subscription = await client.v1.subscriptions.update('x');\n\nconsole.log(subscription);\n```",
|
|
1370
1431
|
perLanguage: {
|
|
1371
1432
|
typescript: {
|
|
1372
1433
|
method: 'client.v1.subscriptions.update',
|
|
@@ -1412,9 +1473,11 @@ const EMBEDDED_METHODS = [
|
|
|
1412
1473
|
params: [
|
|
1413
1474
|
"subscriptions: { id: string; customerId: string; planId: string; addons?: { id: string; quantity: number; }[]; billingId?: string; billingPeriod?: 'MONTHLY' | 'ANNUALLY'; charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]; endDate?: string; metadata?: object; resourceId?: string; startDate?: string; }[];",
|
|
1414
1475
|
'integrationId?: string;',
|
|
1476
|
+
'X-ACCOUNT-ID?: string;',
|
|
1477
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
1415
1478
|
],
|
|
1416
1479
|
response: '{ data: { taskId: string; }; }',
|
|
1417
|
-
markdown: "## import\n\n`client.v1.subscriptions.import(subscriptions: { id: string; customerId: string; planId: string; addons?: { id: string; quantity: number; }[]; billingId?: string; billingPeriod?: 'MONTHLY' | 'ANNUALLY'; charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]; endDate?: string; metadata?: object; resourceId?: string; startDate?: string; }[], integrationId?: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/import`\n\nImports multiple subscriptions in bulk. Used for migrating subscription data from external systems.\n\n### Parameters\n\n- `subscriptions: { id: string; customerId: string; planId: string; addons?: { id: string; quantity: number; }[]; billingId?: string; billingPeriod?: 'MONTHLY' | 'ANNUALLY'; charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]; endDate?: string; metadata?: object; resourceId?: string; startDate?: string; }[]`\n List of subscription objects to import\n\n- `integrationId?: string`\n Integration ID to use for importing subscriptions\n\n### Returns\n\n- `{ data: { taskId: string; }; }`\n Response object\n\n - `data: { taskId: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.import({ subscriptions: [{\n id: 'id',\n customerId: 'customerId',\n planId: 'planId',\n}] });\n\nconsole.log(response);\n```",
|
|
1480
|
+
markdown: "## import\n\n`client.v1.subscriptions.import(subscriptions: { id: string; customerId: string; planId: string; addons?: { id: string; quantity: number; }[]; billingId?: string; billingPeriod?: 'MONTHLY' | 'ANNUALLY'; charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]; endDate?: string; metadata?: object; resourceId?: string; startDate?: string; }[], integrationId?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/import`\n\nImports multiple subscriptions in bulk. Used for migrating subscription data from external systems.\n\n### Parameters\n\n- `subscriptions: { id: string; customerId: string; planId: string; addons?: { id: string; quantity: number; }[]; billingId?: string; billingPeriod?: 'MONTHLY' | 'ANNUALLY'; charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]; endDate?: string; metadata?: object; resourceId?: string; startDate?: string; }[]`\n List of subscription objects to import\n\n- `integrationId?: string`\n Integration ID to use for importing subscriptions\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { taskId: string; }; }`\n Response object\n\n - `data: { taskId: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.import({ subscriptions: [{\n id: 'id',\n customerId: 'customerId',\n planId: 'planId',\n}] });\n\nconsole.log(response);\n```",
|
|
1418
1481
|
perLanguage: {
|
|
1419
1482
|
typescript: {
|
|
1420
1483
|
method: 'client.v1.subscriptions.import',
|
|
@@ -1463,9 +1526,11 @@ const EMBEDDED_METHODS = [
|
|
|
1463
1526
|
"cancellationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE';",
|
|
1464
1527
|
'endDate?: string;',
|
|
1465
1528
|
'prorate?: boolean;',
|
|
1529
|
+
'X-ACCOUNT-ID?: string;',
|
|
1530
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
1466
1531
|
],
|
|
1467
1532
|
response: "{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: object[]; billingCycleAnchor?: string; budget?: object; cancellationDate?: string; cancelReason?: string; coupons?: object[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: object[]; latestInvoice?: object; metadata?: object; minimumSpend?: object; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: object[]; resourceId?: string; subscriptionEntitlements?: object[]; trial?: object; trialEndDate?: string; }; }",
|
|
1468
|
-
markdown: "## cancel\n\n`client.v1.subscriptions.cancel(id: string, cancellationAction?: 'DEFAULT' | 'REVOKE_ENTITLEMENTS', cancellationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE', endDate?: string, prorate?: boolean): { data: object; }`\n\n**post** `/api/v1/subscriptions/{id}/cancel`\n\nCancels an active subscription, either immediately or at a specified time such as end of billing period.\n\n### Parameters\n\n- `id: string`\n\n- `cancellationAction?: 'DEFAULT' | 'REVOKE_ENTITLEMENTS'`\n Action on cancellation (downgrade or revoke)\n\n- `cancellationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'`\n When to cancel (immediate, period end, or date)\n\n- `endDate?: string`\n Subscription end date\n\n- `prorate?: boolean`\n If set, enables or disables prorating of credits on subscription cancellation.\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: object[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: object; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: object[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst subscription = await client.v1.subscriptions.cancel('x');\n\nconsole.log(subscription);\n```",
|
|
1533
|
+
markdown: "## cancel\n\n`client.v1.subscriptions.cancel(id: string, cancellationAction?: 'DEFAULT' | 'REVOKE_ENTITLEMENTS', cancellationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE', endDate?: string, prorate?: boolean, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/{id}/cancel`\n\nCancels an active subscription, either immediately or at a specified time such as end of billing period.\n\n### Parameters\n\n- `id: string`\n\n- `cancellationAction?: 'DEFAULT' | 'REVOKE_ENTITLEMENTS'`\n Action on cancellation (downgrade or revoke)\n\n- `cancellationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'`\n When to cancel (immediate, period end, or date)\n\n- `endDate?: string`\n Subscription end date\n\n- `prorate?: boolean`\n If set, enables or disables prorating of credits on subscription cancellation.\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: object[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: object; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: object[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst subscription = await client.v1.subscriptions.cancel('x');\n\nconsole.log(subscription);\n```",
|
|
1469
1534
|
perLanguage: {
|
|
1470
1535
|
typescript: {
|
|
1471
1536
|
method: 'client.v1.subscriptions.cancel',
|
|
@@ -1508,9 +1573,9 @@ const EMBEDDED_METHODS = [
|
|
|
1508
1573
|
description: 'Cancels a subscription update that is pending payment completion.',
|
|
1509
1574
|
stainlessPath: '(resource) v1.subscriptions.future_update > (method) cancel_pending_payment',
|
|
1510
1575
|
qualified: 'client.v1.subscriptions.futureUpdate.cancelPendingPayment',
|
|
1511
|
-
params: ['id: string;'],
|
|
1576
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
1512
1577
|
response: '{ data: { id: string; }; }',
|
|
1513
|
-
markdown: "## cancel_pending_payment\n\n`client.v1.subscriptions.futureUpdate.cancelPendingPayment(id: string): { data: object; }`\n\n**delete** `/api/v1/subscriptions/{id}/future-update/pending-payment`\n\nCancels a subscription update that is pending payment completion.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; }; }`\n Response object\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst cancelSubscription = await client.v1.subscriptions.futureUpdate.cancelPendingPayment('x');\n\nconsole.log(cancelSubscription);\n```",
|
|
1578
|
+
markdown: "## cancel_pending_payment\n\n`client.v1.subscriptions.futureUpdate.cancelPendingPayment(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**delete** `/api/v1/subscriptions/{id}/future-update/pending-payment`\n\nCancels a subscription update that is pending payment completion.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; }; }`\n Response object\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst cancelSubscription = await client.v1.subscriptions.futureUpdate.cancelPendingPayment('x');\n\nconsole.log(cancelSubscription);\n```",
|
|
1514
1579
|
perLanguage: {
|
|
1515
1580
|
typescript: {
|
|
1516
1581
|
method: 'client.v1.subscriptions.futureUpdate.cancelPendingPayment',
|
|
@@ -1518,7 +1583,7 @@ const EMBEDDED_METHODS = [
|
|
|
1518
1583
|
},
|
|
1519
1584
|
python: {
|
|
1520
1585
|
method: 'v1.subscriptions.future_update.cancel_pending_payment',
|
|
1521
|
-
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)\ncancel_subscription = client.v1.subscriptions.future_update.cancel_pending_payment(\n "x",\n)\nprint(cancel_subscription.data)',
|
|
1586
|
+
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)\ncancel_subscription = client.v1.subscriptions.future_update.cancel_pending_payment(\n id="x",\n)\nprint(cancel_subscription.data)',
|
|
1522
1587
|
},
|
|
1523
1588
|
java: {
|
|
1524
1589
|
method: 'v1().subscriptions().futureUpdate().cancelPendingPayment',
|
|
@@ -1526,7 +1591,7 @@ const EMBEDDED_METHODS = [
|
|
|
1526
1591
|
},
|
|
1527
1592
|
go: {
|
|
1528
1593
|
method: 'client.V1.Subscriptions.FutureUpdate.CancelPendingPayment',
|
|
1529
|
-
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\tcancelSubscription, err := client.V1.Subscriptions.FutureUpdate.CancelPendingPayment(
|
|
1594
|
+
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\tcancelSubscription, err := client.V1.Subscriptions.FutureUpdate.CancelPendingPayment(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1SubscriptionFutureUpdateCancelPendingPaymentParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", cancelSubscription.Data)\n}\n',
|
|
1530
1595
|
},
|
|
1531
1596
|
ruby: {
|
|
1532
1597
|
method: 'v1.subscriptions.future_update.cancel_pending_payment',
|
|
@@ -1553,9 +1618,9 @@ const EMBEDDED_METHODS = [
|
|
|
1553
1618
|
description: 'Cancels a scheduled subscription update, such as a future downgrade or plan change.',
|
|
1554
1619
|
stainlessPath: '(resource) v1.subscriptions.future_update > (method) cancel_schedule',
|
|
1555
1620
|
qualified: 'client.v1.subscriptions.futureUpdate.cancelSchedule',
|
|
1556
|
-
params: ['id: string;'],
|
|
1621
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
1557
1622
|
response: '{ data: { id: string; }; }',
|
|
1558
|
-
markdown: "## cancel_schedule\n\n`client.v1.subscriptions.futureUpdate.cancelSchedule(id: string): { data: object; }`\n\n**delete** `/api/v1/subscriptions/{id}/future-update/schedule`\n\nCancels a scheduled subscription update, such as a future downgrade or plan change.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; }; }`\n Response object\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst cancelSubscription = await client.v1.subscriptions.futureUpdate.cancelSchedule('x');\n\nconsole.log(cancelSubscription);\n```",
|
|
1623
|
+
markdown: "## cancel_schedule\n\n`client.v1.subscriptions.futureUpdate.cancelSchedule(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**delete** `/api/v1/subscriptions/{id}/future-update/schedule`\n\nCancels a scheduled subscription update, such as a future downgrade or plan change.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; }; }`\n Response object\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst cancelSubscription = await client.v1.subscriptions.futureUpdate.cancelSchedule('x');\n\nconsole.log(cancelSubscription);\n```",
|
|
1559
1624
|
perLanguage: {
|
|
1560
1625
|
typescript: {
|
|
1561
1626
|
method: 'client.v1.subscriptions.futureUpdate.cancelSchedule',
|
|
@@ -1563,7 +1628,7 @@ const EMBEDDED_METHODS = [
|
|
|
1563
1628
|
},
|
|
1564
1629
|
python: {
|
|
1565
1630
|
method: 'v1.subscriptions.future_update.cancel_schedule',
|
|
1566
|
-
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)\ncancel_subscription = client.v1.subscriptions.future_update.cancel_schedule(\n "x",\n)\nprint(cancel_subscription.data)',
|
|
1631
|
+
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)\ncancel_subscription = client.v1.subscriptions.future_update.cancel_schedule(\n id="x",\n)\nprint(cancel_subscription.data)',
|
|
1567
1632
|
},
|
|
1568
1633
|
java: {
|
|
1569
1634
|
method: 'v1().subscriptions().futureUpdate().cancelSchedule',
|
|
@@ -1571,7 +1636,7 @@ const EMBEDDED_METHODS = [
|
|
|
1571
1636
|
},
|
|
1572
1637
|
go: {
|
|
1573
1638
|
method: 'client.V1.Subscriptions.FutureUpdate.CancelSchedule',
|
|
1574
|
-
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\tcancelSubscription, err := client.V1.Subscriptions.FutureUpdate.CancelSchedule(
|
|
1639
|
+
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\tcancelSubscription, err := client.V1.Subscriptions.FutureUpdate.CancelSchedule(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1SubscriptionFutureUpdateCancelScheduleParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", cancelSubscription.Data)\n}\n',
|
|
1575
1640
|
},
|
|
1576
1641
|
ruby: {
|
|
1577
1642
|
method: 'v1.subscriptions.future_update.cancel_schedule',
|
|
@@ -1598,9 +1663,9 @@ const EMBEDDED_METHODS = [
|
|
|
1598
1663
|
description: 'Immediately charges usage for a subscription via the billing integration. Calculates usage since the last charge and creates an invoice.',
|
|
1599
1664
|
stainlessPath: '(resource) v1.subscriptions.usage > (method) charge_usage',
|
|
1600
1665
|
qualified: 'client.v1.subscriptions.usage.chargeUsage',
|
|
1601
|
-
params: ['id: string;', 'untilDate?: string;'],
|
|
1666
|
+
params: ['id: string;', 'untilDate?: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
1602
1667
|
response: '{ data: { invoiceBillingId: string; periodEnd: string; periodStart: string; subscriptionId: string; usageCharged: { featureId: string; usageAmount: number; }[]; }; }',
|
|
1603
|
-
markdown: "## charge_usage\n\n`client.v1.subscriptions.usage.chargeUsage(id: string, untilDate?: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/{id}/usage/charge`\n\nImmediately charges usage for a subscription via the billing integration. Calculates usage since the last charge and creates an invoice.\n\n### Parameters\n\n- `id: string`\n\n- `untilDate?: string`\n Cutoff date for usage calculation. If not provided, the current time is used.\n\n### Returns\n\n- `{ data: { invoiceBillingId: string; periodEnd: string; periodStart: string; subscriptionId: string; usageCharged: { featureId: string; usageAmount: number; }[]; }; }`\n Response object\n\n - `data: { invoiceBillingId: string; periodEnd: string; periodStart: string; subscriptionId: string; usageCharged: { featureId: string; usageAmount: number; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.usage.chargeUsage('x');\n\nconsole.log(response);\n```",
|
|
1668
|
+
markdown: "## charge_usage\n\n`client.v1.subscriptions.usage.chargeUsage(id: string, untilDate?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/{id}/usage/charge`\n\nImmediately charges usage for a subscription via the billing integration. Calculates usage since the last charge and creates an invoice.\n\n### Parameters\n\n- `id: string`\n\n- `untilDate?: string`\n Cutoff date for usage calculation. If not provided, the current time is used.\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { invoiceBillingId: string; periodEnd: string; periodStart: string; subscriptionId: string; usageCharged: { featureId: string; usageAmount: number; }[]; }; }`\n Response object\n\n - `data: { invoiceBillingId: string; periodEnd: string; periodStart: string; subscriptionId: string; usageCharged: { featureId: string; usageAmount: number; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.usage.chargeUsage('x');\n\nconsole.log(response);\n```",
|
|
1604
1669
|
perLanguage: {
|
|
1605
1670
|
typescript: {
|
|
1606
1671
|
method: 'client.v1.subscriptions.usage.chargeUsage',
|
|
@@ -1643,9 +1708,9 @@ const EMBEDDED_METHODS = [
|
|
|
1643
1708
|
description: 'Triggers a usage sync for a subscription, reporting current usage to the billing provider.',
|
|
1644
1709
|
stainlessPath: '(resource) v1.subscriptions.usage > (method) sync',
|
|
1645
1710
|
qualified: 'client.v1.subscriptions.usage.sync',
|
|
1646
|
-
params: ['id: string;'],
|
|
1711
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
1647
1712
|
response: '{ data: { triggered: boolean; }; }',
|
|
1648
|
-
markdown: "## sync\n\n`client.v1.subscriptions.usage.sync(id: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/{id}/usage/sync`\n\nTriggers a usage sync for a subscription, reporting current usage to the billing provider.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { triggered: boolean; }; }`\n Response object\n\n - `data: { triggered: boolean; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.usage.sync('x');\n\nconsole.log(response);\n```",
|
|
1713
|
+
markdown: "## sync\n\n`client.v1.subscriptions.usage.sync(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/{id}/usage/sync`\n\nTriggers a usage sync for a subscription, reporting current usage to the billing provider.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { triggered: boolean; }; }`\n Response object\n\n - `data: { triggered: boolean; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.usage.sync('x');\n\nconsole.log(response);\n```",
|
|
1649
1714
|
perLanguage: {
|
|
1650
1715
|
typescript: {
|
|
1651
1716
|
method: 'client.v1.subscriptions.usage.sync',
|
|
@@ -1653,7 +1718,7 @@ const EMBEDDED_METHODS = [
|
|
|
1653
1718
|
},
|
|
1654
1719
|
python: {
|
|
1655
1720
|
method: 'v1.subscriptions.usage.sync',
|
|
1656
|
-
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)\nresponse = client.v1.subscriptions.usage.sync(\n "x",\n)\nprint(response.data)',
|
|
1721
|
+
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)\nresponse = client.v1.subscriptions.usage.sync(\n id="x",\n)\nprint(response.data)',
|
|
1657
1722
|
},
|
|
1658
1723
|
java: {
|
|
1659
1724
|
method: 'v1().subscriptions().usage().sync',
|
|
@@ -1661,7 +1726,7 @@ const EMBEDDED_METHODS = [
|
|
|
1661
1726
|
},
|
|
1662
1727
|
go: {
|
|
1663
1728
|
method: 'client.V1.Subscriptions.Usage.Sync',
|
|
1664
|
-
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\tresponse, err := client.V1.Subscriptions.Usage.Sync(
|
|
1729
|
+
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\tresponse, err := client.V1.Subscriptions.Usage.Sync(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1SubscriptionUsageSyncParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
1665
1730
|
},
|
|
1666
1731
|
ruby: {
|
|
1667
1732
|
method: 'v1.subscriptions.usage.sync',
|
|
@@ -1688,9 +1753,9 @@ const EMBEDDED_METHODS = [
|
|
|
1688
1753
|
description: 'Marks the latest invoice of a subscription as paid in the billing provider. The invoice must exist and have an OPEN status.',
|
|
1689
1754
|
stainlessPath: '(resource) v1.subscriptions.invoice > (method) mark_as_paid',
|
|
1690
1755
|
qualified: 'client.v1.subscriptions.invoice.markAsPaid',
|
|
1691
|
-
params: ['id: string;'],
|
|
1756
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
1692
1757
|
response: '{ data: { id: string; }; }',
|
|
1693
|
-
markdown: "## mark_as_paid\n\n`client.v1.subscriptions.invoice.markAsPaid(id: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/{id}/invoice/paid`\n\nMarks the latest invoice of a subscription as paid in the billing provider. The invoice must exist and have an OPEN status.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; }; }`\n Response object\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.invoice.markAsPaid('x');\n\nconsole.log(response);\n```",
|
|
1758
|
+
markdown: "## mark_as_paid\n\n`client.v1.subscriptions.invoice.markAsPaid(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/subscriptions/{id}/invoice/paid`\n\nMarks the latest invoice of a subscription as paid in the billing provider. The invoice must exist and have an OPEN status.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; }; }`\n Response object\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.invoice.markAsPaid('x');\n\nconsole.log(response);\n```",
|
|
1694
1759
|
perLanguage: {
|
|
1695
1760
|
typescript: {
|
|
1696
1761
|
method: 'client.v1.subscriptions.invoice.markAsPaid',
|
|
@@ -1698,7 +1763,7 @@ const EMBEDDED_METHODS = [
|
|
|
1698
1763
|
},
|
|
1699
1764
|
python: {
|
|
1700
1765
|
method: 'v1.subscriptions.invoice.mark_as_paid',
|
|
1701
|
-
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)\nresponse = client.v1.subscriptions.invoice.mark_as_paid(\n "x",\n)\nprint(response.data)',
|
|
1766
|
+
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)\nresponse = client.v1.subscriptions.invoice.mark_as_paid(\n id="x",\n)\nprint(response.data)',
|
|
1702
1767
|
},
|
|
1703
1768
|
java: {
|
|
1704
1769
|
method: 'v1().subscriptions().invoice().markAsPaid',
|
|
@@ -1706,7 +1771,7 @@ const EMBEDDED_METHODS = [
|
|
|
1706
1771
|
},
|
|
1707
1772
|
go: {
|
|
1708
1773
|
method: 'client.V1.Subscriptions.Invoice.MarkAsPaid',
|
|
1709
|
-
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\tresponse, err := client.V1.Subscriptions.Invoice.MarkAsPaid(
|
|
1774
|
+
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\tresponse, err := client.V1.Subscriptions.Invoice.MarkAsPaid(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1SubscriptionInvoiceMarkAsPaidParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
1710
1775
|
},
|
|
1711
1776
|
ruby: {
|
|
1712
1777
|
method: 'v1.subscriptions.invoice.mark_as_paid',
|
|
@@ -1741,9 +1806,11 @@ const EMBEDDED_METHODS = [
|
|
|
1741
1806
|
'metadata: object;',
|
|
1742
1807
|
'name: string;',
|
|
1743
1808
|
'percentOff: number;',
|
|
1809
|
+
'X-ACCOUNT-ID?: string;',
|
|
1810
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
1744
1811
|
],
|
|
1745
1812
|
response: "{ data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }; }",
|
|
1746
|
-
markdown: "## create\n\n`client.v1.coupons.create(id: string, amountsOff: { amount: number; currency: string; }[], description: string, durationInMonths: number, metadata: object, name: string, percentOff: number): { data: object; }`\n\n**post** `/api/v1/coupons`\n\nCreates a new discount coupon with percentage or fixed amount off, applicable to customer subscriptions.\n\n### Parameters\n\n- `id: string`\n The unique identifier for the entity\n\n- `amountsOff: { amount: number; currency: string; }[]`\n Fixed amount discounts in different currencies\n\n- `description: string`\n Description of the coupon\n\n- `durationInMonths: number`\n Duration of the coupon validity in months\n\n- `metadata: object`\n Metadata associated with the entity\n\n- `name: string`\n Name of the coupon\n\n- `percentOff: number`\n Percentage discount off the original price\n\n### Returns\n\n- `{ data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst coupon = await client.v1.coupons.create({\n id: 'id',\n amountsOff: [{ amount: 0, currency: 'usd' }],\n description: 'description',\n durationInMonths: 1,\n metadata: { foo: 'string' },\n name: 'name',\n percentOff: 1,\n});\n\nconsole.log(coupon);\n```",
|
|
1813
|
+
markdown: "## create\n\n`client.v1.coupons.create(id: string, amountsOff: { amount: number; currency: string; }[], description: string, durationInMonths: number, metadata: object, name: string, percentOff: number, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/coupons`\n\nCreates a new discount coupon with percentage or fixed amount off, applicable to customer subscriptions.\n\n### Parameters\n\n- `id: string`\n The unique identifier for the entity\n\n- `amountsOff: { amount: number; currency: string; }[]`\n Fixed amount discounts in different currencies\n\n- `description: string`\n Description of the coupon\n\n- `durationInMonths: number`\n Duration of the coupon validity in months\n\n- `metadata: object`\n Metadata associated with the entity\n\n- `name: string`\n Name of the coupon\n\n- `percentOff: number`\n Percentage discount off the original price\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst coupon = await client.v1.coupons.create({\n id: 'id',\n amountsOff: [{ amount: 0, currency: 'usd' }],\n description: 'description',\n durationInMonths: 1,\n metadata: { foo: 'string' },\n name: 'name',\n percentOff: 1,\n});\n\nconsole.log(coupon);\n```",
|
|
1747
1814
|
perLanguage: {
|
|
1748
1815
|
typescript: {
|
|
1749
1816
|
method: 'client.v1.coupons.create',
|
|
@@ -1794,9 +1861,11 @@ const EMBEDDED_METHODS = [
|
|
|
1794
1861
|
'limit?: number;',
|
|
1795
1862
|
"status?: 'ACTIVE' | 'ARCHIVED'[];",
|
|
1796
1863
|
"type?: 'FIXED' | 'PERCENTAGE';",
|
|
1864
|
+
'X-ACCOUNT-ID?: string;',
|
|
1865
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
1797
1866
|
],
|
|
1798
1867
|
response: "{ id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }",
|
|
1799
|
-
markdown: "## list\n\n`client.v1.coupons.list(id?: string, after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, limit?: number, status?: 'ACTIVE' | 'ARCHIVED'[], type?: 'FIXED' | 'PERCENTAGE'): { id: string; amountsOff: object[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }`\n\n**get** `/api/v1/coupons`\n\nRetrieves a paginated list of coupons in the environment.\n\n### Parameters\n\n- `id?: string`\n Filter by entity ID\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `limit?: number`\n Maximum number of items to return\n\n- `status?: 'ACTIVE' | 'ARCHIVED'[]`\n Filter by coupon status. Supports comma-separated values for multiple statuses\n\n- `type?: 'FIXED' | 'PERCENTAGE'`\n Filter by coupon type (FIXED or PERCENTAGE)\n\n### Returns\n\n- `{ id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }`\n Discount instrument with percentage or fixed amount\n\n - `id: string`\n - `amountsOff: { amount: number; currency: string; }[]`\n - `billingId: string`\n - `billingLinkUrl: string`\n - `createdAt: string`\n - `description: string`\n - `durationInMonths: number`\n - `metadata: object`\n - `name: string`\n - `percentOff: number`\n - `source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'`\n - `status: 'ACTIVE' | 'ARCHIVED'`\n - `type: 'FIXED' | 'PERCENTAGE'`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const couponListResponse of client.v1.coupons.list()) {\n console.log(couponListResponse);\n}\n```",
|
|
1868
|
+
markdown: "## list\n\n`client.v1.coupons.list(id?: string, after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, limit?: number, status?: 'ACTIVE' | 'ARCHIVED'[], type?: 'FIXED' | 'PERCENTAGE', X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; amountsOff: object[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }`\n\n**get** `/api/v1/coupons`\n\nRetrieves a paginated list of coupons in the environment.\n\n### Parameters\n\n- `id?: string`\n Filter by entity ID\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `limit?: number`\n Maximum number of items to return\n\n- `status?: 'ACTIVE' | 'ARCHIVED'[]`\n Filter by coupon status. Supports comma-separated values for multiple statuses\n\n- `type?: 'FIXED' | 'PERCENTAGE'`\n Filter by coupon type (FIXED or PERCENTAGE)\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }`\n Discount instrument with percentage or fixed amount\n\n - `id: string`\n - `amountsOff: { amount: number; currency: string; }[]`\n - `billingId: string`\n - `billingLinkUrl: string`\n - `createdAt: string`\n - `description: string`\n - `durationInMonths: number`\n - `metadata: object`\n - `name: string`\n - `percentOff: number`\n - `source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'`\n - `status: 'ACTIVE' | 'ARCHIVED'`\n - `type: 'FIXED' | 'PERCENTAGE'`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const couponListResponse of client.v1.coupons.list()) {\n console.log(couponListResponse);\n}\n```",
|
|
1800
1869
|
perLanguage: {
|
|
1801
1870
|
typescript: {
|
|
1802
1871
|
method: 'client.v1.coupons.list',
|
|
@@ -1839,9 +1908,9 @@ const EMBEDDED_METHODS = [
|
|
|
1839
1908
|
description: 'Retrieves a coupon by its unique identifier.',
|
|
1840
1909
|
stainlessPath: '(resource) v1.coupons > (method) retrieve',
|
|
1841
1910
|
qualified: 'client.v1.coupons.retrieve',
|
|
1842
|
-
params: ['id: string;'],
|
|
1911
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
1843
1912
|
response: "{ data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }; }",
|
|
1844
|
-
markdown: "## retrieve\n\n`client.v1.coupons.retrieve(id: string): { data: object; }`\n\n**get** `/api/v1/coupons/{id}`\n\nRetrieves a coupon by its unique identifier.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst coupon = await client.v1.coupons.retrieve('x');\n\nconsole.log(coupon);\n```",
|
|
1913
|
+
markdown: "## retrieve\n\n`client.v1.coupons.retrieve(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1/coupons/{id}`\n\nRetrieves a coupon by its unique identifier.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst coupon = await client.v1.coupons.retrieve('x');\n\nconsole.log(coupon);\n```",
|
|
1845
1914
|
perLanguage: {
|
|
1846
1915
|
typescript: {
|
|
1847
1916
|
method: 'client.v1.coupons.retrieve',
|
|
@@ -1849,7 +1918,7 @@ const EMBEDDED_METHODS = [
|
|
|
1849
1918
|
},
|
|
1850
1919
|
python: {
|
|
1851
1920
|
method: 'v1.coupons.retrieve',
|
|
1852
|
-
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)\ncoupon = client.v1.coupons.retrieve(\n "x",\n)\nprint(coupon.data)',
|
|
1921
|
+
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)\ncoupon = client.v1.coupons.retrieve(\n id="x",\n)\nprint(coupon.data)',
|
|
1853
1922
|
},
|
|
1854
1923
|
java: {
|
|
1855
1924
|
method: 'v1().coupons().retrieve',
|
|
@@ -1857,7 +1926,7 @@ const EMBEDDED_METHODS = [
|
|
|
1857
1926
|
},
|
|
1858
1927
|
go: {
|
|
1859
1928
|
method: 'client.V1.Coupons.Get',
|
|
1860
|
-
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\tcoupon, err := client.V1.Coupons.Get(
|
|
1929
|
+
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\tcoupon, err := client.V1.Coupons.Get(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1CouponGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", coupon.Data)\n}\n',
|
|
1861
1930
|
},
|
|
1862
1931
|
ruby: {
|
|
1863
1932
|
method: 'v1.coupons.retrieve',
|
|
@@ -1884,9 +1953,16 @@ const EMBEDDED_METHODS = [
|
|
|
1884
1953
|
description: "Updates an existing coupon's properties such as name, description, and metadata.",
|
|
1885
1954
|
stainlessPath: '(resource) v1.coupons > (method) update_coupon',
|
|
1886
1955
|
qualified: 'client.v1.coupons.updateCoupon',
|
|
1887
|
-
params: [
|
|
1956
|
+
params: [
|
|
1957
|
+
'id: string;',
|
|
1958
|
+
'description?: string;',
|
|
1959
|
+
'metadata?: object;',
|
|
1960
|
+
'name?: string;',
|
|
1961
|
+
'X-ACCOUNT-ID?: string;',
|
|
1962
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
1963
|
+
],
|
|
1888
1964
|
response: "{ data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }; }",
|
|
1889
|
-
markdown: "## update_coupon\n\n`client.v1.coupons.updateCoupon(id: string, description?: string, metadata?: object, name?: string): { data: object; }`\n\n**patch** `/api/v1/coupons/{id}`\n\nUpdates an existing coupon's properties such as name, description, and metadata.\n\n### Parameters\n\n- `id: string`\n\n- `description?: string`\n Description of the coupon\n\n- `metadata?: object`\n Metadata associated with the entity\n\n- `name?: string`\n Name of the coupon\n\n### Returns\n\n- `{ data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst coupon = await client.v1.coupons.updateCoupon('x');\n\nconsole.log(coupon);\n```",
|
|
1965
|
+
markdown: "## update_coupon\n\n`client.v1.coupons.updateCoupon(id: string, description?: string, metadata?: object, name?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**patch** `/api/v1/coupons/{id}`\n\nUpdates an existing coupon's properties such as name, description, and metadata.\n\n### Parameters\n\n- `id: string`\n\n- `description?: string`\n Description of the coupon\n\n- `metadata?: object`\n Metadata associated with the entity\n\n- `name?: string`\n Name of the coupon\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst coupon = await client.v1.coupons.updateCoupon('x');\n\nconsole.log(coupon);\n```",
|
|
1890
1966
|
perLanguage: {
|
|
1891
1967
|
typescript: {
|
|
1892
1968
|
method: 'client.v1.coupons.updateCoupon',
|
|
@@ -1929,9 +2005,9 @@ const EMBEDDED_METHODS = [
|
|
|
1929
2005
|
description: 'Archives a coupon, preventing it from being applied to new subscriptions.',
|
|
1930
2006
|
stainlessPath: '(resource) v1.coupons > (method) archive_coupon',
|
|
1931
2007
|
qualified: 'client.v1.coupons.archiveCoupon',
|
|
1932
|
-
params: ['id: string;'],
|
|
2008
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
1933
2009
|
response: "{ data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }; }",
|
|
1934
|
-
markdown: "## archive_coupon\n\n`client.v1.coupons.archiveCoupon(id: string): { data: object; }`\n\n**post** `/api/v1/coupons/{id}/archive`\n\nArchives a coupon, preventing it from being applied to new subscriptions.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst coupon = await client.v1.coupons.archiveCoupon('x');\n\nconsole.log(coupon);\n```",
|
|
2010
|
+
markdown: "## archive_coupon\n\n`client.v1.coupons.archiveCoupon(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/coupons/{id}/archive`\n\nArchives a coupon, preventing it from being applied to new subscriptions.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; amountsOff: { amount: number; currency: string; }[]; billingId: string; billingLinkUrl: string; createdAt: string; description: string; durationInMonths: number; metadata: object; name: string; percentOff: number; source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE'; status: 'ACTIVE' | 'ARCHIVED'; type: 'FIXED' | 'PERCENTAGE'; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst coupon = await client.v1.coupons.archiveCoupon('x');\n\nconsole.log(coupon);\n```",
|
|
1935
2011
|
perLanguage: {
|
|
1936
2012
|
typescript: {
|
|
1937
2013
|
method: 'client.v1.coupons.archiveCoupon',
|
|
@@ -1939,7 +2015,7 @@ const EMBEDDED_METHODS = [
|
|
|
1939
2015
|
},
|
|
1940
2016
|
python: {
|
|
1941
2017
|
method: 'v1.coupons.archive_coupon',
|
|
1942
|
-
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)\ncoupon = client.v1.coupons.archive_coupon(\n "x",\n)\nprint(coupon.data)',
|
|
2018
|
+
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)\ncoupon = client.v1.coupons.archive_coupon(\n id="x",\n)\nprint(coupon.data)',
|
|
1943
2019
|
},
|
|
1944
2020
|
java: {
|
|
1945
2021
|
method: 'v1().coupons().archiveCoupon',
|
|
@@ -1947,7 +2023,7 @@ const EMBEDDED_METHODS = [
|
|
|
1947
2023
|
},
|
|
1948
2024
|
go: {
|
|
1949
2025
|
method: 'client.V1.Coupons.ArchiveCoupon',
|
|
1950
|
-
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\tcoupon, err := client.V1.Coupons.ArchiveCoupon(
|
|
2026
|
+
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\tcoupon, err := client.V1.Coupons.ArchiveCoupon(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1CouponArchiveCouponParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", coupon.Data)\n}\n',
|
|
1951
2027
|
},
|
|
1952
2028
|
ruby: {
|
|
1953
2029
|
method: 'v1.coupons.archive_coupon',
|
|
@@ -1976,9 +2052,11 @@ const EMBEDDED_METHODS = [
|
|
|
1976
2052
|
qualified: 'client.v1.events.report',
|
|
1977
2053
|
params: [
|
|
1978
2054
|
'events: { customerId: string; eventName: string; idempotencyKey: string; dimensions?: object; resourceId?: string; timestamp?: string; }[];',
|
|
2055
|
+
'X-ACCOUNT-ID?: string;',
|
|
2056
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
1979
2057
|
],
|
|
1980
2058
|
response: '{ data: object; }',
|
|
1981
|
-
markdown: "## report\n\n`client.v1.events.report(events: { customerId: string; eventName: string; idempotencyKey: string; dimensions?: object; resourceId?: string; timestamp?: string; }[]): { data: object; }`\n\n**post** `/api/v1/events`\n\nReports raw usage events for event-based metering. Events are ingested asynchronously and aggregated into usage totals.\n\n### Parameters\n\n- `events: { customerId: string; eventName: string; idempotencyKey: string; dimensions?: object; resourceId?: string; timestamp?: string; }[]`\n A list of usage events to report\n\n### Returns\n\n- `{ data: object; }`\n Response object\n\n - `data: object`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.report({ events: [{\n customerId: 'customerId',\n eventName: 'x',\n idempotencyKey: 'x',\n}] });\n\nconsole.log(response);\n```",
|
|
2059
|
+
markdown: "## report\n\n`client.v1.events.report(events: { customerId: string; eventName: string; idempotencyKey: string; dimensions?: object; resourceId?: string; timestamp?: string; }[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/events`\n\nReports raw usage events for event-based metering. Events are ingested asynchronously and aggregated into usage totals.\n\n### Parameters\n\n- `events: { customerId: string; eventName: string; idempotencyKey: string; dimensions?: object; resourceId?: string; timestamp?: string; }[]`\n A list of usage events to report\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: object; }`\n Response object\n\n - `data: object`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.report({ events: [{\n customerId: 'customerId',\n eventName: 'x',\n idempotencyKey: 'x',\n}] });\n\nconsole.log(response);\n```",
|
|
1982
2060
|
perLanguage: {
|
|
1983
2061
|
typescript: {
|
|
1984
2062
|
method: 'client.v1.events.report',
|
|
@@ -2029,9 +2107,11 @@ const EMBEDDED_METHODS = [
|
|
|
2029
2107
|
'requestedUsage?: number;',
|
|
2030
2108
|
'requestedValues?: string[];',
|
|
2031
2109
|
'resourceId?: string;',
|
|
2110
|
+
'X-ACCOUNT-ID?: string;',
|
|
2111
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
2032
2112
|
],
|
|
2033
2113
|
response: "{ data: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }; }",
|
|
2034
|
-
markdown: "## check\n\n`client.v1.events.beta.customers.entitlements.check(id: string, currencyId?: string, dimensions?: object, featureId?: string, requestedUsage?: number, requestedValues?: string[], resourceId?: string): { data: object | object; }`\n\n**get** `/api/v1-beta/customers/{id}/entitlements/check`\n\nExperimental — request and response shapes may change without notice. Same semantics as `Check entitlement`, plus an optional `dimensions` query param that resolves to per-entity governance limits surfaced as `chains` on the response.\n\n### Parameters\n\n- `id: string`\n\n- `currencyId?: string`\n Currency ID (refId) to check for credit entitlements. Mutually exclusive with `featureId`.\n\n- `dimensions?: object`\n Optional attribution map (e.g. `dimensions[userId]=u1`). When provided, the response includes a `chains` array with per-entity governance limits.\n\n- `featureId?: string`\n Feature ID (refId) to check. Mutually exclusive with `currencyId`.\n\n- `requestedUsage?: number`\n Requested usage amount to evaluate against the entitlement limit (numeric features only)\n\n- `requestedValues?: string[]`\n Requested values to evaluate against allowed values (enum features only)\n\n- `resourceId?: string`\n Resource ID to scope the entitlement check to a specific resource\n\n### Returns\n\n- `{ data: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }; }`\n Response object\n\n - `data: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.entitlements.check('x');\n\nconsole.log(response);\n```",
|
|
2114
|
+
markdown: "## check\n\n`client.v1.events.beta.customers.entitlements.check(id: string, currencyId?: string, dimensions?: object, featureId?: string, requestedUsage?: number, requestedValues?: string[], resourceId?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object | object; }`\n\n**get** `/api/v1-beta/customers/{id}/entitlements/check`\n\nExperimental — request and response shapes may change without notice. Same semantics as `Check entitlement`, plus an optional `dimensions` query param that resolves to per-entity governance limits surfaced as `chains` on the response.\n\n### Parameters\n\n- `id: string`\n\n- `currencyId?: string`\n Currency ID (refId) to check for credit entitlements. Mutually exclusive with `featureId`.\n\n- `dimensions?: object`\n Optional attribution map (e.g. `dimensions[userId]=u1`). When provided, the response includes a `chains` array with per-entity governance limits.\n\n- `featureId?: string`\n Feature ID (refId) to check. Mutually exclusive with `currencyId`.\n\n- `requestedUsage?: number`\n Requested usage amount to evaluate against the entitlement limit (numeric features only)\n\n- `requestedValues?: string[]`\n Requested values to evaluate against allowed values (enum features only)\n\n- `resourceId?: string`\n Resource ID to scope the entitlement check to a specific resource\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }; }`\n Response object\n\n - `data: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.entitlements.check('x');\n\nconsole.log(response);\n```",
|
|
2035
2115
|
perLanguage: {
|
|
2036
2116
|
typescript: {
|
|
2037
2117
|
method: 'client.v1.events.beta.customers.entitlements.check',
|
|
@@ -2081,9 +2161,11 @@ const EMBEDDED_METHODS = [
|
|
|
2081
2161
|
"includeArchived?: 'true' | 'false';",
|
|
2082
2162
|
'limit?: number;',
|
|
2083
2163
|
'typeRefId?: string;',
|
|
2164
|
+
'X-ACCOUNT-ID?: string;',
|
|
2165
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
2084
2166
|
],
|
|
2085
2167
|
response: '{ id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }',
|
|
2086
|
-
markdown: "## list\n\n`client.v1.events.beta.customers.entities.list(id: string, after?: string, before?: string, includeArchived?: 'true' | 'false', limit?: number, typeRefId?: string): { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }`\n\n**get** `/api/v1-beta/customers/{id}/entities`\n\nRetrieves a paginated list of entities for the given customer.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `includeArchived?: 'true' | 'false'`\n Whether to include archived entities. One of: true, false\n\n- `limit?: number`\n Maximum number of items to return\n\n- `typeRefId?: string`\n Filter results to entities of a specific entity type, by the type's refId\n\n### Returns\n\n- `{ id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }`\n A stored entity instance tracked by the governance service for a given customer\n\n - `id: string`\n - `archivedAt: string`\n - `createdAt: string`\n - `metadata: object`\n - `typeId: string`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const entityListResponse of client.v1.events.beta.customers.entities.list('id')) {\n console.log(entityListResponse);\n}\n```",
|
|
2168
|
+
markdown: "## list\n\n`client.v1.events.beta.customers.entities.list(id: string, after?: string, before?: string, includeArchived?: 'true' | 'false', limit?: number, typeRefId?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }`\n\n**get** `/api/v1-beta/customers/{id}/entities`\n\nRetrieves a paginated list of entities for the given customer.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `includeArchived?: 'true' | 'false'`\n Whether to include archived entities. One of: true, false\n\n- `limit?: number`\n Maximum number of items to return\n\n- `typeRefId?: string`\n Filter results to entities of a specific entity type, by the type's refId\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }`\n A stored entity instance tracked by the governance service for a given customer\n\n - `id: string`\n - `archivedAt: string`\n - `createdAt: string`\n - `metadata: object`\n - `typeId: string`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const entityListResponse of client.v1.events.beta.customers.entities.list('id')) {\n console.log(entityListResponse);\n}\n```",
|
|
2087
2169
|
perLanguage: {
|
|
2088
2170
|
typescript: {
|
|
2089
2171
|
method: 'client.v1.events.beta.customers.entities.list',
|
|
@@ -2126,9 +2208,14 @@ const EMBEDDED_METHODS = [
|
|
|
2126
2208
|
description: 'Creates or updates entities in bulk for the given customer. Existing entities matched by id are updated; new ids are created.',
|
|
2127
2209
|
stainlessPath: '(resource) v1.events.beta.customers.entities > (method) upsert',
|
|
2128
2210
|
qualified: 'client.v1.events.beta.customers.entities.upsert',
|
|
2129
|
-
params: [
|
|
2211
|
+
params: [
|
|
2212
|
+
'id: string;',
|
|
2213
|
+
'entities: { id: string; metadata?: object; typeRefId?: string; }[];',
|
|
2214
|
+
'X-ACCOUNT-ID?: string;',
|
|
2215
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
2216
|
+
],
|
|
2130
2217
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }[]; }',
|
|
2131
|
-
markdown: "## upsert\n\n`client.v1.events.beta.customers.entities.upsert(id: string, entities: { id: string; metadata?: object; typeRefId?: string; }[]): { data: object[]; }`\n\n**put** `/api/v1-beta/customers/{id}/entities`\n\nCreates or updates entities in bulk for the given customer. Existing entities matched by id are updated; new ids are created.\n\n### Parameters\n\n- `id: string`\n\n- `entities: { id: string; metadata?: object; typeRefId?: string; }[]`\n List of entities to create or update (1-100 entries)\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }[]; }`\n List of entities created or updated by an upsert request\n\n - `data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.entities.upsert('id', { entities: [{ id: 'user-7f3a0c1d' }, { id: 'user-c4d1b2e9' }] });\n\nconsole.log(response);\n```",
|
|
2218
|
+
markdown: "## upsert\n\n`client.v1.events.beta.customers.entities.upsert(id: string, entities: { id: string; metadata?: object; typeRefId?: string; }[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object[]; }`\n\n**put** `/api/v1-beta/customers/{id}/entities`\n\nCreates or updates entities in bulk for the given customer. Existing entities matched by id are updated; new ids are created.\n\n### Parameters\n\n- `id: string`\n\n- `entities: { id: string; metadata?: object; typeRefId?: string; }[]`\n List of entities to create or update (1-100 entries)\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }[]; }`\n List of entities created or updated by an upsert request\n\n - `data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.entities.upsert('id', { entities: [{ id: 'user-7f3a0c1d' }, { id: 'user-c4d1b2e9' }] });\n\nconsole.log(response);\n```",
|
|
2132
2219
|
perLanguage: {
|
|
2133
2220
|
typescript: {
|
|
2134
2221
|
method: 'client.v1.events.beta.customers.entities.upsert',
|
|
@@ -2171,9 +2258,9 @@ const EMBEDDED_METHODS = [
|
|
|
2171
2258
|
description: 'Retrieves a single entity for the given customer by its identifier.',
|
|
2172
2259
|
stainlessPath: '(resource) v1.events.beta.customers.entities > (method) retrieve',
|
|
2173
2260
|
qualified: 'client.v1.events.beta.customers.entities.retrieve',
|
|
2174
|
-
params: ['id: string;', 'entityId: string;'],
|
|
2261
|
+
params: ['id: string;', 'entityId: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
2175
2262
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }; }',
|
|
2176
|
-
markdown: "## retrieve\n\n`client.v1.events.beta.customers.entities.retrieve(id: string, entityId: string): { data: object; }`\n\n**get** `/api/v1-beta/customers/{id}/entities/{entityId}`\n\nRetrieves a single entity for the given customer by its identifier.\n\n### Parameters\n\n- `id: string`\n\n- `entityId: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst entity = await client.v1.events.beta.customers.entities.retrieve('x', { id: 'id' });\n\nconsole.log(entity);\n```",
|
|
2263
|
+
markdown: "## retrieve\n\n`client.v1.events.beta.customers.entities.retrieve(id: string, entityId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1-beta/customers/{id}/entities/{entityId}`\n\nRetrieves a single entity for the given customer by its identifier.\n\n### Parameters\n\n- `id: string`\n\n- `entityId: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst entity = await client.v1.events.beta.customers.entities.retrieve('x', { id: 'id' });\n\nconsole.log(entity);\n```",
|
|
2177
2264
|
perLanguage: {
|
|
2178
2265
|
typescript: {
|
|
2179
2266
|
method: 'client.v1.events.beta.customers.entities.retrieve',
|
|
@@ -2216,9 +2303,9 @@ const EMBEDDED_METHODS = [
|
|
|
2216
2303
|
description: 'Archives entities in bulk for the given customer by id.',
|
|
2217
2304
|
stainlessPath: '(resource) v1.events.beta.customers.entities > (method) archive',
|
|
2218
2305
|
qualified: 'client.v1.events.beta.customers.entities.archive',
|
|
2219
|
-
params: ['id: string;', 'ids: string[];'],
|
|
2306
|
+
params: ['id: string;', 'ids: string[];', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
2220
2307
|
response: '{ data: { ids: string[]; }; }',
|
|
2221
|
-
markdown: "## archive\n\n`client.v1.events.beta.customers.entities.archive(id: string, ids: string[]): { data: object; }`\n\n**post** `/api/v1-beta/customers/{id}/entities/archive`\n\nArchives entities in bulk for the given customer by id.\n\n### Parameters\n\n- `id: string`\n\n- `ids: string[]`\n Entity identifiers to act on\n\n### Returns\n\n- `{ data: { ids: string[]; }; }`\n Wrapped response echoing the ids that were acted on by an archive/unarchive call\n\n - `data: { ids: string[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.entities.archive('id', { ids: ['user-7f3a0c1d', 'user-c4d1b2e9'] });\n\nconsole.log(response);\n```",
|
|
2308
|
+
markdown: "## archive\n\n`client.v1.events.beta.customers.entities.archive(id: string, ids: string[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1-beta/customers/{id}/entities/archive`\n\nArchives entities in bulk for the given customer by id.\n\n### Parameters\n\n- `id: string`\n\n- `ids: string[]`\n Entity identifiers to act on\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { ids: string[]; }; }`\n Wrapped response echoing the ids that were acted on by an archive/unarchive call\n\n - `data: { ids: string[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.entities.archive('id', { ids: ['user-7f3a0c1d', 'user-c4d1b2e9'] });\n\nconsole.log(response);\n```",
|
|
2222
2309
|
perLanguage: {
|
|
2223
2310
|
typescript: {
|
|
2224
2311
|
method: 'client.v1.events.beta.customers.entities.archive',
|
|
@@ -2261,9 +2348,9 @@ const EMBEDDED_METHODS = [
|
|
|
2261
2348
|
description: 'Restores previously archived entities in bulk for the given customer by id.',
|
|
2262
2349
|
stainlessPath: '(resource) v1.events.beta.customers.entities > (method) unarchive',
|
|
2263
2350
|
qualified: 'client.v1.events.beta.customers.entities.unarchive',
|
|
2264
|
-
params: ['id: string;', 'ids: string[];'],
|
|
2351
|
+
params: ['id: string;', 'ids: string[];', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
2265
2352
|
response: '{ data: { ids: string[]; }; }',
|
|
2266
|
-
markdown: "## unarchive\n\n`client.v1.events.beta.customers.entities.unarchive(id: string, ids: string[]): { data: object; }`\n\n**post** `/api/v1-beta/customers/{id}/entities/unarchive`\n\nRestores previously archived entities in bulk for the given customer by id.\n\n### Parameters\n\n- `id: string`\n\n- `ids: string[]`\n Entity identifiers to act on\n\n### Returns\n\n- `{ data: { ids: string[]; }; }`\n Wrapped response echoing the ids that were acted on by an archive/unarchive call\n\n - `data: { ids: string[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.entities.unarchive('id', { ids: ['user-7f3a0c1d', 'user-c4d1b2e9'] });\n\nconsole.log(response);\n```",
|
|
2353
|
+
markdown: "## unarchive\n\n`client.v1.events.beta.customers.entities.unarchive(id: string, ids: string[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1-beta/customers/{id}/entities/unarchive`\n\nRestores previously archived entities in bulk for the given customer by id.\n\n### Parameters\n\n- `id: string`\n\n- `ids: string[]`\n Entity identifiers to act on\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { ids: string[]; }; }`\n Wrapped response echoing the ids that were acted on by an archive/unarchive call\n\n - `data: { ids: string[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.entities.unarchive('id', { ids: ['user-7f3a0c1d', 'user-c4d1b2e9'] });\n\nconsole.log(response);\n```",
|
|
2267
2354
|
perLanguage: {
|
|
2268
2355
|
typescript: {
|
|
2269
2356
|
method: 'client.v1.events.beta.customers.entities.unarchive',
|
|
@@ -2313,9 +2400,11 @@ const EMBEDDED_METHODS = [
|
|
|
2313
2400
|
'capabilityId?: string;',
|
|
2314
2401
|
'entityId?: string;',
|
|
2315
2402
|
'limit?: number;',
|
|
2403
|
+
'X-ACCOUNT-ID?: string;',
|
|
2404
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
2316
2405
|
],
|
|
2317
2406
|
response: "{ id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }",
|
|
2318
|
-
markdown: "## list\n\n`client.v1.events.beta.customers.assignments.list(id: string, after?: string, before?: string, capabilityId?: string, entityId?: string, limit?: number): { id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }`\n\n**get** `/api/v1-beta/customers/{id}/assignments`\n\nReturns a cursor-paginated list of capability assignments for the given customer. An assignment ties an entity to a capability with a usage limit and reset cadence.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `capabilityId?: string`\n Filter assignments to a specific capability refId\n\n- `entityId?: string`\n Filter assignments to a specific entity refId\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }`\n A capability assignment for an entity belonging to a customer. Defines how much of the capability the entity may consume (`usageLimit`) and how often the counter resets (`cadence`).\n\n - `id: string`\n - `cadence: 'MONTH'`\n - `capabilityId: string`\n - `createdAt: string`\n - `entityId: string`\n - `updatedAt: string`\n - `usageLimit: number`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const assignmentListResponse of client.v1.events.beta.customers.assignments.list('id')) {\n console.log(assignmentListResponse);\n}\n```",
|
|
2407
|
+
markdown: "## list\n\n`client.v1.events.beta.customers.assignments.list(id: string, after?: string, before?: string, capabilityId?: string, entityId?: string, limit?: number, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }`\n\n**get** `/api/v1-beta/customers/{id}/assignments`\n\nReturns a cursor-paginated list of capability assignments for the given customer. An assignment ties an entity to a capability with a usage limit and reset cadence.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `capabilityId?: string`\n Filter assignments to a specific capability refId\n\n- `entityId?: string`\n Filter assignments to a specific entity refId\n\n- `limit?: number`\n Maximum number of items to return\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }`\n A capability assignment for an entity belonging to a customer. Defines how much of the capability the entity may consume (`usageLimit`) and how often the counter resets (`cadence`).\n\n - `id: string`\n - `cadence: 'MONTH'`\n - `capabilityId: string`\n - `createdAt: string`\n - `entityId: string`\n - `updatedAt: string`\n - `usageLimit: number`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const assignmentListResponse of client.v1.events.beta.customers.assignments.list('id')) {\n console.log(assignmentListResponse);\n}\n```",
|
|
2319
2408
|
perLanguage: {
|
|
2320
2409
|
typescript: {
|
|
2321
2410
|
method: 'client.v1.events.beta.customers.assignments.list',
|
|
@@ -2361,9 +2450,11 @@ const EMBEDDED_METHODS = [
|
|
|
2361
2450
|
params: [
|
|
2362
2451
|
'id: string;',
|
|
2363
2452
|
"assignments: { capabilityId: string; entityId: string; cadence?: 'MONTH'; usageLimit?: number; }[];",
|
|
2453
|
+
'X-ACCOUNT-ID?: string;',
|
|
2454
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
2364
2455
|
],
|
|
2365
2456
|
response: "{ data: { id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }[]; }",
|
|
2366
|
-
markdown: "## upsert\n\n`client.v1.events.beta.customers.assignments.upsert(id: string, assignments: { capabilityId: string; entityId: string; cadence?: 'MONTH'; usageLimit?: number; }[]): { data: object[]; }`\n\n**put** `/api/v1-beta/customers/{id}/assignments`\n\nBatched create-or-update of capability assignments. Existing assignments matched by (entityId, capabilityId) are updated; new pairs are created. On update, omitted fields (usageLimit, cadence) are preserved; on create both are required by the governance service.\n\n### Parameters\n\n- `id: string`\n\n- `assignments: { capabilityId: string; entityId: string; cadence?: 'MONTH'; usageLimit?: number; }[]`\n Assignments to upsert (1–100 per request)\n\n### Returns\n\n- `{ data: { id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }[]; }`\n Assignments after upsert.\n\n - `data: { id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.assignments.upsert('id', { assignments: [{ capabilityId: 'compute-minutes', entityId: 'workspace-001' }, { capabilityId: 'compute-minutes', entityId: 'workspace-002' }] });\n\nconsole.log(response);\n```",
|
|
2457
|
+
markdown: "## upsert\n\n`client.v1.events.beta.customers.assignments.upsert(id: string, assignments: { capabilityId: string; entityId: string; cadence?: 'MONTH'; usageLimit?: number; }[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object[]; }`\n\n**put** `/api/v1-beta/customers/{id}/assignments`\n\nBatched create-or-update of capability assignments. Existing assignments matched by (entityId, capabilityId) are updated; new pairs are created. On update, omitted fields (usageLimit, cadence) are preserved; on create both are required by the governance service.\n\n### Parameters\n\n- `id: string`\n\n- `assignments: { capabilityId: string; entityId: string; cadence?: 'MONTH'; usageLimit?: number; }[]`\n Assignments to upsert (1–100 per request)\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }[]; }`\n Assignments after upsert.\n\n - `data: { id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.assignments.upsert('id', { assignments: [{ capabilityId: 'compute-minutes', entityId: 'workspace-001' }, { capabilityId: 'compute-minutes', entityId: 'workspace-002' }] });\n\nconsole.log(response);\n```",
|
|
2367
2458
|
perLanguage: {
|
|
2368
2459
|
typescript: {
|
|
2369
2460
|
method: 'client.v1.events.beta.customers.assignments.upsert',
|
|
@@ -2406,9 +2497,15 @@ const EMBEDDED_METHODS = [
|
|
|
2406
2497
|
description: 'Returns a cursor-paginated list of entity types defined in the environment. Entity types are vendor-defined categories of resource that can be governed (e.g. Org, Team, User).',
|
|
2407
2498
|
stainlessPath: '(resource) v1.events.beta.entity_types > (method) list',
|
|
2408
2499
|
qualified: 'client.v1.events.beta.entityTypes.list',
|
|
2409
|
-
params: [
|
|
2500
|
+
params: [
|
|
2501
|
+
'after?: string;',
|
|
2502
|
+
'before?: string;',
|
|
2503
|
+
'limit?: number;',
|
|
2504
|
+
'X-ACCOUNT-ID?: string;',
|
|
2505
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
2506
|
+
],
|
|
2410
2507
|
response: '{ id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }',
|
|
2411
|
-
markdown: "## list\n\n`client.v1.events.beta.entityTypes.list(after?: string, before?: string, limit?: number): { id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }`\n\n**get** `/api/v1-beta/entity-types`\n\nReturns a cursor-paginated list of entity types defined in the environment. Entity types are vendor-defined categories of resource that can be governed (e.g. Org, Team, User).\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }`\n A vendor-defined category of resource that can be governed (e.g. Org, Team, User). Vendors define entity types once per environment; their customers create instances (entities) of these types and the governance engine tracks usage and enforces limits per instance.\n\n - `id: string`\n - `attributionKeys: string[]`\n - `createdAt: string`\n - `displayName: string`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const entityTypeListResponse of client.v1.events.beta.entityTypes.list()) {\n console.log(entityTypeListResponse);\n}\n```",
|
|
2508
|
+
markdown: "## list\n\n`client.v1.events.beta.entityTypes.list(after?: string, before?: string, limit?: number, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }`\n\n**get** `/api/v1-beta/entity-types`\n\nReturns a cursor-paginated list of entity types defined in the environment. Entity types are vendor-defined categories of resource that can be governed (e.g. Org, Team, User).\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }`\n A vendor-defined category of resource that can be governed (e.g. Org, Team, User). Vendors define entity types once per environment; their customers create instances (entities) of these types and the governance engine tracks usage and enforces limits per instance.\n\n - `id: string`\n - `attributionKeys: string[]`\n - `createdAt: string`\n - `displayName: string`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const entityTypeListResponse of client.v1.events.beta.entityTypes.list()) {\n console.log(entityTypeListResponse);\n}\n```",
|
|
2412
2509
|
perLanguage: {
|
|
2413
2510
|
typescript: {
|
|
2414
2511
|
method: 'client.v1.events.beta.entityTypes.list',
|
|
@@ -2451,9 +2548,13 @@ const EMBEDDED_METHODS = [
|
|
|
2451
2548
|
description: 'Batched create-or-update of entity types. Existing types matched by id are updated; new ids are created. Idempotent — re-submitting the same payload converges to the same state.',
|
|
2452
2549
|
stainlessPath: '(resource) v1.events.beta.entity_types > (method) upsert',
|
|
2453
2550
|
qualified: 'client.v1.events.beta.entityTypes.upsert',
|
|
2454
|
-
params: [
|
|
2551
|
+
params: [
|
|
2552
|
+
'types: { id: string; attributionKeys: string[]; displayName: string; }[];',
|
|
2553
|
+
'X-ACCOUNT-ID?: string;',
|
|
2554
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
2555
|
+
],
|
|
2455
2556
|
response: '{ data: { id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }[]; }',
|
|
2456
|
-
markdown: "## upsert\n\n`client.v1.events.beta.entityTypes.upsert(types: { id: string; attributionKeys: string[]; displayName: string; }[]): { data: object[]; }`\n\n**put** `/api/v1-beta/entity-types`\n\nBatched create-or-update of entity types. Existing types matched by id are updated; new ids are created. Idempotent — re-submitting the same payload converges to the same state.\n\n### Parameters\n\n- `types: { id: string; attributionKeys: string[]; displayName: string; }[]`\n Entity types to upsert (1–100 per request)\n\n### Returns\n\n- `{ data: { id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }[]; }`\n Entity types after upsert.\n\n - `data: { id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.entityTypes.upsert({ types: [{\n id: 'org',\n attributionKeys: ['organizationId'],\n displayName: 'Organization',\n}, {\n id: 'team',\n attributionKeys: ['teamId'],\n displayName: 'Team',\n}] });\n\nconsole.log(response);\n```",
|
|
2557
|
+
markdown: "## upsert\n\n`client.v1.events.beta.entityTypes.upsert(types: { id: string; attributionKeys: string[]; displayName: string; }[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object[]; }`\n\n**put** `/api/v1-beta/entity-types`\n\nBatched create-or-update of entity types. Existing types matched by id are updated; new ids are created. Idempotent — re-submitting the same payload converges to the same state.\n\n### Parameters\n\n- `types: { id: string; attributionKeys: string[]; displayName: string; }[]`\n Entity types to upsert (1–100 per request)\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }[]; }`\n Entity types after upsert.\n\n - `data: { id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.entityTypes.upsert({ types: [{\n id: 'org',\n attributionKeys: ['organizationId'],\n displayName: 'Organization',\n}, {\n id: 'team',\n attributionKeys: ['teamId'],\n displayName: 'Team',\n}] });\n\nconsole.log(response);\n```",
|
|
2457
2558
|
perLanguage: {
|
|
2458
2559
|
typescript: {
|
|
2459
2560
|
method: 'client.v1.events.beta.entityTypes.upsert',
|
|
@@ -2687,9 +2788,11 @@ const EMBEDDED_METHODS = [
|
|
|
2687
2788
|
'resourceId?: string;',
|
|
2688
2789
|
'startDate?: string;',
|
|
2689
2790
|
"timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR';",
|
|
2791
|
+
'X-ACCOUNT-ID?: string;',
|
|
2792
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
2690
2793
|
],
|
|
2691
2794
|
response: '{ data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; pagination: { next: string; prev: string; }; series: { featureId: string; featureName: string; points: object[]; totalCredits: number; tags?: object[]; }[]; }; }',
|
|
2692
|
-
markdown: "## get_usage\n\n`client.v1.credits.getUsage(customerId: string, after?: string, before?: string, currencyId?: string, endDate?: string, groupBy?: string, limit?: number, resourceId?: string, startDate?: string, timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR'): { data: object; }`\n\n**get** `/api/v1/credits/usage`\n\nRetrieves credit usage time-series data for a customer, grouped by feature, over a specified time range.\n\n### Parameters\n\n- `customerId: string`\n Filter by customer ID (required)\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `currencyId?: string`\n Filter by currency ID\n\n- `endDate?: string`\n End date for the credit usage time range (ISO 8601). Defaults to now when startDate is provided\n\n- `groupBy?: string`\n Comma-separated list of feature dimension keys to group usage series by (up to 3). Each key matches /^[a-zA-Z0-9_$-]+$/\n\n- `limit?: number`\n Maximum number of items to return\n\n- `resourceId?: string`\n Filter by resource ID\n\n- `startDate?: string`\n Start date for the credit usage time range (ISO 8601). Takes precedence over timeRange when provided\n\n- `timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR'`\n Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_YEAR). Defaults to LAST_MONTH\n\n### Returns\n\n- `{ data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; pagination: { next: string; prev: string; }; series: { featureId: string; featureName: string; points: object[]; totalCredits: number; tags?: object[]; }[]; }; }`\n Response object\n\n - `data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; pagination: { next: string; prev: string; }; series: { featureId: string; featureName: string; points: { timestamp: string; value: number; }[]; totalCredits: number; tags?: { key: string; value: string; }[]; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.credits.getUsage({ customerId: 'customerId' });\n\nconsole.log(response);\n```",
|
|
2795
|
+
markdown: "## get_usage\n\n`client.v1.credits.getUsage(customerId: string, after?: string, before?: string, currencyId?: string, endDate?: string, groupBy?: string, limit?: number, resourceId?: string, startDate?: string, timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR', X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1/credits/usage`\n\nRetrieves credit usage time-series data for a customer, grouped by feature, over a specified time range.\n\n### Parameters\n\n- `customerId: string`\n Filter by customer ID (required)\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `currencyId?: string`\n Filter by currency ID\n\n- `endDate?: string`\n End date for the credit usage time range (ISO 8601). Defaults to now when startDate is provided\n\n- `groupBy?: string`\n Comma-separated list of feature dimension keys to group usage series by (up to 3). Each key matches /^[a-zA-Z0-9_$-]+$/\n\n- `limit?: number`\n Maximum number of items to return\n\n- `resourceId?: string`\n Filter by resource ID\n\n- `startDate?: string`\n Start date for the credit usage time range (ISO 8601). Takes precedence over timeRange when provided\n\n- `timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR'`\n Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_YEAR). Defaults to LAST_MONTH\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; pagination: { next: string; prev: string; }; series: { featureId: string; featureName: string; points: object[]; totalCredits: number; tags?: object[]; }[]; }; }`\n Response object\n\n - `data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; pagination: { next: string; prev: string; }; series: { featureId: string; featureName: string; points: { timestamp: string; value: number; }[]; totalCredits: number; tags?: { key: string; value: string; }[]; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.credits.getUsage({ customerId: 'customerId' });\n\nconsole.log(response);\n```",
|
|
2693
2796
|
perLanguage: {
|
|
2694
2797
|
typescript: {
|
|
2695
2798
|
method: 'client.v1.credits.getUsage',
|
|
@@ -2732,9 +2835,14 @@ const EMBEDDED_METHODS = [
|
|
|
2732
2835
|
description: 'Retrieves the automatic recharge configuration for a customer and currency. Returns default settings if no configuration exists.',
|
|
2733
2836
|
stainlessPath: '(resource) v1.credits > (method) get_auto_recharge',
|
|
2734
2837
|
qualified: 'client.v1.credits.getAutoRecharge',
|
|
2735
|
-
params: [
|
|
2838
|
+
params: [
|
|
2839
|
+
'currencyId: string;',
|
|
2840
|
+
'customerId: string;',
|
|
2841
|
+
'X-ACCOUNT-ID?: string;',
|
|
2842
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
2843
|
+
],
|
|
2736
2844
|
response: "{ data: { id: string; createdAt: string; currencyId: string; customerId: string; grantExpirationPeriod: '1_MONTH' | '1_YEAR'; isEnabled: boolean; maxSpendLimit: number; targetBalance: number; thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT'; thresholdValue: number; updatedAt: string; }; }",
|
|
2737
|
-
markdown: "## get_auto_recharge\n\n`client.v1.credits.getAutoRecharge(currencyId: string, customerId: string): { data: object; }`\n\n**get** `/api/v1/credits/auto-recharge`\n\nRetrieves the automatic recharge configuration for a customer and currency. Returns default settings if no configuration exists.\n\n### Parameters\n\n- `currencyId: string`\n Filter by currency ID (required)\n\n- `customerId: string`\n Filter by customer ID (required)\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; currencyId: string; customerId: string; grantExpirationPeriod: '1_MONTH' | '1_YEAR'; isEnabled: boolean; maxSpendLimit: number; targetBalance: number; thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT'; thresholdValue: number; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; currencyId: string; customerId: string; grantExpirationPeriod: '1_MONTH' | '1_YEAR'; isEnabled: boolean; maxSpendLimit: number; targetBalance: number; thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT'; thresholdValue: number; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.credits.getAutoRecharge({ currencyId: 'currencyId', customerId: 'customerId' });\n\nconsole.log(response);\n```",
|
|
2845
|
+
markdown: "## get_auto_recharge\n\n`client.v1.credits.getAutoRecharge(currencyId: string, customerId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1/credits/auto-recharge`\n\nRetrieves the automatic recharge configuration for a customer and currency. Returns default settings if no configuration exists.\n\n### Parameters\n\n- `currencyId: string`\n Filter by currency ID (required)\n\n- `customerId: string`\n Filter by customer ID (required)\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; currencyId: string; customerId: string; grantExpirationPeriod: '1_MONTH' | '1_YEAR'; isEnabled: boolean; maxSpendLimit: number; targetBalance: number; thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT'; thresholdValue: number; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; currencyId: string; customerId: string; grantExpirationPeriod: '1_MONTH' | '1_YEAR'; isEnabled: boolean; maxSpendLimit: number; targetBalance: number; thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT'; thresholdValue: number; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.credits.getAutoRecharge({ currencyId: 'currencyId', customerId: 'customerId' });\n\nconsole.log(response);\n```",
|
|
2738
2846
|
perLanguage: {
|
|
2739
2847
|
typescript: {
|
|
2740
2848
|
method: 'client.v1.credits.getAutoRecharge',
|
|
@@ -2784,9 +2892,11 @@ const EMBEDDED_METHODS = [
|
|
|
2784
2892
|
'currencyId?: string;',
|
|
2785
2893
|
'limit?: number;',
|
|
2786
2894
|
'resourceId?: string;',
|
|
2895
|
+
'X-ACCOUNT-ID?: string;',
|
|
2896
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
2787
2897
|
],
|
|
2788
2898
|
response: '{ amount: number; creditCurrencyId: string; creditGrantId: string; customerId: string; eventId: string; eventType: string; featureId: string; resourceId: string; timestamp: string; }',
|
|
2789
|
-
markdown: "## list_ledger\n\n`client.v1.credits.listLedger(customerId: string, after?: string, before?: string, currencyId?: string, limit?: number, resourceId?: string): { amount: number; creditCurrencyId: string; creditGrantId: string; customerId: string; eventId: string; eventType: string; featureId: string; resourceId: string; timestamp: string; }`\n\n**get** `/api/v1/credits/ledger`\n\nRetrieves a paginated list of credit ledger events for a customer.\n\n### Parameters\n\n- `customerId: string`\n Filter by customer ID (required)\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `currencyId?: string`\n Filter by currency ID\n\n- `limit?: number`\n Maximum number of items to return\n\n- `resourceId?: string`\n Filter by resource ID\n\n### Returns\n\n- `{ amount: number; creditCurrencyId: string; creditGrantId: string; customerId: string; eventId: string; eventType: string; featureId: string; resourceId: string; timestamp: string; }`\n A credit ledger event representing a change to credit balance\n\n - `amount: number`\n - `creditCurrencyId: string`\n - `creditGrantId: string`\n - `customerId: string`\n - `eventId: string`\n - `eventType: string`\n - `featureId: string`\n - `resourceId: string`\n - `timestamp: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const creditListLedgerResponse of client.v1.credits.listLedger({ customerId: 'customerId' })) {\n console.log(creditListLedgerResponse);\n}\n```",
|
|
2899
|
+
markdown: "## list_ledger\n\n`client.v1.credits.listLedger(customerId: string, after?: string, before?: string, currencyId?: string, limit?: number, resourceId?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { amount: number; creditCurrencyId: string; creditGrantId: string; customerId: string; eventId: string; eventType: string; featureId: string; resourceId: string; timestamp: string; }`\n\n**get** `/api/v1/credits/ledger`\n\nRetrieves a paginated list of credit ledger events for a customer.\n\n### Parameters\n\n- `customerId: string`\n Filter by customer ID (required)\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `currencyId?: string`\n Filter by currency ID\n\n- `limit?: number`\n Maximum number of items to return\n\n- `resourceId?: string`\n Filter by resource ID\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ amount: number; creditCurrencyId: string; creditGrantId: string; customerId: string; eventId: string; eventType: string; featureId: string; resourceId: string; timestamp: string; }`\n A credit ledger event representing a change to credit balance\n\n - `amount: number`\n - `creditCurrencyId: string`\n - `creditGrantId: string`\n - `customerId: string`\n - `eventId: string`\n - `eventType: string`\n - `featureId: string`\n - `resourceId: string`\n - `timestamp: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const creditListLedgerResponse of client.v1.credits.listLedger({ customerId: 'customerId' })) {\n console.log(creditListLedgerResponse);\n}\n```",
|
|
2790
2900
|
perLanguage: {
|
|
2791
2901
|
typescript: {
|
|
2792
2902
|
method: 'client.v1.credits.listLedger',
|
|
@@ -2837,9 +2947,11 @@ const EMBEDDED_METHODS = [
|
|
|
2837
2947
|
'currencyId?: string;',
|
|
2838
2948
|
'limit?: number;',
|
|
2839
2949
|
'resourceId?: string;',
|
|
2950
|
+
'X-ACCOUNT-ID?: string;',
|
|
2951
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
2840
2952
|
],
|
|
2841
2953
|
response: "{ id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }",
|
|
2842
|
-
markdown: "## list\n\n`client.v1.credits.grants.list(customerId: string, after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, currencyId?: string, limit?: number, resourceId?: string): { id: string; amount: number; comment: string; consumedAmount: number; cost: object; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: object; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n\n**get** `/api/v1/credits/grants`\n\nRetrieves a paginated list of credit grants for a customer.\n\n### Parameters\n\n- `customerId: string`\n Filter by customer ID (required)\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `currencyId?: string`\n Filter by currency ID\n\n- `limit?: number`\n Maximum number of items to return\n\n- `resourceId?: string`\n Filter by resource ID. When omitted, only grants without a resource are returned\n\n### Returns\n\n- `{ id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n Credit grant object representing allocated credits for a customer\n\n - `id: string`\n - `amount: number`\n - `comment: string`\n - `consumedAmount: number`\n - `cost: { amount: number; currency: string; }`\n - `createdAt: string`\n - `currencyId: string`\n - `customerId: string`\n - `displayName: string`\n - `effectiveAt: string`\n - `expireAt: string`\n - `grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'`\n - `invoiceId: string`\n - `latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }`\n - `metadata: object`\n - `paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'`\n - `priority: number`\n - `resourceId: string`\n - `sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'`\n - `status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'`\n - `updatedAt: string`\n - `voidedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const grantListResponse of client.v1.credits.grants.list({ customerId: 'customerId' })) {\n console.log(grantListResponse);\n}\n```",
|
|
2954
|
+
markdown: "## list\n\n`client.v1.credits.grants.list(customerId: string, after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, currencyId?: string, limit?: number, resourceId?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; amount: number; comment: string; consumedAmount: number; cost: object; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: object; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n\n**get** `/api/v1/credits/grants`\n\nRetrieves a paginated list of credit grants for a customer.\n\n### Parameters\n\n- `customerId: string`\n Filter by customer ID (required)\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `currencyId?: string`\n Filter by currency ID\n\n- `limit?: number`\n Maximum number of items to return\n\n- `resourceId?: string`\n Filter by resource ID. When omitted, only grants without a resource are returned\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n Credit grant object representing allocated credits for a customer\n\n - `id: string`\n - `amount: number`\n - `comment: string`\n - `consumedAmount: number`\n - `cost: { amount: number; currency: string; }`\n - `createdAt: string`\n - `currencyId: string`\n - `customerId: string`\n - `displayName: string`\n - `effectiveAt: string`\n - `expireAt: string`\n - `grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'`\n - `invoiceId: string`\n - `latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }`\n - `metadata: object`\n - `paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'`\n - `priority: number`\n - `resourceId: string`\n - `sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'`\n - `status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'`\n - `updatedAt: string`\n - `voidedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const grantListResponse of client.v1.credits.grants.list({ customerId: 'customerId' })) {\n console.log(grantListResponse);\n}\n```",
|
|
2843
2955
|
perLanguage: {
|
|
2844
2956
|
typescript: {
|
|
2845
2957
|
method: 'client.v1.credits.grants.list',
|
|
@@ -2898,9 +3010,11 @@ const EMBEDDED_METHODS = [
|
|
|
2898
3010
|
"paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE';",
|
|
2899
3011
|
'priority?: number;',
|
|
2900
3012
|
'resourceId?: string;',
|
|
3013
|
+
'X-ACCOUNT-ID?: string;',
|
|
3014
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
2901
3015
|
],
|
|
2902
3016
|
response: "{ data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }; }",
|
|
2903
|
-
markdown: "## create\n\n`client.v1.credits.grants.create(amount: number, currencyId: string, customerId: string, displayName: string, grantType: 'PAID' | 'PROMOTIONAL', awaitPaymentConfirmation?: boolean, billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; invoiceDaysUntilDue?: number; isInvoicePaid?: boolean; }, comment?: string, cost?: { amount: number; currency: string; }, effectiveAt?: string, expireAt?: string, metadata?: object, paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE', priority?: number, resourceId?: string): { data: object; }`\n\n**post** `/api/v1/credits/grants`\n\nCreates a new credit grant for a customer with specified amount, type, and optional billing configuration.\n\n### Parameters\n\n- `amount: number`\n The credit amount to grant\n\n- `currencyId: string`\n The credit currency ID (required)\n\n- `customerId: string`\n The customer ID to grant credits to (required)\n\n- `displayName: string`\n The display name for the credit grant\n\n- `grantType: 'PAID' | 'PROMOTIONAL'`\n The type of credit grant (PAID, PROMOTIONAL)\n\n- `awaitPaymentConfirmation?: boolean`\n Whether to wait for payment confirmation before returning (default: true)\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; invoiceDaysUntilDue?: number; isInvoicePaid?: boolean; }`\n Billing information for the credit grant\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n The billing address\n - `invoiceDaysUntilDue?: number`\n Days until the invoice is due\n - `isInvoicePaid?: boolean`\n Whether the invoice is already paid\n\n- `comment?: string`\n An optional comment on the credit grant\n\n- `cost?: { amount: number; currency: string; }`\n The monetary cost of the credit grant\n - `amount: number`\n The price amount\n - `currency: string`\n ISO 4217 currency code\n\n- `effectiveAt?: string`\n The date when the credit grant becomes effective\n\n- `expireAt?: string`\n The date when the credit grant expires\n\n- `metadata?: object`\n Additional metadata for the credit grant\n\n- `paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'`\n The payment collection method (CHARGE, INVOICE, NONE)\n\n- `priority?: number`\n The priority of the credit grant (lower number = higher priority)\n\n- `resourceId?: string`\n The resource ID to scope the grant to\n\n### Returns\n\n- `{ data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }; }`\n Response object\n\n - `data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst creditGrantResponse = await client.v1.credits.grants.create({\n amount: 0,\n currencyId: 'currencyId',\n customerId: 'customerId',\n displayName: 'displayName',\n grantType: 'PAID',\n});\n\nconsole.log(creditGrantResponse);\n```",
|
|
3017
|
+
markdown: "## create\n\n`client.v1.credits.grants.create(amount: number, currencyId: string, customerId: string, displayName: string, grantType: 'PAID' | 'PROMOTIONAL', awaitPaymentConfirmation?: boolean, billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; invoiceDaysUntilDue?: number; isInvoicePaid?: boolean; }, comment?: string, cost?: { amount: number; currency: string; }, effectiveAt?: string, expireAt?: string, metadata?: object, paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE', priority?: number, resourceId?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/credits/grants`\n\nCreates a new credit grant for a customer with specified amount, type, and optional billing configuration.\n\n### Parameters\n\n- `amount: number`\n The credit amount to grant\n\n- `currencyId: string`\n The credit currency ID (required)\n\n- `customerId: string`\n The customer ID to grant credits to (required)\n\n- `displayName: string`\n The display name for the credit grant\n\n- `grantType: 'PAID' | 'PROMOTIONAL'`\n The type of credit grant (PAID, PROMOTIONAL)\n\n- `awaitPaymentConfirmation?: boolean`\n Whether to wait for payment confirmation before returning (default: true)\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; invoiceDaysUntilDue?: number; isInvoicePaid?: boolean; }`\n Billing information for the credit grant\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n The billing address\n - `invoiceDaysUntilDue?: number`\n Days until the invoice is due\n - `isInvoicePaid?: boolean`\n Whether the invoice is already paid\n\n- `comment?: string`\n An optional comment on the credit grant\n\n- `cost?: { amount: number; currency: string; }`\n The monetary cost of the credit grant\n - `amount: number`\n The price amount\n - `currency: string`\n ISO 4217 currency code\n\n- `effectiveAt?: string`\n The date when the credit grant becomes effective\n\n- `expireAt?: string`\n The date when the credit grant expires\n\n- `metadata?: object`\n Additional metadata for the credit grant\n\n- `paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'`\n The payment collection method (CHARGE, INVOICE, NONE)\n\n- `priority?: number`\n The priority of the credit grant (lower number = higher priority)\n\n- `resourceId?: string`\n The resource ID to scope the grant to\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }; }`\n Response object\n\n - `data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst creditGrantResponse = await client.v1.credits.grants.create({\n amount: 0,\n currencyId: 'currencyId',\n customerId: 'customerId',\n displayName: 'displayName',\n grantType: 'PAID',\n});\n\nconsole.log(creditGrantResponse);\n```",
|
|
2904
3018
|
perLanguage: {
|
|
2905
3019
|
typescript: {
|
|
2906
3020
|
method: 'client.v1.credits.grants.create',
|
|
@@ -2943,9 +3057,9 @@ const EMBEDDED_METHODS = [
|
|
|
2943
3057
|
description: 'Voids an existing credit grant, preventing further consumption of the remaining credits.',
|
|
2944
3058
|
stainlessPath: '(resource) v1.credits.grants > (method) void',
|
|
2945
3059
|
qualified: 'client.v1.credits.grants.void',
|
|
2946
|
-
params: ['id: string;'],
|
|
3060
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
2947
3061
|
response: "{ data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }; }",
|
|
2948
|
-
markdown: "## void\n\n`client.v1.credits.grants.void(id: string): { data: object; }`\n\n**post** `/api/v1/credits/grants/{id}/void`\n\nVoids an existing credit grant, preventing further consumption of the remaining credits.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }; }`\n Response object\n\n - `data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst creditGrantResponse = await client.v1.credits.grants.void('x');\n\nconsole.log(creditGrantResponse);\n```",
|
|
3062
|
+
markdown: "## void\n\n`client.v1.credits.grants.void(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/credits/grants/{id}/void`\n\nVoids an existing credit grant, preventing further consumption of the remaining credits.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }; }`\n Response object\n\n - `data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst creditGrantResponse = await client.v1.credits.grants.void('x');\n\nconsole.log(creditGrantResponse);\n```",
|
|
2949
3063
|
perLanguage: {
|
|
2950
3064
|
typescript: {
|
|
2951
3065
|
method: 'client.v1.credits.grants.void',
|
|
@@ -2953,7 +3067,7 @@ const EMBEDDED_METHODS = [
|
|
|
2953
3067
|
},
|
|
2954
3068
|
python: {
|
|
2955
3069
|
method: 'v1.credits.grants.void',
|
|
2956
|
-
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)\ncredit_grant_response = client.v1.credits.grants.void(\n "x",\n)\nprint(credit_grant_response.data)',
|
|
3070
|
+
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)\ncredit_grant_response = client.v1.credits.grants.void(\n id="x",\n)\nprint(credit_grant_response.data)',
|
|
2957
3071
|
},
|
|
2958
3072
|
java: {
|
|
2959
3073
|
method: 'v1().credits().grants().void_',
|
|
@@ -2961,7 +3075,7 @@ const EMBEDDED_METHODS = [
|
|
|
2961
3075
|
},
|
|
2962
3076
|
go: {
|
|
2963
3077
|
method: 'client.V1.Credits.Grants.Void',
|
|
2964
|
-
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\tcreditGrantResponse, err := client.V1.Credits.Grants.Void(
|
|
3078
|
+
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\tcreditGrantResponse, err := client.V1.Credits.Grants.Void(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1CreditGrantVoidParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", creditGrantResponse.Data)\n}\n',
|
|
2965
3079
|
},
|
|
2966
3080
|
ruby: {
|
|
2967
3081
|
method: 'v1.credits.grants.void',
|
|
@@ -2988,9 +3102,16 @@ const EMBEDDED_METHODS = [
|
|
|
2988
3102
|
description: 'Retrieves a paginated list of custom currencies in the environment. Archived currencies are excluded by default; pass `status=ARCHIVED` (or `status=ACTIVE,ARCHIVED`) to include them.',
|
|
2989
3103
|
stainlessPath: '(resource) v1.credits.custom_currencies > (method) list',
|
|
2990
3104
|
qualified: 'client.v1.credits.customCurrencies.list',
|
|
2991
|
-
params: [
|
|
3105
|
+
params: [
|
|
3106
|
+
'after?: string;',
|
|
3107
|
+
'before?: string;',
|
|
3108
|
+
'limit?: number;',
|
|
3109
|
+
"status?: 'ACTIVE' | 'ARCHIVED'[];",
|
|
3110
|
+
'X-ACCOUNT-ID?: string;',
|
|
3111
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
3112
|
+
],
|
|
2992
3113
|
response: '{ id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }',
|
|
2993
|
-
markdown: "## list\n\n`client.v1.credits.customCurrencies.list(after?: string, before?: string, limit?: number, status?: 'ACTIVE' | 'ARCHIVED'[]): { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: object; updatedAt: string; }`\n\n**get** `/api/v1/credits/custom-currencies`\n\nRetrieves a paginated list of custom currencies in the environment. Archived currencies are excluded by default; pass `status=ARCHIVED` (or `status=ACTIVE,ARCHIVED`) to include them.\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n- `status?: 'ACTIVE' | 'ARCHIVED'[]`\n Filter by custom currency status. Supports comma-separated values (e.g., `ACTIVE,ARCHIVED`). Defaults to `ACTIVE`.\n\n### Returns\n\n- `{ id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n A custom currency used to denominate credit-based entitlements and pricing\n\n - `id: string`\n - `archivedAt: string`\n - `createdAt: string`\n - `description: string`\n - `displayName: string`\n - `metadata: object`\n - `symbol: string`\n - `units: { plural: string; singular: string; }`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const customCurrencyListResponse of client.v1.credits.customCurrencies.list()) {\n console.log(customCurrencyListResponse);\n}\n```",
|
|
3114
|
+
markdown: "## list\n\n`client.v1.credits.customCurrencies.list(after?: string, before?: string, limit?: number, status?: 'ACTIVE' | 'ARCHIVED'[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: object; updatedAt: string; }`\n\n**get** `/api/v1/credits/custom-currencies`\n\nRetrieves a paginated list of custom currencies in the environment. Archived currencies are excluded by default; pass `status=ARCHIVED` (or `status=ACTIVE,ARCHIVED`) to include them.\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n- `status?: 'ACTIVE' | 'ARCHIVED'[]`\n Filter by custom currency status. Supports comma-separated values (e.g., `ACTIVE,ARCHIVED`). Defaults to `ACTIVE`.\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n A custom currency used to denominate credit-based entitlements and pricing\n\n - `id: string`\n - `archivedAt: string`\n - `createdAt: string`\n - `description: string`\n - `displayName: string`\n - `metadata: object`\n - `symbol: string`\n - `units: { plural: string; singular: string; }`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const customCurrencyListResponse of client.v1.credits.customCurrencies.list()) {\n console.log(customCurrencyListResponse);\n}\n```",
|
|
2994
3115
|
perLanguage: {
|
|
2995
3116
|
typescript: {
|
|
2996
3117
|
method: 'client.v1.credits.customCurrencies.list',
|
|
@@ -3040,9 +3161,11 @@ const EMBEDDED_METHODS = [
|
|
|
3040
3161
|
'metadata?: object;',
|
|
3041
3162
|
'symbol?: string;',
|
|
3042
3163
|
'units?: { plural: string; singular: string; };',
|
|
3164
|
+
'X-ACCOUNT-ID?: string;',
|
|
3165
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
3043
3166
|
],
|
|
3044
3167
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
3045
|
-
markdown: "## create\n\n`client.v1.credits.customCurrencies.create(id: string, displayName: string, description?: string, metadata?: object, symbol?: string, units?: { plural: string; singular: string; }): { data: object; }`\n\n**post** `/api/v1/credits/custom-currencies`\n\nCreates a new custom currency in the environment.\n\n### Parameters\n\n- `id: string`\n The unique identifier for the new custom currency\n\n- `displayName: string`\n The display name of the custom currency\n\n- `description?: string`\n Description of the currency\n\n- `metadata?: object`\n Additional metadata to attach to the custom currency\n\n- `symbol?: string`\n The symbol used to represent the custom currency\n\n- `units?: { plural: string; singular: string; }`\n Singular and plural unit labels for a custom currency. Both fields are required when supplied.\n - `plural: string`\n Plural form of the unit label\n - `singular: string`\n Singular form of the unit label\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.create({ id: 'id', displayName: 'displayName' });\n\nconsole.log(customCurrencyResponse);\n```",
|
|
3168
|
+
markdown: "## create\n\n`client.v1.credits.customCurrencies.create(id: string, displayName: string, description?: string, metadata?: object, symbol?: string, units?: { plural: string; singular: string; }, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/credits/custom-currencies`\n\nCreates a new custom currency in the environment.\n\n### Parameters\n\n- `id: string`\n The unique identifier for the new custom currency\n\n- `displayName: string`\n The display name of the custom currency\n\n- `description?: string`\n Description of the currency\n\n- `metadata?: object`\n Additional metadata to attach to the custom currency\n\n- `symbol?: string`\n The symbol used to represent the custom currency\n\n- `units?: { plural: string; singular: string; }`\n Singular and plural unit labels for a custom currency. Both fields are required when supplied.\n - `plural: string`\n Plural form of the unit label\n - `singular: string`\n Singular form of the unit label\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.create({ id: 'id', displayName: 'displayName' });\n\nconsole.log(customCurrencyResponse);\n```",
|
|
3046
3169
|
perLanguage: {
|
|
3047
3170
|
typescript: {
|
|
3048
3171
|
method: 'client.v1.credits.customCurrencies.create',
|
|
@@ -3092,9 +3215,11 @@ const EMBEDDED_METHODS = [
|
|
|
3092
3215
|
'metadata?: object;',
|
|
3093
3216
|
'symbol?: string;',
|
|
3094
3217
|
'units?: { plural: string; singular: string; };',
|
|
3218
|
+
'X-ACCOUNT-ID?: string;',
|
|
3219
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
3095
3220
|
],
|
|
3096
3221
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
3097
|
-
markdown: "## update\n\n`client.v1.credits.customCurrencies.update(currencyId: string, description?: string, displayName?: string, metadata?: object, symbol?: string, units?: { plural: string; singular: string; }): { data: object; }`\n\n**patch** `/api/v1/credits/custom-currencies/{currencyId}`\n\nUpdates an existing custom currency. Only the supplied fields are modified.\n\n### Parameters\n\n- `currencyId: string`\n\n- `description?: string`\n A human-readable description of the custom currency. Send an empty string to clear.\n\n- `displayName?: string`\n The display name of the custom currency\n\n- `metadata?: object`\n Additional metadata to attach to the custom currency\n\n- `symbol?: string`\n The symbol used to represent the custom currency. Send an empty string to clear.\n\n- `units?: { plural: string; singular: string; }`\n Singular and plural unit labels for a custom currency. Both fields are required when supplied.\n - `plural: string`\n Plural form of the unit label\n - `singular: string`\n Singular form of the unit label\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.update('currencyId');\n\nconsole.log(customCurrencyResponse);\n```",
|
|
3222
|
+
markdown: "## update\n\n`client.v1.credits.customCurrencies.update(currencyId: string, description?: string, displayName?: string, metadata?: object, symbol?: string, units?: { plural: string; singular: string; }, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**patch** `/api/v1/credits/custom-currencies/{currencyId}`\n\nUpdates an existing custom currency. Only the supplied fields are modified.\n\n### Parameters\n\n- `currencyId: string`\n\n- `description?: string`\n A human-readable description of the custom currency. Send an empty string to clear.\n\n- `displayName?: string`\n The display name of the custom currency\n\n- `metadata?: object`\n Additional metadata to attach to the custom currency\n\n- `symbol?: string`\n The symbol used to represent the custom currency. Send an empty string to clear.\n\n- `units?: { plural: string; singular: string; }`\n Singular and plural unit labels for a custom currency. Both fields are required when supplied.\n - `plural: string`\n Plural form of the unit label\n - `singular: string`\n Singular form of the unit label\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.update('currencyId');\n\nconsole.log(customCurrencyResponse);\n```",
|
|
3098
3223
|
perLanguage: {
|
|
3099
3224
|
typescript: {
|
|
3100
3225
|
method: 'client.v1.credits.customCurrencies.update',
|
|
@@ -3137,9 +3262,9 @@ const EMBEDDED_METHODS = [
|
|
|
3137
3262
|
description: 'Archives a custom currency. Fails if the currency is still associated with any active plan or addon — use the associated-entities endpoint first to inspect dependencies.',
|
|
3138
3263
|
stainlessPath: '(resource) v1.credits.custom_currencies > (method) archive',
|
|
3139
3264
|
qualified: 'client.v1.credits.customCurrencies.archive',
|
|
3140
|
-
params: ['currencyId: string;'],
|
|
3265
|
+
params: ['currencyId: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
3141
3266
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
3142
|
-
markdown: "## archive\n\n`client.v1.credits.customCurrencies.archive(currencyId: string): { data: object; }`\n\n**post** `/api/v1/credits/custom-currencies/{currencyId}/archive`\n\nArchives a custom currency. Fails if the currency is still associated with any active plan or addon — use the associated-entities endpoint first to inspect dependencies.\n\n### Parameters\n\n- `currencyId: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.archive('currencyId');\n\nconsole.log(customCurrencyResponse);\n```",
|
|
3267
|
+
markdown: "## archive\n\n`client.v1.credits.customCurrencies.archive(currencyId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/credits/custom-currencies/{currencyId}/archive`\n\nArchives a custom currency. Fails if the currency is still associated with any active plan or addon — use the associated-entities endpoint first to inspect dependencies.\n\n### Parameters\n\n- `currencyId: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.archive('currencyId');\n\nconsole.log(customCurrencyResponse);\n```",
|
|
3143
3268
|
perLanguage: {
|
|
3144
3269
|
typescript: {
|
|
3145
3270
|
method: 'client.v1.credits.customCurrencies.archive',
|
|
@@ -3147,7 +3272,7 @@ const EMBEDDED_METHODS = [
|
|
|
3147
3272
|
},
|
|
3148
3273
|
python: {
|
|
3149
3274
|
method: 'v1.credits.custom_currencies.archive',
|
|
3150
|
-
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)\ncustom_currency_response = client.v1.credits.custom_currencies.archive(\n "currencyId",\n)\nprint(custom_currency_response.data)',
|
|
3275
|
+
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)\ncustom_currency_response = client.v1.credits.custom_currencies.archive(\n currency_id="currencyId",\n)\nprint(custom_currency_response.data)',
|
|
3151
3276
|
},
|
|
3152
3277
|
java: {
|
|
3153
3278
|
method: 'v1().credits().customCurrencies().archive',
|
|
@@ -3155,7 +3280,7 @@ const EMBEDDED_METHODS = [
|
|
|
3155
3280
|
},
|
|
3156
3281
|
go: {
|
|
3157
3282
|
method: 'client.V1.Credits.CustomCurrencies.Archive',
|
|
3158
|
-
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\tcustomCurrencyResponse, err := client.V1.Credits.CustomCurrencies.Archive(
|
|
3283
|
+
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\tcustomCurrencyResponse, err := client.V1.Credits.CustomCurrencies.Archive(\n\t\tcontext.TODO(),\n\t\t"currencyId",\n\t\tstigg.V1CreditCustomCurrencyArchiveParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customCurrencyResponse.Data)\n}\n',
|
|
3159
3284
|
},
|
|
3160
3285
|
ruby: {
|
|
3161
3286
|
method: 'v1.credits.custom_currencies.archive',
|
|
@@ -3182,9 +3307,9 @@ const EMBEDDED_METHODS = [
|
|
|
3182
3307
|
description: 'Restores a previously archived custom currency. Fails if another active currency with the same ID already exists.',
|
|
3183
3308
|
stainlessPath: '(resource) v1.credits.custom_currencies > (method) unarchive',
|
|
3184
3309
|
qualified: 'client.v1.credits.customCurrencies.unarchive',
|
|
3185
|
-
params: ['currencyId: string;'],
|
|
3310
|
+
params: ['currencyId: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
3186
3311
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
3187
|
-
markdown: "## unarchive\n\n`client.v1.credits.customCurrencies.unarchive(currencyId: string): { data: object; }`\n\n**post** `/api/v1/credits/custom-currencies/{currencyId}/unarchive`\n\nRestores a previously archived custom currency. Fails if another active currency with the same ID already exists.\n\n### Parameters\n\n- `currencyId: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.unarchive('currencyId');\n\nconsole.log(customCurrencyResponse);\n```",
|
|
3312
|
+
markdown: "## unarchive\n\n`client.v1.credits.customCurrencies.unarchive(currencyId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/credits/custom-currencies/{currencyId}/unarchive`\n\nRestores a previously archived custom currency. Fails if another active currency with the same ID already exists.\n\n### Parameters\n\n- `currencyId: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.unarchive('currencyId');\n\nconsole.log(customCurrencyResponse);\n```",
|
|
3188
3313
|
perLanguage: {
|
|
3189
3314
|
typescript: {
|
|
3190
3315
|
method: 'client.v1.credits.customCurrencies.unarchive',
|
|
@@ -3192,7 +3317,7 @@ const EMBEDDED_METHODS = [
|
|
|
3192
3317
|
},
|
|
3193
3318
|
python: {
|
|
3194
3319
|
method: 'v1.credits.custom_currencies.unarchive',
|
|
3195
|
-
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)\ncustom_currency_response = client.v1.credits.custom_currencies.unarchive(\n "currencyId",\n)\nprint(custom_currency_response.data)',
|
|
3320
|
+
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)\ncustom_currency_response = client.v1.credits.custom_currencies.unarchive(\n currency_id="currencyId",\n)\nprint(custom_currency_response.data)',
|
|
3196
3321
|
},
|
|
3197
3322
|
java: {
|
|
3198
3323
|
method: 'v1().credits().customCurrencies().unarchive',
|
|
@@ -3200,7 +3325,7 @@ const EMBEDDED_METHODS = [
|
|
|
3200
3325
|
},
|
|
3201
3326
|
go: {
|
|
3202
3327
|
method: 'client.V1.Credits.CustomCurrencies.Unarchive',
|
|
3203
|
-
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\tcustomCurrencyResponse, err := client.V1.Credits.CustomCurrencies.Unarchive(
|
|
3328
|
+
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\tcustomCurrencyResponse, err := client.V1.Credits.CustomCurrencies.Unarchive(\n\t\tcontext.TODO(),\n\t\t"currencyId",\n\t\tstigg.V1CreditCustomCurrencyUnarchiveParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customCurrencyResponse.Data)\n}\n',
|
|
3204
3329
|
},
|
|
3205
3330
|
ruby: {
|
|
3206
3331
|
method: 'v1.credits.custom_currencies.unarchive',
|
|
@@ -3227,9 +3352,9 @@ const EMBEDDED_METHODS = [
|
|
|
3227
3352
|
description: 'Lists the active plans and addons that reference a custom currency. Useful before archiving to inspect dependencies.',
|
|
3228
3353
|
stainlessPath: '(resource) v1.credits.custom_currencies > (method) list_associated_entities',
|
|
3229
3354
|
qualified: 'client.v1.credits.customCurrencies.listAssociatedEntities',
|
|
3230
|
-
params: ['currencyId: string;'],
|
|
3355
|
+
params: ['currencyId: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
3231
3356
|
response: '{ data: { id: string; displayName: string; type: string; }[]; }',
|
|
3232
|
-
markdown: "## list_associated_entities\n\n`client.v1.credits.customCurrencies.listAssociatedEntities(currencyId: string): { data: object[]; }`\n\n**get** `/api/v1/credits/custom-currencies/{currencyId}/associated-entities`\n\nLists the active plans and addons that reference a custom currency. Useful before archiving to inspect dependencies.\n\n### Parameters\n\n- `currencyId: string`\n\n### Returns\n\n- `{ data: { id: string; displayName: string; type: string; }[]; }`\n List of entities (plans or addons) that reference a custom currency\n\n - `data: { id: string; displayName: string; type: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.credits.customCurrencies.listAssociatedEntities('currencyId');\n\nconsole.log(response);\n```",
|
|
3357
|
+
markdown: "## list_associated_entities\n\n`client.v1.credits.customCurrencies.listAssociatedEntities(currencyId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object[]; }`\n\n**get** `/api/v1/credits/custom-currencies/{currencyId}/associated-entities`\n\nLists the active plans and addons that reference a custom currency. Useful before archiving to inspect dependencies.\n\n### Parameters\n\n- `currencyId: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; displayName: string; type: string; }[]; }`\n List of entities (plans or addons) that reference a custom currency\n\n - `data: { id: string; displayName: string; type: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.credits.customCurrencies.listAssociatedEntities('currencyId');\n\nconsole.log(response);\n```",
|
|
3233
3358
|
perLanguage: {
|
|
3234
3359
|
typescript: {
|
|
3235
3360
|
method: 'client.v1.credits.customCurrencies.listAssociatedEntities',
|
|
@@ -3237,7 +3362,7 @@ const EMBEDDED_METHODS = [
|
|
|
3237
3362
|
},
|
|
3238
3363
|
python: {
|
|
3239
3364
|
method: 'v1.credits.custom_currencies.list_associated_entities',
|
|
3240
|
-
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)\nresponse = client.v1.credits.custom_currencies.list_associated_entities(\n "currencyId",\n)\nprint(response.data)',
|
|
3365
|
+
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)\nresponse = client.v1.credits.custom_currencies.list_associated_entities(\n currency_id="currencyId",\n)\nprint(response.data)',
|
|
3241
3366
|
},
|
|
3242
3367
|
java: {
|
|
3243
3368
|
method: 'v1().credits().customCurrencies().listAssociatedEntities',
|
|
@@ -3245,7 +3370,7 @@ const EMBEDDED_METHODS = [
|
|
|
3245
3370
|
},
|
|
3246
3371
|
go: {
|
|
3247
3372
|
method: 'client.V1.Credits.CustomCurrencies.ListAssociatedEntities',
|
|
3248
|
-
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\tresponse, err := client.V1.Credits.CustomCurrencies.ListAssociatedEntities(
|
|
3373
|
+
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\tresponse, err := client.V1.Credits.CustomCurrencies.ListAssociatedEntities(\n\t\tcontext.TODO(),\n\t\t"currencyId",\n\t\tstigg.V1CreditCustomCurrencyListAssociatedEntitiesParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
3249
3374
|
},
|
|
3250
3375
|
ruby: {
|
|
3251
3376
|
method: 'v1.credits.custom_currencies.list_associated_entities',
|
|
@@ -3272,9 +3397,9 @@ const EMBEDDED_METHODS = [
|
|
|
3272
3397
|
description: 'Retrieves a feature by its unique identifier.',
|
|
3273
3398
|
stainlessPath: '(resource) v1.features > (method) retrieve_feature',
|
|
3274
3399
|
qualified: 'client.v1.features.retrieveFeature',
|
|
3275
|
-
params: ['id: string;'],
|
|
3400
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
3276
3401
|
response: "{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }",
|
|
3277
|
-
markdown: "## retrieve_feature\n\n`client.v1.features.retrieveFeature(id: string): { data: object; }`\n\n**get** `/api/v1/features/{id}`\n\nRetrieves a feature by its unique identifier.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst feature = await client.v1.features.retrieveFeature('x');\n\nconsole.log(feature);\n```",
|
|
3402
|
+
markdown: "## retrieve_feature\n\n`client.v1.features.retrieveFeature(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1/features/{id}`\n\nRetrieves a feature by its unique identifier.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst feature = await client.v1.features.retrieveFeature('x');\n\nconsole.log(feature);\n```",
|
|
3278
3403
|
perLanguage: {
|
|
3279
3404
|
typescript: {
|
|
3280
3405
|
method: 'client.v1.features.retrieveFeature',
|
|
@@ -3282,7 +3407,7 @@ const EMBEDDED_METHODS = [
|
|
|
3282
3407
|
},
|
|
3283
3408
|
python: {
|
|
3284
3409
|
method: 'v1.features.retrieve_feature',
|
|
3285
|
-
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)\nfeature = client.v1.features.retrieve_feature(\n "x",\n)\nprint(feature.data)',
|
|
3410
|
+
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)\nfeature = client.v1.features.retrieve_feature(\n id="x",\n)\nprint(feature.data)',
|
|
3286
3411
|
},
|
|
3287
3412
|
java: {
|
|
3288
3413
|
method: 'v1().features().retrieveFeature',
|
|
@@ -3290,7 +3415,7 @@ const EMBEDDED_METHODS = [
|
|
|
3290
3415
|
},
|
|
3291
3416
|
go: {
|
|
3292
3417
|
method: 'client.V1.Features.GetFeature',
|
|
3293
|
-
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\tfeature, err := client.V1.Features.GetFeature(
|
|
3418
|
+
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\tfeature, err := client.V1.Features.GetFeature(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1FeatureGetFeatureParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", feature.Data)\n}\n',
|
|
3294
3419
|
},
|
|
3295
3420
|
ruby: {
|
|
3296
3421
|
method: 'v1.features.retrieve_feature',
|
|
@@ -3327,9 +3452,11 @@ const EMBEDDED_METHODS = [
|
|
|
3327
3452
|
'metadata?: object;',
|
|
3328
3453
|
"meter?: { aggregation: { function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE'; field?: string; }; filters: { conditions: { field: string; operation: string; value?: string; values?: string[]; }[]; }[]; };",
|
|
3329
3454
|
"unitTransformation?: { divide: number; featureUnits?: string; featureUnitsPlural?: string; round?: 'UP' | 'DOWN'; };",
|
|
3455
|
+
'X-ACCOUNT-ID?: string;',
|
|
3456
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
3330
3457
|
],
|
|
3331
3458
|
response: "{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }",
|
|
3332
|
-
markdown: "## update_feature\n\n`client.v1.features.updateFeature(id: string, description?: string, displayName?: string, enumConfiguration?: { displayName: string; value: string; }[], featureUnits?: string, featureUnitsPlural?: string, metadata?: object, meter?: { aggregation: { function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE'; field?: string; }; filters: { conditions: object[]; }[]; }, unitTransformation?: { divide: number; featureUnits?: string; featureUnitsPlural?: string; round?: 'UP' | 'DOWN'; }): { data: object; }`\n\n**patch** `/api/v1/features/{id}`\n\nUpdates an existing feature's properties such as display name, description, and configuration.\n\n### Parameters\n\n- `id: string`\n\n- `description?: string`\n The description for the feature\n\n- `displayName?: string`\n The display name for the feature\n\n- `enumConfiguration?: { displayName: string; value: string; }[]`\n The configuration data for the feature\n\n- `featureUnits?: string`\n The units for the feature\n\n- `featureUnitsPlural?: string`\n The plural units for the feature\n\n- `metadata?: object`\n The additional metadata for the feature\n\n- `meter?: { aggregation: { function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE'; field?: string; }; filters: { conditions: { field: string; operation: string; value?: string; values?: string[]; }[]; }[]; }`\n - `aggregation: { function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE'; field?: string; }`\n - `filters: { conditions: { field: string; operation: string; value?: string; values?: string[]; }[]; }[]`\n\n- `unitTransformation?: { divide: number; featureUnits?: string; featureUnitsPlural?: string; round?: 'UP' | 'DOWN'; }`\n Unit transformation to be applied to the reported usage\n - `divide: number`\n Divide usage by this number\n - `featureUnits?: string`\n Singular feature units after the transformation\n - `featureUnitsPlural?: string`\n Plural feature units after the transformation\n - `round?: 'UP' | 'DOWN'`\n After division, either round the result up or down\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst feature = await client.v1.features.updateFeature('x');\n\nconsole.log(feature);\n```",
|
|
3459
|
+
markdown: "## update_feature\n\n`client.v1.features.updateFeature(id: string, description?: string, displayName?: string, enumConfiguration?: { displayName: string; value: string; }[], featureUnits?: string, featureUnitsPlural?: string, metadata?: object, meter?: { aggregation: { function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE'; field?: string; }; filters: { conditions: object[]; }[]; }, unitTransformation?: { divide: number; featureUnits?: string; featureUnitsPlural?: string; round?: 'UP' | 'DOWN'; }, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**patch** `/api/v1/features/{id}`\n\nUpdates an existing feature's properties such as display name, description, and configuration.\n\n### Parameters\n\n- `id: string`\n\n- `description?: string`\n The description for the feature\n\n- `displayName?: string`\n The display name for the feature\n\n- `enumConfiguration?: { displayName: string; value: string; }[]`\n The configuration data for the feature\n\n- `featureUnits?: string`\n The units for the feature\n\n- `featureUnitsPlural?: string`\n The plural units for the feature\n\n- `metadata?: object`\n The additional metadata for the feature\n\n- `meter?: { aggregation: { function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE'; field?: string; }; filters: { conditions: { field: string; operation: string; value?: string; values?: string[]; }[]; }[]; }`\n - `aggregation: { function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE'; field?: string; }`\n - `filters: { conditions: { field: string; operation: string; value?: string; values?: string[]; }[]; }[]`\n\n- `unitTransformation?: { divide: number; featureUnits?: string; featureUnitsPlural?: string; round?: 'UP' | 'DOWN'; }`\n Unit transformation to be applied to the reported usage\n - `divide: number`\n Divide usage by this number\n - `featureUnits?: string`\n Singular feature units after the transformation\n - `featureUnitsPlural?: string`\n Plural feature units after the transformation\n - `round?: 'UP' | 'DOWN'`\n After division, either round the result up or down\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst feature = await client.v1.features.updateFeature('x');\n\nconsole.log(feature);\n```",
|
|
3333
3460
|
perLanguage: {
|
|
3334
3461
|
typescript: {
|
|
3335
3462
|
method: 'client.v1.features.updateFeature',
|
|
@@ -3384,9 +3511,11 @@ const EMBEDDED_METHODS = [
|
|
|
3384
3511
|
'metadata?: object;',
|
|
3385
3512
|
"meterType?: 'None' | 'FLUCTUATING' | 'INCREMENTAL';",
|
|
3386
3513
|
"unitTransformation?: { divide: number; featureUnits?: string; featureUnitsPlural?: string; round?: 'UP' | 'DOWN'; };",
|
|
3514
|
+
'X-ACCOUNT-ID?: string;',
|
|
3515
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
3387
3516
|
],
|
|
3388
3517
|
response: "{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }",
|
|
3389
|
-
markdown: "## create_feature\n\n`client.v1.features.createFeature(id: string, displayName: string, featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM', description?: string, enumConfiguration?: { displayName: string; value: string; }[], featureStatus?: 'NEW' | 'SUSPENDED' | 'ACTIVE', featureUnits?: string, featureUnitsPlural?: string, metadata?: object, meterType?: 'None' | 'FLUCTUATING' | 'INCREMENTAL', unitTransformation?: { divide: number; featureUnits?: string; featureUnitsPlural?: string; round?: 'UP' | 'DOWN'; }): { data: object; }`\n\n**post** `/api/v1/features`\n\nCreates a new feature with the specified type, metering, and configuration.\n\n### Parameters\n\n- `id: string`\n The unique identifier for the feature\n\n- `displayName: string`\n The display name for the feature\n\n- `featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'`\n The type of the feature\n\n- `description?: string`\n The description for the feature\n\n- `enumConfiguration?: { displayName: string; value: string; }[]`\n The configuration data for the feature\n\n- `featureStatus?: 'NEW' | 'SUSPENDED' | 'ACTIVE'`\n The status of the feature\n\n- `featureUnits?: string`\n The units for the feature\n\n- `featureUnitsPlural?: string`\n The plural units for the feature\n\n- `metadata?: object`\n The additional metadata for the feature\n\n- `meterType?: 'None' | 'FLUCTUATING' | 'INCREMENTAL'`\n The meter type for the feature\n\n- `unitTransformation?: { divide: number; featureUnits?: string; featureUnitsPlural?: string; round?: 'UP' | 'DOWN'; }`\n Unit transformation to be applied to the reported usage\n - `divide: number`\n Divide usage by this number\n - `featureUnits?: string`\n Singular feature units after the transformation\n - `featureUnitsPlural?: string`\n Plural feature units after the transformation\n - `round?: 'UP' | 'DOWN'`\n After division, either round the result up or down\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst feature = await client.v1.features.createFeature({\n id: 'id',\n displayName: 'displayName',\n featureType: 'BOOLEAN',\n});\n\nconsole.log(feature);\n```",
|
|
3518
|
+
markdown: "## create_feature\n\n`client.v1.features.createFeature(id: string, displayName: string, featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM', description?: string, enumConfiguration?: { displayName: string; value: string; }[], featureStatus?: 'NEW' | 'SUSPENDED' | 'ACTIVE', featureUnits?: string, featureUnitsPlural?: string, metadata?: object, meterType?: 'None' | 'FLUCTUATING' | 'INCREMENTAL', unitTransformation?: { divide: number; featureUnits?: string; featureUnitsPlural?: string; round?: 'UP' | 'DOWN'; }, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/features`\n\nCreates a new feature with the specified type, metering, and configuration.\n\n### Parameters\n\n- `id: string`\n The unique identifier for the feature\n\n- `displayName: string`\n The display name for the feature\n\n- `featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'`\n The type of the feature\n\n- `description?: string`\n The description for the feature\n\n- `enumConfiguration?: { displayName: string; value: string; }[]`\n The configuration data for the feature\n\n- `featureStatus?: 'NEW' | 'SUSPENDED' | 'ACTIVE'`\n The status of the feature\n\n- `featureUnits?: string`\n The units for the feature\n\n- `featureUnitsPlural?: string`\n The plural units for the feature\n\n- `metadata?: object`\n The additional metadata for the feature\n\n- `meterType?: 'None' | 'FLUCTUATING' | 'INCREMENTAL'`\n The meter type for the feature\n\n- `unitTransformation?: { divide: number; featureUnits?: string; featureUnitsPlural?: string; round?: 'UP' | 'DOWN'; }`\n Unit transformation to be applied to the reported usage\n - `divide: number`\n Divide usage by this number\n - `featureUnits?: string`\n Singular feature units after the transformation\n - `featureUnitsPlural?: string`\n Plural feature units after the transformation\n - `round?: 'UP' | 'DOWN'`\n After division, either round the result up or down\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst feature = await client.v1.features.createFeature({\n id: 'id',\n displayName: 'displayName',\n featureType: 'BOOLEAN',\n});\n\nconsole.log(feature);\n```",
|
|
3390
3519
|
perLanguage: {
|
|
3391
3520
|
typescript: {
|
|
3392
3521
|
method: 'client.v1.features.createFeature',
|
|
@@ -3438,9 +3567,11 @@ const EMBEDDED_METHODS = [
|
|
|
3438
3567
|
'limit?: number;',
|
|
3439
3568
|
"meterType?: 'None' | 'FLUCTUATING' | 'INCREMENTAL'[];",
|
|
3440
3569
|
"status?: 'NEW' | 'SUSPENDED' | 'ACTIVE'[];",
|
|
3570
|
+
'X-ACCOUNT-ID?: string;',
|
|
3571
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
3441
3572
|
],
|
|
3442
3573
|
response: "{ id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }",
|
|
3443
|
-
markdown: "## list_features\n\n`client.v1.features.listFeatures(id?: string, after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, featureType?: 'BOOLEAN' | 'NUMBER' | 'ENUM'[], limit?: number, meterType?: 'None' | 'FLUCTUATING' | 'INCREMENTAL'[], status?: 'NEW' | 'SUSPENDED' | 'ACTIVE'[]): { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: object[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: object; updatedAt: string; }`\n\n**get** `/api/v1/features`\n\nRetrieves a paginated list of features in the environment.\n\n### Parameters\n\n- `id?: string`\n Filter by entity ID\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `featureType?: 'BOOLEAN' | 'NUMBER' | 'ENUM'[]`\n Filter by feature type. Supports comma-separated values for multiple types\n\n- `limit?: number`\n Maximum number of items to return\n\n- `meterType?: 'None' | 'FLUCTUATING' | 'INCREMENTAL'[]`\n Filter by meter type. Supports comma-separated values for multiple types\n\n- `status?: 'NEW' | 'SUSPENDED' | 'ACTIVE'[]`\n Filter by feature status. Supports comma-separated values for multiple statuses\n\n### Returns\n\n- `{ id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }`\n Feature configuration object\n\n - `id: string`\n - `createdAt: string`\n - `description: string`\n - `displayName: string`\n - `enumConfiguration: { displayName: string; value: string; }[]`\n - `featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'`\n - `featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'`\n - `featureUnits: string`\n - `featureUnitsPlural: string`\n - `metadata: object`\n - `meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'`\n - `unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const featureListFeaturesResponse of client.v1.features.listFeatures()) {\n console.log(featureListFeaturesResponse);\n}\n```",
|
|
3574
|
+
markdown: "## list_features\n\n`client.v1.features.listFeatures(id?: string, after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, featureType?: 'BOOLEAN' | 'NUMBER' | 'ENUM'[], limit?: number, meterType?: 'None' | 'FLUCTUATING' | 'INCREMENTAL'[], status?: 'NEW' | 'SUSPENDED' | 'ACTIVE'[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: object[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: object; updatedAt: string; }`\n\n**get** `/api/v1/features`\n\nRetrieves a paginated list of features in the environment.\n\n### Parameters\n\n- `id?: string`\n Filter by entity ID\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `featureType?: 'BOOLEAN' | 'NUMBER' | 'ENUM'[]`\n Filter by feature type. Supports comma-separated values for multiple types\n\n- `limit?: number`\n Maximum number of items to return\n\n- `meterType?: 'None' | 'FLUCTUATING' | 'INCREMENTAL'[]`\n Filter by meter type. Supports comma-separated values for multiple types\n\n- `status?: 'NEW' | 'SUSPENDED' | 'ACTIVE'[]`\n Filter by feature status. Supports comma-separated values for multiple statuses\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }`\n Feature configuration object\n\n - `id: string`\n - `createdAt: string`\n - `description: string`\n - `displayName: string`\n - `enumConfiguration: { displayName: string; value: string; }[]`\n - `featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'`\n - `featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'`\n - `featureUnits: string`\n - `featureUnitsPlural: string`\n - `metadata: object`\n - `meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'`\n - `unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const featureListFeaturesResponse of client.v1.features.listFeatures()) {\n console.log(featureListFeaturesResponse);\n}\n```",
|
|
3444
3575
|
perLanguage: {
|
|
3445
3576
|
typescript: {
|
|
3446
3577
|
method: 'client.v1.features.listFeatures',
|
|
@@ -3483,9 +3614,9 @@ const EMBEDDED_METHODS = [
|
|
|
3483
3614
|
description: 'Archives a feature, preventing it from being used in new entitlements.',
|
|
3484
3615
|
stainlessPath: '(resource) v1.features > (method) archive_feature',
|
|
3485
3616
|
qualified: 'client.v1.features.archiveFeature',
|
|
3486
|
-
params: ['id: string;'],
|
|
3617
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
3487
3618
|
response: "{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }",
|
|
3488
|
-
markdown: "## archive_feature\n\n`client.v1.features.archiveFeature(id: string): { data: object; }`\n\n**post** `/api/v1/features/{id}/archive`\n\nArchives a feature, preventing it from being used in new entitlements.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst feature = await client.v1.features.archiveFeature('x');\n\nconsole.log(feature);\n```",
|
|
3619
|
+
markdown: "## archive_feature\n\n`client.v1.features.archiveFeature(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/features/{id}/archive`\n\nArchives a feature, preventing it from being used in new entitlements.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst feature = await client.v1.features.archiveFeature('x');\n\nconsole.log(feature);\n```",
|
|
3489
3620
|
perLanguage: {
|
|
3490
3621
|
typescript: {
|
|
3491
3622
|
method: 'client.v1.features.archiveFeature',
|
|
@@ -3493,7 +3624,7 @@ const EMBEDDED_METHODS = [
|
|
|
3493
3624
|
},
|
|
3494
3625
|
python: {
|
|
3495
3626
|
method: 'v1.features.archive_feature',
|
|
3496
|
-
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)\nfeature = client.v1.features.archive_feature(\n "x",\n)\nprint(feature.data)',
|
|
3627
|
+
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)\nfeature = client.v1.features.archive_feature(\n id="x",\n)\nprint(feature.data)',
|
|
3497
3628
|
},
|
|
3498
3629
|
java: {
|
|
3499
3630
|
method: 'v1().features().archiveFeature',
|
|
@@ -3501,7 +3632,7 @@ const EMBEDDED_METHODS = [
|
|
|
3501
3632
|
},
|
|
3502
3633
|
go: {
|
|
3503
3634
|
method: 'client.V1.Features.ArchiveFeature',
|
|
3504
|
-
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\tfeature, err := client.V1.Features.ArchiveFeature(
|
|
3635
|
+
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\tfeature, err := client.V1.Features.ArchiveFeature(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1FeatureArchiveFeatureParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", feature.Data)\n}\n',
|
|
3505
3636
|
},
|
|
3506
3637
|
ruby: {
|
|
3507
3638
|
method: 'v1.features.archive_feature',
|
|
@@ -3528,9 +3659,9 @@ const EMBEDDED_METHODS = [
|
|
|
3528
3659
|
description: 'Restores an archived feature, allowing it to be used in entitlements again.',
|
|
3529
3660
|
stainlessPath: '(resource) v1.features > (method) unarchive_feature',
|
|
3530
3661
|
qualified: 'client.v1.features.unarchiveFeature',
|
|
3531
|
-
params: ['id: string;'],
|
|
3662
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
3532
3663
|
response: "{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }",
|
|
3533
|
-
markdown: "## unarchive_feature\n\n`client.v1.features.unarchiveFeature(id: string): { data: object; }`\n\n**post** `/api/v1/features/{id}/unarchive`\n\nRestores an archived feature, allowing it to be used in entitlements again.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst feature = await client.v1.features.unarchiveFeature('x');\n\nconsole.log(feature);\n```",
|
|
3664
|
+
markdown: "## unarchive_feature\n\n`client.v1.features.unarchiveFeature(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/features/{id}/unarchive`\n\nRestores an archived feature, allowing it to be used in entitlements again.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; enumConfiguration: { displayName: string; value: string; }[]; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; featureUnits: string; featureUnitsPlural: string; metadata: object; meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL'; unitTransformation: { divide: number; featureUnits: string; featureUnitsPlural: string; round: 'UP' | 'DOWN'; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst feature = await client.v1.features.unarchiveFeature('x');\n\nconsole.log(feature);\n```",
|
|
3534
3665
|
perLanguage: {
|
|
3535
3666
|
typescript: {
|
|
3536
3667
|
method: 'client.v1.features.unarchiveFeature',
|
|
@@ -3538,7 +3669,7 @@ const EMBEDDED_METHODS = [
|
|
|
3538
3669
|
},
|
|
3539
3670
|
python: {
|
|
3540
3671
|
method: 'v1.features.unarchive_feature',
|
|
3541
|
-
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)\nfeature = client.v1.features.unarchive_feature(\n "x",\n)\nprint(feature.data)',
|
|
3672
|
+
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)\nfeature = client.v1.features.unarchive_feature(\n id="x",\n)\nprint(feature.data)',
|
|
3542
3673
|
},
|
|
3543
3674
|
java: {
|
|
3544
3675
|
method: 'v1().features().unarchiveFeature',
|
|
@@ -3546,7 +3677,7 @@ const EMBEDDED_METHODS = [
|
|
|
3546
3677
|
},
|
|
3547
3678
|
go: {
|
|
3548
3679
|
method: 'client.V1.Features.UnarchiveFeature',
|
|
3549
|
-
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\tfeature, err := client.V1.Features.UnarchiveFeature(
|
|
3680
|
+
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\tfeature, err := client.V1.Features.UnarchiveFeature(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1FeatureUnarchiveFeatureParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", feature.Data)\n}\n',
|
|
3550
3681
|
},
|
|
3551
3682
|
ruby: {
|
|
3552
3683
|
method: 'v1.features.unarchive_feature',
|
|
@@ -3580,9 +3711,11 @@ const EMBEDDED_METHODS = [
|
|
|
3580
3711
|
'limit?: number;',
|
|
3581
3712
|
'productId?: string;',
|
|
3582
3713
|
"status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'[];",
|
|
3714
|
+
'X-ACCOUNT-ID?: string;',
|
|
3715
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
3583
3716
|
],
|
|
3584
3717
|
response: "{ id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }",
|
|
3585
|
-
markdown: "## list\n\n`client.v1.addons.list(after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, limit?: number, productId?: string, status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'[]): { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: object[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n**get** `/api/v1/addons`\n\nRetrieves a paginated list of addons in the environment.\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `limit?: number`\n Maximum number of items to return\n\n- `productId?: string`\n Filter by product ID\n\n- `status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'[]`\n Filter by status. Supports comma-separated values for multiple statuses\n\n### Returns\n\n- `{ id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n Addon configuration object\n\n - `id: string`\n - `billingId: string`\n - `createdAt: string`\n - `dependencies: string[]`\n - `description: string`\n - `displayName: string`\n - `entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]`\n - `isLatest: boolean`\n - `maxQuantity: number`\n - `metadata: object`\n - `pricingType: 'FREE' | 'PAID' | 'CUSTOM'`\n - `productId: string`\n - `status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'`\n - `updatedAt: string`\n - `versionNumber: number`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const addonListResponse of client.v1.addons.list()) {\n console.log(addonListResponse);\n}\n```",
|
|
3718
|
+
markdown: "## list\n\n`client.v1.addons.list(after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, limit?: number, productId?: string, status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: object[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n**get** `/api/v1/addons`\n\nRetrieves a paginated list of addons in the environment.\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `limit?: number`\n Maximum number of items to return\n\n- `productId?: string`\n Filter by product ID\n\n- `status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'[]`\n Filter by status. Supports comma-separated values for multiple statuses\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n Addon configuration object\n\n - `id: string`\n - `billingId: string`\n - `createdAt: string`\n - `dependencies: string[]`\n - `description: string`\n - `displayName: string`\n - `entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]`\n - `isLatest: boolean`\n - `maxQuantity: number`\n - `metadata: object`\n - `pricingType: 'FREE' | 'PAID' | 'CUSTOM'`\n - `productId: string`\n - `status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'`\n - `updatedAt: string`\n - `versionNumber: number`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const addonListResponse of client.v1.addons.list()) {\n console.log(addonListResponse);\n}\n```",
|
|
3586
3719
|
perLanguage: {
|
|
3587
3720
|
typescript: {
|
|
3588
3721
|
method: 'client.v1.addons.list',
|
|
@@ -3635,9 +3768,11 @@ const EMBEDDED_METHODS = [
|
|
|
3635
3768
|
'metadata?: object;',
|
|
3636
3769
|
"pricingType?: 'FREE' | 'PAID' | 'CUSTOM';",
|
|
3637
3770
|
"status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';",
|
|
3771
|
+
'X-ACCOUNT-ID?: string;',
|
|
3772
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
3638
3773
|
],
|
|
3639
3774
|
response: "{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }",
|
|
3640
|
-
markdown: "## create\n\n`client.v1.addons.create(id: string, displayName: string, productId: string, billingId?: string, description?: string, maxQuantity?: number, metadata?: object, pricingType?: 'FREE' | 'PAID' | 'CUSTOM', status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'): { data: object; }`\n\n**post** `/api/v1/addons`\n\nCreates a new addon in draft status, associated with a specific product.\n\n### Parameters\n\n- `id: string`\n The unique identifier for the entity\n\n- `displayName: string`\n The display name of the package\n\n- `productId: string`\n The product id of the package\n\n- `billingId?: string`\n The unique identifier for the entity in the billing provider\n\n- `description?: string`\n The description of the package\n\n- `maxQuantity?: number`\n The maximum quantity of this addon that can be added to a subscription\n\n- `metadata?: object`\n Metadata associated with the entity\n\n- `pricingType?: 'FREE' | 'PAID' | 'CUSTOM'`\n The pricing type of the package\n\n- `status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'`\n The status of the package\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst addon = await client.v1.addons.create({\n id: 'id',\n displayName: 'displayName',\n productId: 'productId',\n});\n\nconsole.log(addon);\n```",
|
|
3775
|
+
markdown: "## create\n\n`client.v1.addons.create(id: string, displayName: string, productId: string, billingId?: string, description?: string, maxQuantity?: number, metadata?: object, pricingType?: 'FREE' | 'PAID' | 'CUSTOM', status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED', X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/addons`\n\nCreates a new addon in draft status, associated with a specific product.\n\n### Parameters\n\n- `id: string`\n The unique identifier for the entity\n\n- `displayName: string`\n The display name of the package\n\n- `productId: string`\n The product id of the package\n\n- `billingId?: string`\n The unique identifier for the entity in the billing provider\n\n- `description?: string`\n The description of the package\n\n- `maxQuantity?: number`\n The maximum quantity of this addon that can be added to a subscription\n\n- `metadata?: object`\n Metadata associated with the entity\n\n- `pricingType?: 'FREE' | 'PAID' | 'CUSTOM'`\n The pricing type of the package\n\n- `status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'`\n The status of the package\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst addon = await client.v1.addons.create({\n id: 'id',\n displayName: 'displayName',\n productId: 'productId',\n});\n\nconsole.log(addon);\n```",
|
|
3641
3776
|
perLanguage: {
|
|
3642
3777
|
typescript: {
|
|
3643
3778
|
method: 'client.v1.addons.create',
|
|
@@ -3680,9 +3815,9 @@ const EMBEDDED_METHODS = [
|
|
|
3680
3815
|
description: 'Retrieves an addon by its unique identifier, including entitlements and pricing details.',
|
|
3681
3816
|
stainlessPath: '(resource) v1.addons > (method) retrieve',
|
|
3682
3817
|
qualified: 'client.v1.addons.retrieve',
|
|
3683
|
-
params: ['id: string;'],
|
|
3818
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
3684
3819
|
response: "{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }",
|
|
3685
|
-
markdown: "## retrieve\n\n`client.v1.addons.retrieve(id: string): { data: object; }`\n\n**get** `/api/v1/addons/{id}`\n\nRetrieves an addon by its unique identifier, including entitlements and pricing details.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst addon = await client.v1.addons.retrieve('x');\n\nconsole.log(addon);\n```",
|
|
3820
|
+
markdown: "## retrieve\n\n`client.v1.addons.retrieve(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1/addons/{id}`\n\nRetrieves an addon by its unique identifier, including entitlements and pricing details.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst addon = await client.v1.addons.retrieve('x');\n\nconsole.log(addon);\n```",
|
|
3686
3821
|
perLanguage: {
|
|
3687
3822
|
typescript: {
|
|
3688
3823
|
method: 'client.v1.addons.retrieve',
|
|
@@ -3690,7 +3825,7 @@ const EMBEDDED_METHODS = [
|
|
|
3690
3825
|
},
|
|
3691
3826
|
python: {
|
|
3692
3827
|
method: 'v1.addons.retrieve',
|
|
3693
|
-
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)\naddon = client.v1.addons.retrieve(\n "x",\n)\nprint(addon.data)',
|
|
3828
|
+
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)\naddon = client.v1.addons.retrieve(\n id="x",\n)\nprint(addon.data)',
|
|
3694
3829
|
},
|
|
3695
3830
|
java: {
|
|
3696
3831
|
method: 'v1().addons().retrieve',
|
|
@@ -3698,7 +3833,7 @@ const EMBEDDED_METHODS = [
|
|
|
3698
3833
|
},
|
|
3699
3834
|
go: {
|
|
3700
3835
|
method: 'client.V1.Addons.Get',
|
|
3701
|
-
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\taddon, err := client.V1.Addons.Get(
|
|
3836
|
+
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\taddon, err := client.V1.Addons.Get(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1AddonGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", addon.Data)\n}\n',
|
|
3702
3837
|
},
|
|
3703
3838
|
ruby: {
|
|
3704
3839
|
method: 'v1.addons.retrieve',
|
|
@@ -3735,9 +3870,11 @@ const EMBEDDED_METHODS = [
|
|
|
3735
3870
|
'maxQuantity?: number;',
|
|
3736
3871
|
'metadata?: object;',
|
|
3737
3872
|
"status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';",
|
|
3873
|
+
'X-ACCOUNT-ID?: string;',
|
|
3874
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
3738
3875
|
],
|
|
3739
3876
|
response: "{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }",
|
|
3740
|
-
markdown: "## update\n\n`client.v1.addons.update(id: string, billingId?: string, charges?: { pricingType: 'FREE' | 'PAID' | 'CUSTOM'; billingId?: string; minimumSpend?: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; minimum: object; }[]; overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY'; overagePricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: object[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; entitlement?: object; featureId?: string; topUpCustomCurrencyId?: string; }[]; pricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: object[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; monthlyResetPeriodConfiguration?: object; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; weeklyResetPeriodConfiguration?: object; yearlyResetPeriodConfiguration?: object; }[]; }, dependencies?: string[], description?: string, displayName?: string, maxQuantity?: number, metadata?: object, status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'): { data: object; }`\n\n**patch** `/api/v1/addons/{id}`\n\nUpdates an existing addon's properties such as display name, description, and metadata.\n\n### Parameters\n\n- `id: string`\n\n- `billingId?: string`\n The unique identifier for the entity in the billing provider\n\n- `charges?: { pricingType: 'FREE' | 'PAID' | 'CUSTOM'; billingId?: string; minimumSpend?: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; minimum: { amount: number; currency?: string; }; }[]; overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY'; overagePricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; entitlement?: { featureId: string; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }; featureId?: string; topUpCustomCurrencyId?: string; }[]; pricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }[]; }`\n Pricing configuration to set on the addon draft\n - `pricingType: 'FREE' | 'PAID' | 'CUSTOM'`\n The pricing type (FREE, PAID, or CUSTOM)\n - `billingId?: string`\n Deprecated: billing integration ID\n - `minimumSpend?: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; minimum: { amount: number; currency?: string; }; }[]`\n Minimum spend configuration per billing period\n - `overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY'`\n When overage charges are billed\n - `overagePricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: { amount: number; currency?: string; }; unitPrice?: { amount: number; currency?: string; }; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; entitlement?: { featureId: string; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }; featureId?: string; topUpCustomCurrencyId?: string; }[]`\n Array of overage pricing model configurations\n - `pricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: { amount: number; currency?: string; }; unitPrice?: { amount: number; currency?: string; }; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }[]`\n Array of pricing model configurations\n\n- `dependencies?: string[]`\n List of addons the addon is dependant on\n\n- `description?: string`\n The description of the package\n\n- `displayName?: string`\n The display name of the package\n\n- `maxQuantity?: number`\n The maximum quantity of this addon that can be added to a subscription\n\n- `metadata?: object`\n Metadata associated with the entity\n\n- `status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'`\n The status of the package\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst addon = await client.v1.addons.update('x');\n\nconsole.log(addon);\n```",
|
|
3877
|
+
markdown: "## update\n\n`client.v1.addons.update(id: string, billingId?: string, charges?: { pricingType: 'FREE' | 'PAID' | 'CUSTOM'; billingId?: string; minimumSpend?: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; minimum: object; }[]; overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY'; overagePricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: object[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; entitlement?: object; featureId?: string; topUpCustomCurrencyId?: string; }[]; pricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: object[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; monthlyResetPeriodConfiguration?: object; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; weeklyResetPeriodConfiguration?: object; yearlyResetPeriodConfiguration?: object; }[]; }, dependencies?: string[], description?: string, displayName?: string, maxQuantity?: number, metadata?: object, status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED', X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**patch** `/api/v1/addons/{id}`\n\nUpdates an existing addon's properties such as display name, description, and metadata.\n\n### Parameters\n\n- `id: string`\n\n- `billingId?: string`\n The unique identifier for the entity in the billing provider\n\n- `charges?: { pricingType: 'FREE' | 'PAID' | 'CUSTOM'; billingId?: string; minimumSpend?: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; minimum: { amount: number; currency?: string; }; }[]; overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY'; overagePricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; entitlement?: { featureId: string; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }; featureId?: string; topUpCustomCurrencyId?: string; }[]; pricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }[]; }`\n Pricing configuration to set on the addon draft\n - `pricingType: 'FREE' | 'PAID' | 'CUSTOM'`\n The pricing type (FREE, PAID, or CUSTOM)\n - `billingId?: string`\n Deprecated: billing integration ID\n - `minimumSpend?: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; minimum: { amount: number; currency?: string; }; }[]`\n Minimum spend configuration per billing period\n - `overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY'`\n When overage charges are billed\n - `overagePricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: { amount: number; currency?: string; }; unitPrice?: { amount: number; currency?: string; }; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; entitlement?: { featureId: string; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }; featureId?: string; topUpCustomCurrencyId?: string; }[]`\n Array of overage pricing model configurations\n - `pricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: { amount: number; currency?: string; }; unitPrice?: { amount: number; currency?: string; }; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }[]`\n Array of pricing model configurations\n\n- `dependencies?: string[]`\n List of addons the addon is dependant on\n\n- `description?: string`\n The description of the package\n\n- `displayName?: string`\n The display name of the package\n\n- `maxQuantity?: number`\n The maximum quantity of this addon that can be added to a subscription\n\n- `metadata?: object`\n Metadata associated with the entity\n\n- `status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'`\n The status of the package\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst addon = await client.v1.addons.update('x');\n\nconsole.log(addon);\n```",
|
|
3741
3878
|
perLanguage: {
|
|
3742
3879
|
typescript: {
|
|
3743
3880
|
method: 'client.v1.addons.update',
|
|
@@ -3780,9 +3917,9 @@ const EMBEDDED_METHODS = [
|
|
|
3780
3917
|
description: 'Archives an addon, preventing it from being used in new subscriptions.',
|
|
3781
3918
|
stainlessPath: '(resource) v1.addons > (method) archive',
|
|
3782
3919
|
qualified: 'client.v1.addons.archive',
|
|
3783
|
-
params: ['id: string;'],
|
|
3920
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
3784
3921
|
response: "{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }",
|
|
3785
|
-
markdown: "## archive\n\n`client.v1.addons.archive(id: string): { data: object; }`\n\n**post** `/api/v1/addons/{id}/archive`\n\nArchives an addon, preventing it from being used in new subscriptions.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst addon = await client.v1.addons.archive('x');\n\nconsole.log(addon);\n```",
|
|
3922
|
+
markdown: "## archive\n\n`client.v1.addons.archive(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/addons/{id}/archive`\n\nArchives an addon, preventing it from being used in new subscriptions.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst addon = await client.v1.addons.archive('x');\n\nconsole.log(addon);\n```",
|
|
3786
3923
|
perLanguage: {
|
|
3787
3924
|
typescript: {
|
|
3788
3925
|
method: 'client.v1.addons.archive',
|
|
@@ -3790,7 +3927,7 @@ const EMBEDDED_METHODS = [
|
|
|
3790
3927
|
},
|
|
3791
3928
|
python: {
|
|
3792
3929
|
method: 'v1.addons.archive',
|
|
3793
|
-
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)\naddon = client.v1.addons.archive(\n "x",\n)\nprint(addon.data)',
|
|
3930
|
+
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)\naddon = client.v1.addons.archive(\n id="x",\n)\nprint(addon.data)',
|
|
3794
3931
|
},
|
|
3795
3932
|
java: {
|
|
3796
3933
|
method: 'v1().addons().archive',
|
|
@@ -3798,7 +3935,7 @@ const EMBEDDED_METHODS = [
|
|
|
3798
3935
|
},
|
|
3799
3936
|
go: {
|
|
3800
3937
|
method: 'client.V1.Addons.Archive',
|
|
3801
|
-
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\taddon, err := client.V1.Addons.Archive(
|
|
3938
|
+
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\taddon, err := client.V1.Addons.Archive(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1AddonArchiveParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", addon.Data)\n}\n',
|
|
3802
3939
|
},
|
|
3803
3940
|
ruby: {
|
|
3804
3941
|
method: 'v1.addons.archive',
|
|
@@ -3825,9 +3962,14 @@ const EMBEDDED_METHODS = [
|
|
|
3825
3962
|
description: 'Publishes a draft addon, making it available for use in subscriptions.',
|
|
3826
3963
|
stainlessPath: '(resource) v1.addons > (method) publish',
|
|
3827
3964
|
qualified: 'client.v1.addons.publish',
|
|
3828
|
-
params: [
|
|
3965
|
+
params: [
|
|
3966
|
+
'id: string;',
|
|
3967
|
+
"migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS';",
|
|
3968
|
+
'X-ACCOUNT-ID?: string;',
|
|
3969
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
3970
|
+
],
|
|
3829
3971
|
response: '{ data: { taskId: string; }; }',
|
|
3830
|
-
markdown: "## publish\n\n`client.v1.addons.publish(id: string, migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS'): { data: object; }`\n\n**post** `/api/v1/addons/{id}/publish`\n\nPublishes a draft addon, making it available for use in subscriptions.\n\n### Parameters\n\n- `id: string`\n\n- `migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS'`\n The migration type of the package\n\n### Returns\n\n- `{ data: { taskId: string; }; }`\n Response containing task ID for publish operation\n\n - `data: { taskId: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.addons.publish('x', { migrationType: 'NEW_CUSTOMERS' });\n\nconsole.log(response);\n```",
|
|
3972
|
+
markdown: "## publish\n\n`client.v1.addons.publish(id: string, migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS', X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/addons/{id}/publish`\n\nPublishes a draft addon, making it available for use in subscriptions.\n\n### Parameters\n\n- `id: string`\n\n- `migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS'`\n The migration type of the package\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { taskId: string; }; }`\n Response containing task ID for publish operation\n\n - `data: { taskId: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.addons.publish('x', { migrationType: 'NEW_CUSTOMERS' });\n\nconsole.log(response);\n```",
|
|
3831
3973
|
perLanguage: {
|
|
3832
3974
|
typescript: {
|
|
3833
3975
|
method: 'client.v1.addons.publish',
|
|
@@ -3870,9 +4012,9 @@ const EMBEDDED_METHODS = [
|
|
|
3870
4012
|
description: 'Creates a draft version of an existing addon for modification before publishing.',
|
|
3871
4013
|
stainlessPath: '(resource) v1.addons > (method) create_draft',
|
|
3872
4014
|
qualified: 'client.v1.addons.createDraft',
|
|
3873
|
-
params: ['id: string;'],
|
|
4015
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
3874
4016
|
response: "{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }",
|
|
3875
|
-
markdown: "## create_draft\n\n`client.v1.addons.createDraft(id: string): { data: object; }`\n\n**post** `/api/v1/addons/{id}/draft`\n\nCreates a draft version of an existing addon for modification before publishing.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst addon = await client.v1.addons.createDraft('x');\n\nconsole.log(addon);\n```",
|
|
4017
|
+
markdown: "## create_draft\n\n`client.v1.addons.createDraft(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/addons/{id}/draft`\n\nCreates a draft version of an existing addon for modification before publishing.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; dependencies: string[]; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; maxQuantity: number; metadata: object; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst addon = await client.v1.addons.createDraft('x');\n\nconsole.log(addon);\n```",
|
|
3876
4018
|
perLanguage: {
|
|
3877
4019
|
typescript: {
|
|
3878
4020
|
method: 'client.v1.addons.createDraft',
|
|
@@ -3880,7 +4022,7 @@ const EMBEDDED_METHODS = [
|
|
|
3880
4022
|
},
|
|
3881
4023
|
python: {
|
|
3882
4024
|
method: 'v1.addons.create_draft',
|
|
3883
|
-
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)\naddon = client.v1.addons.create_draft(\n "x",\n)\nprint(addon.data)',
|
|
4025
|
+
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)\naddon = client.v1.addons.create_draft(\n id="x",\n)\nprint(addon.data)',
|
|
3884
4026
|
},
|
|
3885
4027
|
java: {
|
|
3886
4028
|
method: 'v1().addons().createDraft',
|
|
@@ -3888,7 +4030,7 @@ const EMBEDDED_METHODS = [
|
|
|
3888
4030
|
},
|
|
3889
4031
|
go: {
|
|
3890
4032
|
method: 'client.V1.Addons.NewDraft',
|
|
3891
|
-
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\taddon, err := client.V1.Addons.NewDraft(
|
|
4033
|
+
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\taddon, err := client.V1.Addons.NewDraft(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1AddonNewDraftParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", addon.Data)\n}\n',
|
|
3892
4034
|
},
|
|
3893
4035
|
ruby: {
|
|
3894
4036
|
method: 'v1.addons.create_draft',
|
|
@@ -3915,9 +4057,9 @@ const EMBEDDED_METHODS = [
|
|
|
3915
4057
|
description: 'Removes a draft version of an addon.',
|
|
3916
4058
|
stainlessPath: '(resource) v1.addons > (method) remove_draft',
|
|
3917
4059
|
qualified: 'client.v1.addons.removeDraft',
|
|
3918
|
-
params: ['id: string;'],
|
|
4060
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
3919
4061
|
response: '{ data: { id: string; }; }',
|
|
3920
|
-
markdown: "## remove_draft\n\n`client.v1.addons.removeDraft(id: string): { data: object; }`\n\n**delete** `/api/v1/addons/{id}/draft`\n\nRemoves a draft version of an addon.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; }; }`\n Response confirming the addon draft was removed.\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.addons.removeDraft('x');\n\nconsole.log(response);\n```",
|
|
4062
|
+
markdown: "## remove_draft\n\n`client.v1.addons.removeDraft(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**delete** `/api/v1/addons/{id}/draft`\n\nRemoves a draft version of an addon.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; }; }`\n Response confirming the addon draft was removed.\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.addons.removeDraft('x');\n\nconsole.log(response);\n```",
|
|
3921
4063
|
perLanguage: {
|
|
3922
4064
|
typescript: {
|
|
3923
4065
|
method: 'client.v1.addons.removeDraft',
|
|
@@ -3925,7 +4067,7 @@ const EMBEDDED_METHODS = [
|
|
|
3925
4067
|
},
|
|
3926
4068
|
python: {
|
|
3927
4069
|
method: 'v1.addons.remove_draft',
|
|
3928
|
-
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)\nresponse = client.v1.addons.remove_draft(\n "x",\n)\nprint(response.data)',
|
|
4070
|
+
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)\nresponse = client.v1.addons.remove_draft(\n id="x",\n)\nprint(response.data)',
|
|
3929
4071
|
},
|
|
3930
4072
|
java: {
|
|
3931
4073
|
method: 'v1().addons().removeDraft',
|
|
@@ -3933,7 +4075,7 @@ const EMBEDDED_METHODS = [
|
|
|
3933
4075
|
},
|
|
3934
4076
|
go: {
|
|
3935
4077
|
method: 'client.V1.Addons.RemoveDraft',
|
|
3936
|
-
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\tresponse, err := client.V1.Addons.RemoveDraft(
|
|
4078
|
+
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\tresponse, err := client.V1.Addons.RemoveDraft(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1AddonRemoveDraftParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
3937
4079
|
},
|
|
3938
4080
|
ruby: {
|
|
3939
4081
|
method: 'v1.addons.remove_draft',
|
|
@@ -3960,9 +4102,16 @@ const EMBEDDED_METHODS = [
|
|
|
3960
4102
|
description: 'Retrieves the list of charges configured on an addon.',
|
|
3961
4103
|
stainlessPath: '(resource) v1.addons > (method) list_charges',
|
|
3962
4104
|
qualified: 'client.v1.addons.listCharges',
|
|
3963
|
-
params: [
|
|
4105
|
+
params: [
|
|
4106
|
+
'id: string;',
|
|
4107
|
+
'after?: string;',
|
|
4108
|
+
'before?: string;',
|
|
4109
|
+
'limit?: number;',
|
|
4110
|
+
'X-ACCOUNT-ID?: string;',
|
|
4111
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
4112
|
+
],
|
|
3964
4113
|
response: "{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }",
|
|
3965
|
-
markdown: "## list_charges\n\n`client.v1.addons.listCharges(id: string, after?: string, before?: string, limit?: number): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: object; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: object; tiers?: object[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n\n**get** `/api/v1/addons/{id}/charges`\n\nRetrieves the list of charges configured on an addon.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n A single pricing row on a plan or addon. Each charge encodes one (billingPeriod, billingModel, billingCadence, billingCountryCode) combination. Plans and addons own many of these — one per currency / billing period / feature.\n\n - `id: string`\n - `billingCadence: 'RECURRING' | 'ONE_OFF'`\n - `billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'`\n - `billingPeriod: 'MONTHLY' | 'ANNUALLY'`\n - `createdAt: string`\n - `billingCountryCode?: string`\n - `billingId?: string`\n - `blockSize?: number`\n - `creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'`\n - `creditRate?: { amount: number; currencyId: string; costFormula?: string; }`\n - `crmId?: string`\n - `crmLinkUrl?: string`\n - `featureId?: string`\n - `maxUnitQuantity?: number`\n - `minUnitQuantity?: number`\n - `price?: { amount: number; currency: string; }`\n - `tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]`\n - `tiersMode?: 'VOLUME' | 'GRADUATED'`\n - `topUpCustomCurrencyId?: string`\n - `usedInSubscriptions?: boolean`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const addonListChargesResponse of client.v1.addons.listCharges('x')) {\n console.log(addonListChargesResponse);\n}\n```",
|
|
4114
|
+
markdown: "## list_charges\n\n`client.v1.addons.listCharges(id: string, after?: string, before?: string, limit?: number, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: object; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: object; tiers?: object[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n\n**get** `/api/v1/addons/{id}/charges`\n\nRetrieves the list of charges configured on an addon.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n A single pricing row on a plan or addon. Each charge encodes one (billingPeriod, billingModel, billingCadence, billingCountryCode) combination. Plans and addons own many of these — one per currency / billing period / feature.\n\n - `id: string`\n - `billingCadence: 'RECURRING' | 'ONE_OFF'`\n - `billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'`\n - `billingPeriod: 'MONTHLY' | 'ANNUALLY'`\n - `createdAt: string`\n - `billingCountryCode?: string`\n - `billingId?: string`\n - `blockSize?: number`\n - `creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'`\n - `creditRate?: { amount: number; currencyId: string; costFormula?: string; }`\n - `crmId?: string`\n - `crmLinkUrl?: string`\n - `featureId?: string`\n - `maxUnitQuantity?: number`\n - `minUnitQuantity?: number`\n - `price?: { amount: number; currency: string; }`\n - `tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]`\n - `tiersMode?: 'VOLUME' | 'GRADUATED'`\n - `topUpCustomCurrencyId?: string`\n - `usedInSubscriptions?: boolean`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const addonListChargesResponse of client.v1.addons.listCharges('x')) {\n console.log(addonListChargesResponse);\n}\n```",
|
|
3966
4115
|
perLanguage: {
|
|
3967
4116
|
typescript: {
|
|
3968
4117
|
method: 'client.v1.addons.listCharges',
|
|
@@ -4005,9 +4154,9 @@ const EMBEDDED_METHODS = [
|
|
|
4005
4154
|
description: 'Retrieves a list of entitlements for an addon.',
|
|
4006
4155
|
stainlessPath: '(resource) v1.addons.entitlements > (method) list',
|
|
4007
4156
|
qualified: 'client.v1.addons.entitlements.list',
|
|
4008
|
-
params: ['addonId: string;'],
|
|
4157
|
+
params: ['addonId: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
4009
4158
|
response: "{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]; pagination: { next: string; prev: string; }; }",
|
|
4010
|
-
markdown: "## list\n\n`client.v1.addons.entitlements.list(addonId: string): { data: object | object[]; pagination: object; }`\n\n**get** `/api/v1/addons/{addonId}/entitlements`\n\nRetrieves a list of entitlements for an addon.\n\n### Parameters\n\n- `addonId: string`\n\n### Returns\n\n- `{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]; pagination: { next: string; prev: string; }; }`\n Response list object\n\n - `data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]`\n - `pagination: { next: string; prev: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst entitlements = await client.v1.addons.entitlements.list('addonId');\n\nconsole.log(entitlements);\n```",
|
|
4159
|
+
markdown: "## list\n\n`client.v1.addons.entitlements.list(addonId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object | object[]; pagination: object; }`\n\n**get** `/api/v1/addons/{addonId}/entitlements`\n\nRetrieves a list of entitlements for an addon.\n\n### Parameters\n\n- `addonId: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]; pagination: { next: string; prev: string; }; }`\n Response list object\n\n - `data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]`\n - `pagination: { next: string; prev: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst entitlements = await client.v1.addons.entitlements.list('addonId');\n\nconsole.log(entitlements);\n```",
|
|
4011
4160
|
perLanguage: {
|
|
4012
4161
|
typescript: {
|
|
4013
4162
|
method: 'client.v1.addons.entitlements.list',
|
|
@@ -4015,7 +4164,7 @@ const EMBEDDED_METHODS = [
|
|
|
4015
4164
|
},
|
|
4016
4165
|
python: {
|
|
4017
4166
|
method: 'v1.addons.entitlements.list',
|
|
4018
|
-
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)\nentitlements = client.v1.addons.entitlements.list(\n "addonId",\n)\nprint(entitlements.data)',
|
|
4167
|
+
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)\nentitlements = client.v1.addons.entitlements.list(\n addon_id="addonId",\n)\nprint(entitlements.data)',
|
|
4019
4168
|
},
|
|
4020
4169
|
java: {
|
|
4021
4170
|
method: 'v1().addons().entitlements().list',
|
|
@@ -4023,7 +4172,7 @@ const EMBEDDED_METHODS = [
|
|
|
4023
4172
|
},
|
|
4024
4173
|
go: {
|
|
4025
4174
|
method: 'client.V1.Addons.Entitlements.List',
|
|
4026
|
-
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\tentitlements, err := client.V1.Addons.Entitlements.List(
|
|
4175
|
+
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\tentitlements, err := client.V1.Addons.Entitlements.List(\n\t\tcontext.TODO(),\n\t\t"addonId",\n\t\tstigg.V1AddonEntitlementListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", entitlements.Data)\n}\n',
|
|
4027
4176
|
},
|
|
4028
4177
|
ruby: {
|
|
4029
4178
|
method: 'v1.addons.entitlements.list',
|
|
@@ -4053,9 +4202,11 @@ const EMBEDDED_METHODS = [
|
|
|
4053
4202
|
params: [
|
|
4054
4203
|
'addonId: string;',
|
|
4055
4204
|
"entitlements: { id: string; type: 'FEATURE'; behavior?: 'Increment' | 'Override'; description?: string; displayNameOverride?: string; enumValues?: string[]; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; order?: number; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; behavior?: 'Increment' | 'Override'; dependencyFeatureId?: string; description?: string; displayNameOverride?: string; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; order?: number; }[];",
|
|
4205
|
+
'X-ACCOUNT-ID?: string;',
|
|
4206
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
4056
4207
|
],
|
|
4057
4208
|
response: "{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]; }",
|
|
4058
|
-
markdown: "## create\n\n`client.v1.addons.entitlements.create(addonId: string, entitlements: { id: string; type: 'FEATURE'; behavior?: 'Increment' | 'Override'; description?: string; displayNameOverride?: string; enumValues?: string[]; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; order?: number; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; behavior?: 'Increment' | 'Override'; dependencyFeatureId?: string; description?: string; displayNameOverride?: string; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; order?: number; }[]): { data: object | object[]; }`\n\n**post** `/api/v1/addons/{addonId}/entitlements`\n\nCreates one or more entitlements (feature or credit) on a draft addon.\n\n### Parameters\n\n- `addonId: string`\n\n- `entitlements: { id: string; type: 'FEATURE'; behavior?: 'Increment' | 'Override'; description?: string; displayNameOverride?: string; enumValues?: string[]; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; order?: number; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; behavior?: 'Increment' | 'Override'; dependencyFeatureId?: string; description?: string; displayNameOverride?: string; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; order?: number; }[]`\n Entitlements to create\n\n### Returns\n\n- `{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]; }`\n Response object\n\n - `data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst entitlement = await client.v1.addons.entitlements.create('addonId', { entitlements: [{ id: 'id', type: 'FEATURE' }] });\n\nconsole.log(entitlement);\n```",
|
|
4209
|
+
markdown: "## create\n\n`client.v1.addons.entitlements.create(addonId: string, entitlements: { id: string; type: 'FEATURE'; behavior?: 'Increment' | 'Override'; description?: string; displayNameOverride?: string; enumValues?: string[]; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; order?: number; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; behavior?: 'Increment' | 'Override'; dependencyFeatureId?: string; description?: string; displayNameOverride?: string; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; order?: number; }[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object | object[]; }`\n\n**post** `/api/v1/addons/{addonId}/entitlements`\n\nCreates one or more entitlements (feature or credit) on a draft addon.\n\n### Parameters\n\n- `addonId: string`\n\n- `entitlements: { id: string; type: 'FEATURE'; behavior?: 'Increment' | 'Override'; description?: string; displayNameOverride?: string; enumValues?: string[]; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; order?: number; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; behavior?: 'Increment' | 'Override'; dependencyFeatureId?: string; description?: string; displayNameOverride?: string; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; order?: number; }[]`\n Entitlements to create\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]; }`\n Response object\n\n - `data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst entitlement = await client.v1.addons.entitlements.create('addonId', { entitlements: [{ id: 'id', type: 'FEATURE' }] });\n\nconsole.log(entitlement);\n```",
|
|
4059
4210
|
perLanguage: {
|
|
4060
4211
|
typescript: {
|
|
4061
4212
|
method: 'client.v1.addons.entitlements.create',
|
|
@@ -4102,6 +4253,8 @@ const EMBEDDED_METHODS = [
|
|
|
4102
4253
|
'addonId: string;',
|
|
4103
4254
|
'id: string;',
|
|
4104
4255
|
"body: { type: 'FEATURE'; behavior?: 'Increment' | 'Override'; description?: string; displayNameOverride?: string; enumValues?: string[]; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; order?: number; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { type: 'CREDIT'; amount?: number; behavior?: 'Increment' | 'Override'; cadence?: 'MONTH' | 'YEAR'; dependencyFeatureId?: string; description?: string; displayNameOverride?: string; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; order?: number; };",
|
|
4256
|
+
'X-ACCOUNT-ID?: string;',
|
|
4257
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
4105
4258
|
],
|
|
4106
4259
|
response: "{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }; }",
|
|
4107
4260
|
perLanguage: {
|
|
@@ -4146,9 +4299,9 @@ const EMBEDDED_METHODS = [
|
|
|
4146
4299
|
description: 'Deletes an entitlement from a draft addon.',
|
|
4147
4300
|
stainlessPath: '(resource) v1.addons.entitlements > (method) delete',
|
|
4148
4301
|
qualified: 'client.v1.addons.entitlements.delete',
|
|
4149
|
-
params: ['addonId: string;', 'id: string;'],
|
|
4302
|
+
params: ['addonId: string;', 'id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
4150
4303
|
response: "{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }; }",
|
|
4151
|
-
markdown: "## delete\n\n`client.v1.addons.entitlements.delete(addonId: string, id: string): { data: object | object; }`\n\n**delete** `/api/v1/addons/{addonId}/entitlements/{id}`\n\nDeletes an entitlement from a draft addon.\n\n### Parameters\n\n- `addonId: string`\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }; }`\n Response object\n\n - `data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst addonPackageEntitlement = await client.v1.addons.entitlements.delete('id', { addonId: 'addonId' });\n\nconsole.log(addonPackageEntitlement);\n```",
|
|
4304
|
+
markdown: "## delete\n\n`client.v1.addons.entitlements.delete(addonId: string, id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object | object; }`\n\n**delete** `/api/v1/addons/{addonId}/entitlements/{id}`\n\nDeletes an entitlement from a draft addon.\n\n### Parameters\n\n- `addonId: string`\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }; }`\n Response object\n\n - `data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst addonPackageEntitlement = await client.v1.addons.entitlements.delete('id', { addonId: 'addonId' });\n\nconsole.log(addonPackageEntitlement);\n```",
|
|
4152
4305
|
perLanguage: {
|
|
4153
4306
|
typescript: {
|
|
4154
4307
|
method: 'client.v1.addons.entitlements.delete',
|
|
@@ -4202,9 +4355,11 @@ const EMBEDDED_METHODS = [
|
|
|
4202
4355
|
'parentPlanId?: string;',
|
|
4203
4356
|
"pricingType?: 'FREE' | 'PAID' | 'CUSTOM';",
|
|
4204
4357
|
"status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';",
|
|
4358
|
+
'X-ACCOUNT-ID?: string;',
|
|
4359
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
4205
4360
|
],
|
|
4206
4361
|
response: "{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }",
|
|
4207
|
-
markdown: "## create\n\n`client.v1.plans.create(id: string, displayName: string, productId: string, billingId?: string, defaultTrialConfig?: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }, description?: string, metadata?: object, parentPlanId?: string, pricingType?: 'FREE' | 'PAID' | 'CUSTOM', status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'): { data: object; }`\n\n**post** `/api/v1/plans`\n\nCreates a new plan in draft status.\n\n### Parameters\n\n- `id: string`\n The unique identifier for the entity\n\n- `displayName: string`\n The display name of the package\n\n- `productId: string`\n The product ID to associate the plan with\n\n- `billingId?: string`\n The unique identifier for the entity in the billing provider\n\n- `defaultTrialConfig?: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }`\n Default trial configuration for the plan\n - `duration: number`\n The duration of the trial in the specified units\n - `units: 'DAY' | 'MONTH'`\n The time unit for the trial duration (DAY or MONTH)\n - `budget?: { hasSoftLimit: boolean; limit: number; }`\n Budget configuration for the trial\n - `trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'`\n Behavior when the trial ends (CONVERT_TO_PAID or CANCEL_SUBSCRIPTION)\n\n- `description?: string`\n The description of the package\n\n- `metadata?: object`\n Metadata associated with the entity\n\n- `parentPlanId?: string`\n The ID of the parent plan, if applicable\n\n- `pricingType?: 'FREE' | 'PAID' | 'CUSTOM'`\n The pricing type of the package\n\n- `status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'`\n The status of the package\n\n### Returns\n\n- `{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst plan = await client.v1.plans.create({\n id: 'id',\n displayName: 'displayName',\n productId: 'productId',\n});\n\nconsole.log(plan);\n```",
|
|
4362
|
+
markdown: "## create\n\n`client.v1.plans.create(id: string, displayName: string, productId: string, billingId?: string, defaultTrialConfig?: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }, description?: string, metadata?: object, parentPlanId?: string, pricingType?: 'FREE' | 'PAID' | 'CUSTOM', status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED', X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/plans`\n\nCreates a new plan in draft status.\n\n### Parameters\n\n- `id: string`\n The unique identifier for the entity\n\n- `displayName: string`\n The display name of the package\n\n- `productId: string`\n The product ID to associate the plan with\n\n- `billingId?: string`\n The unique identifier for the entity in the billing provider\n\n- `defaultTrialConfig?: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }`\n Default trial configuration for the plan\n - `duration: number`\n The duration of the trial in the specified units\n - `units: 'DAY' | 'MONTH'`\n The time unit for the trial duration (DAY or MONTH)\n - `budget?: { hasSoftLimit: boolean; limit: number; }`\n Budget configuration for the trial\n - `trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'`\n Behavior when the trial ends (CONVERT_TO_PAID or CANCEL_SUBSCRIPTION)\n\n- `description?: string`\n The description of the package\n\n- `metadata?: object`\n Metadata associated with the entity\n\n- `parentPlanId?: string`\n The ID of the parent plan, if applicable\n\n- `pricingType?: 'FREE' | 'PAID' | 'CUSTOM'`\n The pricing type of the package\n\n- `status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'`\n The status of the package\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst plan = await client.v1.plans.create({\n id: 'id',\n displayName: 'displayName',\n productId: 'productId',\n});\n\nconsole.log(plan);\n```",
|
|
4208
4363
|
perLanguage: {
|
|
4209
4364
|
typescript: {
|
|
4210
4365
|
method: 'client.v1.plans.create',
|
|
@@ -4254,9 +4409,11 @@ const EMBEDDED_METHODS = [
|
|
|
4254
4409
|
'limit?: number;',
|
|
4255
4410
|
'productId?: string;',
|
|
4256
4411
|
"status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'[];",
|
|
4412
|
+
'X-ACCOUNT-ID?: string;',
|
|
4413
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
4257
4414
|
],
|
|
4258
4415
|
response: "{ id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }",
|
|
4259
|
-
markdown: "## list\n\n`client.v1.plans.list(after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, limit?: number, productId?: string, status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'[]): { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: object; description: string; displayName: string; entitlements: object[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n**get** `/api/v1/plans`\n\nRetrieves a paginated list of plans in the environment.\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `limit?: number`\n Maximum number of items to return\n\n- `productId?: string`\n Filter by product ID\n\n- `status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'[]`\n Filter by status. Supports comma-separated values for multiple statuses\n\n### Returns\n\n- `{ id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n Plan configuration object\n\n - `id: string`\n - `billingId: string`\n - `compatibleAddonIds: string[]`\n - `createdAt: string`\n - `defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }`\n - `description: string`\n - `displayName: string`\n - `entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]`\n - `isLatest: boolean`\n - `metadata: object`\n - `parentPlanId: string`\n - `pricingType: 'FREE' | 'PAID' | 'CUSTOM'`\n - `productId: string`\n - `status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'`\n - `updatedAt: string`\n - `versionNumber: number`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const planListResponse of client.v1.plans.list()) {\n console.log(planListResponse);\n}\n```",
|
|
4416
|
+
markdown: "## list\n\n`client.v1.plans.list(after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, limit?: number, productId?: string, status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: object; description: string; displayName: string; entitlements: object[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n**get** `/api/v1/plans`\n\nRetrieves a paginated list of plans in the environment.\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `limit?: number`\n Maximum number of items to return\n\n- `productId?: string`\n Filter by product ID\n\n- `status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'[]`\n Filter by status. Supports comma-separated values for multiple statuses\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n Plan configuration object\n\n - `id: string`\n - `billingId: string`\n - `compatibleAddonIds: string[]`\n - `createdAt: string`\n - `defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }`\n - `description: string`\n - `displayName: string`\n - `entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]`\n - `isLatest: boolean`\n - `metadata: object`\n - `parentPlanId: string`\n - `pricingType: 'FREE' | 'PAID' | 'CUSTOM'`\n - `productId: string`\n - `status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'`\n - `updatedAt: string`\n - `versionNumber: number`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const planListResponse of client.v1.plans.list()) {\n console.log(planListResponse);\n}\n```",
|
|
4260
4417
|
perLanguage: {
|
|
4261
4418
|
typescript: {
|
|
4262
4419
|
method: 'client.v1.plans.list',
|
|
@@ -4299,9 +4456,9 @@ const EMBEDDED_METHODS = [
|
|
|
4299
4456
|
description: 'Retrieves a plan by its unique identifier, including entitlements and pricing details.',
|
|
4300
4457
|
stainlessPath: '(resource) v1.plans > (method) retrieve',
|
|
4301
4458
|
qualified: 'client.v1.plans.retrieve',
|
|
4302
|
-
params: ['id: string;'],
|
|
4459
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
4303
4460
|
response: "{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }",
|
|
4304
|
-
markdown: "## retrieve\n\n`client.v1.plans.retrieve(id: string): { data: object; }`\n\n**get** `/api/v1/plans/{id}`\n\nRetrieves a plan by its unique identifier, including entitlements and pricing details.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst plan = await client.v1.plans.retrieve('x');\n\nconsole.log(plan);\n```",
|
|
4461
|
+
markdown: "## retrieve\n\n`client.v1.plans.retrieve(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1/plans/{id}`\n\nRetrieves a plan by its unique identifier, including entitlements and pricing details.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst plan = await client.v1.plans.retrieve('x');\n\nconsole.log(plan);\n```",
|
|
4305
4462
|
perLanguage: {
|
|
4306
4463
|
typescript: {
|
|
4307
4464
|
method: 'client.v1.plans.retrieve',
|
|
@@ -4309,7 +4466,7 @@ const EMBEDDED_METHODS = [
|
|
|
4309
4466
|
},
|
|
4310
4467
|
python: {
|
|
4311
4468
|
method: 'v1.plans.retrieve',
|
|
4312
|
-
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)\nplan = client.v1.plans.retrieve(\n "x",\n)\nprint(plan.data)',
|
|
4469
|
+
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)\nplan = client.v1.plans.retrieve(\n id="x",\n)\nprint(plan.data)',
|
|
4313
4470
|
},
|
|
4314
4471
|
java: {
|
|
4315
4472
|
method: 'v1().plans().retrieve',
|
|
@@ -4317,7 +4474,7 @@ const EMBEDDED_METHODS = [
|
|
|
4317
4474
|
},
|
|
4318
4475
|
go: {
|
|
4319
4476
|
method: 'client.V1.Plans.Get',
|
|
4320
|
-
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\tplan, err := client.V1.Plans.Get(
|
|
4477
|
+
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\tplan, err := client.V1.Plans.Get(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1PlanGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", plan.Data)\n}\n',
|
|
4321
4478
|
},
|
|
4322
4479
|
ruby: {
|
|
4323
4480
|
method: 'v1.plans.retrieve',
|
|
@@ -4354,9 +4511,11 @@ const EMBEDDED_METHODS = [
|
|
|
4354
4511
|
'displayName?: string;',
|
|
4355
4512
|
'metadata?: object;',
|
|
4356
4513
|
'parentPlanId?: string;',
|
|
4514
|
+
'X-ACCOUNT-ID?: string;',
|
|
4515
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
4357
4516
|
],
|
|
4358
4517
|
response: "{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }",
|
|
4359
|
-
markdown: "## update\n\n`client.v1.plans.update(id: string, billingId?: string, charges?: { pricingType: 'FREE' | 'PAID' | 'CUSTOM'; billingId?: string; minimumSpend?: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; minimum: object; }[]; overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY'; overagePricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: object[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; entitlement?: object; featureId?: string; topUpCustomCurrencyId?: string; }[]; pricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: object[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; monthlyResetPeriodConfiguration?: object; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; weeklyResetPeriodConfiguration?: object; yearlyResetPeriodConfiguration?: object; }[]; }, compatibleAddonIds?: string[], defaultTrialConfig?: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }, description?: string, displayName?: string, metadata?: object, parentPlanId?: string): { data: object; }`\n\n**patch** `/api/v1/plans/{id}`\n\nUpdates an existing plan's properties such as display name, description, and metadata.\n\n### Parameters\n\n- `id: string`\n\n- `billingId?: string`\n The unique identifier for the entity in the billing provider\n\n- `charges?: { pricingType: 'FREE' | 'PAID' | 'CUSTOM'; billingId?: string; minimumSpend?: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; minimum: { amount: number; currency?: string; }; }[]; overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY'; overagePricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; entitlement?: { featureId: string; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }; featureId?: string; topUpCustomCurrencyId?: string; }[]; pricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }[]; }`\n Pricing configuration to set on the plan draft\n - `pricingType: 'FREE' | 'PAID' | 'CUSTOM'`\n The pricing type (FREE, PAID, or CUSTOM)\n - `billingId?: string`\n Deprecated: billing integration ID\n - `minimumSpend?: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; minimum: { amount: number; currency?: string; }; }[]`\n Minimum spend configuration per billing period\n - `overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY'`\n When overage charges are billed\n - `overagePricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: { amount: number; currency?: string; }; unitPrice?: { amount: number; currency?: string; }; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; entitlement?: { featureId: string; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }; featureId?: string; topUpCustomCurrencyId?: string; }[]`\n Array of overage pricing model configurations\n - `pricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: { amount: number; currency?: string; }; unitPrice?: { amount: number; currency?: string; }; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }[]`\n Array of pricing model configurations\n\n- `compatibleAddonIds?: string[]`\n\n- `defaultTrialConfig?: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }`\n Default trial configuration for the plan\n - `duration: number`\n The duration of the trial in the specified units\n - `units: 'DAY' | 'MONTH'`\n The time unit for the trial duration (DAY or MONTH)\n - `budget?: { hasSoftLimit: boolean; limit: number; }`\n Budget configuration for the trial\n - `trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'`\n Behavior when the trial ends (CONVERT_TO_PAID or CANCEL_SUBSCRIPTION)\n\n- `description?: string`\n The description of the package\n\n- `displayName?: string`\n The display name of the package\n\n- `metadata?: object`\n Metadata associated with the entity\n\n- `parentPlanId?: string`\n The ID of the parent plan, if applicable\n\n### Returns\n\n- `{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst plan = await client.v1.plans.update('x');\n\nconsole.log(plan);\n```",
|
|
4518
|
+
markdown: "## update\n\n`client.v1.plans.update(id: string, billingId?: string, charges?: { pricingType: 'FREE' | 'PAID' | 'CUSTOM'; billingId?: string; minimumSpend?: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; minimum: object; }[]; overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY'; overagePricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: object[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; entitlement?: object; featureId?: string; topUpCustomCurrencyId?: string; }[]; pricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: object[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; monthlyResetPeriodConfiguration?: object; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; weeklyResetPeriodConfiguration?: object; yearlyResetPeriodConfiguration?: object; }[]; }, compatibleAddonIds?: string[], defaultTrialConfig?: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }, description?: string, displayName?: string, metadata?: object, parentPlanId?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**patch** `/api/v1/plans/{id}`\n\nUpdates an existing plan's properties such as display name, description, and metadata.\n\n### Parameters\n\n- `id: string`\n\n- `billingId?: string`\n The unique identifier for the entity in the billing provider\n\n- `charges?: { pricingType: 'FREE' | 'PAID' | 'CUSTOM'; billingId?: string; minimumSpend?: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; minimum: { amount: number; currency?: string; }; }[]; overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY'; overagePricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; entitlement?: { featureId: string; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }; featureId?: string; topUpCustomCurrencyId?: string; }[]; pricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }[]; }`\n Pricing configuration to set on the plan draft\n - `pricingType: 'FREE' | 'PAID' | 'CUSTOM'`\n The pricing type (FREE, PAID, or CUSTOM)\n - `billingId?: string`\n Deprecated: billing integration ID\n - `minimumSpend?: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; minimum: { amount: number; currency?: string; }; }[]`\n Minimum spend configuration per billing period\n - `overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY'`\n When overage charges are billed\n - `overagePricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: { amount: number; currency?: string; }; unitPrice?: { amount: number; currency?: string; }; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; entitlement?: { featureId: string; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }; featureId?: string; topUpCustomCurrencyId?: string; }[]`\n Array of overage pricing model configurations\n - `pricingModels?: { billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; pricePeriods: { billingPeriod: 'MONTHLY' | 'ANNUALLY'; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; price?: { amount: number; currency?: string; }; tiers?: { flatPrice?: { amount: number; currency?: string; }; unitPrice?: { amount: number; currency?: string; }; upTo?: number; }[]; }[]; billingCadence?: 'RECURRING' | 'ONE_OFF'; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; }[]`\n Array of pricing model configurations\n\n- `compatibleAddonIds?: string[]`\n\n- `defaultTrialConfig?: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }`\n Default trial configuration for the plan\n - `duration: number`\n The duration of the trial in the specified units\n - `units: 'DAY' | 'MONTH'`\n The time unit for the trial duration (DAY or MONTH)\n - `budget?: { hasSoftLimit: boolean; limit: number; }`\n Budget configuration for the trial\n - `trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'`\n Behavior when the trial ends (CONVERT_TO_PAID or CANCEL_SUBSCRIPTION)\n\n- `description?: string`\n The description of the package\n\n- `displayName?: string`\n The display name of the package\n\n- `metadata?: object`\n Metadata associated with the entity\n\n- `parentPlanId?: string`\n The ID of the parent plan, if applicable\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst plan = await client.v1.plans.update('x');\n\nconsole.log(plan);\n```",
|
|
4360
4519
|
perLanguage: {
|
|
4361
4520
|
typescript: {
|
|
4362
4521
|
method: 'client.v1.plans.update',
|
|
@@ -4399,9 +4558,9 @@ const EMBEDDED_METHODS = [
|
|
|
4399
4558
|
description: 'Archives a plan, preventing it from being used in new subscriptions.',
|
|
4400
4559
|
stainlessPath: '(resource) v1.plans > (method) archive',
|
|
4401
4560
|
qualified: 'client.v1.plans.archive',
|
|
4402
|
-
params: ['id: string;'],
|
|
4561
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
4403
4562
|
response: "{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }",
|
|
4404
|
-
markdown: "## archive\n\n`client.v1.plans.archive(id: string): { data: object; }`\n\n**post** `/api/v1/plans/{id}/archive`\n\nArchives a plan, preventing it from being used in new subscriptions.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst plan = await client.v1.plans.archive('x');\n\nconsole.log(plan);\n```",
|
|
4563
|
+
markdown: "## archive\n\n`client.v1.plans.archive(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/plans/{id}/archive`\n\nArchives a plan, preventing it from being used in new subscriptions.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst plan = await client.v1.plans.archive('x');\n\nconsole.log(plan);\n```",
|
|
4405
4564
|
perLanguage: {
|
|
4406
4565
|
typescript: {
|
|
4407
4566
|
method: 'client.v1.plans.archive',
|
|
@@ -4409,7 +4568,7 @@ const EMBEDDED_METHODS = [
|
|
|
4409
4568
|
},
|
|
4410
4569
|
python: {
|
|
4411
4570
|
method: 'v1.plans.archive',
|
|
4412
|
-
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)\nplan = client.v1.plans.archive(\n "x",\n)\nprint(plan.data)',
|
|
4571
|
+
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)\nplan = client.v1.plans.archive(\n id="x",\n)\nprint(plan.data)',
|
|
4413
4572
|
},
|
|
4414
4573
|
java: {
|
|
4415
4574
|
method: 'v1().plans().archive',
|
|
@@ -4417,7 +4576,7 @@ const EMBEDDED_METHODS = [
|
|
|
4417
4576
|
},
|
|
4418
4577
|
go: {
|
|
4419
4578
|
method: 'client.V1.Plans.Archive',
|
|
4420
|
-
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\tplan, err := client.V1.Plans.Archive(
|
|
4579
|
+
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\tplan, err := client.V1.Plans.Archive(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1PlanArchiveParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", plan.Data)\n}\n',
|
|
4421
4580
|
},
|
|
4422
4581
|
ruby: {
|
|
4423
4582
|
method: 'v1.plans.archive',
|
|
@@ -4444,9 +4603,14 @@ const EMBEDDED_METHODS = [
|
|
|
4444
4603
|
description: 'Publishes a draft plan, making it available for use in subscriptions.',
|
|
4445
4604
|
stainlessPath: '(resource) v1.plans > (method) publish',
|
|
4446
4605
|
qualified: 'client.v1.plans.publish',
|
|
4447
|
-
params: [
|
|
4606
|
+
params: [
|
|
4607
|
+
'id: string;',
|
|
4608
|
+
"migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS';",
|
|
4609
|
+
'X-ACCOUNT-ID?: string;',
|
|
4610
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
4611
|
+
],
|
|
4448
4612
|
response: '{ data: { taskId: string; }; }',
|
|
4449
|
-
markdown: "## publish\n\n`client.v1.plans.publish(id: string, migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS'): { data: object; }`\n\n**post** `/api/v1/plans/{id}/publish`\n\nPublishes a draft plan, making it available for use in subscriptions.\n\n### Parameters\n\n- `id: string`\n\n- `migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS'`\n The migration type of the package\n\n### Returns\n\n- `{ data: { taskId: string; }; }`\n Response containing task ID for publish operation\n\n - `data: { taskId: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.plans.publish('x', { migrationType: 'NEW_CUSTOMERS' });\n\nconsole.log(response);\n```",
|
|
4613
|
+
markdown: "## publish\n\n`client.v1.plans.publish(id: string, migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS', X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/plans/{id}/publish`\n\nPublishes a draft plan, making it available for use in subscriptions.\n\n### Parameters\n\n- `id: string`\n\n- `migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS'`\n The migration type of the package\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { taskId: string; }; }`\n Response containing task ID for publish operation\n\n - `data: { taskId: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.plans.publish('x', { migrationType: 'NEW_CUSTOMERS' });\n\nconsole.log(response);\n```",
|
|
4450
4614
|
perLanguage: {
|
|
4451
4615
|
typescript: {
|
|
4452
4616
|
method: 'client.v1.plans.publish',
|
|
@@ -4489,9 +4653,9 @@ const EMBEDDED_METHODS = [
|
|
|
4489
4653
|
description: 'Creates a draft version of an existing plan for modification before publishing.',
|
|
4490
4654
|
stainlessPath: '(resource) v1.plans > (method) create_draft',
|
|
4491
4655
|
qualified: 'client.v1.plans.createDraft',
|
|
4492
|
-
params: ['id: string;'],
|
|
4656
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
4493
4657
|
response: "{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }",
|
|
4494
|
-
markdown: "## create_draft\n\n`client.v1.plans.createDraft(id: string): { data: object; }`\n\n**post** `/api/v1/plans/{id}/draft`\n\nCreates a draft version of an existing plan for modification before publishing.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst plan = await client.v1.plans.createDraft('x');\n\nconsole.log(plan);\n```",
|
|
4658
|
+
markdown: "## create_draft\n\n`client.v1.plans.createDraft(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/plans/{id}/draft`\n\nCreates a draft version of an existing plan for modification before publishing.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: object; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }; }`\n Response object\n\n - `data: { id: string; billingId: string; compatibleAddonIds: string[]; createdAt: string; defaultTrialConfig: { duration: number; units: 'DAY' | 'MONTH'; budget?: { hasSoftLimit: boolean; limit: number; }; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; description: string; displayName: string; entitlements: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; isLatest: boolean; metadata: object; parentPlanId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; productId: string; status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; versionNumber: number; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst plan = await client.v1.plans.createDraft('x');\n\nconsole.log(plan);\n```",
|
|
4495
4659
|
perLanguage: {
|
|
4496
4660
|
typescript: {
|
|
4497
4661
|
method: 'client.v1.plans.createDraft',
|
|
@@ -4499,7 +4663,7 @@ const EMBEDDED_METHODS = [
|
|
|
4499
4663
|
},
|
|
4500
4664
|
python: {
|
|
4501
4665
|
method: 'v1.plans.create_draft',
|
|
4502
|
-
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)\nplan = client.v1.plans.create_draft(\n "x",\n)\nprint(plan.data)',
|
|
4666
|
+
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)\nplan = client.v1.plans.create_draft(\n id="x",\n)\nprint(plan.data)',
|
|
4503
4667
|
},
|
|
4504
4668
|
java: {
|
|
4505
4669
|
method: 'v1().plans().createDraft',
|
|
@@ -4507,7 +4671,7 @@ const EMBEDDED_METHODS = [
|
|
|
4507
4671
|
},
|
|
4508
4672
|
go: {
|
|
4509
4673
|
method: 'client.V1.Plans.NewDraft',
|
|
4510
|
-
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\tplan, err := client.V1.Plans.NewDraft(
|
|
4674
|
+
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\tplan, err := client.V1.Plans.NewDraft(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1PlanNewDraftParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", plan.Data)\n}\n',
|
|
4511
4675
|
},
|
|
4512
4676
|
ruby: {
|
|
4513
4677
|
method: 'v1.plans.create_draft',
|
|
@@ -4534,9 +4698,9 @@ const EMBEDDED_METHODS = [
|
|
|
4534
4698
|
description: 'Removes a draft version of a plan.',
|
|
4535
4699
|
stainlessPath: '(resource) v1.plans > (method) remove_draft',
|
|
4536
4700
|
qualified: 'client.v1.plans.removeDraft',
|
|
4537
|
-
params: ['id: string;'],
|
|
4701
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
4538
4702
|
response: '{ data: { id: string; }; }',
|
|
4539
|
-
markdown: "## remove_draft\n\n`client.v1.plans.removeDraft(id: string): { data: object; }`\n\n**delete** `/api/v1/plans/{id}/draft`\n\nRemoves a draft version of a plan.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; }; }`\n Response confirming the plan draft was removed.\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.plans.removeDraft('x');\n\nconsole.log(response);\n```",
|
|
4703
|
+
markdown: "## remove_draft\n\n`client.v1.plans.removeDraft(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**delete** `/api/v1/plans/{id}/draft`\n\nRemoves a draft version of a plan.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; }; }`\n Response confirming the plan draft was removed.\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.plans.removeDraft('x');\n\nconsole.log(response);\n```",
|
|
4540
4704
|
perLanguage: {
|
|
4541
4705
|
typescript: {
|
|
4542
4706
|
method: 'client.v1.plans.removeDraft',
|
|
@@ -4544,7 +4708,7 @@ const EMBEDDED_METHODS = [
|
|
|
4544
4708
|
},
|
|
4545
4709
|
python: {
|
|
4546
4710
|
method: 'v1.plans.remove_draft',
|
|
4547
|
-
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)\nresponse = client.v1.plans.remove_draft(\n "x",\n)\nprint(response.data)',
|
|
4711
|
+
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)\nresponse = client.v1.plans.remove_draft(\n id="x",\n)\nprint(response.data)',
|
|
4548
4712
|
},
|
|
4549
4713
|
java: {
|
|
4550
4714
|
method: 'v1().plans().removeDraft',
|
|
@@ -4552,7 +4716,7 @@ const EMBEDDED_METHODS = [
|
|
|
4552
4716
|
},
|
|
4553
4717
|
go: {
|
|
4554
4718
|
method: 'client.V1.Plans.RemoveDraft',
|
|
4555
|
-
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\tresponse, err := client.V1.Plans.RemoveDraft(
|
|
4719
|
+
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\tresponse, err := client.V1.Plans.RemoveDraft(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1PlanRemoveDraftParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
4556
4720
|
},
|
|
4557
4721
|
ruby: {
|
|
4558
4722
|
method: 'v1.plans.remove_draft',
|
|
@@ -4579,9 +4743,16 @@ const EMBEDDED_METHODS = [
|
|
|
4579
4743
|
description: 'Retrieves the list of charges configured on a plan.',
|
|
4580
4744
|
stainlessPath: '(resource) v1.plans > (method) list_charges',
|
|
4581
4745
|
qualified: 'client.v1.plans.listCharges',
|
|
4582
|
-
params: [
|
|
4746
|
+
params: [
|
|
4747
|
+
'id: string;',
|
|
4748
|
+
'after?: string;',
|
|
4749
|
+
'before?: string;',
|
|
4750
|
+
'limit?: number;',
|
|
4751
|
+
'X-ACCOUNT-ID?: string;',
|
|
4752
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
4753
|
+
],
|
|
4583
4754
|
response: "{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }",
|
|
4584
|
-
markdown: "## list_charges\n\n`client.v1.plans.listCharges(id: string, after?: string, before?: string, limit?: number): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: object; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: object; tiers?: object[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n\n**get** `/api/v1/plans/{id}/charges`\n\nRetrieves the list of charges configured on a plan.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n A single pricing row on a plan or addon. Each charge encodes one (billingPeriod, billingModel, billingCadence, billingCountryCode) combination. Plans and addons own many of these — one per currency / billing period / feature.\n\n - `id: string`\n - `billingCadence: 'RECURRING' | 'ONE_OFF'`\n - `billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'`\n - `billingPeriod: 'MONTHLY' | 'ANNUALLY'`\n - `createdAt: string`\n - `billingCountryCode?: string`\n - `billingId?: string`\n - `blockSize?: number`\n - `creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'`\n - `creditRate?: { amount: number; currencyId: string; costFormula?: string; }`\n - `crmId?: string`\n - `crmLinkUrl?: string`\n - `featureId?: string`\n - `maxUnitQuantity?: number`\n - `minUnitQuantity?: number`\n - `price?: { amount: number; currency: string; }`\n - `tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]`\n - `tiersMode?: 'VOLUME' | 'GRADUATED'`\n - `topUpCustomCurrencyId?: string`\n - `usedInSubscriptions?: boolean`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const planListChargesResponse of client.v1.plans.listCharges('x')) {\n console.log(planListChargesResponse);\n}\n```",
|
|
4755
|
+
markdown: "## list_charges\n\n`client.v1.plans.listCharges(id: string, after?: string, before?: string, limit?: number, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: object; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: object; tiers?: object[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n\n**get** `/api/v1/plans/{id}/charges`\n\nRetrieves the list of charges configured on a plan.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n A single pricing row on a plan or addon. Each charge encodes one (billingPeriod, billingModel, billingCadence, billingCountryCode) combination. Plans and addons own many of these — one per currency / billing period / feature.\n\n - `id: string`\n - `billingCadence: 'RECURRING' | 'ONE_OFF'`\n - `billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'`\n - `billingPeriod: 'MONTHLY' | 'ANNUALLY'`\n - `createdAt: string`\n - `billingCountryCode?: string`\n - `billingId?: string`\n - `blockSize?: number`\n - `creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'`\n - `creditRate?: { amount: number; currencyId: string; costFormula?: string; }`\n - `crmId?: string`\n - `crmLinkUrl?: string`\n - `featureId?: string`\n - `maxUnitQuantity?: number`\n - `minUnitQuantity?: number`\n - `price?: { amount: number; currency: string; }`\n - `tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]`\n - `tiersMode?: 'VOLUME' | 'GRADUATED'`\n - `topUpCustomCurrencyId?: string`\n - `usedInSubscriptions?: boolean`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const planListChargesResponse of client.v1.plans.listCharges('x')) {\n console.log(planListChargesResponse);\n}\n```",
|
|
4585
4756
|
perLanguage: {
|
|
4586
4757
|
typescript: {
|
|
4587
4758
|
method: 'client.v1.plans.listCharges',
|
|
@@ -4624,9 +4795,16 @@ const EMBEDDED_METHODS = [
|
|
|
4624
4795
|
description: 'Retrieves the list of overage charges configured on a plan.',
|
|
4625
4796
|
stainlessPath: '(resource) v1.plans > (method) list_overage_charges',
|
|
4626
4797
|
qualified: 'client.v1.plans.listOverageCharges',
|
|
4627
|
-
params: [
|
|
4798
|
+
params: [
|
|
4799
|
+
'id: string;',
|
|
4800
|
+
'after?: string;',
|
|
4801
|
+
'before?: string;',
|
|
4802
|
+
'limit?: number;',
|
|
4803
|
+
'X-ACCOUNT-ID?: string;',
|
|
4804
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
4805
|
+
],
|
|
4628
4806
|
response: "{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }",
|
|
4629
|
-
markdown: "## list_overage_charges\n\n`client.v1.plans.listOverageCharges(id: string, after?: string, before?: string, limit?: number): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: object; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: object; tiers?: object[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n\n**get** `/api/v1/plans/{id}/overage-charges`\n\nRetrieves the list of overage charges configured on a plan.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n A single pricing row on a plan or addon. Each charge encodes one (billingPeriod, billingModel, billingCadence, billingCountryCode) combination. Plans and addons own many of these — one per currency / billing period / feature.\n\n - `id: string`\n - `billingCadence: 'RECURRING' | 'ONE_OFF'`\n - `billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'`\n - `billingPeriod: 'MONTHLY' | 'ANNUALLY'`\n - `createdAt: string`\n - `billingCountryCode?: string`\n - `billingId?: string`\n - `blockSize?: number`\n - `creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'`\n - `creditRate?: { amount: number; currencyId: string; costFormula?: string; }`\n - `crmId?: string`\n - `crmLinkUrl?: string`\n - `featureId?: string`\n - `maxUnitQuantity?: number`\n - `minUnitQuantity?: number`\n - `price?: { amount: number; currency: string; }`\n - `tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]`\n - `tiersMode?: 'VOLUME' | 'GRADUATED'`\n - `topUpCustomCurrencyId?: string`\n - `usedInSubscriptions?: boolean`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const planListOverageChargesResponse of client.v1.plans.listOverageCharges('x')) {\n console.log(planListOverageChargesResponse);\n}\n```",
|
|
4807
|
+
markdown: "## list_overage_charges\n\n`client.v1.plans.listOverageCharges(id: string, after?: string, before?: string, limit?: number, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: object; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: object; tiers?: object[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n\n**get** `/api/v1/plans/{id}/overage-charges`\n\nRetrieves the list of overage charges configured on a plan.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n A single pricing row on a plan or addon. Each charge encodes one (billingPeriod, billingModel, billingCadence, billingCountryCode) combination. Plans and addons own many of these — one per currency / billing period / feature.\n\n - `id: string`\n - `billingCadence: 'RECURRING' | 'ONE_OFF'`\n - `billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'`\n - `billingPeriod: 'MONTHLY' | 'ANNUALLY'`\n - `createdAt: string`\n - `billingCountryCode?: string`\n - `billingId?: string`\n - `blockSize?: number`\n - `creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'`\n - `creditRate?: { amount: number; currencyId: string; costFormula?: string; }`\n - `crmId?: string`\n - `crmLinkUrl?: string`\n - `featureId?: string`\n - `maxUnitQuantity?: number`\n - `minUnitQuantity?: number`\n - `price?: { amount: number; currency: string; }`\n - `tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]`\n - `tiersMode?: 'VOLUME' | 'GRADUATED'`\n - `topUpCustomCurrencyId?: string`\n - `usedInSubscriptions?: boolean`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const planListOverageChargesResponse of client.v1.plans.listOverageCharges('x')) {\n console.log(planListOverageChargesResponse);\n}\n```",
|
|
4630
4808
|
perLanguage: {
|
|
4631
4809
|
typescript: {
|
|
4632
4810
|
method: 'client.v1.plans.listOverageCharges',
|
|
@@ -4669,9 +4847,9 @@ const EMBEDDED_METHODS = [
|
|
|
4669
4847
|
description: 'Retrieves a list of entitlements for a plan.',
|
|
4670
4848
|
stainlessPath: '(resource) v1.plans.entitlements > (method) list',
|
|
4671
4849
|
qualified: 'client.v1.plans.entitlements.list',
|
|
4672
|
-
params: ['planId: string;'],
|
|
4850
|
+
params: ['planId: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
4673
4851
|
response: "{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]; pagination: { next: string; prev: string; }; }",
|
|
4674
|
-
markdown: "## list\n\n`client.v1.plans.entitlements.list(planId: string): { data: object | object[]; pagination: object; }`\n\n**get** `/api/v1/plans/{planId}/entitlements`\n\nRetrieves a list of entitlements for a plan.\n\n### Parameters\n\n- `planId: string`\n\n### Returns\n\n- `{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]; pagination: { next: string; prev: string; }; }`\n Response list object\n\n - `data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]`\n - `pagination: { next: string; prev: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst entitlements = await client.v1.plans.entitlements.list('planId');\n\nconsole.log(entitlements);\n```",
|
|
4852
|
+
markdown: "## list\n\n`client.v1.plans.entitlements.list(planId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object | object[]; pagination: object; }`\n\n**get** `/api/v1/plans/{planId}/entitlements`\n\nRetrieves a list of entitlements for a plan.\n\n### Parameters\n\n- `planId: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]; pagination: { next: string; prev: string; }; }`\n Response list object\n\n - `data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]`\n - `pagination: { next: string; prev: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst entitlements = await client.v1.plans.entitlements.list('planId');\n\nconsole.log(entitlements);\n```",
|
|
4675
4853
|
perLanguage: {
|
|
4676
4854
|
typescript: {
|
|
4677
4855
|
method: 'client.v1.plans.entitlements.list',
|
|
@@ -4679,7 +4857,7 @@ const EMBEDDED_METHODS = [
|
|
|
4679
4857
|
},
|
|
4680
4858
|
python: {
|
|
4681
4859
|
method: 'v1.plans.entitlements.list',
|
|
4682
|
-
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)\nentitlements = client.v1.plans.entitlements.list(\n "planId",\n)\nprint(entitlements.data)',
|
|
4860
|
+
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)\nentitlements = client.v1.plans.entitlements.list(\n plan_id="planId",\n)\nprint(entitlements.data)',
|
|
4683
4861
|
},
|
|
4684
4862
|
java: {
|
|
4685
4863
|
method: 'v1().plans().entitlements().list',
|
|
@@ -4687,7 +4865,7 @@ const EMBEDDED_METHODS = [
|
|
|
4687
4865
|
},
|
|
4688
4866
|
go: {
|
|
4689
4867
|
method: 'client.V1.Plans.Entitlements.List',
|
|
4690
|
-
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\tentitlements, err := client.V1.Plans.Entitlements.List(
|
|
4868
|
+
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\tentitlements, err := client.V1.Plans.Entitlements.List(\n\t\tcontext.TODO(),\n\t\t"planId",\n\t\tstigg.V1PlanEntitlementListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", entitlements.Data)\n}\n',
|
|
4691
4869
|
},
|
|
4692
4870
|
ruby: {
|
|
4693
4871
|
method: 'v1.plans.entitlements.list',
|
|
@@ -4717,9 +4895,11 @@ const EMBEDDED_METHODS = [
|
|
|
4717
4895
|
params: [
|
|
4718
4896
|
'planId: string;',
|
|
4719
4897
|
"entitlements: { id: string; type: 'FEATURE'; behavior?: 'Increment' | 'Override'; description?: string; displayNameOverride?: string; enumValues?: string[]; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; order?: number; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; behavior?: 'Increment' | 'Override'; dependencyFeatureId?: string; description?: string; displayNameOverride?: string; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; order?: number; }[];",
|
|
4898
|
+
'X-ACCOUNT-ID?: string;',
|
|
4899
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
4720
4900
|
],
|
|
4721
4901
|
response: "{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]; }",
|
|
4722
|
-
markdown: "## create\n\n`client.v1.plans.entitlements.create(planId: string, entitlements: { id: string; type: 'FEATURE'; behavior?: 'Increment' | 'Override'; description?: string; displayNameOverride?: string; enumValues?: string[]; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; order?: number; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; behavior?: 'Increment' | 'Override'; dependencyFeatureId?: string; description?: string; displayNameOverride?: string; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; order?: number; }[]): { data: object | object[]; }`\n\n**post** `/api/v1/plans/{planId}/entitlements`\n\nCreates one or more entitlements (feature or credit) on a draft plan.\n\n### Parameters\n\n- `planId: string`\n\n- `entitlements: { id: string; type: 'FEATURE'; behavior?: 'Increment' | 'Override'; description?: string; displayNameOverride?: string; enumValues?: string[]; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; order?: number; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; behavior?: 'Increment' | 'Override'; dependencyFeatureId?: string; description?: string; displayNameOverride?: string; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; order?: number; }[]`\n Entitlements to create\n\n### Returns\n\n- `{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]; }`\n Response object\n\n - `data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst entitlement = await client.v1.plans.entitlements.create('planId', { entitlements: [{ id: 'id', type: 'FEATURE' }] });\n\nconsole.log(entitlement);\n```",
|
|
4902
|
+
markdown: "## create\n\n`client.v1.plans.entitlements.create(planId: string, entitlements: { id: string; type: 'FEATURE'; behavior?: 'Increment' | 'Override'; description?: string; displayNameOverride?: string; enumValues?: string[]; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; order?: number; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; behavior?: 'Increment' | 'Override'; dependencyFeatureId?: string; description?: string; displayNameOverride?: string; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; order?: number; }[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object | object[]; }`\n\n**post** `/api/v1/plans/{planId}/entitlements`\n\nCreates one or more entitlements (feature or credit) on a draft plan.\n\n### Parameters\n\n- `planId: string`\n\n- `entitlements: { id: string; type: 'FEATURE'; behavior?: 'Increment' | 'Override'; description?: string; displayNameOverride?: string; enumValues?: string[]; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; order?: number; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; behavior?: 'Increment' | 'Override'; dependencyFeatureId?: string; description?: string; displayNameOverride?: string; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; order?: number; }[]`\n Entitlements to create\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]; }`\n Response object\n\n - `data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst entitlement = await client.v1.plans.entitlements.create('planId', { entitlements: [{ id: 'id', type: 'FEATURE' }] });\n\nconsole.log(entitlement);\n```",
|
|
4723
4903
|
perLanguage: {
|
|
4724
4904
|
typescript: {
|
|
4725
4905
|
method: 'client.v1.plans.entitlements.create',
|
|
@@ -4766,6 +4946,8 @@ const EMBEDDED_METHODS = [
|
|
|
4766
4946
|
'planId: string;',
|
|
4767
4947
|
'id: string;',
|
|
4768
4948
|
"body: { type: 'FEATURE'; behavior?: 'Increment' | 'Override'; description?: string; displayNameOverride?: string; enumValues?: string[]; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; order?: number; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { type: 'CREDIT'; amount?: number; behavior?: 'Increment' | 'Override'; cadence?: 'MONTH' | 'YEAR'; dependencyFeatureId?: string; description?: string; displayNameOverride?: string; hiddenFromWidgets?: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom?: boolean; isGranted?: boolean; order?: number; };",
|
|
4949
|
+
'X-ACCOUNT-ID?: string;',
|
|
4950
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
4769
4951
|
],
|
|
4770
4952
|
response: "{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }; }",
|
|
4771
4953
|
perLanguage: {
|
|
@@ -4810,9 +4992,9 @@ const EMBEDDED_METHODS = [
|
|
|
4810
4992
|
description: 'Deletes an entitlement from a draft plan.',
|
|
4811
4993
|
stainlessPath: '(resource) v1.plans.entitlements > (method) delete',
|
|
4812
4994
|
qualified: 'client.v1.plans.entitlements.delete',
|
|
4813
|
-
params: ['planId: string;', 'id: string;'],
|
|
4995
|
+
params: ['planId: string;', 'id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
4814
4996
|
response: "{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }; }",
|
|
4815
|
-
markdown: "## delete\n\n`client.v1.plans.entitlements.delete(planId: string, id: string): { data: object | object; }`\n\n**delete** `/api/v1/plans/{planId}/entitlements/{id}`\n\nDeletes an entitlement from a draft plan.\n\n### Parameters\n\n- `planId: string`\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }; }`\n Response object\n\n - `data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst planEntitlement = await client.v1.plans.entitlements.delete('id', { planId: 'planId' });\n\nconsole.log(planEntitlement);\n```",
|
|
4997
|
+
markdown: "## delete\n\n`client.v1.plans.entitlements.delete(planId: string, id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object | object; }`\n\n**delete** `/api/v1/plans/{planId}/entitlements/{id}`\n\nDeletes an entitlement from a draft plan.\n\n### Parameters\n\n- `planId: string`\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }; }`\n Response object\n\n - `data: { id: string; behavior: 'Increment' | 'Override'; createdAt: string; description: string; displayNameOverride: string; enumValues: string[]; hasSoftLimit: boolean; hasUnlimitedUsage: boolean; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; resetPeriodConfiguration: { accordingTo: 'SubscriptionStart'; } | { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; } | { accordingTo: string; }; type: 'FEATURE'; updatedAt: string; usageLimit: number; } | { id: string; amount: number; behavior: 'Increment' | 'Override'; cadence: 'MONTH' | 'YEAR'; createdAt: string; description: string; displayNameOverride: string; hiddenFromWidgets: 'PAYWALL' | 'CUSTOMER_PORTAL' | 'CHECKOUT'[]; isCustom: boolean; isGranted: boolean; order: number; type: 'CREDIT'; updatedAt: string; dependencyFeatureId?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst planEntitlement = await client.v1.plans.entitlements.delete('id', { planId: 'planId' });\n\nconsole.log(planEntitlement);\n```",
|
|
4816
4998
|
perLanguage: {
|
|
4817
4999
|
typescript: {
|
|
4818
5000
|
method: 'client.v1.plans.entitlements.delete',
|
|
@@ -4857,9 +5039,11 @@ const EMBEDDED_METHODS = [
|
|
|
4857
5039
|
qualified: 'client.v1.usage.report',
|
|
4858
5040
|
params: [
|
|
4859
5041
|
"usages: { customerId: string; featureId: string; value: number; createdAt?: string; dimensions?: object; resourceId?: string; updateBehavior?: 'DELTA' | 'SET'; }[];",
|
|
5042
|
+
'X-ACCOUNT-ID?: string;',
|
|
5043
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
4860
5044
|
],
|
|
4861
5045
|
response: '{ data: { id: string; createdAt: string; customerId: string; featureId: string; timestamp: string; value: number; currentUsage?: number; nextResetDate?: string; resourceId?: string; usagePeriodEnd?: string; usagePeriodStart?: string; }[]; }',
|
|
4862
|
-
markdown: "## report\n\n`client.v1.usage.report(usages: { customerId: string; featureId: string; value: number; createdAt?: string; dimensions?: object; resourceId?: string; updateBehavior?: 'DELTA' | 'SET'; }[]): { data: object[]; }`\n\n**post** `/api/v1/usage`\n\nReports usage measurements for metered features. The reported usage is used to track, limit, and bill customer consumption.\n\n### Parameters\n\n- `usages: { customerId: string; featureId: string; value: number; createdAt?: string; dimensions?: object; resourceId?: string; updateBehavior?: 'DELTA' | 'SET'; }[]`\n A list of usage reports to be submitted in bulk\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; customerId: string; featureId: string; timestamp: string; value: number; currentUsage?: number; nextResetDate?: string; resourceId?: string; usagePeriodEnd?: string; usagePeriodStart?: string; }[]; }`\n Response containing reported usage measurements with current usage values, period information, and reset dates for each measurement.\n\n - `data: { id: string; createdAt: string; customerId: string; featureId: string; timestamp: string; value: number; currentUsage?: number; nextResetDate?: string; resourceId?: string; usagePeriodEnd?: string; usagePeriodStart?: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.usage.report({ usages: [{\n customerId: 'customerId',\n featureId: 'featureId',\n value: -9007199254740991,\n}] });\n\nconsole.log(response);\n```",
|
|
5046
|
+
markdown: "## report\n\n`client.v1.usage.report(usages: { customerId: string; featureId: string; value: number; createdAt?: string; dimensions?: object; resourceId?: string; updateBehavior?: 'DELTA' | 'SET'; }[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object[]; }`\n\n**post** `/api/v1/usage`\n\nReports usage measurements for metered features. The reported usage is used to track, limit, and bill customer consumption.\n\n### Parameters\n\n- `usages: { customerId: string; featureId: string; value: number; createdAt?: string; dimensions?: object; resourceId?: string; updateBehavior?: 'DELTA' | 'SET'; }[]`\n A list of usage reports to be submitted in bulk\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; customerId: string; featureId: string; timestamp: string; value: number; currentUsage?: number; nextResetDate?: string; resourceId?: string; usagePeriodEnd?: string; usagePeriodStart?: string; }[]; }`\n Response containing reported usage measurements with current usage values, period information, and reset dates for each measurement.\n\n - `data: { id: string; createdAt: string; customerId: string; featureId: string; timestamp: string; value: number; currentUsage?: number; nextResetDate?: string; resourceId?: string; usagePeriodEnd?: string; usagePeriodStart?: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.usage.report({ usages: [{\n customerId: 'customerId',\n featureId: 'featureId',\n value: -9007199254740991,\n}] });\n\nconsole.log(response);\n```",
|
|
4863
5047
|
perLanguage: {
|
|
4864
5048
|
typescript: {
|
|
4865
5049
|
method: 'client.v1.usage.report',
|
|
@@ -4909,9 +5093,11 @@ const EMBEDDED_METHODS = [
|
|
|
4909
5093
|
'endDate?: string;',
|
|
4910
5094
|
'groupBy?: string;',
|
|
4911
5095
|
'resourceId?: string;',
|
|
5096
|
+
'X-ACCOUNT-ID?: string;',
|
|
5097
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
4912
5098
|
],
|
|
4913
5099
|
response: "{ data: { markers: { timestamp: string; type: 'PERIODIC_RESET' | 'SUBSCRIPTION_CHANGE_RESET'; }[]; series: { points: object[]; tags: object[]; }[]; }; }",
|
|
4914
|
-
markdown: "## history\n\n`client.v1.usage.history(customerId: string, featureId: string, startDate: string, endDate?: string, groupBy?: string, resourceId?: string): { data: object; }`\n\n**get** `/api/v1/usage/{customerId}/history/{featureId}`\n\nRetrieves historical usage data for a customer's metered feature over time.\n\n### Parameters\n\n- `customerId: string`\n\n- `featureId: string`\n\n- `startDate: string`\n The start date of the range\n\n- `endDate?: string`\n The end date of the range\n\n- `groupBy?: string`\n Criteria by which to group the usage history\n\n- `resourceId?: string`\n Resource id\n\n### Returns\n\n- `{ data: { markers: { timestamp: string; type: 'PERIODIC_RESET' | 'SUBSCRIPTION_CHANGE_RESET'; }[]; series: { points: object[]; tags: object[]; }[]; }; }`\n Response object\n\n - `data: { markers: { timestamp: string; type: 'PERIODIC_RESET' | 'SUBSCRIPTION_CHANGE_RESET'; }[]; series: { points: { isResetPoint: boolean; timestamp: string; value: number; }[]; tags: { key: string; value: string; }[]; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.usage.history('featureId', { customerId: 'customerId', startDate: '2019-12-27T18:11:19.117Z' });\n\nconsole.log(response);\n```",
|
|
5100
|
+
markdown: "## history\n\n`client.v1.usage.history(customerId: string, featureId: string, startDate: string, endDate?: string, groupBy?: string, resourceId?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1/usage/{customerId}/history/{featureId}`\n\nRetrieves historical usage data for a customer's metered feature over time.\n\n### Parameters\n\n- `customerId: string`\n\n- `featureId: string`\n\n- `startDate: string`\n The start date of the range\n\n- `endDate?: string`\n The end date of the range\n\n- `groupBy?: string`\n Criteria by which to group the usage history\n\n- `resourceId?: string`\n Resource id\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { markers: { timestamp: string; type: 'PERIODIC_RESET' | 'SUBSCRIPTION_CHANGE_RESET'; }[]; series: { points: object[]; tags: object[]; }[]; }; }`\n Response object\n\n - `data: { markers: { timestamp: string; type: 'PERIODIC_RESET' | 'SUBSCRIPTION_CHANGE_RESET'; }[]; series: { points: { isResetPoint: boolean; timestamp: string; value: number; }[]; tags: { key: string; value: string; }[]; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.usage.history('featureId', { customerId: 'customerId', startDate: '2019-12-27T18:11:19.117Z' });\n\nconsole.log(response);\n```",
|
|
4915
5101
|
perLanguage: {
|
|
4916
5102
|
typescript: {
|
|
4917
5103
|
method: 'client.v1.usage.history',
|
|
@@ -4961,9 +5147,11 @@ const EMBEDDED_METHODS = [
|
|
|
4961
5147
|
'createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; };',
|
|
4962
5148
|
'limit?: number;',
|
|
4963
5149
|
"status?: 'PUBLISHED' | 'ARCHIVED'[];",
|
|
5150
|
+
'X-ACCOUNT-ID?: string;',
|
|
5151
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
4964
5152
|
],
|
|
4965
5153
|
response: "{ id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }",
|
|
4966
|
-
markdown: "## list_products\n\n`client.v1.products.listProducts(id?: string, after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, limit?: number, status?: 'PUBLISHED' | 'ARCHIVED'[]): { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: object; }`\n\n**get** `/api/v1/products`\n\nRetrieves a paginated list of products in the environment.\n\n### Parameters\n\n- `id?: string`\n Filter by entity ID\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `limit?: number`\n Maximum number of items to return\n\n- `status?: 'PUBLISHED' | 'ARCHIVED'[]`\n Filter by product status. Supports comma-separated values for multiple statuses\n\n### Returns\n\n- `{ id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }`\n Product configuration object\n\n - `id: string`\n - `createdAt: string`\n - `description: string`\n - `displayName: string`\n - `metadata: object`\n - `multipleSubscriptions: boolean`\n - `status: 'PUBLISHED' | 'ARCHIVED'`\n - `updatedAt: string`\n - `productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const productListProductsResponse of client.v1.products.listProducts()) {\n console.log(productListProductsResponse);\n}\n```",
|
|
5154
|
+
markdown: "## list_products\n\n`client.v1.products.listProducts(id?: string, after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, limit?: number, status?: 'PUBLISHED' | 'ARCHIVED'[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: object; }`\n\n**get** `/api/v1/products`\n\nRetrieves a paginated list of products in the environment.\n\n### Parameters\n\n- `id?: string`\n Filter by entity ID\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `limit?: number`\n Maximum number of items to return\n\n- `status?: 'PUBLISHED' | 'ARCHIVED'[]`\n Filter by product status. Supports comma-separated values for multiple statuses\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }`\n Product configuration object\n\n - `id: string`\n - `createdAt: string`\n - `description: string`\n - `displayName: string`\n - `metadata: object`\n - `multipleSubscriptions: boolean`\n - `status: 'PUBLISHED' | 'ARCHIVED'`\n - `updatedAt: string`\n - `productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const productListProductsResponse of client.v1.products.listProducts()) {\n console.log(productListProductsResponse);\n}\n```",
|
|
4967
5155
|
perLanguage: {
|
|
4968
5156
|
typescript: {
|
|
4969
5157
|
method: 'client.v1.products.listProducts',
|
|
@@ -5012,9 +5200,11 @@ const EMBEDDED_METHODS = [
|
|
|
5012
5200
|
'description?: string;',
|
|
5013
5201
|
'metadata?: object;',
|
|
5014
5202
|
'multipleSubscriptions?: boolean;',
|
|
5203
|
+
'X-ACCOUNT-ID?: string;',
|
|
5204
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
5015
5205
|
],
|
|
5016
5206
|
response: "{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }",
|
|
5017
|
-
markdown: "## create_product\n\n`client.v1.products.createProduct(id: string, displayName: string, description?: string, metadata?: object, multipleSubscriptions?: boolean): { data: object; }`\n\n**post** `/api/v1/products`\n\nCreates a new product.\n\n### Parameters\n\n- `id: string`\n The unique identifier for the entity\n\n- `displayName: string`\n Display name of the product\n\n- `description?: string`\n Description of the product\n\n- `metadata?: object`\n Additional metadata for the product\n\n- `multipleSubscriptions?: boolean`\n Indicates if multiple subscriptions to this product are allowed\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst product = await client.v1.products.createProduct({ id: 'id', displayName: 'displayName' });\n\nconsole.log(product);\n```",
|
|
5207
|
+
markdown: "## create_product\n\n`client.v1.products.createProduct(id: string, displayName: string, description?: string, metadata?: object, multipleSubscriptions?: boolean, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/products`\n\nCreates a new product.\n\n### Parameters\n\n- `id: string`\n The unique identifier for the entity\n\n- `displayName: string`\n Display name of the product\n\n- `description?: string`\n Description of the product\n\n- `metadata?: object`\n Additional metadata for the product\n\n- `multipleSubscriptions?: boolean`\n Indicates if multiple subscriptions to this product are allowed\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst product = await client.v1.products.createProduct({ id: 'id', displayName: 'displayName' });\n\nconsole.log(product);\n```",
|
|
5018
5208
|
perLanguage: {
|
|
5019
5209
|
typescript: {
|
|
5020
5210
|
method: 'client.v1.products.createProduct',
|
|
@@ -5065,9 +5255,11 @@ const EMBEDDED_METHODS = [
|
|
|
5065
5255
|
'multipleSubscriptions?: boolean;',
|
|
5066
5256
|
"productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; };",
|
|
5067
5257
|
"usageResetCutoffRule?: { behavior: 'NEVER_RESET' | 'ALWAYS_RESET' | 'BILLING_PERIOD_CHANGE'; };",
|
|
5258
|
+
'X-ACCOUNT-ID?: string;',
|
|
5259
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
5068
5260
|
],
|
|
5069
5261
|
response: "{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }",
|
|
5070
|
-
markdown: "## update_product\n\n`client.v1.products.updateProduct(id: string, description?: string, displayName?: string, metadata?: object, multipleSubscriptions?: boolean, productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }, usageResetCutoffRule?: { behavior: 'NEVER_RESET' | 'ALWAYS_RESET' | 'BILLING_PERIOD_CHANGE'; }): { data: object; }`\n\n**patch** `/api/v1/products/{id}`\n\nUpdates an existing product's properties such as display name, description, and metadata.\n\n### Parameters\n\n- `id: string`\n\n- `description?: string`\n Description of the product\n\n- `displayName?: string`\n Display name of the product\n\n- `metadata?: object`\n Additional metadata for the product\n\n- `multipleSubscriptions?: boolean`\n Indicates if multiple subscriptions to this product are allowed\n\n- `productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }`\n - `subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'`\n Time when the subscription will be cancelled\n - `subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'`\n Setup for the end of the subscription\n - `subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'`\n Setup for the start of the subscription\n - `downgradePlanId?: string`\n ID of the plan to downgrade to at the end of the billing period\n - `prorateAtEndOfBillingPeriod?: boolean`\n Indicates if the subscription should be prorated at the end of the billing period\n - `subscriptionStartPlanId?: string`\n ID of the plan to start the subscription with\n\n- `usageResetCutoffRule?: { behavior: 'NEVER_RESET' | 'ALWAYS_RESET' | 'BILLING_PERIOD_CHANGE'; }`\n Rule defining when usage resets upon subscription update.\n - `behavior: 'NEVER_RESET' | 'ALWAYS_RESET' | 'BILLING_PERIOD_CHANGE'`\n Behavior of the usage reset cutoff rule\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst product = await client.v1.products.updateProduct('x');\n\nconsole.log(product);\n```",
|
|
5262
|
+
markdown: "## update_product\n\n`client.v1.products.updateProduct(id: string, description?: string, displayName?: string, metadata?: object, multipleSubscriptions?: boolean, productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }, usageResetCutoffRule?: { behavior: 'NEVER_RESET' | 'ALWAYS_RESET' | 'BILLING_PERIOD_CHANGE'; }, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**patch** `/api/v1/products/{id}`\n\nUpdates an existing product's properties such as display name, description, and metadata.\n\n### Parameters\n\n- `id: string`\n\n- `description?: string`\n Description of the product\n\n- `displayName?: string`\n Display name of the product\n\n- `metadata?: object`\n Additional metadata for the product\n\n- `multipleSubscriptions?: boolean`\n Indicates if multiple subscriptions to this product are allowed\n\n- `productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }`\n - `subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'`\n Time when the subscription will be cancelled\n - `subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'`\n Setup for the end of the subscription\n - `subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'`\n Setup for the start of the subscription\n - `downgradePlanId?: string`\n ID of the plan to downgrade to at the end of the billing period\n - `prorateAtEndOfBillingPeriod?: boolean`\n Indicates if the subscription should be prorated at the end of the billing period\n - `subscriptionStartPlanId?: string`\n ID of the plan to start the subscription with\n\n- `usageResetCutoffRule?: { behavior: 'NEVER_RESET' | 'ALWAYS_RESET' | 'BILLING_PERIOD_CHANGE'; }`\n Rule defining when usage resets upon subscription update.\n - `behavior: 'NEVER_RESET' | 'ALWAYS_RESET' | 'BILLING_PERIOD_CHANGE'`\n Behavior of the usage reset cutoff rule\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst product = await client.v1.products.updateProduct('x');\n\nconsole.log(product);\n```",
|
|
5071
5263
|
perLanguage: {
|
|
5072
5264
|
typescript: {
|
|
5073
5265
|
method: 'client.v1.products.updateProduct',
|
|
@@ -5110,9 +5302,9 @@ const EMBEDDED_METHODS = [
|
|
|
5110
5302
|
description: 'Archives a product, preventing new subscriptions. All plans and addons are archived.',
|
|
5111
5303
|
stainlessPath: '(resource) v1.products > (method) archive_product',
|
|
5112
5304
|
qualified: 'client.v1.products.archiveProduct',
|
|
5113
|
-
params: ['id: string;'],
|
|
5305
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
5114
5306
|
response: "{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }",
|
|
5115
|
-
markdown: "## archive_product\n\n`client.v1.products.archiveProduct(id: string): { data: object; }`\n\n**post** `/api/v1/products/{id}/archive`\n\nArchives a product, preventing new subscriptions. All plans and addons are archived.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst product = await client.v1.products.archiveProduct('x');\n\nconsole.log(product);\n```",
|
|
5307
|
+
markdown: "## archive_product\n\n`client.v1.products.archiveProduct(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/products/{id}/archive`\n\nArchives a product, preventing new subscriptions. All plans and addons are archived.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst product = await client.v1.products.archiveProduct('x');\n\nconsole.log(product);\n```",
|
|
5116
5308
|
perLanguage: {
|
|
5117
5309
|
typescript: {
|
|
5118
5310
|
method: 'client.v1.products.archiveProduct',
|
|
@@ -5120,7 +5312,7 @@ const EMBEDDED_METHODS = [
|
|
|
5120
5312
|
},
|
|
5121
5313
|
python: {
|
|
5122
5314
|
method: 'v1.products.archive_product',
|
|
5123
|
-
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)\nproduct = client.v1.products.archive_product(\n "x",\n)\nprint(product.data)',
|
|
5315
|
+
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)\nproduct = client.v1.products.archive_product(\n id="x",\n)\nprint(product.data)',
|
|
5124
5316
|
},
|
|
5125
5317
|
java: {
|
|
5126
5318
|
method: 'v1().products().archiveProduct',
|
|
@@ -5128,7 +5320,7 @@ const EMBEDDED_METHODS = [
|
|
|
5128
5320
|
},
|
|
5129
5321
|
go: {
|
|
5130
5322
|
method: 'client.V1.Products.ArchiveProduct',
|
|
5131
|
-
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\tproduct, err := client.V1.Products.ArchiveProduct(
|
|
5323
|
+
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\tproduct, err := client.V1.Products.ArchiveProduct(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1ProductArchiveProductParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", product.Data)\n}\n',
|
|
5132
5324
|
},
|
|
5133
5325
|
ruby: {
|
|
5134
5326
|
method: 'v1.products.archive_product',
|
|
@@ -5155,9 +5347,9 @@ const EMBEDDED_METHODS = [
|
|
|
5155
5347
|
description: 'Restores an archived product, allowing new subscriptions to be created.',
|
|
5156
5348
|
stainlessPath: '(resource) v1.products > (method) unarchive_product',
|
|
5157
5349
|
qualified: 'client.v1.products.unarchiveProduct',
|
|
5158
|
-
params: ['id: string;'],
|
|
5350
|
+
params: ['id: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
5159
5351
|
response: "{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }",
|
|
5160
|
-
markdown: "## unarchive_product\n\n`client.v1.products.unarchiveProduct(id: string): { data: object; }`\n\n**post** `/api/v1/products/{id}/unarchive`\n\nRestores an archived product, allowing new subscriptions to be created.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst product = await client.v1.products.unarchiveProduct('x');\n\nconsole.log(product);\n```",
|
|
5352
|
+
markdown: "## unarchive_product\n\n`client.v1.products.unarchiveProduct(id: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/products/{id}/unarchive`\n\nRestores an archived product, allowing new subscriptions to be created.\n\n### Parameters\n\n- `id: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst product = await client.v1.products.unarchiveProduct('x');\n\nconsole.log(product);\n```",
|
|
5161
5353
|
perLanguage: {
|
|
5162
5354
|
typescript: {
|
|
5163
5355
|
method: 'client.v1.products.unarchiveProduct',
|
|
@@ -5165,7 +5357,7 @@ const EMBEDDED_METHODS = [
|
|
|
5165
5357
|
},
|
|
5166
5358
|
python: {
|
|
5167
5359
|
method: 'v1.products.unarchive_product',
|
|
5168
|
-
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)\nproduct = client.v1.products.unarchive_product(\n "x",\n)\nprint(product.data)',
|
|
5360
|
+
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)\nproduct = client.v1.products.unarchive_product(\n id="x",\n)\nprint(product.data)',
|
|
5169
5361
|
},
|
|
5170
5362
|
java: {
|
|
5171
5363
|
method: 'v1().products().unarchiveProduct',
|
|
@@ -5173,7 +5365,7 @@ const EMBEDDED_METHODS = [
|
|
|
5173
5365
|
},
|
|
5174
5366
|
go: {
|
|
5175
5367
|
method: 'client.V1.Products.UnarchiveProduct',
|
|
5176
|
-
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\tproduct, err := client.V1.Products.UnarchiveProduct(
|
|
5368
|
+
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\tproduct, err := client.V1.Products.UnarchiveProduct(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1ProductUnarchiveProductParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", product.Data)\n}\n',
|
|
5177
5369
|
},
|
|
5178
5370
|
ruby: {
|
|
5179
5371
|
method: 'v1.products.unarchive_product',
|
|
@@ -5200,9 +5392,16 @@ const EMBEDDED_METHODS = [
|
|
|
5200
5392
|
description: 'Duplicates an existing product, including its plans, addons, and configuration.',
|
|
5201
5393
|
stainlessPath: '(resource) v1.products > (method) duplicate_product',
|
|
5202
5394
|
qualified: 'client.v1.products.duplicateProduct',
|
|
5203
|
-
params: [
|
|
5395
|
+
params: [
|
|
5396
|
+
'id: string;',
|
|
5397
|
+
'targetId: string;',
|
|
5398
|
+
'description?: string;',
|
|
5399
|
+
'displayName?: string;',
|
|
5400
|
+
'X-ACCOUNT-ID?: string;',
|
|
5401
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
5402
|
+
],
|
|
5204
5403
|
response: "{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }",
|
|
5205
|
-
markdown: "## duplicate_product\n\n`client.v1.products.duplicateProduct(id: string, targetId: string, description?: string, displayName?: string): { data: object; }`\n\n**post** `/api/v1/products/{id}/duplicate`\n\nDuplicates an existing product, including its plans, addons, and configuration.\n\n### Parameters\n\n- `id: string`\n\n- `targetId: string`\n The unique identifier for the entity\n\n- `description?: string`\n Description of the product\n\n- `displayName?: string`\n Display name of the product\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst product = await client.v1.products.duplicateProduct('x', { targetId: 'targetId' });\n\nconsole.log(product);\n```",
|
|
5404
|
+
markdown: "## duplicate_product\n\n`client.v1.products.duplicateProduct(id: string, targetId: string, description?: string, displayName?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/products/{id}/duplicate`\n\nDuplicates an existing product, including its plans, addons, and configuration.\n\n### Parameters\n\n- `id: string`\n\n- `targetId: string`\n The unique identifier for the entity\n\n- `description?: string`\n Description of the product\n\n- `displayName?: string`\n Display name of the product\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; description: string; displayName: string; metadata: object; multipleSubscriptions: boolean; status: 'PUBLISHED' | 'ARCHIVED'; updatedAt: string; productSettings?: { subscriptionCancellationTime: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE'; subscriptionEndSetup: 'DOWNGRADE_TO_FREE' | 'CANCEL_SUBSCRIPTION'; subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN'; downgradePlanId?: string; prorateAtEndOfBillingPeriod?: boolean; subscriptionStartPlanId?: string; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst product = await client.v1.products.duplicateProduct('x', { targetId: 'targetId' });\n\nconsole.log(product);\n```",
|
|
5206
5405
|
perLanguage: {
|
|
5207
5406
|
typescript: {
|
|
5208
5407
|
method: 'client.v1.products.duplicateProduct',
|
|
@@ -5249,7 +5448,7 @@ const EMBEDDED_READMES = [
|
|
|
5249
5448
|
},
|
|
5250
5449
|
{
|
|
5251
5450
|
language: 'go',
|
|
5252
|
-
content: '# Stigg Go API Library\n\n<a href="https://pkg.go.dev/github.com/stiggio/stigg-go"><img src="https://pkg.go.dev/badge/github.com/stiggio/stigg-go.svg" alt="Go Reference"></a>\n\nThe Stigg Go library provides convenient access to the Stigg REST API\nfrom applications written in Go.\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## Installation\n\n<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/stiggio/stigg-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/stiggio/stigg-go@v0.0.1\'\n```\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage 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"), // defaults to os.LookupEnv("STIGG_API_KEY")\n\t)\n\tcustomerResponse, err := client.V1.Customers.Get(context.TODO(), "REPLACE_ME")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customerResponse.Data)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.V1.Customers.Get(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/stiggio/stigg-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.V1.Customers.ListAutoPaging(context.TODO(), stigg.V1CustomerListParams{\n\tLimit: stigg.Int(30),\n})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tv1CustomerListResponse := iter.Current()\n\tfmt.Printf("%+v\\n", v1CustomerListResponse)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.V1.Customers.List(context.TODO(), stigg.V1CustomerListParams{\n\tLimit: stigg.Int(30),\n})\nfor page != nil {\n\tfor _, customer := range page.Data {\n\t\tfmt.Printf("%+v\\n", customer)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.V1.Customers.Get(context.TODO(), "REPLACE_ME")\nif err != nil {\n\tvar apierr *stigg.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/api/v1/customers/{id}": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.V1.Customers.Get(\n\tctx,\n\t"REPLACE_ME",\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := stigg.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.V1.Customers.Get(\n\tcontext.TODO(),\n\t"REPLACE_ME",\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\ncustomerResponse, err := client.V1.Customers.Get(\n\tcontext.TODO(),\n\t"REPLACE_ME",\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", customerResponse)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\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-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
|
|
5451
|
+
content: '# Stigg Go API Library\n\n<a href="https://pkg.go.dev/github.com/stiggio/stigg-go"><img src="https://pkg.go.dev/badge/github.com/stiggio/stigg-go.svg" alt="Go Reference"></a>\n\nThe Stigg Go library provides convenient access to the Stigg REST API\nfrom applications written in Go.\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## Installation\n\n<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/stiggio/stigg-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/stiggio/stigg-go@v0.0.1\'\n```\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage 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"), // defaults to os.LookupEnv("STIGG_API_KEY")\n\t)\n\tcustomerResponse, err := client.V1.Customers.Get(\n\t\tcontext.TODO(),\n\t\t"REPLACE_ME",\n\t\tstigg.V1CustomerGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customerResponse.Data)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.V1.Customers.Get(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/stiggio/stigg-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.V1.Customers.ListAutoPaging(context.TODO(), stigg.V1CustomerListParams{\n\tLimit: stigg.Int(30),\n})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tv1CustomerListResponse := iter.Current()\n\tfmt.Printf("%+v\\n", v1CustomerListResponse)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.V1.Customers.List(context.TODO(), stigg.V1CustomerListParams{\n\tLimit: stigg.Int(30),\n})\nfor page != nil {\n\tfor _, customer := range page.Data {\n\t\tfmt.Printf("%+v\\n", customer)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.V1.Customers.Get(\n\tcontext.TODO(),\n\t"REPLACE_ME",\n\tstigg.V1CustomerGetParams{},\n)\nif err != nil {\n\tvar apierr *stigg.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/api/v1/customers/{id}": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.V1.Customers.Get(\n\tctx,\n\t"REPLACE_ME",\n\tstigg.V1CustomerGetParams{},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := stigg.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.V1.Customers.Get(\n\tcontext.TODO(),\n\t"REPLACE_ME",\n\tstigg.V1CustomerGetParams{},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\ncustomerResponse, err := client.V1.Customers.Get(\n\tcontext.TODO(),\n\t"REPLACE_ME",\n\tstigg.V1CustomerGetParams{},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", customerResponse)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\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-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
|
|
5253
5452
|
},
|
|
5254
5453
|
{
|
|
5255
5454
|
language: 'java',
|
|
@@ -5257,7 +5456,7 @@ const EMBEDDED_READMES = [
|
|
|
5257
5456
|
},
|
|
5258
5457
|
{
|
|
5259
5458
|
language: 'python',
|
|
5260
|
-
content: '# Stigg Python API library\n\n<!-- prettier-ignore -->\n[)](https://pypi.org/project/stigg/)\n\nThe Stigg Python library provides convenient access to the Stigg REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\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## Documentation\n\n The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from PyPI\npip install stigg\n```\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport 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)\n\ncustomer_response = client.v1.customers.retrieve(\n "REPLACE_ME",\n)\nprint(customer_response.data)\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `STIGG_API_KEY="My API Key"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncStigg` instead of `Stigg` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom stigg import AsyncStigg\n\nclient = AsyncStigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\n\nasync def main() -> None:\n customer_response = await client.v1.customers.retrieve(\n "REPLACE_ME",\n )\n print(customer_response.data)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from PyPI\npip install stigg[aiohttp]\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom stigg import DefaultAioHttpClient\nfrom stigg import AsyncStigg\n\nasync def main() -> None:\n async with AsyncStigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n customer_response = await client.v1.customers.retrieve(\n "REPLACE_ME",\n )\n print(customer_response.data)\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n## Pagination\n\nList methods in the Stigg API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```python\nfrom stigg import Stigg\n\nclient = Stigg()\n\nall_customers = []\n# Automatically fetches more pages as needed.\nfor customer in client.v1.customers.list(\n limit=30,\n):\n # Do something with customer here\n all_customers.append(customer)\nprint(all_customers)\n```\n\nOr, asynchronously:\n\n```python\nimport asyncio\nfrom stigg import AsyncStigg\n\nclient = AsyncStigg()\n\nasync def main() -> None:\n all_customers = []\n # Iterate through items across all pages, issuing requests as needed.\n async for customer in client.v1.customers.list(\n limit=30,\n):\n all_customers.append(customer)\n print(all_customers)\n\nasyncio.run(main())\n```\n\nAlternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:\n\n```python\nfirst_page = await client.v1.customers.list(\n limit=30,\n)\nif first_page.has_next_page():\n print(f"will fetch next page using these details: {first_page.next_page_info()}")\n next_page = await first_page.get_next_page()\n print(f"number of items we just fetched: {len(next_page.data)}")\n\n# Remove `await` for non-async usage.\n```\n\nOr just work directly with the returned data:\n\n```python\nfirst_page = await client.v1.customers.list(\n limit=30,\n)\n\nprint(f"next page cursor: {first_page.pagination.next}") # => "next page cursor: ..."\nfor customer in first_page.data:\n print(customer.id)\n\n# Remove `await` for non-async usage.\n```\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom stigg import Stigg\n\nclient = Stigg()\n\ncustomer_response = client.v1.customers.update(\n id="x",\n passthrough={},\n)\nprint(customer_response.passthrough)\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `stigg.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `stigg.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `stigg.APIError`.\n\n```python\nimport stigg\nfrom stigg import Stigg\n\nclient = Stigg()\n\ntry:\n client.v1.customers.retrieve(\n "REPLACE_ME",\n )\nexcept stigg.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept stigg.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept stigg.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom stigg import Stigg\n\n# Configure the default for all requests:\nclient = Stigg(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).v1.customers.retrieve(\n "REPLACE_ME",\n)\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom stigg import Stigg\n\n# Configure the default for all requests:\nclient = Stigg(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = Stigg(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).v1.customers.retrieve(\n "REPLACE_ME",\n)\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `STIGG_LOG` to `info`.\n\n```shell\n$ export STIGG_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom stigg import Stigg\n\nclient = Stigg()\nresponse = client.v1.customers.with_raw_response.retrieve(\n "REPLACE_ME",\n)\nprint(response.headers.get(\'X-My-Header\'))\n\ncustomer = response.parse() # get the object that `v1.customers.retrieve()` would have returned\nprint(customer.data)\n```\n\nThese methods return an [`APIResponse`](https://github.com/stiggio/stigg-python/tree/main/src/stigg/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/stiggio/stigg-python/tree/main/src/stigg/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.v1.customers.with_streaming_response.retrieve(\n "REPLACE_ME",\n) as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom stigg import Stigg, DefaultHttpxClient\n\nclient = Stigg(\n # Or use the `STIGG_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom stigg import Stigg\n\nwith Stigg() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## 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 that only affect static types, without breaking runtime behavior.\n2. 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.)_\n3. 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-python/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport stigg\nprint(stigg.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
|
|
5459
|
+
content: '# Stigg Python API library\n\n<!-- prettier-ignore -->\n[)](https://pypi.org/project/stigg/)\n\nThe Stigg Python library provides convenient access to the Stigg REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\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## Documentation\n\n The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from PyPI\npip install stigg\n```\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport 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)\n\ncustomer_response = client.v1.customers.retrieve(\n id="REPLACE_ME",\n)\nprint(customer_response.data)\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `STIGG_API_KEY="My API Key"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncStigg` instead of `Stigg` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom stigg import AsyncStigg\n\nclient = AsyncStigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\n\nasync def main() -> None:\n customer_response = await client.v1.customers.retrieve(\n id="REPLACE_ME",\n )\n print(customer_response.data)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from PyPI\npip install stigg[aiohttp]\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom stigg import DefaultAioHttpClient\nfrom stigg import AsyncStigg\n\nasync def main() -> None:\n async with AsyncStigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n customer_response = await client.v1.customers.retrieve(\n id="REPLACE_ME",\n )\n print(customer_response.data)\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n## Pagination\n\nList methods in the Stigg API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```python\nfrom stigg import Stigg\n\nclient = Stigg()\n\nall_customers = []\n# Automatically fetches more pages as needed.\nfor customer in client.v1.customers.list(\n limit=30,\n):\n # Do something with customer here\n all_customers.append(customer)\nprint(all_customers)\n```\n\nOr, asynchronously:\n\n```python\nimport asyncio\nfrom stigg import AsyncStigg\n\nclient = AsyncStigg()\n\nasync def main() -> None:\n all_customers = []\n # Iterate through items across all pages, issuing requests as needed.\n async for customer in client.v1.customers.list(\n limit=30,\n):\n all_customers.append(customer)\n print(all_customers)\n\nasyncio.run(main())\n```\n\nAlternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:\n\n```python\nfirst_page = await client.v1.customers.list(\n limit=30,\n)\nif first_page.has_next_page():\n print(f"will fetch next page using these details: {first_page.next_page_info()}")\n next_page = await first_page.get_next_page()\n print(f"number of items we just fetched: {len(next_page.data)}")\n\n# Remove `await` for non-async usage.\n```\n\nOr just work directly with the returned data:\n\n```python\nfirst_page = await client.v1.customers.list(\n limit=30,\n)\n\nprint(f"next page cursor: {first_page.pagination.next}") # => "next page cursor: ..."\nfor customer in first_page.data:\n print(customer.id)\n\n# Remove `await` for non-async usage.\n```\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom stigg import Stigg\n\nclient = Stigg()\n\ncustomer_response = client.v1.customers.update(\n id="x",\n passthrough={},\n)\nprint(customer_response.passthrough)\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `stigg.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `stigg.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `stigg.APIError`.\n\n```python\nimport stigg\nfrom stigg import Stigg\n\nclient = Stigg()\n\ntry:\n client.v1.customers.retrieve(\n id="REPLACE_ME",\n )\nexcept stigg.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept stigg.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept stigg.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom stigg import Stigg\n\n# Configure the default for all requests:\nclient = Stigg(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).v1.customers.retrieve(\n id="REPLACE_ME",\n)\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom stigg import Stigg\n\n# Configure the default for all requests:\nclient = Stigg(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = Stigg(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).v1.customers.retrieve(\n id="REPLACE_ME",\n)\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `STIGG_LOG` to `info`.\n\n```shell\n$ export STIGG_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom stigg import Stigg\n\nclient = Stigg()\nresponse = client.v1.customers.with_raw_response.retrieve(\n id="REPLACE_ME",\n)\nprint(response.headers.get(\'X-My-Header\'))\n\ncustomer = response.parse() # get the object that `v1.customers.retrieve()` would have returned\nprint(customer.data)\n```\n\nThese methods return an [`APIResponse`](https://github.com/stiggio/stigg-python/tree/main/src/stigg/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/stiggio/stigg-python/tree/main/src/stigg/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.v1.customers.with_streaming_response.retrieve(\n id="REPLACE_ME",\n) as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom stigg import Stigg, DefaultHttpxClient\n\nclient = Stigg(\n # Or use the `STIGG_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom stigg import Stigg\n\nwith Stigg() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## 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 that only affect static types, without breaking runtime behavior.\n2. 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.)_\n3. 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-python/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport stigg\nprint(stigg.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
|
|
5261
5460
|
},
|
|
5262
5461
|
{
|
|
5263
5462
|
language: 'ruby',
|