@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.mjs
CHANGED
|
@@ -2017,8 +2017,8 @@ const EMBEDDED_METHODS = [
|
|
|
2017
2017
|
httpMethod: 'get',
|
|
2018
2018
|
summary: 'Get credit usage',
|
|
2019
2019
|
description: 'Retrieves credit usage time-series data for a customer, grouped by feature, over a specified time range.',
|
|
2020
|
-
stainlessPath: '(resource) v1.
|
|
2021
|
-
qualified: 'client.v1.
|
|
2020
|
+
stainlessPath: '(resource) v1.credits > (method) get_usage',
|
|
2021
|
+
qualified: 'client.v1.credits.getUsage',
|
|
2022
2022
|
params: [
|
|
2023
2023
|
'customerId: string;',
|
|
2024
2024
|
'currencyId?: string;',
|
|
@@ -2028,94 +2028,49 @@ const EMBEDDED_METHODS = [
|
|
|
2028
2028
|
"timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR';",
|
|
2029
2029
|
],
|
|
2030
2030
|
response: '{ data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; series: { featureId: string; featureName: string; points: object[]; totalCredits: number; }[]; }; }',
|
|
2031
|
-
markdown: "## get_usage\n\n`client.v1.
|
|
2031
|
+
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```",
|
|
2032
2032
|
perLanguage: {
|
|
2033
2033
|
typescript: {
|
|
2034
|
-
method: 'client.v1.
|
|
2035
|
-
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.
|
|
2034
|
+
method: 'client.v1.credits.getUsage',
|
|
2035
|
+
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);",
|
|
2036
2036
|
},
|
|
2037
2037
|
python: {
|
|
2038
|
-
method: 'v1.
|
|
2039
|
-
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.
|
|
2038
|
+
method: 'v1.credits.get_usage',
|
|
2039
|
+
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)',
|
|
2040
2040
|
},
|
|
2041
2041
|
java: {
|
|
2042
|
-
method: 'v1().
|
|
2043
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2042
|
+
method: 'v1().credits().getUsage',
|
|
2043
|
+
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}',
|
|
2044
2044
|
},
|
|
2045
2045
|
go: {
|
|
2046
|
-
method: 'client.V1.
|
|
2047
|
-
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.
|
|
2046
|
+
method: 'client.V1.Credits.GetUsage',
|
|
2047
|
+
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',
|
|
2048
2048
|
},
|
|
2049
2049
|
ruby: {
|
|
2050
|
-
method: 'v1.
|
|
2051
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.
|
|
2050
|
+
method: 'v1.credits.get_usage',
|
|
2051
|
+
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)',
|
|
2052
2052
|
},
|
|
2053
2053
|
cli: {
|
|
2054
2054
|
method: 'credits get_usage',
|
|
2055
|
-
example: "stigg v1:
|
|
2055
|
+
example: "stigg v1:credits get-usage \\\n --api-key 'My API Key' \\\n --customer-id customerId",
|
|
2056
2056
|
},
|
|
2057
2057
|
csharp: {
|
|
2058
|
-
method: 'V1.
|
|
2059
|
-
example: 'CreditGetUsageParams parameters = new() { CustomerID = "customerId" };\n\nvar response = await client.V1.
|
|
2058
|
+
method: 'V1.Credits.GetUsage',
|
|
2059
|
+
example: 'CreditGetUsageParams parameters = new() { CustomerID = "customerId" };\n\nvar response = await client.V1.Credits.GetUsage(parameters);\n\nConsole.WriteLine(response);',
|
|
2060
2060
|
},
|
|
2061
2061
|
http: {
|
|
2062
2062
|
example: 'curl https://api.stigg.io/api/v1/credits/usage \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2063
2063
|
},
|
|
2064
2064
|
},
|
|
2065
2065
|
},
|
|
2066
|
-
{
|
|
2067
|
-
name: 'get_auto_recharge',
|
|
2068
|
-
endpoint: '/api/v1/credits/auto-recharge',
|
|
2069
|
-
httpMethod: 'get',
|
|
2070
|
-
summary: 'Get automatic recharge configuration',
|
|
2071
|
-
description: 'Retrieves the automatic recharge configuration for a customer and currency. Returns default settings if no configuration exists.',
|
|
2072
|
-
stainlessPath: '(resource) v1.events.credits > (method) get_auto_recharge',
|
|
2073
|
-
qualified: 'client.v1.events.credits.getAutoRecharge',
|
|
2074
|
-
params: ['currencyId: string;', 'customerId: string;'],
|
|
2075
|
-
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; }; }",
|
|
2076
|
-
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```",
|
|
2077
|
-
perLanguage: {
|
|
2078
|
-
typescript: {
|
|
2079
|
-
method: 'client.v1.events.credits.getAutoRecharge',
|
|
2080
|
-
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);",
|
|
2081
|
-
},
|
|
2082
|
-
python: {
|
|
2083
|
-
method: 'v1.events.credits.get_auto_recharge',
|
|
2084
|
-
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)',
|
|
2085
|
-
},
|
|
2086
|
-
java: {
|
|
2087
|
-
method: 'v1().events().credits().getAutoRecharge',
|
|
2088
|
-
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}',
|
|
2089
|
-
},
|
|
2090
|
-
go: {
|
|
2091
|
-
method: 'client.V1.Events.Credits.GetAutoRecharge',
|
|
2092
|
-
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',
|
|
2093
|
-
},
|
|
2094
|
-
ruby: {
|
|
2095
|
-
method: 'v1.events.credits.get_auto_recharge',
|
|
2096
|
-
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)',
|
|
2097
|
-
},
|
|
2098
|
-
cli: {
|
|
2099
|
-
method: 'credits get_auto_recharge',
|
|
2100
|
-
example: "stigg v1:events:credits get-auto-recharge \\\n --api-key 'My API Key' \\\n --currency-id currencyId \\\n --customer-id customerId",
|
|
2101
|
-
},
|
|
2102
|
-
csharp: {
|
|
2103
|
-
method: 'V1.Events.Credits.GetAutoRecharge',
|
|
2104
|
-
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);',
|
|
2105
|
-
},
|
|
2106
|
-
http: {
|
|
2107
|
-
example: 'curl https://api.stigg.io/api/v1/credits/auto-recharge \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2108
|
-
},
|
|
2109
|
-
},
|
|
2110
|
-
},
|
|
2111
2066
|
{
|
|
2112
2067
|
name: 'list_ledger',
|
|
2113
2068
|
endpoint: '/api/v1/credits/ledger',
|
|
2114
2069
|
httpMethod: 'get',
|
|
2115
2070
|
summary: 'Get a list of credit ledger events',
|
|
2116
2071
|
description: 'Retrieves a paginated list of credit ledger events for a customer.',
|
|
2117
|
-
stainlessPath: '(resource) v1.
|
|
2118
|
-
qualified: 'client.v1.
|
|
2072
|
+
stainlessPath: '(resource) v1.credits > (method) list_ledger',
|
|
2073
|
+
qualified: 'client.v1.credits.listLedger',
|
|
2119
2074
|
params: [
|
|
2120
2075
|
'customerId: string;',
|
|
2121
2076
|
'after?: string;',
|
|
@@ -2125,35 +2080,35 @@ const EMBEDDED_METHODS = [
|
|
|
2125
2080
|
'resourceId?: string;',
|
|
2126
2081
|
],
|
|
2127
2082
|
response: '{ amount: number; creditCurrencyId: string; creditGrantId: string; customerId: string; eventId: string; eventType: string; featureId: string; resourceId: string; timestamp: string; }',
|
|
2128
|
-
markdown: "## list_ledger\n\n`client.v1.
|
|
2083
|
+
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```",
|
|
2129
2084
|
perLanguage: {
|
|
2130
2085
|
typescript: {
|
|
2131
|
-
method: 'client.v1.
|
|
2132
|
-
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.
|
|
2086
|
+
method: 'client.v1.credits.listLedger',
|
|
2087
|
+
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}",
|
|
2133
2088
|
},
|
|
2134
2089
|
python: {
|
|
2135
|
-
method: 'v1.
|
|
2136
|
-
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.
|
|
2090
|
+
method: 'v1.credits.list_ledger',
|
|
2091
|
+
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)',
|
|
2137
2092
|
},
|
|
2138
2093
|
java: {
|
|
2139
|
-
method: 'v1().
|
|
2140
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2094
|
+
method: 'v1().credits().listLedger',
|
|
2095
|
+
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}',
|
|
2141
2096
|
},
|
|
2142
2097
|
go: {
|
|
2143
|
-
method: 'client.V1.
|
|
2144
|
-
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.
|
|
2098
|
+
method: 'client.V1.Credits.ListLedger',
|
|
2099
|
+
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',
|
|
2145
2100
|
},
|
|
2146
2101
|
ruby: {
|
|
2147
|
-
method: 'v1.
|
|
2148
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.
|
|
2102
|
+
method: 'v1.credits.list_ledger',
|
|
2103
|
+
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)',
|
|
2149
2104
|
},
|
|
2150
2105
|
cli: {
|
|
2151
2106
|
method: 'credits list_ledger',
|
|
2152
|
-
example: "stigg v1:
|
|
2107
|
+
example: "stigg v1:credits list-ledger \\\n --api-key 'My API Key' \\\n --customer-id customerId",
|
|
2153
2108
|
},
|
|
2154
2109
|
csharp: {
|
|
2155
|
-
method: 'V1.
|
|
2156
|
-
example: 'CreditListLedgerParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.
|
|
2110
|
+
method: 'V1.Credits.ListLedger',
|
|
2111
|
+
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}',
|
|
2157
2112
|
},
|
|
2158
2113
|
http: {
|
|
2159
2114
|
example: 'curl https://api.stigg.io/api/v1/credits/ledger \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2166,8 +2121,8 @@ const EMBEDDED_METHODS = [
|
|
|
2166
2121
|
httpMethod: 'get',
|
|
2167
2122
|
summary: 'Get a list of credit grants',
|
|
2168
2123
|
description: 'Retrieves a paginated list of credit grants for a customer.',
|
|
2169
|
-
stainlessPath: '(resource) v1.
|
|
2170
|
-
qualified: 'client.v1.
|
|
2124
|
+
stainlessPath: '(resource) v1.credits.grants > (method) list',
|
|
2125
|
+
qualified: 'client.v1.credits.grants.list',
|
|
2171
2126
|
params: [
|
|
2172
2127
|
'customerId: string;',
|
|
2173
2128
|
'after?: string;',
|
|
@@ -2178,35 +2133,35 @@ const EMBEDDED_METHODS = [
|
|
|
2178
2133
|
'resourceId?: string;',
|
|
2179
2134
|
],
|
|
2180
2135
|
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; }",
|
|
2181
|
-
markdown: "## list\n\n`client.v1.
|
|
2136
|
+
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```",
|
|
2182
2137
|
perLanguage: {
|
|
2183
2138
|
typescript: {
|
|
2184
|
-
method: 'client.v1.
|
|
2185
|
-
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.
|
|
2139
|
+
method: 'client.v1.credits.grants.list',
|
|
2140
|
+
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}",
|
|
2186
2141
|
},
|
|
2187
2142
|
python: {
|
|
2188
|
-
method: 'v1.
|
|
2189
|
-
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.
|
|
2143
|
+
method: 'v1.credits.grants.list',
|
|
2144
|
+
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)',
|
|
2190
2145
|
},
|
|
2191
2146
|
java: {
|
|
2192
|
-
method: 'v1().
|
|
2193
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2147
|
+
method: 'v1().credits().grants().list',
|
|
2148
|
+
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}',
|
|
2194
2149
|
},
|
|
2195
2150
|
go: {
|
|
2196
|
-
method: 'client.V1.
|
|
2197
|
-
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.
|
|
2151
|
+
method: 'client.V1.Credits.Grants.List',
|
|
2152
|
+
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',
|
|
2198
2153
|
},
|
|
2199
2154
|
ruby: {
|
|
2200
|
-
method: 'v1.
|
|
2201
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.
|
|
2155
|
+
method: 'v1.credits.grants.list',
|
|
2156
|
+
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)',
|
|
2202
2157
|
},
|
|
2203
2158
|
cli: {
|
|
2204
2159
|
method: 'grants list',
|
|
2205
|
-
example: "stigg v1:
|
|
2160
|
+
example: "stigg v1:credits:grants list \\\n --api-key 'My API Key' \\\n --customer-id customerId",
|
|
2206
2161
|
},
|
|
2207
2162
|
csharp: {
|
|
2208
|
-
method: 'V1.
|
|
2209
|
-
example: 'GrantListParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.
|
|
2163
|
+
method: 'V1.Credits.Grants.List',
|
|
2164
|
+
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}',
|
|
2210
2165
|
},
|
|
2211
2166
|
http: {
|
|
2212
2167
|
example: 'curl https://api.stigg.io/api/v1/credits/grants \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2219,8 +2174,8 @@ const EMBEDDED_METHODS = [
|
|
|
2219
2174
|
httpMethod: 'post',
|
|
2220
2175
|
summary: 'Create a credit grant',
|
|
2221
2176
|
description: 'Creates a new credit grant for a customer with specified amount, type, and optional billing configuration.',
|
|
2222
|
-
stainlessPath: '(resource) v1.
|
|
2223
|
-
qualified: 'client.v1.
|
|
2177
|
+
stainlessPath: '(resource) v1.credits.grants > (method) create',
|
|
2178
|
+
qualified: 'client.v1.credits.grants.create',
|
|
2224
2179
|
params: [
|
|
2225
2180
|
'amount: number;',
|
|
2226
2181
|
'currencyId: string;',
|
|
@@ -2239,35 +2194,35 @@ const EMBEDDED_METHODS = [
|
|
|
2239
2194
|
'resourceId?: string;',
|
|
2240
2195
|
],
|
|
2241
2196
|
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; }; }",
|
|
2242
|
-
markdown: "## create\n\n`client.v1.
|
|
2197
|
+
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```",
|
|
2243
2198
|
perLanguage: {
|
|
2244
2199
|
typescript: {
|
|
2245
|
-
method: 'client.v1.
|
|
2246
|
-
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.
|
|
2200
|
+
method: 'client.v1.credits.grants.create',
|
|
2201
|
+
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);",
|
|
2247
2202
|
},
|
|
2248
2203
|
python: {
|
|
2249
|
-
method: 'v1.
|
|
2250
|
-
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.
|
|
2204
|
+
method: 'v1.credits.grants.create',
|
|
2205
|
+
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)',
|
|
2251
2206
|
},
|
|
2252
2207
|
java: {
|
|
2253
|
-
method: 'v1().
|
|
2254
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2208
|
+
method: 'v1().credits().grants().create',
|
|
2209
|
+
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}',
|
|
2255
2210
|
},
|
|
2256
2211
|
go: {
|
|
2257
|
-
method: 'client.V1.
|
|
2258
|
-
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.
|
|
2212
|
+
method: 'client.V1.Credits.Grants.New',
|
|
2213
|
+
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',
|
|
2259
2214
|
},
|
|
2260
2215
|
ruby: {
|
|
2261
|
-
method: 'v1.
|
|
2262
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncredit_grant_response = stigg.v1.
|
|
2216
|
+
method: 'v1.credits.grants.create',
|
|
2217
|
+
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)',
|
|
2263
2218
|
},
|
|
2264
2219
|
cli: {
|
|
2265
2220
|
method: 'grants create',
|
|
2266
|
-
example: "stigg v1:
|
|
2221
|
+
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",
|
|
2267
2222
|
},
|
|
2268
2223
|
csharp: {
|
|
2269
|
-
method: 'V1.
|
|
2270
|
-
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.
|
|
2224
|
+
method: 'V1.Credits.Grants.Create',
|
|
2225
|
+
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);',
|
|
2271
2226
|
},
|
|
2272
2227
|
http: {
|
|
2273
2228
|
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 }\'',
|
|
@@ -2280,39 +2235,39 @@ const EMBEDDED_METHODS = [
|
|
|
2280
2235
|
httpMethod: 'post',
|
|
2281
2236
|
summary: 'Void credit grant',
|
|
2282
2237
|
description: 'Voids an existing credit grant, preventing further consumption of the remaining credits.',
|
|
2283
|
-
stainlessPath: '(resource) v1.
|
|
2284
|
-
qualified: 'client.v1.
|
|
2238
|
+
stainlessPath: '(resource) v1.credits.grants > (method) void',
|
|
2239
|
+
qualified: 'client.v1.credits.grants.void',
|
|
2285
2240
|
params: ['id: string;'],
|
|
2286
2241
|
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; }; }",
|
|
2287
|
-
markdown: "## void\n\n`client.v1.
|
|
2242
|
+
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```",
|
|
2288
2243
|
perLanguage: {
|
|
2289
2244
|
typescript: {
|
|
2290
|
-
method: 'client.v1.
|
|
2291
|
-
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.
|
|
2245
|
+
method: 'client.v1.credits.grants.void',
|
|
2246
|
+
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);",
|
|
2292
2247
|
},
|
|
2293
2248
|
python: {
|
|
2294
|
-
method: 'v1.
|
|
2295
|
-
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.
|
|
2249
|
+
method: 'v1.credits.grants.void',
|
|
2250
|
+
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)',
|
|
2296
2251
|
},
|
|
2297
2252
|
java: {
|
|
2298
|
-
method: 'v1().
|
|
2299
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2253
|
+
method: 'v1().credits().grants().void_',
|
|
2254
|
+
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}',
|
|
2300
2255
|
},
|
|
2301
2256
|
go: {
|
|
2302
|
-
method: 'client.V1.
|
|
2303
|
-
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.
|
|
2257
|
+
method: 'client.V1.Credits.Grants.Void',
|
|
2258
|
+
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',
|
|
2304
2259
|
},
|
|
2305
2260
|
ruby: {
|
|
2306
|
-
method: 'v1.
|
|
2307
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncredit_grant_response = stigg.v1.
|
|
2261
|
+
method: 'v1.credits.grants.void',
|
|
2262
|
+
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)',
|
|
2308
2263
|
},
|
|
2309
2264
|
cli: {
|
|
2310
2265
|
method: 'grants void',
|
|
2311
|
-
example: "stigg v1:
|
|
2266
|
+
example: "stigg v1:credits:grants void \\\n --api-key 'My API Key' \\\n --id x",
|
|
2312
2267
|
},
|
|
2313
2268
|
csharp: {
|
|
2314
|
-
method: 'V1.
|
|
2315
|
-
example: 'GrantVoidParams parameters = new() { ID = "x" };\n\nvar creditGrantResponse = await client.V1.
|
|
2269
|
+
method: 'V1.Credits.Grants.Void',
|
|
2270
|
+
example: 'GrantVoidParams parameters = new() { ID = "x" };\n\nvar creditGrantResponse = await client.V1.Credits.Grants.Void(parameters);\n\nConsole.WriteLine(creditGrantResponse);',
|
|
2316
2271
|
},
|
|
2317
2272
|
http: {
|
|
2318
2273
|
example: 'curl https://api.stigg.io/api/v1/credits/grants/$ID/void \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2325,39 +2280,39 @@ const EMBEDDED_METHODS = [
|
|
|
2325
2280
|
httpMethod: 'get',
|
|
2326
2281
|
summary: 'Get a list of custom currencys',
|
|
2327
2282
|
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.',
|
|
2328
|
-
stainlessPath: '(resource) v1.
|
|
2329
|
-
qualified: 'client.v1.
|
|
2283
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) list',
|
|
2284
|
+
qualified: 'client.v1.credits.customCurrencies.list',
|
|
2330
2285
|
params: ['after?: string;', 'before?: string;', 'limit?: number;', "status?: 'ACTIVE' | 'ARCHIVED'[];"],
|
|
2331
2286
|
response: '{ id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }',
|
|
2332
|
-
markdown: "## list\n\n`client.v1.
|
|
2287
|
+
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```",
|
|
2333
2288
|
perLanguage: {
|
|
2334
2289
|
typescript: {
|
|
2335
|
-
method: 'client.v1.
|
|
2336
|
-
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.
|
|
2290
|
+
method: 'client.v1.credits.customCurrencies.list',
|
|
2291
|
+
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}",
|
|
2337
2292
|
},
|
|
2338
2293
|
python: {
|
|
2339
|
-
method: 'v1.
|
|
2340
|
-
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.
|
|
2294
|
+
method: 'v1.credits.custom_currencies.list',
|
|
2295
|
+
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)',
|
|
2341
2296
|
},
|
|
2342
2297
|
java: {
|
|
2343
|
-
method: 'v1().
|
|
2344
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2298
|
+
method: 'v1().credits().customCurrencies().list',
|
|
2299
|
+
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}',
|
|
2345
2300
|
},
|
|
2346
2301
|
go: {
|
|
2347
|
-
method: 'client.V1.
|
|
2348
|
-
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.
|
|
2302
|
+
method: 'client.V1.Credits.CustomCurrencies.List',
|
|
2303
|
+
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',
|
|
2349
2304
|
},
|
|
2350
2305
|
ruby: {
|
|
2351
|
-
method: 'v1.
|
|
2352
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.
|
|
2306
|
+
method: 'v1.credits.custom_currencies.list',
|
|
2307
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.credits.custom_currencies.list\n\nputs(page)',
|
|
2353
2308
|
},
|
|
2354
2309
|
cli: {
|
|
2355
2310
|
method: 'custom_currencies list',
|
|
2356
|
-
example: "stigg v1:
|
|
2311
|
+
example: "stigg v1:credits:custom-currencies list \\\n --api-key 'My API Key'",
|
|
2357
2312
|
},
|
|
2358
2313
|
csharp: {
|
|
2359
|
-
method: 'V1.
|
|
2360
|
-
example: 'CustomCurrencyListParams parameters = new();\n\nvar page = await client.V1.
|
|
2314
|
+
method: 'V1.Credits.CustomCurrencies.List',
|
|
2315
|
+
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}',
|
|
2361
2316
|
},
|
|
2362
2317
|
http: {
|
|
2363
2318
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2370,8 +2325,8 @@ const EMBEDDED_METHODS = [
|
|
|
2370
2325
|
httpMethod: 'post',
|
|
2371
2326
|
summary: 'Create custom currency',
|
|
2372
2327
|
description: 'Creates a new custom currency in the environment.',
|
|
2373
|
-
stainlessPath: '(resource) v1.
|
|
2374
|
-
qualified: 'client.v1.
|
|
2328
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) create',
|
|
2329
|
+
qualified: 'client.v1.credits.customCurrencies.create',
|
|
2375
2330
|
params: [
|
|
2376
2331
|
'id: string;',
|
|
2377
2332
|
'displayName: string;',
|
|
@@ -2381,35 +2336,35 @@ const EMBEDDED_METHODS = [
|
|
|
2381
2336
|
'units?: { plural: string; singular: string; };',
|
|
2382
2337
|
],
|
|
2383
2338
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2384
|
-
markdown: "## create\n\n`client.v1.
|
|
2339
|
+
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```",
|
|
2385
2340
|
perLanguage: {
|
|
2386
2341
|
typescript: {
|
|
2387
|
-
method: 'client.v1.
|
|
2388
|
-
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.
|
|
2342
|
+
method: 'client.v1.credits.customCurrencies.create',
|
|
2343
|
+
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);",
|
|
2389
2344
|
},
|
|
2390
2345
|
python: {
|
|
2391
|
-
method: 'v1.
|
|
2392
|
-
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.
|
|
2346
|
+
method: 'v1.credits.custom_currencies.create',
|
|
2347
|
+
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)',
|
|
2393
2348
|
},
|
|
2394
2349
|
java: {
|
|
2395
|
-
method: 'v1().
|
|
2396
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2350
|
+
method: 'v1().credits().customCurrencies().create',
|
|
2351
|
+
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}',
|
|
2397
2352
|
},
|
|
2398
2353
|
go: {
|
|
2399
|
-
method: 'client.V1.
|
|
2400
|
-
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.
|
|
2354
|
+
method: 'client.V1.Credits.CustomCurrencies.New',
|
|
2355
|
+
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',
|
|
2401
2356
|
},
|
|
2402
2357
|
ruby: {
|
|
2403
|
-
method: 'v1.
|
|
2404
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncustom_currency = stigg.v1.
|
|
2358
|
+
method: 'v1.credits.custom_currencies.create',
|
|
2359
|
+
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)',
|
|
2405
2360
|
},
|
|
2406
2361
|
cli: {
|
|
2407
2362
|
method: 'custom_currencies create',
|
|
2408
|
-
example: "stigg v1:
|
|
2363
|
+
example: "stigg v1:credits:custom-currencies create \\\n --api-key 'My API Key' \\\n --id id \\\n --display-name displayName",
|
|
2409
2364
|
},
|
|
2410
2365
|
csharp: {
|
|
2411
|
-
method: 'V1.
|
|
2412
|
-
example: 'CustomCurrencyCreateParams parameters = new()\n{\n ID = "id",\n DisplayName = "displayName",\n};\n\nvar customCurrency = await client.V1.
|
|
2366
|
+
method: 'V1.Credits.CustomCurrencies.Create',
|
|
2367
|
+
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);',
|
|
2413
2368
|
},
|
|
2414
2369
|
http: {
|
|
2415
2370
|
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 }\'',
|
|
@@ -2422,8 +2377,8 @@ const EMBEDDED_METHODS = [
|
|
|
2422
2377
|
httpMethod: 'patch',
|
|
2423
2378
|
summary: 'Update custom currency',
|
|
2424
2379
|
description: 'Updates an existing custom currency. Only the supplied fields are modified.',
|
|
2425
|
-
stainlessPath: '(resource) v1.
|
|
2426
|
-
qualified: 'client.v1.
|
|
2380
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) update',
|
|
2381
|
+
qualified: 'client.v1.credits.customCurrencies.update',
|
|
2427
2382
|
params: [
|
|
2428
2383
|
'currencyId: string;',
|
|
2429
2384
|
'description?: string;',
|
|
@@ -2433,35 +2388,35 @@ const EMBEDDED_METHODS = [
|
|
|
2433
2388
|
'units?: { plural: string; singular: string; };',
|
|
2434
2389
|
],
|
|
2435
2390
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2436
|
-
markdown: "## update\n\n`client.v1.
|
|
2391
|
+
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```",
|
|
2437
2392
|
perLanguage: {
|
|
2438
2393
|
typescript: {
|
|
2439
|
-
method: 'client.v1.
|
|
2440
|
-
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.
|
|
2394
|
+
method: 'client.v1.credits.customCurrencies.update',
|
|
2395
|
+
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);",
|
|
2441
2396
|
},
|
|
2442
2397
|
python: {
|
|
2443
|
-
method: 'v1.
|
|
2444
|
-
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.
|
|
2398
|
+
method: 'v1.credits.custom_currencies.update',
|
|
2399
|
+
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)',
|
|
2445
2400
|
},
|
|
2446
2401
|
java: {
|
|
2447
|
-
method: 'v1().
|
|
2448
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2402
|
+
method: 'v1().credits().customCurrencies().update',
|
|
2403
|
+
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}',
|
|
2449
2404
|
},
|
|
2450
2405
|
go: {
|
|
2451
|
-
method: 'client.V1.
|
|
2452
|
-
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.
|
|
2406
|
+
method: 'client.V1.Credits.CustomCurrencies.Update',
|
|
2407
|
+
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',
|
|
2453
2408
|
},
|
|
2454
2409
|
ruby: {
|
|
2455
|
-
method: 'v1.
|
|
2456
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncustom_currency = stigg.v1.
|
|
2410
|
+
method: 'v1.credits.custom_currencies.update',
|
|
2411
|
+
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)',
|
|
2457
2412
|
},
|
|
2458
2413
|
cli: {
|
|
2459
2414
|
method: 'custom_currencies update',
|
|
2460
|
-
example: "stigg v1:
|
|
2415
|
+
example: "stigg v1:credits:custom-currencies update \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2461
2416
|
},
|
|
2462
2417
|
csharp: {
|
|
2463
|
-
method: 'V1.
|
|
2464
|
-
example: 'CustomCurrencyUpdateParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrency = await client.V1.
|
|
2418
|
+
method: 'V1.Credits.CustomCurrencies.Update',
|
|
2419
|
+
example: 'CustomCurrencyUpdateParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrency = await client.V1.Credits.CustomCurrencies.Update(parameters);\n\nConsole.WriteLine(customCurrency);',
|
|
2465
2420
|
},
|
|
2466
2421
|
http: {
|
|
2467
2422
|
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 '{}'",
|
|
@@ -2474,39 +2429,39 @@ const EMBEDDED_METHODS = [
|
|
|
2474
2429
|
httpMethod: 'post',
|
|
2475
2430
|
summary: 'Archive custom currency',
|
|
2476
2431
|
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.',
|
|
2477
|
-
stainlessPath: '(resource) v1.
|
|
2478
|
-
qualified: 'client.v1.
|
|
2432
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) archive',
|
|
2433
|
+
qualified: 'client.v1.credits.customCurrencies.archive',
|
|
2479
2434
|
params: ['currencyId: string;'],
|
|
2480
2435
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2481
|
-
markdown: "## archive\n\n`client.v1.
|
|
2436
|
+
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```",
|
|
2482
2437
|
perLanguage: {
|
|
2483
2438
|
typescript: {
|
|
2484
|
-
method: 'client.v1.
|
|
2485
|
-
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
|
|
2439
|
+
method: 'client.v1.credits.customCurrencies.archive',
|
|
2440
|
+
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);",
|
|
2486
2441
|
},
|
|
2487
2442
|
python: {
|
|
2488
|
-
method: 'v1.
|
|
2489
|
-
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)\
|
|
2443
|
+
method: 'v1.credits.custom_currencies.archive',
|
|
2444
|
+
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)',
|
|
2490
2445
|
},
|
|
2491
2446
|
java: {
|
|
2492
|
-
method: 'v1().
|
|
2493
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2447
|
+
method: 'v1().credits().customCurrencies().archive',
|
|
2448
|
+
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}',
|
|
2494
2449
|
},
|
|
2495
2450
|
go: {
|
|
2496
|
-
method: 'client.V1.
|
|
2497
|
-
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\
|
|
2451
|
+
method: 'client.V1.Credits.CustomCurrencies.Archive',
|
|
2452
|
+
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',
|
|
2498
2453
|
},
|
|
2499
2454
|
ruby: {
|
|
2500
|
-
method: 'v1.
|
|
2501
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\
|
|
2455
|
+
method: 'v1.credits.custom_currencies.archive',
|
|
2456
|
+
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)',
|
|
2502
2457
|
},
|
|
2503
2458
|
cli: {
|
|
2504
2459
|
method: 'custom_currencies archive',
|
|
2505
|
-
example: "stigg v1:
|
|
2460
|
+
example: "stigg v1:credits:custom-currencies archive \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2506
2461
|
},
|
|
2507
2462
|
csharp: {
|
|
2508
|
-
method: 'V1.
|
|
2509
|
-
example: 'CustomCurrencyArchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar
|
|
2463
|
+
method: 'V1.Credits.CustomCurrencies.Archive',
|
|
2464
|
+
example: 'CustomCurrencyArchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrency = await client.V1.Credits.CustomCurrencies.Archive(parameters);\n\nConsole.WriteLine(customCurrency);',
|
|
2510
2465
|
},
|
|
2511
2466
|
http: {
|
|
2512
2467
|
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"',
|
|
@@ -2519,39 +2474,39 @@ const EMBEDDED_METHODS = [
|
|
|
2519
2474
|
httpMethod: 'post',
|
|
2520
2475
|
summary: 'Unarchive custom currency',
|
|
2521
2476
|
description: 'Restores a previously archived custom currency. Fails if another active currency with the same ID already exists.',
|
|
2522
|
-
stainlessPath: '(resource) v1.
|
|
2523
|
-
qualified: 'client.v1.
|
|
2477
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) unarchive',
|
|
2478
|
+
qualified: 'client.v1.credits.customCurrencies.unarchive',
|
|
2524
2479
|
params: ['currencyId: string;'],
|
|
2525
2480
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2526
|
-
markdown: "## unarchive\n\n`client.v1.
|
|
2481
|
+
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```",
|
|
2527
2482
|
perLanguage: {
|
|
2528
2483
|
typescript: {
|
|
2529
|
-
method: 'client.v1.
|
|
2530
|
-
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
|
|
2484
|
+
method: 'client.v1.credits.customCurrencies.unarchive',
|
|
2485
|
+
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);",
|
|
2531
2486
|
},
|
|
2532
2487
|
python: {
|
|
2533
|
-
method: 'v1.
|
|
2534
|
-
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)\
|
|
2488
|
+
method: 'v1.credits.custom_currencies.unarchive',
|
|
2489
|
+
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)',
|
|
2535
2490
|
},
|
|
2536
2491
|
java: {
|
|
2537
|
-
method: 'v1().
|
|
2538
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2492
|
+
method: 'v1().credits().customCurrencies().unarchive',
|
|
2493
|
+
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}',
|
|
2539
2494
|
},
|
|
2540
2495
|
go: {
|
|
2541
|
-
method: 'client.V1.
|
|
2542
|
-
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\
|
|
2496
|
+
method: 'client.V1.Credits.CustomCurrencies.Unarchive',
|
|
2497
|
+
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',
|
|
2543
2498
|
},
|
|
2544
2499
|
ruby: {
|
|
2545
|
-
method: 'v1.
|
|
2546
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\
|
|
2500
|
+
method: 'v1.credits.custom_currencies.unarchive',
|
|
2501
|
+
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)',
|
|
2547
2502
|
},
|
|
2548
2503
|
cli: {
|
|
2549
2504
|
method: 'custom_currencies unarchive',
|
|
2550
|
-
example: "stigg v1:
|
|
2505
|
+
example: "stigg v1:credits:custom-currencies unarchive \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2551
2506
|
},
|
|
2552
2507
|
csharp: {
|
|
2553
|
-
method: 'V1.
|
|
2554
|
-
example: 'CustomCurrencyUnarchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar
|
|
2508
|
+
method: 'V1.Credits.CustomCurrencies.Unarchive',
|
|
2509
|
+
example: 'CustomCurrencyUnarchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrency = await client.V1.Credits.CustomCurrencies.Unarchive(parameters);\n\nConsole.WriteLine(customCurrency);',
|
|
2555
2510
|
},
|
|
2556
2511
|
http: {
|
|
2557
2512
|
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"',
|
|
@@ -2564,45 +2519,90 @@ const EMBEDDED_METHODS = [
|
|
|
2564
2519
|
httpMethod: 'get',
|
|
2565
2520
|
summary: 'List custom currency associated entities',
|
|
2566
2521
|
description: 'Lists the active plans and addons that reference a custom currency. Useful before archiving to inspect dependencies.',
|
|
2567
|
-
stainlessPath: '(resource) v1.
|
|
2568
|
-
qualified: 'client.v1.
|
|
2522
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) list_associated_entities',
|
|
2523
|
+
qualified: 'client.v1.credits.customCurrencies.listAssociatedEntities',
|
|
2569
2524
|
params: ['currencyId: string;'],
|
|
2570
2525
|
response: '{ data: { id: string; displayName: string; type: string; }[]; }',
|
|
2571
|
-
markdown: "## list_associated_entities\n\n`client.v1.
|
|
2526
|
+
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```",
|
|
2572
2527
|
perLanguage: {
|
|
2573
2528
|
typescript: {
|
|
2574
|
-
method: 'client.v1.
|
|
2575
|
-
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.
|
|
2529
|
+
method: 'client.v1.credits.customCurrencies.listAssociatedEntities',
|
|
2530
|
+
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);",
|
|
2576
2531
|
},
|
|
2577
2532
|
python: {
|
|
2578
|
-
method: 'v1.
|
|
2579
|
-
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.
|
|
2533
|
+
method: 'v1.credits.custom_currencies.list_associated_entities',
|
|
2534
|
+
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)',
|
|
2580
2535
|
},
|
|
2581
2536
|
java: {
|
|
2582
|
-
method: 'v1().
|
|
2583
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2537
|
+
method: 'v1().credits().customCurrencies().listAssociatedEntities',
|
|
2538
|
+
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}',
|
|
2584
2539
|
},
|
|
2585
2540
|
go: {
|
|
2586
|
-
method: 'client.V1.
|
|
2587
|
-
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.
|
|
2541
|
+
method: 'client.V1.Credits.CustomCurrencies.ListAssociatedEntities',
|
|
2542
|
+
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',
|
|
2588
2543
|
},
|
|
2589
2544
|
ruby: {
|
|
2590
|
-
method: 'v1.
|
|
2591
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.
|
|
2545
|
+
method: 'v1.credits.custom_currencies.list_associated_entities',
|
|
2546
|
+
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)',
|
|
2592
2547
|
},
|
|
2593
2548
|
cli: {
|
|
2594
2549
|
method: 'custom_currencies list_associated_entities',
|
|
2595
|
-
example: "stigg v1:
|
|
2550
|
+
example: "stigg v1:credits:custom-currencies list-associated-entities \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2596
2551
|
},
|
|
2597
2552
|
csharp: {
|
|
2598
|
-
method: 'V1.
|
|
2599
|
-
example: 'CustomCurrencyListAssociatedEntitiesParams parameters = new()\n{\n CurrencyID = "currencyId"\n};\n\nvar response = await client.V1.
|
|
2553
|
+
method: 'V1.Credits.CustomCurrencies.ListAssociatedEntities',
|
|
2554
|
+
example: 'CustomCurrencyListAssociatedEntitiesParams parameters = new()\n{\n CurrencyID = "currencyId"\n};\n\nvar response = await client.V1.Credits.CustomCurrencies.ListAssociatedEntities(parameters);\n\nConsole.WriteLine(response);',
|
|
2600
2555
|
},
|
|
2601
2556
|
http: {
|
|
2602
2557
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/associated-entities \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2603
2558
|
},
|
|
2604
2559
|
},
|
|
2605
2560
|
},
|
|
2561
|
+
{
|
|
2562
|
+
name: 'get_auto_recharge',
|
|
2563
|
+
endpoint: '/api/v1/credits/auto-recharge',
|
|
2564
|
+
httpMethod: 'get',
|
|
2565
|
+
summary: 'Get automatic recharge configuration',
|
|
2566
|
+
description: 'Retrieves the automatic recharge configuration for a customer and currency. Returns default settings if no configuration exists.',
|
|
2567
|
+
stainlessPath: '(resource) v1.credits.auto_recharge > (method) get_auto_recharge',
|
|
2568
|
+
qualified: 'client.v1.credits.autoRecharge.getAutoRecharge',
|
|
2569
|
+
params: ['currencyId: string;', 'customerId: string;'],
|
|
2570
|
+
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; }; }",
|
|
2571
|
+
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```",
|
|
2572
|
+
perLanguage: {
|
|
2573
|
+
typescript: {
|
|
2574
|
+
method: 'client.v1.credits.autoRecharge.getAutoRecharge',
|
|
2575
|
+
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);",
|
|
2576
|
+
},
|
|
2577
|
+
python: {
|
|
2578
|
+
method: 'v1.credits.auto_recharge.get_auto_recharge',
|
|
2579
|
+
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)',
|
|
2580
|
+
},
|
|
2581
|
+
java: {
|
|
2582
|
+
method: 'v1().credits().autoRecharge().getAutoRecharge',
|
|
2583
|
+
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}',
|
|
2584
|
+
},
|
|
2585
|
+
go: {
|
|
2586
|
+
method: 'client.V1.Credits.AutoRecharge.GetAutoRecharge',
|
|
2587
|
+
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',
|
|
2588
|
+
},
|
|
2589
|
+
ruby: {
|
|
2590
|
+
method: 'v1.credits.auto_recharge.get_auto_recharge',
|
|
2591
|
+
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)',
|
|
2592
|
+
},
|
|
2593
|
+
cli: {
|
|
2594
|
+
method: 'auto_recharge get_auto_recharge',
|
|
2595
|
+
example: "stigg v1:credits:auto-recharge get-auto-recharge \\\n --api-key 'My API Key' \\\n --currency-id currencyId \\\n --customer-id customerId",
|
|
2596
|
+
},
|
|
2597
|
+
csharp: {
|
|
2598
|
+
method: 'V1.Credits.AutoRecharge.GetAutoRecharge',
|
|
2599
|
+
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);',
|
|
2600
|
+
},
|
|
2601
|
+
http: {
|
|
2602
|
+
example: 'curl https://api.stigg.io/api/v1/credits/auto-recharge \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2603
|
+
},
|
|
2604
|
+
},
|
|
2605
|
+
},
|
|
2606
2606
|
{
|
|
2607
2607
|
name: 'retrieve_feature',
|
|
2608
2608
|
endpoint: '/api/v1/features/{id}',
|