@stigg/typescript-mcp 0.1.0-beta.1 → 0.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/code-tool-worker.js +12 -12
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +12 -12
- package/code-tool-worker.mjs.map +1 -1
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +221 -221
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +221 -221
- package/local-docs-search.mjs.map +1 -1
- package/methods.js +28 -28
- package/methods.js.map +1 -1
- package/methods.mjs +28 -28
- package/methods.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool-worker.ts +12 -12
- package/src/local-docs-search.ts +232 -235
- package/src/methods.ts +28 -28
- package/src/server.ts +1 -1
package/local-docs-search.js
CHANGED
|
@@ -2056,8 +2056,8 @@ const EMBEDDED_METHODS = [
|
|
|
2056
2056
|
httpMethod: 'get',
|
|
2057
2057
|
summary: 'Get credit usage',
|
|
2058
2058
|
description: 'Retrieves credit usage time-series data for a customer, grouped by feature, over a specified time range.',
|
|
2059
|
-
stainlessPath: '(resource) v1.
|
|
2060
|
-
qualified: 'client.v1.
|
|
2059
|
+
stainlessPath: '(resource) v1.credits > (method) get_usage',
|
|
2060
|
+
qualified: 'client.v1.credits.getUsage',
|
|
2061
2061
|
params: [
|
|
2062
2062
|
'customerId: string;',
|
|
2063
2063
|
'currencyId?: string;',
|
|
@@ -2067,94 +2067,49 @@ const EMBEDDED_METHODS = [
|
|
|
2067
2067
|
"timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR';",
|
|
2068
2068
|
],
|
|
2069
2069
|
response: '{ data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; series: { featureId: string; featureName: string; points: object[]; totalCredits: number; }[]; }; }',
|
|
2070
|
-
markdown: "## get_usage\n\n`client.v1.
|
|
2070
|
+
markdown: "## get_usage\n\n`client.v1.credits.getUsage(customerId: string, currencyId?: string, endDate?: string, 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- `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- `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; }; series: { featureId: string; featureName: string; points: object[]; totalCredits: number; }[]; }; }`\n Response object\n\n - `data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; series: { featureId: string; featureName: string; points: { timestamp: string; value: number; }[]; totalCredits: number; }[]; }`\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```",
|
|
2071
2071
|
perLanguage: {
|
|
2072
2072
|
typescript: {
|
|
2073
|
-
method: 'client.v1.
|
|
2074
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.
|
|
2073
|
+
method: 'client.v1.credits.getUsage',
|
|
2074
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.credits.getUsage({ customerId: 'customerId' });\n\nconsole.log(response.data);",
|
|
2075
2075
|
},
|
|
2076
2076
|
python: {
|
|
2077
|
-
method: 'v1.
|
|
2078
|
-
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.
|
|
2077
|
+
method: 'v1.credits.get_usage',
|
|
2078
|
+
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.get_usage(\n customer_id="customerId",\n)\nprint(response.data)',
|
|
2079
2079
|
},
|
|
2080
2080
|
java: {
|
|
2081
|
-
method: 'v1().
|
|
2082
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2081
|
+
method: 'v1().credits().getUsage',
|
|
2082
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.CreditGetUsageParams;\nimport io.stigg.models.v1.credits.CreditGetUsageResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CreditGetUsageParams params = CreditGetUsageParams.builder()\n .customerId("customerId")\n .build();\n CreditGetUsageResponse response = client.v1().credits().getUsage(params);\n }\n}',
|
|
2083
2083
|
},
|
|
2084
2084
|
go: {
|
|
2085
|
-
method: 'client.V1.
|
|
2086
|
-
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.
|
|
2085
|
+
method: 'client.V1.Credits.GetUsage',
|
|
2086
|
+
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.GetUsage(context.TODO(), stigg.V1CreditGetUsageParams{\n\t\tCustomerID: "customerId",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
2087
2087
|
},
|
|
2088
2088
|
ruby: {
|
|
2089
|
-
method: 'v1.
|
|
2090
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.
|
|
2089
|
+
method: 'v1.credits.get_usage',
|
|
2090
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.credits.get_usage(customer_id: "customerId")\n\nputs(response)',
|
|
2091
2091
|
},
|
|
2092
2092
|
cli: {
|
|
2093
2093
|
method: 'credits get_usage',
|
|
2094
|
-
example: "stigg v1:
|
|
2094
|
+
example: "stigg v1:credits get-usage \\\n --api-key 'My API Key' \\\n --customer-id customerId",
|
|
2095
2095
|
},
|
|
2096
2096
|
csharp: {
|
|
2097
|
-
method: 'V1.
|
|
2098
|
-
example: 'CreditGetUsageParams parameters = new() { CustomerID = "customerId" };\n\nvar response = await client.V1.
|
|
2097
|
+
method: 'V1.Credits.GetUsage',
|
|
2098
|
+
example: 'CreditGetUsageParams parameters = new() { CustomerID = "customerId" };\n\nvar response = await client.V1.Credits.GetUsage(parameters);\n\nConsole.WriteLine(response);',
|
|
2099
2099
|
},
|
|
2100
2100
|
http: {
|
|
2101
2101
|
example: 'curl https://api.stigg.io/api/v1/credits/usage \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2102
2102
|
},
|
|
2103
2103
|
},
|
|
2104
2104
|
},
|
|
2105
|
-
{
|
|
2106
|
-
name: 'get_auto_recharge',
|
|
2107
|
-
endpoint: '/api/v1/credits/auto-recharge',
|
|
2108
|
-
httpMethod: 'get',
|
|
2109
|
-
summary: 'Get automatic recharge configuration',
|
|
2110
|
-
description: 'Retrieves the automatic recharge configuration for a customer and currency. Returns default settings if no configuration exists.',
|
|
2111
|
-
stainlessPath: '(resource) v1.events.credits > (method) get_auto_recharge',
|
|
2112
|
-
qualified: 'client.v1.events.credits.getAutoRecharge',
|
|
2113
|
-
params: ['currencyId: string;', 'customerId: string;'],
|
|
2114
|
-
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; }; }",
|
|
2115
|
-
markdown: "## get_auto_recharge\n\n`client.v1.events.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.events.credits.getAutoRecharge({ currencyId: 'currencyId', customerId: 'customerId' });\n\nconsole.log(response);\n```",
|
|
2116
|
-
perLanguage: {
|
|
2117
|
-
typescript: {
|
|
2118
|
-
method: 'client.v1.events.credits.getAutoRecharge',
|
|
2119
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.events.credits.getAutoRecharge({\n currencyId: 'currencyId',\n customerId: 'customerId',\n});\n\nconsole.log(response.data);",
|
|
2120
|
-
},
|
|
2121
|
-
python: {
|
|
2122
|
-
method: 'v1.events.credits.get_auto_recharge',
|
|
2123
|
-
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.events.credits.get_auto_recharge(\n currency_id="currencyId",\n customer_id="customerId",\n)\nprint(response.data)',
|
|
2124
|
-
},
|
|
2125
|
-
java: {
|
|
2126
|
-
method: 'v1().events().credits().getAutoRecharge',
|
|
2127
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.credits.CreditGetAutoRechargeParams;\nimport io.stigg.models.v1.events.credits.CreditGetAutoRechargeResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CreditGetAutoRechargeParams params = CreditGetAutoRechargeParams.builder()\n .currencyId("currencyId")\n .customerId("customerId")\n .build();\n CreditGetAutoRechargeResponse response = client.v1().events().credits().getAutoRecharge(params);\n }\n}',
|
|
2128
|
-
},
|
|
2129
|
-
go: {
|
|
2130
|
-
method: 'client.V1.Events.Credits.GetAutoRecharge',
|
|
2131
|
-
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.Events.Credits.GetAutoRecharge(context.TODO(), stigg.V1EventCreditGetAutoRechargeParams{\n\t\tCurrencyID: "currencyId",\n\t\tCustomerID: "customerId",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
2132
|
-
},
|
|
2133
|
-
ruby: {
|
|
2134
|
-
method: 'v1.events.credits.get_auto_recharge',
|
|
2135
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.events.credits.get_auto_recharge(currency_id: "currencyId", customer_id: "customerId")\n\nputs(response)',
|
|
2136
|
-
},
|
|
2137
|
-
cli: {
|
|
2138
|
-
method: 'credits get_auto_recharge',
|
|
2139
|
-
example: "stigg v1:events:credits get-auto-recharge \\\n --api-key 'My API Key' \\\n --currency-id currencyId \\\n --customer-id customerId",
|
|
2140
|
-
},
|
|
2141
|
-
csharp: {
|
|
2142
|
-
method: 'V1.Events.Credits.GetAutoRecharge',
|
|
2143
|
-
example: 'CreditGetAutoRechargeParams parameters = new()\n{\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n};\n\nvar response = await client.V1.Events.Credits.GetAutoRecharge(parameters);\n\nConsole.WriteLine(response);',
|
|
2144
|
-
},
|
|
2145
|
-
http: {
|
|
2146
|
-
example: 'curl https://api.stigg.io/api/v1/credits/auto-recharge \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2147
|
-
},
|
|
2148
|
-
},
|
|
2149
|
-
},
|
|
2150
2105
|
{
|
|
2151
2106
|
name: 'list_ledger',
|
|
2152
2107
|
endpoint: '/api/v1/credits/ledger',
|
|
2153
2108
|
httpMethod: 'get',
|
|
2154
2109
|
summary: 'Get a list of credit ledger events',
|
|
2155
2110
|
description: 'Retrieves a paginated list of credit ledger events for a customer.',
|
|
2156
|
-
stainlessPath: '(resource) v1.
|
|
2157
|
-
qualified: 'client.v1.
|
|
2111
|
+
stainlessPath: '(resource) v1.credits > (method) list_ledger',
|
|
2112
|
+
qualified: 'client.v1.credits.listLedger',
|
|
2158
2113
|
params: [
|
|
2159
2114
|
'customerId: string;',
|
|
2160
2115
|
'after?: string;',
|
|
@@ -2164,35 +2119,35 @@ const EMBEDDED_METHODS = [
|
|
|
2164
2119
|
'resourceId?: string;',
|
|
2165
2120
|
],
|
|
2166
2121
|
response: '{ amount: number; creditCurrencyId: string; creditGrantId: string; customerId: string; eventId: string; eventType: string; featureId: string; resourceId: string; timestamp: string; }',
|
|
2167
|
-
markdown: "## list_ledger\n\n`client.v1.
|
|
2122
|
+
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```",
|
|
2168
2123
|
perLanguage: {
|
|
2169
2124
|
typescript: {
|
|
2170
|
-
method: 'client.v1.
|
|
2171
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const creditListLedgerResponse of client.v1.
|
|
2125
|
+
method: 'client.v1.credits.listLedger',
|
|
2126
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const creditListLedgerResponse of client.v1.credits.listLedger({\n customerId: 'customerId',\n})) {\n console.log(creditListLedgerResponse.amount);\n}",
|
|
2172
2127
|
},
|
|
2173
2128
|
python: {
|
|
2174
|
-
method: 'v1.
|
|
2175
|
-
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)\npage = client.v1.
|
|
2129
|
+
method: 'v1.credits.list_ledger',
|
|
2130
|
+
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)\npage = client.v1.credits.list_ledger(\n customer_id="customerId",\n)\npage = page.data[0]\nprint(page.amount)',
|
|
2176
2131
|
},
|
|
2177
2132
|
java: {
|
|
2178
|
-
method: 'v1().
|
|
2179
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2133
|
+
method: 'v1().credits().listLedger',
|
|
2134
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.CreditListLedgerPage;\nimport io.stigg.models.v1.credits.CreditListLedgerParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CreditListLedgerParams params = CreditListLedgerParams.builder()\n .customerId("customerId")\n .build();\n CreditListLedgerPage page = client.v1().credits().listLedger(params);\n }\n}',
|
|
2180
2135
|
},
|
|
2181
2136
|
go: {
|
|
2182
|
-
method: 'client.V1.
|
|
2183
|
-
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\tpage, err := client.V1.
|
|
2137
|
+
method: 'client.V1.Credits.ListLedger',
|
|
2138
|
+
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\tpage, err := client.V1.Credits.ListLedger(context.TODO(), stigg.V1CreditListLedgerParams{\n\t\tCustomerID: "customerId",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2184
2139
|
},
|
|
2185
2140
|
ruby: {
|
|
2186
|
-
method: 'v1.
|
|
2187
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.
|
|
2141
|
+
method: 'v1.credits.list_ledger',
|
|
2142
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.credits.list_ledger(customer_id: "customerId")\n\nputs(page)',
|
|
2188
2143
|
},
|
|
2189
2144
|
cli: {
|
|
2190
2145
|
method: 'credits list_ledger',
|
|
2191
|
-
example: "stigg v1:
|
|
2146
|
+
example: "stigg v1:credits list-ledger \\\n --api-key 'My API Key' \\\n --customer-id customerId",
|
|
2192
2147
|
},
|
|
2193
2148
|
csharp: {
|
|
2194
|
-
method: 'V1.
|
|
2195
|
-
example: 'CreditListLedgerParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.
|
|
2149
|
+
method: 'V1.Credits.ListLedger',
|
|
2150
|
+
example: 'CreditListLedgerParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.Credits.ListLedger(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
2196
2151
|
},
|
|
2197
2152
|
http: {
|
|
2198
2153
|
example: 'curl https://api.stigg.io/api/v1/credits/ledger \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2205,8 +2160,8 @@ const EMBEDDED_METHODS = [
|
|
|
2205
2160
|
httpMethod: 'get',
|
|
2206
2161
|
summary: 'Get a list of credit grants',
|
|
2207
2162
|
description: 'Retrieves a paginated list of credit grants for a customer.',
|
|
2208
|
-
stainlessPath: '(resource) v1.
|
|
2209
|
-
qualified: 'client.v1.
|
|
2163
|
+
stainlessPath: '(resource) v1.credits.grants > (method) list',
|
|
2164
|
+
qualified: 'client.v1.credits.grants.list',
|
|
2210
2165
|
params: [
|
|
2211
2166
|
'customerId: string;',
|
|
2212
2167
|
'after?: string;',
|
|
@@ -2217,35 +2172,35 @@ const EMBEDDED_METHODS = [
|
|
|
2217
2172
|
'resourceId?: string;',
|
|
2218
2173
|
],
|
|
2219
2174
|
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; }",
|
|
2220
|
-
markdown: "## list\n\n`client.v1.
|
|
2175
|
+
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```",
|
|
2221
2176
|
perLanguage: {
|
|
2222
2177
|
typescript: {
|
|
2223
|
-
method: 'client.v1.
|
|
2224
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const grantListResponse of client.v1.
|
|
2178
|
+
method: 'client.v1.credits.grants.list',
|
|
2179
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const grantListResponse of client.v1.credits.grants.list({ customerId: 'customerId' })) {\n console.log(grantListResponse.id);\n}",
|
|
2225
2180
|
},
|
|
2226
2181
|
python: {
|
|
2227
|
-
method: 'v1.
|
|
2228
|
-
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)\npage = client.v1.
|
|
2182
|
+
method: 'v1.credits.grants.list',
|
|
2183
|
+
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)\npage = client.v1.credits.grants.list(\n customer_id="customerId",\n)\npage = page.data[0]\nprint(page.id)',
|
|
2229
2184
|
},
|
|
2230
2185
|
java: {
|
|
2231
|
-
method: 'v1().
|
|
2232
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2186
|
+
method: 'v1().credits().grants().list',
|
|
2187
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.grants.GrantListPage;\nimport io.stigg.models.v1.credits.grants.GrantListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n GrantListParams params = GrantListParams.builder()\n .customerId("customerId")\n .build();\n GrantListPage page = client.v1().credits().grants().list(params);\n }\n}',
|
|
2233
2188
|
},
|
|
2234
2189
|
go: {
|
|
2235
|
-
method: 'client.V1.
|
|
2236
|
-
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\tpage, err := client.V1.
|
|
2190
|
+
method: 'client.V1.Credits.Grants.List',
|
|
2191
|
+
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\tpage, err := client.V1.Credits.Grants.List(context.TODO(), stigg.V1CreditGrantListParams{\n\t\tCustomerID: "customerId",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2237
2192
|
},
|
|
2238
2193
|
ruby: {
|
|
2239
|
-
method: 'v1.
|
|
2240
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.
|
|
2194
|
+
method: 'v1.credits.grants.list',
|
|
2195
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.credits.grants.list(customer_id: "customerId")\n\nputs(page)',
|
|
2241
2196
|
},
|
|
2242
2197
|
cli: {
|
|
2243
2198
|
method: 'grants list',
|
|
2244
|
-
example: "stigg v1:
|
|
2199
|
+
example: "stigg v1:credits:grants list \\\n --api-key 'My API Key' \\\n --customer-id customerId",
|
|
2245
2200
|
},
|
|
2246
2201
|
csharp: {
|
|
2247
|
-
method: 'V1.
|
|
2248
|
-
example: 'GrantListParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.
|
|
2202
|
+
method: 'V1.Credits.Grants.List',
|
|
2203
|
+
example: 'GrantListParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.Credits.Grants.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
2249
2204
|
},
|
|
2250
2205
|
http: {
|
|
2251
2206
|
example: 'curl https://api.stigg.io/api/v1/credits/grants \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2258,8 +2213,8 @@ const EMBEDDED_METHODS = [
|
|
|
2258
2213
|
httpMethod: 'post',
|
|
2259
2214
|
summary: 'Create a credit grant',
|
|
2260
2215
|
description: 'Creates a new credit grant for a customer with specified amount, type, and optional billing configuration.',
|
|
2261
|
-
stainlessPath: '(resource) v1.
|
|
2262
|
-
qualified: 'client.v1.
|
|
2216
|
+
stainlessPath: '(resource) v1.credits.grants > (method) create',
|
|
2217
|
+
qualified: 'client.v1.credits.grants.create',
|
|
2263
2218
|
params: [
|
|
2264
2219
|
'amount: number;',
|
|
2265
2220
|
'currencyId: string;',
|
|
@@ -2278,35 +2233,35 @@ const EMBEDDED_METHODS = [
|
|
|
2278
2233
|
'resourceId?: string;',
|
|
2279
2234
|
],
|
|
2280
2235
|
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; }; }",
|
|
2281
|
-
markdown: "## create\n\n`client.v1.
|
|
2236
|
+
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```",
|
|
2282
2237
|
perLanguage: {
|
|
2283
2238
|
typescript: {
|
|
2284
|
-
method: 'client.v1.
|
|
2285
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst creditGrantResponse = await client.v1.
|
|
2239
|
+
method: 'client.v1.credits.grants.create',
|
|
2240
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst 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.data);",
|
|
2286
2241
|
},
|
|
2287
2242
|
python: {
|
|
2288
|
-
method: 'v1.
|
|
2289
|
-
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.
|
|
2243
|
+
method: 'v1.credits.grants.create',
|
|
2244
|
+
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.create(\n amount=0,\n currency_id="currencyId",\n customer_id="customerId",\n display_name="displayName",\n grant_type="PAID",\n)\nprint(credit_grant_response.data)',
|
|
2290
2245
|
},
|
|
2291
2246
|
java: {
|
|
2292
|
-
method: 'v1().
|
|
2293
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2247
|
+
method: 'v1().credits().grants().create',
|
|
2248
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.grants.CreditGrantResponse;\nimport io.stigg.models.v1.credits.grants.GrantCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n GrantCreateParams params = GrantCreateParams.builder()\n .amount(0.0)\n .currencyId("currencyId")\n .customerId("customerId")\n .displayName("displayName")\n .grantType(GrantCreateParams.GrantType.PAID)\n .build();\n CreditGrantResponse creditGrantResponse = client.v1().credits().grants().create(params);\n }\n}',
|
|
2294
2249
|
},
|
|
2295
2250
|
go: {
|
|
2296
|
-
method: 'client.V1.
|
|
2297
|
-
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.
|
|
2251
|
+
method: 'client.V1.Credits.Grants.New',
|
|
2252
|
+
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.New(context.TODO(), stigg.V1CreditGrantNewParams{\n\t\tAmount: 0,\n\t\tCurrencyID: "currencyId",\n\t\tCustomerID: "customerId",\n\t\tDisplayName: "displayName",\n\t\tGrantType: stigg.V1CreditGrantNewParamsGrantTypePaid,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", creditGrantResponse.Data)\n}\n',
|
|
2298
2253
|
},
|
|
2299
2254
|
ruby: {
|
|
2300
|
-
method: 'v1.
|
|
2301
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncredit_grant_response = stigg.v1.
|
|
2255
|
+
method: 'v1.credits.grants.create',
|
|
2256
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncredit_grant_response = stigg.v1.credits.grants.create(\n amount: 0,\n currency_id: "currencyId",\n customer_id: "customerId",\n display_name: "displayName",\n grant_type: :PAID\n)\n\nputs(credit_grant_response)',
|
|
2302
2257
|
},
|
|
2303
2258
|
cli: {
|
|
2304
2259
|
method: 'grants create',
|
|
2305
|
-
example: "stigg v1:
|
|
2260
|
+
example: "stigg v1:credits:grants create \\\n --api-key 'My API Key' \\\n --amount 0 \\\n --currency-id currencyId \\\n --customer-id customerId \\\n --display-name displayName \\\n --grant-type PAID",
|
|
2306
2261
|
},
|
|
2307
2262
|
csharp: {
|
|
2308
|
-
method: 'V1.
|
|
2309
|
-
example: 'GrantCreateParams parameters = new()\n{\n Amount = 0,\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n DisplayName = "displayName",\n GrantType = GrantType.Paid,\n};\n\nvar creditGrantResponse = await client.V1.
|
|
2263
|
+
method: 'V1.Credits.Grants.Create',
|
|
2264
|
+
example: 'GrantCreateParams parameters = new()\n{\n Amount = 0,\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n DisplayName = "displayName",\n GrantType = GrantType.Paid,\n};\n\nvar creditGrantResponse = await client.V1.Credits.Grants.Create(parameters);\n\nConsole.WriteLine(creditGrantResponse);',
|
|
2310
2265
|
},
|
|
2311
2266
|
http: {
|
|
2312
2267
|
example: 'curl https://api.stigg.io/api/v1/credits/grants \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "amount": 0,\n "currencyId": "currencyId",\n "customerId": "customerId",\n "displayName": "displayName",\n "grantType": "PAID"\n }\'',
|
|
@@ -2319,39 +2274,39 @@ const EMBEDDED_METHODS = [
|
|
|
2319
2274
|
httpMethod: 'post',
|
|
2320
2275
|
summary: 'Void credit grant',
|
|
2321
2276
|
description: 'Voids an existing credit grant, preventing further consumption of the remaining credits.',
|
|
2322
|
-
stainlessPath: '(resource) v1.
|
|
2323
|
-
qualified: 'client.v1.
|
|
2277
|
+
stainlessPath: '(resource) v1.credits.grants > (method) void',
|
|
2278
|
+
qualified: 'client.v1.credits.grants.void',
|
|
2324
2279
|
params: ['id: string;'],
|
|
2325
2280
|
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; }; }",
|
|
2326
|
-
markdown: "## void\n\n`client.v1.
|
|
2281
|
+
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```",
|
|
2327
2282
|
perLanguage: {
|
|
2328
2283
|
typescript: {
|
|
2329
|
-
method: 'client.v1.
|
|
2330
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst creditGrantResponse = await client.v1.
|
|
2284
|
+
method: 'client.v1.credits.grants.void',
|
|
2285
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst creditGrantResponse = await client.v1.credits.grants.void('x');\n\nconsole.log(creditGrantResponse.data);",
|
|
2331
2286
|
},
|
|
2332
2287
|
python: {
|
|
2333
|
-
method: 'v1.
|
|
2334
|
-
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.
|
|
2288
|
+
method: 'v1.credits.grants.void',
|
|
2289
|
+
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)',
|
|
2335
2290
|
},
|
|
2336
2291
|
java: {
|
|
2337
|
-
method: 'v1().
|
|
2338
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2292
|
+
method: 'v1().credits().grants().void_',
|
|
2293
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.grants.CreditGrantResponse;\nimport io.stigg.models.v1.credits.grants.GrantVoidParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CreditGrantResponse creditGrantResponse = client.v1().credits().grants().void_("x");\n }\n}',
|
|
2339
2294
|
},
|
|
2340
2295
|
go: {
|
|
2341
|
-
method: 'client.V1.
|
|
2342
|
-
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.
|
|
2296
|
+
method: 'client.V1.Credits.Grants.Void',
|
|
2297
|
+
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(context.TODO(), "x")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", creditGrantResponse.Data)\n}\n',
|
|
2343
2298
|
},
|
|
2344
2299
|
ruby: {
|
|
2345
|
-
method: 'v1.
|
|
2346
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncredit_grant_response = stigg.v1.
|
|
2300
|
+
method: 'v1.credits.grants.void',
|
|
2301
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncredit_grant_response = stigg.v1.credits.grants.void("x")\n\nputs(credit_grant_response)',
|
|
2347
2302
|
},
|
|
2348
2303
|
cli: {
|
|
2349
2304
|
method: 'grants void',
|
|
2350
|
-
example: "stigg v1:
|
|
2305
|
+
example: "stigg v1:credits:grants void \\\n --api-key 'My API Key' \\\n --id x",
|
|
2351
2306
|
},
|
|
2352
2307
|
csharp: {
|
|
2353
|
-
method: 'V1.
|
|
2354
|
-
example: 'GrantVoidParams parameters = new() { ID = "x" };\n\nvar creditGrantResponse = await client.V1.
|
|
2308
|
+
method: 'V1.Credits.Grants.Void',
|
|
2309
|
+
example: 'GrantVoidParams parameters = new() { ID = "x" };\n\nvar creditGrantResponse = await client.V1.Credits.Grants.Void(parameters);\n\nConsole.WriteLine(creditGrantResponse);',
|
|
2355
2310
|
},
|
|
2356
2311
|
http: {
|
|
2357
2312
|
example: 'curl https://api.stigg.io/api/v1/credits/grants/$ID/void \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2364,39 +2319,39 @@ const EMBEDDED_METHODS = [
|
|
|
2364
2319
|
httpMethod: 'get',
|
|
2365
2320
|
summary: 'Get a list of custom currencys',
|
|
2366
2321
|
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.',
|
|
2367
|
-
stainlessPath: '(resource) v1.
|
|
2368
|
-
qualified: 'client.v1.
|
|
2322
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) list',
|
|
2323
|
+
qualified: 'client.v1.credits.customCurrencies.list',
|
|
2369
2324
|
params: ['after?: string;', 'before?: string;', 'limit?: number;', "status?: 'ACTIVE' | 'ARCHIVED'[];"],
|
|
2370
2325
|
response: '{ id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }',
|
|
2371
|
-
markdown: "## list\n\n`client.v1.
|
|
2326
|
+
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```",
|
|
2372
2327
|
perLanguage: {
|
|
2373
2328
|
typescript: {
|
|
2374
|
-
method: 'client.v1.
|
|
2375
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const customCurrencyListResponse of client.v1.
|
|
2329
|
+
method: 'client.v1.credits.customCurrencies.list',
|
|
2330
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const customCurrencyListResponse of client.v1.credits.customCurrencies.list()) {\n console.log(customCurrencyListResponse.id);\n}",
|
|
2376
2331
|
},
|
|
2377
2332
|
python: {
|
|
2378
|
-
method: 'v1.
|
|
2379
|
-
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)\npage = client.v1.
|
|
2333
|
+
method: 'v1.credits.custom_currencies.list',
|
|
2334
|
+
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)\npage = client.v1.credits.custom_currencies.list()\npage = page.data[0]\nprint(page.id)',
|
|
2380
2335
|
},
|
|
2381
2336
|
java: {
|
|
2382
|
-
method: 'v1().
|
|
2383
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2337
|
+
method: 'v1().credits().customCurrencies().list',
|
|
2338
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyListPage;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CustomCurrencyListPage page = client.v1().credits().customCurrencies().list();\n }\n}',
|
|
2384
2339
|
},
|
|
2385
2340
|
go: {
|
|
2386
|
-
method: 'client.V1.
|
|
2387
|
-
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\tpage, err := client.V1.
|
|
2341
|
+
method: 'client.V1.Credits.CustomCurrencies.List',
|
|
2342
|
+
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\tpage, err := client.V1.Credits.CustomCurrencies.List(context.TODO(), stigg.V1CreditCustomCurrencyListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2388
2343
|
},
|
|
2389
2344
|
ruby: {
|
|
2390
|
-
method: 'v1.
|
|
2391
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.
|
|
2345
|
+
method: 'v1.credits.custom_currencies.list',
|
|
2346
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.credits.custom_currencies.list\n\nputs(page)',
|
|
2392
2347
|
},
|
|
2393
2348
|
cli: {
|
|
2394
2349
|
method: 'custom_currencies list',
|
|
2395
|
-
example: "stigg v1:
|
|
2350
|
+
example: "stigg v1:credits:custom-currencies list \\\n --api-key 'My API Key'",
|
|
2396
2351
|
},
|
|
2397
2352
|
csharp: {
|
|
2398
|
-
method: 'V1.
|
|
2399
|
-
example: 'CustomCurrencyListParams parameters = new();\n\nvar page = await client.V1.
|
|
2353
|
+
method: 'V1.Credits.CustomCurrencies.List',
|
|
2354
|
+
example: 'CustomCurrencyListParams parameters = new();\n\nvar page = await client.V1.Credits.CustomCurrencies.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
2400
2355
|
},
|
|
2401
2356
|
http: {
|
|
2402
2357
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2409,8 +2364,8 @@ const EMBEDDED_METHODS = [
|
|
|
2409
2364
|
httpMethod: 'post',
|
|
2410
2365
|
summary: 'Create custom currency',
|
|
2411
2366
|
description: 'Creates a new custom currency in the environment.',
|
|
2412
|
-
stainlessPath: '(resource) v1.
|
|
2413
|
-
qualified: 'client.v1.
|
|
2367
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) create',
|
|
2368
|
+
qualified: 'client.v1.credits.customCurrencies.create',
|
|
2414
2369
|
params: [
|
|
2415
2370
|
'id: string;',
|
|
2416
2371
|
'displayName: string;',
|
|
@@ -2420,35 +2375,35 @@ const EMBEDDED_METHODS = [
|
|
|
2420
2375
|
'units?: { plural: string; singular: string; };',
|
|
2421
2376
|
],
|
|
2422
2377
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2423
|
-
markdown: "## create\n\n`client.v1.
|
|
2378
|
+
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 customCurrency = await client.v1.credits.customCurrencies.create({ id: 'id', displayName: 'displayName' });\n\nconsole.log(customCurrency);\n```",
|
|
2424
2379
|
perLanguage: {
|
|
2425
2380
|
typescript: {
|
|
2426
|
-
method: 'client.v1.
|
|
2427
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst customCurrency = await client.v1.
|
|
2381
|
+
method: 'client.v1.credits.customCurrencies.create',
|
|
2382
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst customCurrency = await client.v1.credits.customCurrencies.create({\n id: 'id',\n displayName: 'displayName',\n});\n\nconsole.log(customCurrency.data);",
|
|
2428
2383
|
},
|
|
2429
2384
|
python: {
|
|
2430
|
-
method: 'v1.
|
|
2431
|
-
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 = client.v1.
|
|
2385
|
+
method: 'v1.credits.custom_currencies.create',
|
|
2386
|
+
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 = client.v1.credits.custom_currencies.create(\n id="id",\n display_name="displayName",\n)\nprint(custom_currency.data)',
|
|
2432
2387
|
},
|
|
2433
2388
|
java: {
|
|
2434
|
-
method: 'v1().
|
|
2435
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2389
|
+
method: 'v1().credits().customCurrencies().create',
|
|
2390
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrency;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CustomCurrencyCreateParams params = CustomCurrencyCreateParams.builder()\n .id("id")\n .displayName("displayName")\n .build();\n CustomCurrency customCurrency = client.v1().credits().customCurrencies().create(params);\n }\n}',
|
|
2436
2391
|
},
|
|
2437
2392
|
go: {
|
|
2438
|
-
method: 'client.V1.
|
|
2439
|
-
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\tcustomCurrency, err := client.V1.
|
|
2393
|
+
method: 'client.V1.Credits.CustomCurrencies.New',
|
|
2394
|
+
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\tcustomCurrency, err := client.V1.Credits.CustomCurrencies.New(context.TODO(), stigg.V1CreditCustomCurrencyNewParams{\n\t\tID: "id",\n\t\tDisplayName: "displayName",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customCurrency.Data)\n}\n',
|
|
2440
2395
|
},
|
|
2441
2396
|
ruby: {
|
|
2442
|
-
method: 'v1.
|
|
2443
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncustom_currency = stigg.v1.
|
|
2397
|
+
method: 'v1.credits.custom_currencies.create',
|
|
2398
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncustom_currency = stigg.v1.credits.custom_currencies.create(id: "id", display_name: "displayName")\n\nputs(custom_currency)',
|
|
2444
2399
|
},
|
|
2445
2400
|
cli: {
|
|
2446
2401
|
method: 'custom_currencies create',
|
|
2447
|
-
example: "stigg v1:
|
|
2402
|
+
example: "stigg v1:credits:custom-currencies create \\\n --api-key 'My API Key' \\\n --id id \\\n --display-name displayName",
|
|
2448
2403
|
},
|
|
2449
2404
|
csharp: {
|
|
2450
|
-
method: 'V1.
|
|
2451
|
-
example: 'CustomCurrencyCreateParams parameters = new()\n{\n ID = "id",\n DisplayName = "displayName",\n};\n\nvar customCurrency = await client.V1.
|
|
2405
|
+
method: 'V1.Credits.CustomCurrencies.Create',
|
|
2406
|
+
example: 'CustomCurrencyCreateParams parameters = new()\n{\n ID = "id",\n DisplayName = "displayName",\n};\n\nvar customCurrency = await client.V1.Credits.CustomCurrencies.Create(parameters);\n\nConsole.WriteLine(customCurrency);',
|
|
2452
2407
|
},
|
|
2453
2408
|
http: {
|
|
2454
2409
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName"\n }\'',
|
|
@@ -2461,8 +2416,8 @@ const EMBEDDED_METHODS = [
|
|
|
2461
2416
|
httpMethod: 'patch',
|
|
2462
2417
|
summary: 'Update custom currency',
|
|
2463
2418
|
description: 'Updates an existing custom currency. Only the supplied fields are modified.',
|
|
2464
|
-
stainlessPath: '(resource) v1.
|
|
2465
|
-
qualified: 'client.v1.
|
|
2419
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) update',
|
|
2420
|
+
qualified: 'client.v1.credits.customCurrencies.update',
|
|
2466
2421
|
params: [
|
|
2467
2422
|
'currencyId: string;',
|
|
2468
2423
|
'description?: string;',
|
|
@@ -2472,35 +2427,35 @@ const EMBEDDED_METHODS = [
|
|
|
2472
2427
|
'units?: { plural: string; singular: string; };',
|
|
2473
2428
|
],
|
|
2474
2429
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2475
|
-
markdown: "## update\n\n`client.v1.
|
|
2430
|
+
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 customCurrency = await client.v1.credits.customCurrencies.update('currencyId');\n\nconsole.log(customCurrency);\n```",
|
|
2476
2431
|
perLanguage: {
|
|
2477
2432
|
typescript: {
|
|
2478
|
-
method: 'client.v1.
|
|
2479
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst customCurrency = await client.v1.
|
|
2433
|
+
method: 'client.v1.credits.customCurrencies.update',
|
|
2434
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst customCurrency = await client.v1.credits.customCurrencies.update('currencyId');\n\nconsole.log(customCurrency.data);",
|
|
2480
2435
|
},
|
|
2481
2436
|
python: {
|
|
2482
|
-
method: 'v1.
|
|
2483
|
-
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 = client.v1.
|
|
2437
|
+
method: 'v1.credits.custom_currencies.update',
|
|
2438
|
+
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 = client.v1.credits.custom_currencies.update(\n currency_id="currencyId",\n)\nprint(custom_currency.data)',
|
|
2484
2439
|
},
|
|
2485
2440
|
java: {
|
|
2486
|
-
method: 'v1().
|
|
2487
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2441
|
+
method: 'v1().credits().customCurrencies().update',
|
|
2442
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrency;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CustomCurrency customCurrency = client.v1().credits().customCurrencies().update("currencyId");\n }\n}',
|
|
2488
2443
|
},
|
|
2489
2444
|
go: {
|
|
2490
|
-
method: 'client.V1.
|
|
2491
|
-
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\tcustomCurrency, err := client.V1.
|
|
2445
|
+
method: 'client.V1.Credits.CustomCurrencies.Update',
|
|
2446
|
+
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\tcustomCurrency, err := client.V1.Credits.CustomCurrencies.Update(\n\t\tcontext.TODO(),\n\t\t"currencyId",\n\t\tstigg.V1CreditCustomCurrencyUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customCurrency.Data)\n}\n',
|
|
2492
2447
|
},
|
|
2493
2448
|
ruby: {
|
|
2494
|
-
method: 'v1.
|
|
2495
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncustom_currency = stigg.v1.
|
|
2449
|
+
method: 'v1.credits.custom_currencies.update',
|
|
2450
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncustom_currency = stigg.v1.credits.custom_currencies.update("currencyId")\n\nputs(custom_currency)',
|
|
2496
2451
|
},
|
|
2497
2452
|
cli: {
|
|
2498
2453
|
method: 'custom_currencies update',
|
|
2499
|
-
example: "stigg v1:
|
|
2454
|
+
example: "stigg v1:credits:custom-currencies update \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2500
2455
|
},
|
|
2501
2456
|
csharp: {
|
|
2502
|
-
method: 'V1.
|
|
2503
|
-
example: 'CustomCurrencyUpdateParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrency = await client.V1.
|
|
2457
|
+
method: 'V1.Credits.CustomCurrencies.Update',
|
|
2458
|
+
example: 'CustomCurrencyUpdateParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrency = await client.V1.Credits.CustomCurrencies.Update(parameters);\n\nConsole.WriteLine(customCurrency);',
|
|
2504
2459
|
},
|
|
2505
2460
|
http: {
|
|
2506
2461
|
example: "curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
@@ -2513,39 +2468,39 @@ const EMBEDDED_METHODS = [
|
|
|
2513
2468
|
httpMethod: 'post',
|
|
2514
2469
|
summary: 'Archive custom currency',
|
|
2515
2470
|
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.',
|
|
2516
|
-
stainlessPath: '(resource) v1.
|
|
2517
|
-
qualified: 'client.v1.
|
|
2471
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) archive',
|
|
2472
|
+
qualified: 'client.v1.credits.customCurrencies.archive',
|
|
2518
2473
|
params: ['currencyId: string;'],
|
|
2519
2474
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2520
|
-
markdown: "## archive\n\n`client.v1.
|
|
2475
|
+
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 customCurrency = await client.v1.credits.customCurrencies.archive('currencyId');\n\nconsole.log(customCurrency);\n```",
|
|
2521
2476
|
perLanguage: {
|
|
2522
2477
|
typescript: {
|
|
2523
|
-
method: 'client.v1.
|
|
2524
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst
|
|
2478
|
+
method: 'client.v1.credits.customCurrencies.archive',
|
|
2479
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst customCurrency = await client.v1.credits.customCurrencies.archive('currencyId');\n\nconsole.log(customCurrency.data);",
|
|
2525
2480
|
},
|
|
2526
2481
|
python: {
|
|
2527
|
-
method: 'v1.
|
|
2528
|
-
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)\
|
|
2482
|
+
method: 'v1.credits.custom_currencies.archive',
|
|
2483
|
+
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 = client.v1.credits.custom_currencies.archive(\n "currencyId",\n)\nprint(custom_currency.data)',
|
|
2529
2484
|
},
|
|
2530
2485
|
java: {
|
|
2531
|
-
method: 'v1().
|
|
2532
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2486
|
+
method: 'v1().credits().customCurrencies().archive',
|
|
2487
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrency;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyArchiveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CustomCurrency customCurrency = client.v1().credits().customCurrencies().archive("currencyId");\n }\n}',
|
|
2533
2488
|
},
|
|
2534
2489
|
go: {
|
|
2535
|
-
method: 'client.V1.
|
|
2536
|
-
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\
|
|
2490
|
+
method: 'client.V1.Credits.CustomCurrencies.Archive',
|
|
2491
|
+
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\tcustomCurrency, err := client.V1.Credits.CustomCurrencies.Archive(context.TODO(), "currencyId")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customCurrency.Data)\n}\n',
|
|
2537
2492
|
},
|
|
2538
2493
|
ruby: {
|
|
2539
|
-
method: 'v1.
|
|
2540
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\
|
|
2494
|
+
method: 'v1.credits.custom_currencies.archive',
|
|
2495
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncustom_currency = stigg.v1.credits.custom_currencies.archive("currencyId")\n\nputs(custom_currency)',
|
|
2541
2496
|
},
|
|
2542
2497
|
cli: {
|
|
2543
2498
|
method: 'custom_currencies archive',
|
|
2544
|
-
example: "stigg v1:
|
|
2499
|
+
example: "stigg v1:credits:custom-currencies archive \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2545
2500
|
},
|
|
2546
2501
|
csharp: {
|
|
2547
|
-
method: 'V1.
|
|
2548
|
-
example: 'CustomCurrencyArchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar
|
|
2502
|
+
method: 'V1.Credits.CustomCurrencies.Archive',
|
|
2503
|
+
example: 'CustomCurrencyArchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrency = await client.V1.Credits.CustomCurrencies.Archive(parameters);\n\nConsole.WriteLine(customCurrency);',
|
|
2549
2504
|
},
|
|
2550
2505
|
http: {
|
|
2551
2506
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2558,39 +2513,39 @@ const EMBEDDED_METHODS = [
|
|
|
2558
2513
|
httpMethod: 'post',
|
|
2559
2514
|
summary: 'Unarchive custom currency',
|
|
2560
2515
|
description: 'Restores a previously archived custom currency. Fails if another active currency with the same ID already exists.',
|
|
2561
|
-
stainlessPath: '(resource) v1.
|
|
2562
|
-
qualified: 'client.v1.
|
|
2516
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) unarchive',
|
|
2517
|
+
qualified: 'client.v1.credits.customCurrencies.unarchive',
|
|
2563
2518
|
params: ['currencyId: string;'],
|
|
2564
2519
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2565
|
-
markdown: "## unarchive\n\n`client.v1.
|
|
2520
|
+
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 customCurrency = await client.v1.credits.customCurrencies.unarchive('currencyId');\n\nconsole.log(customCurrency);\n```",
|
|
2566
2521
|
perLanguage: {
|
|
2567
2522
|
typescript: {
|
|
2568
|
-
method: 'client.v1.
|
|
2569
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst
|
|
2523
|
+
method: 'client.v1.credits.customCurrencies.unarchive',
|
|
2524
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst customCurrency = await client.v1.credits.customCurrencies.unarchive('currencyId');\n\nconsole.log(customCurrency.data);",
|
|
2570
2525
|
},
|
|
2571
2526
|
python: {
|
|
2572
|
-
method: 'v1.
|
|
2573
|
-
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)\
|
|
2527
|
+
method: 'v1.credits.custom_currencies.unarchive',
|
|
2528
|
+
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 = client.v1.credits.custom_currencies.unarchive(\n "currencyId",\n)\nprint(custom_currency.data)',
|
|
2574
2529
|
},
|
|
2575
2530
|
java: {
|
|
2576
|
-
method: 'v1().
|
|
2577
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2531
|
+
method: 'v1().credits().customCurrencies().unarchive',
|
|
2532
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrency;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyUnarchiveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CustomCurrency customCurrency = client.v1().credits().customCurrencies().unarchive("currencyId");\n }\n}',
|
|
2578
2533
|
},
|
|
2579
2534
|
go: {
|
|
2580
|
-
method: 'client.V1.
|
|
2581
|
-
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\
|
|
2535
|
+
method: 'client.V1.Credits.CustomCurrencies.Unarchive',
|
|
2536
|
+
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\tcustomCurrency, err := client.V1.Credits.CustomCurrencies.Unarchive(context.TODO(), "currencyId")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customCurrency.Data)\n}\n',
|
|
2582
2537
|
},
|
|
2583
2538
|
ruby: {
|
|
2584
|
-
method: 'v1.
|
|
2585
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\
|
|
2539
|
+
method: 'v1.credits.custom_currencies.unarchive',
|
|
2540
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncustom_currency = stigg.v1.credits.custom_currencies.unarchive("currencyId")\n\nputs(custom_currency)',
|
|
2586
2541
|
},
|
|
2587
2542
|
cli: {
|
|
2588
2543
|
method: 'custom_currencies unarchive',
|
|
2589
|
-
example: "stigg v1:
|
|
2544
|
+
example: "stigg v1:credits:custom-currencies unarchive \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2590
2545
|
},
|
|
2591
2546
|
csharp: {
|
|
2592
|
-
method: 'V1.
|
|
2593
|
-
example: 'CustomCurrencyUnarchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar
|
|
2547
|
+
method: 'V1.Credits.CustomCurrencies.Unarchive',
|
|
2548
|
+
example: 'CustomCurrencyUnarchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrency = await client.V1.Credits.CustomCurrencies.Unarchive(parameters);\n\nConsole.WriteLine(customCurrency);',
|
|
2594
2549
|
},
|
|
2595
2550
|
http: {
|
|
2596
2551
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2603,45 +2558,90 @@ const EMBEDDED_METHODS = [
|
|
|
2603
2558
|
httpMethod: 'get',
|
|
2604
2559
|
summary: 'List custom currency associated entities',
|
|
2605
2560
|
description: 'Lists the active plans and addons that reference a custom currency. Useful before archiving to inspect dependencies.',
|
|
2606
|
-
stainlessPath: '(resource) v1.
|
|
2607
|
-
qualified: 'client.v1.
|
|
2561
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) list_associated_entities',
|
|
2562
|
+
qualified: 'client.v1.credits.customCurrencies.listAssociatedEntities',
|
|
2608
2563
|
params: ['currencyId: string;'],
|
|
2609
2564
|
response: '{ data: { id: string; displayName: string; type: string; }[]; }',
|
|
2610
|
-
markdown: "## list_associated_entities\n\n`client.v1.
|
|
2565
|
+
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```",
|
|
2611
2566
|
perLanguage: {
|
|
2612
2567
|
typescript: {
|
|
2613
|
-
method: 'client.v1.
|
|
2614
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.
|
|
2568
|
+
method: 'client.v1.credits.customCurrencies.listAssociatedEntities',
|
|
2569
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.credits.customCurrencies.listAssociatedEntities('currencyId');\n\nconsole.log(response.data);",
|
|
2615
2570
|
},
|
|
2616
2571
|
python: {
|
|
2617
|
-
method: 'v1.
|
|
2618
|
-
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.
|
|
2572
|
+
method: 'v1.credits.custom_currencies.list_associated_entities',
|
|
2573
|
+
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)',
|
|
2619
2574
|
},
|
|
2620
2575
|
java: {
|
|
2621
|
-
method: 'v1().
|
|
2622
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2576
|
+
method: 'v1().credits().customCurrencies().listAssociatedEntities',
|
|
2577
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyListAssociatedEntitiesParams;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyListAssociatedEntitiesResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CustomCurrencyListAssociatedEntitiesResponse response = client.v1().credits().customCurrencies().listAssociatedEntities("currencyId");\n }\n}',
|
|
2623
2578
|
},
|
|
2624
2579
|
go: {
|
|
2625
|
-
method: 'client.V1.
|
|
2626
|
-
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.
|
|
2580
|
+
method: 'client.V1.Credits.CustomCurrencies.ListAssociatedEntities',
|
|
2581
|
+
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(context.TODO(), "currencyId")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
2627
2582
|
},
|
|
2628
2583
|
ruby: {
|
|
2629
|
-
method: 'v1.
|
|
2630
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.
|
|
2584
|
+
method: 'v1.credits.custom_currencies.list_associated_entities',
|
|
2585
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.credits.custom_currencies.list_associated_entities("currencyId")\n\nputs(response)',
|
|
2631
2586
|
},
|
|
2632
2587
|
cli: {
|
|
2633
2588
|
method: 'custom_currencies list_associated_entities',
|
|
2634
|
-
example: "stigg v1:
|
|
2589
|
+
example: "stigg v1:credits:custom-currencies list-associated-entities \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2635
2590
|
},
|
|
2636
2591
|
csharp: {
|
|
2637
|
-
method: 'V1.
|
|
2638
|
-
example: 'CustomCurrencyListAssociatedEntitiesParams parameters = new()\n{\n CurrencyID = "currencyId"\n};\n\nvar response = await client.V1.
|
|
2592
|
+
method: 'V1.Credits.CustomCurrencies.ListAssociatedEntities',
|
|
2593
|
+
example: 'CustomCurrencyListAssociatedEntitiesParams parameters = new()\n{\n CurrencyID = "currencyId"\n};\n\nvar response = await client.V1.Credits.CustomCurrencies.ListAssociatedEntities(parameters);\n\nConsole.WriteLine(response);',
|
|
2639
2594
|
},
|
|
2640
2595
|
http: {
|
|
2641
2596
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/associated-entities \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2642
2597
|
},
|
|
2643
2598
|
},
|
|
2644
2599
|
},
|
|
2600
|
+
{
|
|
2601
|
+
name: 'get_auto_recharge',
|
|
2602
|
+
endpoint: '/api/v1/credits/auto-recharge',
|
|
2603
|
+
httpMethod: 'get',
|
|
2604
|
+
summary: 'Get automatic recharge configuration',
|
|
2605
|
+
description: 'Retrieves the automatic recharge configuration for a customer and currency. Returns default settings if no configuration exists.',
|
|
2606
|
+
stainlessPath: '(resource) v1.credits.auto_recharge > (method) get_auto_recharge',
|
|
2607
|
+
qualified: 'client.v1.credits.autoRecharge.getAutoRecharge',
|
|
2608
|
+
params: ['currencyId: string;', 'customerId: string;'],
|
|
2609
|
+
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; }; }",
|
|
2610
|
+
markdown: "## get_auto_recharge\n\n`client.v1.credits.autoRecharge.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.autoRecharge.getAutoRecharge({ currencyId: 'currencyId', customerId: 'customerId' });\n\nconsole.log(response);\n```",
|
|
2611
|
+
perLanguage: {
|
|
2612
|
+
typescript: {
|
|
2613
|
+
method: 'client.v1.credits.autoRecharge.getAutoRecharge',
|
|
2614
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.credits.autoRecharge.getAutoRecharge({\n currencyId: 'currencyId',\n customerId: 'customerId',\n});\n\nconsole.log(response.data);",
|
|
2615
|
+
},
|
|
2616
|
+
python: {
|
|
2617
|
+
method: 'v1.credits.auto_recharge.get_auto_recharge',
|
|
2618
|
+
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.auto_recharge.get_auto_recharge(\n currency_id="currencyId",\n customer_id="customerId",\n)\nprint(response.data)',
|
|
2619
|
+
},
|
|
2620
|
+
java: {
|
|
2621
|
+
method: 'v1().credits().autoRecharge().getAutoRecharge',
|
|
2622
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.autorecharge.AutoRechargeGetAutoRechargeParams;\nimport io.stigg.models.v1.credits.autorecharge.AutoRechargeGetAutoRechargeResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n AutoRechargeGetAutoRechargeParams params = AutoRechargeGetAutoRechargeParams.builder()\n .currencyId("currencyId")\n .customerId("customerId")\n .build();\n AutoRechargeGetAutoRechargeResponse response = client.v1().credits().autoRecharge().getAutoRecharge(params);\n }\n}',
|
|
2623
|
+
},
|
|
2624
|
+
go: {
|
|
2625
|
+
method: 'client.V1.Credits.AutoRecharge.GetAutoRecharge',
|
|
2626
|
+
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.AutoRecharge.GetAutoRecharge(context.TODO(), stigg.V1CreditAutoRechargeGetAutoRechargeParams{\n\t\tCurrencyID: "currencyId",\n\t\tCustomerID: "customerId",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
2627
|
+
},
|
|
2628
|
+
ruby: {
|
|
2629
|
+
method: 'v1.credits.auto_recharge.get_auto_recharge',
|
|
2630
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.credits.auto_recharge.get_auto_recharge(currency_id: "currencyId", customer_id: "customerId")\n\nputs(response)',
|
|
2631
|
+
},
|
|
2632
|
+
cli: {
|
|
2633
|
+
method: 'auto_recharge get_auto_recharge',
|
|
2634
|
+
example: "stigg v1:credits:auto-recharge get-auto-recharge \\\n --api-key 'My API Key' \\\n --currency-id currencyId \\\n --customer-id customerId",
|
|
2635
|
+
},
|
|
2636
|
+
csharp: {
|
|
2637
|
+
method: 'V1.Credits.AutoRecharge.GetAutoRecharge',
|
|
2638
|
+
example: 'AutoRechargeGetAutoRechargeParams parameters = new()\n{\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n};\n\nvar response = await client.V1.Credits.AutoRecharge.GetAutoRecharge(parameters);\n\nConsole.WriteLine(response);',
|
|
2639
|
+
},
|
|
2640
|
+
http: {
|
|
2641
|
+
example: 'curl https://api.stigg.io/api/v1/credits/auto-recharge \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2642
|
+
},
|
|
2643
|
+
},
|
|
2644
|
+
},
|
|
2645
2645
|
{
|
|
2646
2646
|
name: 'retrieve_feature',
|
|
2647
2647
|
endpoint: '/api/v1/features/{id}',
|