@stigg/typescript-mcp 0.1.0-beta.2 → 0.1.0-beta.20

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.
Files changed (55) hide show
  1. package/auth.d.mts.map +1 -1
  2. package/auth.d.ts.map +1 -1
  3. package/code-tool-types.d.mts.map +1 -1
  4. package/code-tool-types.d.ts.map +1 -1
  5. package/code-tool-worker.d.mts.map +1 -1
  6. package/code-tool-worker.d.ts.map +1 -1
  7. package/code-tool-worker.js +18 -1
  8. package/code-tool-worker.js.map +1 -1
  9. package/code-tool-worker.mjs +18 -1
  10. package/code-tool-worker.mjs.map +1 -1
  11. package/code-tool.d.mts.map +1 -1
  12. package/code-tool.d.ts.map +1 -1
  13. package/code-tool.mjs.map +1 -1
  14. package/docs-search-tool.d.mts +2 -2
  15. package/docs-search-tool.d.mts.map +1 -1
  16. package/docs-search-tool.d.ts +2 -2
  17. package/docs-search-tool.d.ts.map +1 -1
  18. package/docs-search-tool.mjs.map +1 -1
  19. package/http.d.mts.map +1 -1
  20. package/http.d.ts.map +1 -1
  21. package/http.mjs.map +1 -1
  22. package/index.mjs.map +1 -1
  23. package/instructions.mjs.map +1 -1
  24. package/local-docs-search.d.mts.map +1 -1
  25. package/local-docs-search.d.ts.map +1 -1
  26. package/local-docs-search.js +875 -79
  27. package/local-docs-search.js.map +1 -1
  28. package/local-docs-search.mjs +875 -79
  29. package/local-docs-search.mjs.map +1 -1
  30. package/logger.d.mts.map +1 -1
  31. package/logger.d.ts.map +1 -1
  32. package/logger.mjs.map +1 -1
  33. package/methods.d.mts.map +1 -1
  34. package/methods.d.ts.map +1 -1
  35. package/methods.js +108 -6
  36. package/methods.js.map +1 -1
  37. package/methods.mjs +108 -6
  38. package/methods.mjs.map +1 -1
  39. package/options.mjs.map +1 -1
  40. package/package.json +2 -2
  41. package/server.d.mts.map +1 -1
  42. package/server.d.ts.map +1 -1
  43. package/server.js +1 -1
  44. package/server.js.map +1 -1
  45. package/server.mjs +1 -1
  46. package/server.mjs.map +1 -1
  47. package/src/code-tool-worker.ts +18 -1
  48. package/src/local-docs-search.ts +1051 -90
  49. package/src/methods.ts +108 -6
  50. package/src/server.ts +1 -1
  51. package/stdio.d.mts.map +1 -1
  52. package/stdio.d.ts.map +1 -1
  53. package/stdio.mjs.map +1 -1
  54. package/types.d.mts.map +1 -1
  55. package/types.d.ts.map +1 -1
@@ -1349,6 +1349,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1349
1349
  "billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; };",
1350
1350
  "billingPeriod?: 'MONTHLY' | 'ANNUALLY';",
1351
1351
  'budget?: { hasSoftLimit: boolean; limit: number; };',
1352
+ 'cancellationDate?: string;',
1352
1353
  "charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[];",
1353
1354
  'checkoutOptions?: { cancelUrl: string; successUrl: string; allowPromoCodes?: boolean; allowTaxIdCollection?: boolean; collectBillingAddress?: boolean; collectPhoneNumber?: boolean; referenceId?: string; };',
1354
1355
  "entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[];",
@@ -1367,7 +1368,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1367
1368
  response:
1368
1369
  "{ data: { id: string; entitlements: object | object[]; status: 'SUCCESS' | 'PAYMENT_REQUIRED'; subscription: object; checkoutBillingId?: string; checkoutUrl?: string; isScheduled?: boolean; }; }",
1369
1370
  markdown:
1370
- "## provision\n\n`client.v1.subscriptions.provision(customerId: string, planId: string, id?: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, awaitPaymentConfirmation?: boolean, billingCountryCode?: string, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingId?: string, billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', budget?: { hasSoftLimit: boolean; limit: number; }, charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[], checkoutOptions?: { cancelUrl: string; successUrl: string; allowPromoCodes?: boolean; allowTaxIdCollection?: boolean; collectBillingAddress?: boolean; collectPhoneNumber?: boolean; referenceId?: string; }, entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[], metadata?: object, minimumSpend?: { amount?: number; currency?: string; }, payingCustomerId?: string, paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE', priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; currency?: string; featureId?: string; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[], resourceId?: string, salesforceId?: string, scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE', startDate?: string, trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }, unitQuantity?: number): { data: object; }`\n\n**post** `/api/v1/subscriptions`\n\nCreates a new subscription for an existing customer. When payment is required and no payment method exists, returns a checkout URL.\n\n### Parameters\n\n- `customerId: string`\n Customer ID to provision the subscription for\n\n- `planId: string`\n Plan ID to provision\n\n- `id?: string`\n Unique identifier for the subscription\n\n- `addons?: { id: string; quantity: number; }[]`\n\n- `appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }`\n Coupon configuration\n - `billingCouponId?: string`\n Billing provider coupon ID\n - `configuration?: { startDate?: string; }`\n Coupon timing configuration\n - `couponId?: string`\n Stigg coupon ID\n - `discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }`\n Ad-hoc discount configuration\n - `promotionCode?: string`\n Promotion code to apply\n\n- `awaitPaymentConfirmation?: boolean`\n Whether to wait for payment confirmation before returning the subscription\n\n- `billingCountryCode?: string`\n The ISO 3166-1 alpha-2 country code for billing\n\n- `billingCycleAnchor?: 'UNCHANGED' | 'NOW'`\n Billing cycle anchor behavior for the subscription\n\n- `billingId?: string`\n External billing system identifier\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }`\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n Billing address for the subscription\n - `chargeOnBehalfOfAccount?: string`\n Stripe Connect account to charge on behalf of\n - `integrationId?: string`\n Billing integration identifier\n - `invoiceDaysUntilDue?: number`\n Number of days until invoice is due\n - `isBackdated?: boolean`\n Whether the subscription is backdated\n - `isInvoicePaid?: boolean`\n Whether the invoice is marked as paid\n - `metadata?: object`\n Additional metadata for the subscription\n - `prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'`\n How to handle proration for billing changes\n - `taxIds?: { type: string; value: string; }[]`\n Customer tax identification numbers\n - `taxPercentage?: number`\n Tax percentage (0-100)\n - `taxRateIds?: string[]`\n Tax rate identifiers to apply\n\n- `billingPeriod?: 'MONTHLY' | 'ANNUALLY'`\n Billing period (MONTHLY or ANNUALLY)\n\n- `budget?: { hasSoftLimit: boolean; limit: number; }`\n - `hasSoftLimit: boolean`\n Whether the budget is a soft limit\n - `limit: number`\n Maximum spending limit\n\n- `charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]`\n\n- `checkoutOptions?: { cancelUrl: string; successUrl: string; allowPromoCodes?: boolean; allowTaxIdCollection?: boolean; collectBillingAddress?: boolean; collectPhoneNumber?: boolean; referenceId?: string; }`\n Checkout page configuration for payment collection\n - `cancelUrl: string`\n URL to redirect to if checkout is canceled\n - `successUrl: string`\n URL to redirect to after successful checkout\n - `allowPromoCodes?: boolean`\n Allow promotional codes during checkout\n - `allowTaxIdCollection?: boolean`\n Allow tax ID collection during checkout\n - `collectBillingAddress?: boolean`\n Collect billing address during checkout\n - `collectPhoneNumber?: boolean`\n Collect phone number during checkout\n - `referenceId?: string`\n Optional reference ID for the checkout session\n\n- `entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[]`\n\n- `metadata?: object`\n Additional metadata for the subscription\n\n- `minimumSpend?: { amount?: number; currency?: string; }`\n Minimum spend amount\n - `amount?: number`\n The price amount\n - `currency?: string`\n The price currency\n\n- `payingCustomerId?: string`\n Optional paying customer ID for split billing scenarios\n\n- `paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'`\n How payments should be collected for this subscription\n\n- `priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]`\n\n- `resourceId?: string`\n Optional resource ID for multi-instance subscriptions\n\n- `salesforceId?: string`\n Salesforce ID\n\n- `scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE'`\n Strategy for scheduling subscription changes\n\n- `startDate?: string`\n Subscription start date\n\n- `trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }`\n Trial period override settings\n - `isTrial: boolean`\n Whether the subscription should start with a trial period\n - `trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'`\n Behavior when trial ends: CONVERT_TO_PAID or CANCEL_SUBSCRIPTION\n - `trialEndDate?: string`\n Custom trial end date\n\n- `unitQuantity?: number`\n Unit quantity\n\n### Returns\n\n- `{ data: { id: string; entitlements: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: object; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: object; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }[]; status: 'SUCCESS' | 'PAYMENT_REQUIRED'; subscription: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: object[]; billingCycleAnchor?: string; budget?: object; cancellationDate?: string; cancelReason?: string; coupons?: object[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: object[]; latestInvoice?: object; metadata?: object; minimumSpend?: object; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: object[]; resourceId?: string; subscriptionEntitlements?: object[]; trial?: object; trialEndDate?: string; }; checkoutBillingId?: string; checkoutUrl?: string; isScheduled?: boolean; }; }`\n Response object\n\n - `data: { id: string; entitlements: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }[]; status: 'SUCCESS' | 'PAYMENT_REQUIRED'; subscription: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; checkoutBillingId?: string; checkoutUrl?: string; isScheduled?: boolean; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.provision({ customerId: 'customerId', planId: 'planId' });\n\nconsole.log(response);\n```",
1371
+ "## provision\n\n`client.v1.subscriptions.provision(customerId: string, planId: string, id?: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, awaitPaymentConfirmation?: boolean, billingCountryCode?: string, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingId?: string, billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', budget?: { hasSoftLimit: boolean; limit: number; }, cancellationDate?: string, charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[], checkoutOptions?: { cancelUrl: string; successUrl: string; allowPromoCodes?: boolean; allowTaxIdCollection?: boolean; collectBillingAddress?: boolean; collectPhoneNumber?: boolean; referenceId?: string; }, entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[], metadata?: object, minimumSpend?: { amount?: number; currency?: string; }, payingCustomerId?: string, paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE', priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; currency?: string; featureId?: string; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[], resourceId?: string, salesforceId?: string, scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE', startDate?: string, trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }, unitQuantity?: number): { data: object; }`\n\n**post** `/api/v1/subscriptions`\n\nCreates a new subscription for an existing customer. When payment is required and no payment method exists, returns a checkout URL.\n\n### Parameters\n\n- `customerId: string`\n Customer ID to provision the subscription for\n\n- `planId: string`\n Plan ID to provision\n\n- `id?: string`\n Unique identifier for the subscription\n\n- `addons?: { id: string; quantity: number; }[]`\n\n- `appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }`\n Coupon configuration\n - `billingCouponId?: string`\n Billing provider coupon ID\n - `configuration?: { startDate?: string; }`\n Coupon timing configuration\n - `couponId?: string`\n Stigg coupon ID\n - `discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }`\n Ad-hoc discount configuration\n - `promotionCode?: string`\n Promotion code to apply\n\n- `awaitPaymentConfirmation?: boolean`\n Whether to wait for payment confirmation before returning the subscription\n\n- `billingCountryCode?: string`\n The ISO 3166-1 alpha-2 country code for billing\n\n- `billingCycleAnchor?: 'UNCHANGED' | 'NOW'`\n Billing cycle anchor behavior for the subscription\n\n- `billingId?: string`\n External billing system identifier\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }`\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n Billing address for the subscription\n - `chargeOnBehalfOfAccount?: string`\n Stripe Connect account to charge on behalf of\n - `integrationId?: string`\n Billing integration identifier\n - `invoiceDaysUntilDue?: number`\n Number of days until invoice is due\n - `isBackdated?: boolean`\n Whether the subscription is backdated\n - `isInvoicePaid?: boolean`\n Whether the invoice is marked as paid\n - `metadata?: object`\n Additional metadata for the subscription\n - `prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'`\n How to handle proration for billing changes\n - `taxIds?: { type: string; value: string; }[]`\n Customer tax identification numbers\n - `taxPercentage?: number`\n Tax percentage (0-100)\n - `taxRateIds?: string[]`\n Tax rate identifiers to apply\n\n- `billingPeriod?: 'MONTHLY' | 'ANNUALLY'`\n Billing period (MONTHLY or ANNUALLY)\n\n- `budget?: { hasSoftLimit: boolean; limit: number; }`\n - `hasSoftLimit: boolean`\n Whether the budget is a soft limit\n - `limit: number`\n Maximum spending limit\n\n- `cancellationDate?: string`\n Subscription cancellation date\n\n- `charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]`\n\n- `checkoutOptions?: { cancelUrl: string; successUrl: string; allowPromoCodes?: boolean; allowTaxIdCollection?: boolean; collectBillingAddress?: boolean; collectPhoneNumber?: boolean; referenceId?: string; }`\n Checkout page configuration for payment collection\n - `cancelUrl: string`\n URL to redirect to if checkout is canceled\n - `successUrl: string`\n URL to redirect to after successful checkout\n - `allowPromoCodes?: boolean`\n Allow promotional codes during checkout\n - `allowTaxIdCollection?: boolean`\n Allow tax ID collection during checkout\n - `collectBillingAddress?: boolean`\n Collect billing address during checkout\n - `collectPhoneNumber?: boolean`\n Collect phone number during checkout\n - `referenceId?: string`\n Optional reference ID for the checkout session\n\n- `entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[]`\n\n- `metadata?: object`\n Additional metadata for the subscription\n\n- `minimumSpend?: { amount?: number; currency?: string; }`\n Minimum spend amount\n - `amount?: number`\n The price amount\n - `currency?: string`\n The price currency\n\n- `payingCustomerId?: string`\n Optional paying customer ID for split billing scenarios\n\n- `paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'`\n How payments should be collected for this subscription\n\n- `priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]`\n\n- `resourceId?: string`\n Optional resource ID for multi-instance subscriptions\n\n- `salesforceId?: string`\n Salesforce ID\n\n- `scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE'`\n Strategy for scheduling subscription changes\n\n- `startDate?: string`\n Subscription start date\n\n- `trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }`\n Trial period override settings\n - `isTrial: boolean`\n Whether the subscription should start with a trial period\n - `trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'`\n Behavior when trial ends: CONVERT_TO_PAID or CANCEL_SUBSCRIPTION\n - `trialEndDate?: string`\n Custom trial end date\n\n- `unitQuantity?: number`\n Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).\n\n### Returns\n\n- `{ data: { id: string; entitlements: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: object; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: object; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }[]; status: 'SUCCESS' | 'PAYMENT_REQUIRED'; subscription: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: object[]; billingCycleAnchor?: string; budget?: object; cancellationDate?: string; cancelReason?: string; coupons?: object[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: object[]; latestInvoice?: object; metadata?: object; minimumSpend?: object; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: object[]; resourceId?: string; subscriptionEntitlements?: object[]; trial?: object; trialEndDate?: string; }; checkoutBillingId?: string; checkoutUrl?: string; isScheduled?: boolean; }; }`\n Response object\n\n - `data: { id: string; entitlements: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }[]; status: 'SUCCESS' | 'PAYMENT_REQUIRED'; subscription: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; checkoutBillingId?: string; checkoutUrl?: string; isScheduled?: boolean; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.provision({ customerId: 'customerId', planId: 'planId' });\n\nconsole.log(response);\n```",
1371
1372
  perLanguage: {
1372
1373
  typescript: {
1373
1374
  method: 'client.v1.subscriptions.provision',
@@ -1607,7 +1608,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1607
1608
  response:
1608
1609
  '{ data: { immediateInvoice: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; billingPeriodRange?: { end?: string; start?: string; }; freeItems?: { id: string; quantity: number; }[]; hasScheduledUpdates?: boolean; isPlanDowngrade?: boolean; recurringInvoice?: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; }; }',
1609
1610
  markdown:
1610
- "## preview\n\n`client.v1.subscriptions.preview(customerId: string, planId: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, billableFeatures?: { featureId: string; quantity: number; }[], billingCountryCode?: string, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[], payingCustomerId?: string, resourceId?: string, scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE', startDate?: string, trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }, unitQuantity?: number): { data: object; }`\n\n**post** `/api/v1/subscriptions/preview`\n\nPreviews the pricing impact of creating or updating a subscription without making changes. Returns estimated costs, taxes, and proration details.\n\n### Parameters\n\n- `customerId: string`\n Customer ID\n\n- `planId: string`\n Plan ID\n\n- `addons?: { id: string; quantity: number; }[]`\n Addons to include\n\n- `appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }`\n Coupon or discount to apply\n - `billingCouponId?: string`\n Billing provider coupon ID\n - `configuration?: { startDate?: string; }`\n Coupon timing configuration\n - `couponId?: string`\n Stigg coupon ID\n - `discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }`\n Ad-hoc discount configuration\n - `promotionCode?: string`\n Promotion code to apply\n\n- `billableFeatures?: { featureId: string; quantity: number; }[]`\n Billable features with quantities\n\n- `billingCountryCode?: string`\n ISO 3166-1 country code for localization\n\n- `billingCycleAnchor?: 'UNCHANGED' | 'NOW'`\n Billing cycle anchor behavior for the subscription\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }`\n Billing and tax configuration\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n Billing address\n - `chargeOnBehalfOfAccount?: string`\n Connected account ID for platform billing\n - `integrationId?: string`\n Billing integration ID\n - `invoiceDaysUntilDue?: number`\n Days until invoice is due\n - `isBackdated?: boolean`\n Whether subscription is backdated\n - `isInvoicePaid?: boolean`\n Whether invoice is already paid\n - `metadata?: object`\n Additional billing metadata\n - `prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'`\n Proration behavior\n - `taxIds?: { type: string; value: string; }[]`\n Customer tax IDs\n - `taxPercentage?: number`\n Tax percentage to apply\n - `taxRateIds?: string[]`\n Tax rate IDs from billing provider\n\n- `billingPeriod?: 'MONTHLY' | 'ANNUALLY'`\n Billing period (MONTHLY or ANNUALLY)\n\n- `charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]`\n One-time or recurring charges\n\n- `payingCustomerId?: string`\n Paying customer ID for delegated billing\n\n- `resourceId?: string`\n Resource ID for multi-instance subscriptions\n\n- `scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE'`\n When to apply subscription changes\n\n- `startDate?: string`\n Subscription start date\n\n- `trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }`\n Trial period override settings\n - `isTrial: boolean`\n Whether to start as trial\n - `trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'`\n Behavior when trial ends\n - `trialEndDate?: string`\n Trial end date\n\n- `unitQuantity?: number`\n Unit quantity for per-unit pricing\n\n### Returns\n\n- `{ data: { immediateInvoice: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; billingPeriodRange?: { end?: string; start?: string; }; freeItems?: { id: string; quantity: number; }[]; hasScheduledUpdates?: boolean; isPlanDowngrade?: boolean; recurringInvoice?: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; }; }`\n Response object\n\n - `data: { immediateInvoice: { subTotal: number; total: number; billingPeriodRange?: { end: string; start: string; }; currency?: string; discount?: number; discountDetails?: { code?: string; fixedAmount?: number; percentage?: number; }; discounts?: { amount: number; currency: string; description: string; }[]; lines?: { currency: string; description: string; subTotal: number; unitPrice: number; quantity?: number; }[]; tax?: number; }; billingPeriodRange?: { end?: string; start?: string; }; freeItems?: { id: string; quantity: number; }[]; hasScheduledUpdates?: boolean; isPlanDowngrade?: boolean; recurringInvoice?: { subTotal: number; total: number; billingPeriodRange?: { end: string; start: string; }; currency?: string; discount?: number; discountDetails?: { code?: string; fixedAmount?: number; percentage?: number; }; discounts?: { amount: number; currency: string; description: string; }[]; lines?: { currency: string; description: string; subTotal: number; unitPrice: number; quantity?: number; }[]; tax?: number; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.preview({ customerId: 'customerId', planId: 'planId' });\n\nconsole.log(response);\n```",
1611
+ "## preview\n\n`client.v1.subscriptions.preview(customerId: string, planId: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, billableFeatures?: { featureId: string; quantity: number; }[], billingCountryCode?: string, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[], payingCustomerId?: string, resourceId?: string, scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE', startDate?: string, trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }, unitQuantity?: number): { data: object; }`\n\n**post** `/api/v1/subscriptions/preview`\n\nPreviews the pricing impact of creating or updating a subscription without making changes. Returns estimated costs, taxes, and proration details.\n\n### Parameters\n\n- `customerId: string`\n Customer ID\n\n- `planId: string`\n Plan ID\n\n- `addons?: { id: string; quantity: number; }[]`\n Addons to include\n\n- `appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }`\n Coupon or discount to apply\n - `billingCouponId?: string`\n Billing provider coupon ID\n - `configuration?: { startDate?: string; }`\n Coupon timing configuration\n - `couponId?: string`\n Stigg coupon ID\n - `discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }`\n Ad-hoc discount configuration\n - `promotionCode?: string`\n Promotion code to apply\n\n- `billableFeatures?: { featureId: string; quantity: number; }[]`\n Billable features with quantities\n\n- `billingCountryCode?: string`\n ISO 3166-1 country code for localization\n\n- `billingCycleAnchor?: 'UNCHANGED' | 'NOW'`\n Billing cycle anchor behavior for the subscription\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }`\n Billing and tax configuration\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n Billing address\n - `chargeOnBehalfOfAccount?: string`\n Connected account ID for platform billing\n - `integrationId?: string`\n Billing integration ID\n - `invoiceDaysUntilDue?: number`\n Days until invoice is due\n - `isBackdated?: boolean`\n Whether subscription is backdated\n - `isInvoicePaid?: boolean`\n Whether invoice is already paid\n - `metadata?: object`\n Additional billing metadata\n - `prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'`\n Proration behavior\n - `taxIds?: { type: string; value: string; }[]`\n Customer tax IDs\n - `taxPercentage?: number`\n Tax percentage to apply\n - `taxRateIds?: string[]`\n Tax rate IDs from billing provider\n\n- `billingPeriod?: 'MONTHLY' | 'ANNUALLY'`\n Billing period (MONTHLY or ANNUALLY)\n\n- `charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]`\n One-time or recurring charges\n\n- `payingCustomerId?: string`\n Paying customer ID for delegated billing\n\n- `resourceId?: string`\n Resource ID for multi-instance subscriptions\n\n- `scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE'`\n When to apply subscription changes\n\n- `startDate?: string`\n Subscription start date\n\n- `trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }`\n Trial period override settings\n - `isTrial: boolean`\n Whether to start as trial\n - `trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'`\n Behavior when trial ends\n - `trialEndDate?: string`\n Trial end date\n\n- `unitQuantity?: number`\n Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).\n\n### Returns\n\n- `{ data: { immediateInvoice: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; billingPeriodRange?: { end?: string; start?: string; }; freeItems?: { id: string; quantity: number; }[]; hasScheduledUpdates?: boolean; isPlanDowngrade?: boolean; recurringInvoice?: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; }; }`\n Response object\n\n - `data: { immediateInvoice: { subTotal: number; total: number; billingPeriodRange?: { end: string; start: string; }; currency?: string; discount?: number; discountDetails?: { code?: string; fixedAmount?: number; percentage?: number; }; discounts?: { amount: number; currency: string; description: string; }[]; lines?: { currency: string; description: string; subTotal: number; unitPrice: number; quantity?: number; }[]; tax?: number; }; billingPeriodRange?: { end?: string; start?: string; }; freeItems?: { id: string; quantity: number; }[]; hasScheduledUpdates?: boolean; isPlanDowngrade?: boolean; recurringInvoice?: { subTotal: number; total: number; billingPeriodRange?: { end: string; start: string; }; currency?: string; discount?: number; discountDetails?: { code?: string; fixedAmount?: number; percentage?: number; }; discounts?: { amount: number; currency: string; description: string; }[]; lines?: { currency: string; description: string; subTotal: number; unitPrice: number; quantity?: number; }[]; tax?: number; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.preview({ customerId: 'customerId', planId: 'planId' });\n\nconsole.log(response);\n```",
1611
1612
  perLanguage: {
1612
1613
  typescript: {
1613
1614
  method: 'client.v1.subscriptions.preview',
@@ -1668,6 +1669,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1668
1669
  "billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; couponId?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; };",
1669
1670
  "billingPeriod?: 'MONTHLY' | 'ANNUALLY';",
1670
1671
  'budget?: { hasSoftLimit: boolean; limit: number; };',
1672
+ 'cancellationDate?: string;',
1671
1673
  "charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[];",
1672
1674
  "entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[];",
1673
1675
  'metadata?: object;',
@@ -1680,7 +1682,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1680
1682
  response:
1681
1683
  "{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: object[]; billingCycleAnchor?: string; budget?: object; cancellationDate?: string; cancelReason?: string; coupons?: object[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: object[]; latestInvoice?: object; metadata?: object; minimumSpend?: object; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: object[]; resourceId?: string; subscriptionEntitlements?: object[]; trial?: object; trialEndDate?: string; }; }",
1682
1684
  markdown:
1683
- "## update\n\n`client.v1.subscriptions.update(id: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, awaitPaymentConfirmation?: boolean, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; couponId?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', budget?: { hasSoftLimit: boolean; limit: number; }, charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[], entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[], metadata?: object, minimumSpend?: { amount?: number; currency?: string; }, priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; currency?: string; currencyId?: string; featureId?: string; }[], promotionCode?: string, scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE', trialEndDate?: string): { data: object; }`\n\n**patch** `/api/v1/subscriptions/{id}`\n\nUpdates an active subscription's properties including billing period, add-ons, unit quantities, and discounts.\n\n### Parameters\n\n- `id: string`\n\n- `addons?: { id: string; quantity: number; }[]`\n\n- `appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }`\n - `billingCouponId?: string`\n - `configuration?: { startDate?: string; }`\n - `couponId?: string`\n Stigg coupon ID\n - `discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }`\n - `promotionCode?: string`\n\n- `awaitPaymentConfirmation?: boolean`\n Await payment confirmation\n\n- `billingCycleAnchor?: 'UNCHANGED' | 'NOW'`\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; couponId?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }`\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n Physical address\n - `chargeOnBehalfOfAccount?: string`\n - `couponId?: string`\n - `integrationId?: string`\n - `invoiceDaysUntilDue?: number`\n - `isBackdated?: boolean`\n - `isInvoicePaid?: boolean`\n - `metadata?: object`\n Additional metadata for the subscription\n - `prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'`\n - `taxIds?: { type: string; value: string; }[]`\n - `taxPercentage?: number`\n - `taxRateIds?: string[]`\n\n- `billingPeriod?: 'MONTHLY' | 'ANNUALLY'`\n\n- `budget?: { hasSoftLimit: boolean; limit: number; }`\n - `hasSoftLimit: boolean`\n Whether the budget is a soft limit\n - `limit: number`\n Maximum spending limit\n\n- `charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]`\n\n- `entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[]`\n\n- `metadata?: object`\n Additional metadata for the subscription\n\n- `minimumSpend?: { amount?: number; currency?: string; }`\n Minimum spend amount\n - `amount?: number`\n The price amount\n - `currency?: string`\n The price currency\n\n- `priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; currency?: string; currencyId?: string; featureId?: string; }[]`\n\n- `promotionCode?: string`\n Promotion code\n\n- `scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE'`\n\n- `trialEndDate?: string`\n Subscription trial end date\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: object[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: object; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: object[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst subscription = await client.v1.subscriptions.update('x');\n\nconsole.log(subscription);\n```",
1685
+ "## update\n\n`client.v1.subscriptions.update(id: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, awaitPaymentConfirmation?: boolean, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; couponId?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', budget?: { hasSoftLimit: boolean; limit: number; }, cancellationDate?: string, charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[], entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[], metadata?: object, minimumSpend?: { amount?: number; currency?: string; }, priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; currency?: string; currencyId?: string; featureId?: string; }[], promotionCode?: string, scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE', trialEndDate?: string): { data: object; }`\n\n**patch** `/api/v1/subscriptions/{id}`\n\nUpdates an active subscription's properties including billing period, add-ons, unit quantities, and discounts.\n\n### Parameters\n\n- `id: string`\n\n- `addons?: { id: string; quantity: number; }[]`\n\n- `appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }`\n - `billingCouponId?: string`\n - `configuration?: { startDate?: string; }`\n - `couponId?: string`\n Stigg coupon ID\n - `discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }`\n - `promotionCode?: string`\n\n- `awaitPaymentConfirmation?: boolean`\n Await payment confirmation\n\n- `billingCycleAnchor?: 'UNCHANGED' | 'NOW'`\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; couponId?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }`\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n Physical address\n - `chargeOnBehalfOfAccount?: string`\n - `couponId?: string`\n - `integrationId?: string`\n - `invoiceDaysUntilDue?: number`\n - `isBackdated?: boolean`\n - `isInvoicePaid?: boolean`\n - `metadata?: object`\n Additional metadata for the subscription\n - `prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'`\n - `taxIds?: { type: string; value: string; }[]`\n - `taxPercentage?: number`\n - `taxRateIds?: string[]`\n\n- `billingPeriod?: 'MONTHLY' | 'ANNUALLY'`\n\n- `budget?: { hasSoftLimit: boolean; limit: number; }`\n - `hasSoftLimit: boolean`\n Whether the budget is a soft limit\n - `limit: number`\n Maximum spending limit\n\n- `cancellationDate?: string`\n Subscription cancellation date\n\n- `charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]`\n\n- `entitlements?: { id: string; type: 'FEATURE'; hasSoftLimit?: boolean; hasUnlimitedUsage?: boolean; monthlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart' | 'StartOfTheMonth'; }; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; weeklyResetPeriodConfiguration?: { accordingTo: string; }; yearlyResetPeriodConfiguration?: { accordingTo: 'SubscriptionStart'; }; } | { id: string; amount: number; cadence: 'MONTH' | 'YEAR'; type: 'CREDIT'; }[]`\n\n- `metadata?: object`\n Additional metadata for the subscription\n\n- `minimumSpend?: { amount?: number; currency?: string; }`\n Minimum spend amount\n - `amount?: number`\n The price amount\n - `currency?: string`\n The price currency\n\n- `priceOverrides?: { addonId?: string; amount?: number; baseCharge?: boolean; currency?: string; currencyId?: string; featureId?: string; }[]`\n\n- `promotionCode?: string`\n Promotion code\n\n- `scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE'`\n\n- `trialEndDate?: string`\n Subscription trial end date\n\n### Returns\n\n- `{ data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: object[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: object; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: object[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }; }`\n Response object\n\n - `data: { id: string; billingId: string; createdAt: string; customerId: string; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; planId: string; pricingType: 'FREE' | 'PAID' | 'CUSTOM'; startDate: string; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'; addons?: { id: string; quantity: number; }[]; billingCycleAnchor?: string; budget?: { hasSoftLimit: boolean; limit: number; }; cancellationDate?: string; cancelReason?: string; coupons?: { id: string; name: string; status: 'ACTIVE' | 'EXPIRED' | 'REMOVED'; amountsOff?: { amount?: number; currency?: string; }[]; percentOff?: number; }[]; currentBillingPeriodEnd?: string; currentBillingPeriodStart?: string; effectiveEndDate?: string; endDate?: string; futureUpdates?: { scheduledExecutionTime: string; scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED'; subscriptionScheduleType: string; targetPackage?: { id: string; }; }[]; latestInvoice?: { billingId: string; createdAt: string; requiresAction: boolean; status: 'OPEN' | 'CANCELED' | 'PAID'; amountDue?: number; billingReason?: string; currency?: string; pdfUrl?: string; total?: number; }; metadata?: object; minimumSpend?: { amount?: number; currency?: string; }; payingCustomerId?: string; paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'; prices?: { addonId?: string; amount?: number; baseCharge?: boolean; billingCountryCode?: string; blockSize?: number; currency?: string; featureId?: string; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; }[]; resourceId?: string; subscriptionEntitlements?: { id: string; type: 'FEATURE' | 'CREDIT'; }[]; trial?: { trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; }; trialEndDate?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst subscription = await client.v1.subscriptions.update('x');\n\nconsole.log(subscription);\n```",
1684
1686
  perLanguage: {
1685
1687
  typescript: {
1686
1688
  method: 'client.v1.subscriptions.update',
@@ -1772,7 +1774,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1772
1774
  csharp: {
1773
1775
  method: 'V1.Subscriptions.Import',
1774
1776
  example:
1775
- 'SubscriptionImportParams parameters = new()\n{\n Subscriptions =\n [\n new()\n {\n ID = "id",\n CustomerID = "customerId",\n PlanID = "planId",\n Addons =\n [\n new()\n {\n ID = "id",\n Quantity = 0,\n },\n ],\n BillingID = "billingId",\n BillingPeriod = BillingPeriod.Monthly,\n Charges =\n [\n new()\n {\n ID = "id",\n Quantity = 1,\n Type = Type.Feature,\n },\n ],\n EndDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),\n Metadata = new Dictionary<string, string>() { { "foo", "string" } },\n ResourceID = "resourceId",\n StartDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),\n },\n ],\n};\n\nvar response = await client.V1.Subscriptions.Import(parameters);\n\nConsole.WriteLine(response);',
1777
+ 'SubscriptionImportParams parameters = new()\n{\n Subscriptions =\n [\n new()\n {\n ID = "id",\n CustomerID = "customerId",\n PlanID = "planId",\n Addons =\n [\n new()\n {\n ID = "id",\n Quantity = 0,\n },\n ],\n BillingID = "billingId",\n BillingPeriod = BillingPeriod.Monthly,\n Charges =\n [\n new()\n {\n ID = "id",\n Quantity = 0,\n Type = Type.Feature,\n },\n ],\n EndDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),\n Metadata = new Dictionary<string, string>() { { "foo", "string" } },\n ResourceID = "resourceId",\n StartDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),\n },\n ],\n};\n\nvar response = await client.V1.Subscriptions.Import(parameters);\n\nConsole.WriteLine(response);',
1776
1778
  },
1777
1779
  http: {
1778
1780
  example:
@@ -2454,6 +2456,801 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2454
2456
  },
2455
2457
  },
2456
2458
  },
2459
+ {
2460
+ name: 'check',
2461
+ endpoint: '/api/v1-beta/customers/{id}/entitlements/check',
2462
+ httpMethod: 'get',
2463
+ summary: 'Check entitlement (beta)',
2464
+ description:
2465
+ 'Experimental — request and response shapes may change without notice. Same semantics as `Check entitlement`, plus an optional `dimensions` query param that resolves to per-entity governance limits surfaced as `chains` on the response.',
2466
+ stainlessPath: '(resource) v1.events.beta.customers.entitlements > (method) check',
2467
+ qualified: 'client.v1.events.beta.customers.entitlements.check',
2468
+ params: [
2469
+ 'id: string;',
2470
+ 'currencyId?: string;',
2471
+ 'dimensions?: object;',
2472
+ 'featureId?: string;',
2473
+ 'requestedUsage?: number;',
2474
+ 'requestedValues?: string[];',
2475
+ 'resourceId?: string;',
2476
+ ],
2477
+ response:
2478
+ "{ data: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }; }",
2479
+ markdown:
2480
+ "## check\n\n`client.v1.events.beta.customers.entitlements.check(id: string, currencyId?: string, dimensions?: object, featureId?: string, requestedUsage?: number, requestedValues?: string[], resourceId?: string): { data: object | object; }`\n\n**get** `/api/v1-beta/customers/{id}/entitlements/check`\n\nExperimental — request and response shapes may change without notice. Same semantics as `Check entitlement`, plus an optional `dimensions` query param that resolves to per-entity governance limits surfaced as `chains` on the response.\n\n### Parameters\n\n- `id: string`\n\n- `currencyId?: string`\n Currency ID (refId) to check for credit entitlements. Mutually exclusive with `featureId`.\n\n- `dimensions?: object`\n Optional attribution map (e.g. `dimensions[userId]=u1`). When provided, the response includes a `chains` array with per-entity governance limits.\n\n- `featureId?: string`\n Feature ID (refId) to check. Mutually exclusive with `currencyId`.\n\n- `requestedUsage?: number`\n Requested usage amount to evaluate against the entitlement limit (numeric features only)\n\n- `requestedValues?: string[]`\n Requested values to evaluate against allowed values (enum features only)\n\n- `resourceId?: string`\n Resource ID to scope the entitlement check to a specific resource\n\n### Returns\n\n- `{ data: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }; }`\n Response object\n\n - `data: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.entitlements.check('x');\n\nconsole.log(response);\n```",
2481
+ perLanguage: {
2482
+ typescript: {
2483
+ method: 'client.v1.events.beta.customers.entitlements.check',
2484
+ example:
2485
+ "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.beta.customers.entitlements.check('x');\n\nconsole.log(response.data);",
2486
+ },
2487
+ python: {
2488
+ method: 'v1.events.beta.customers.entitlements.check',
2489
+ example:
2490
+ '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.beta.customers.entitlements.check(\n id="x",\n)\nprint(response.data)',
2491
+ },
2492
+ java: {
2493
+ method: 'v1().events().beta().customers().entitlements().check',
2494
+ example:
2495
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.beta.customers.entitlements.EntitlementCheckParams;\nimport io.stigg.models.v1.events.beta.customers.entitlements.EntitlementCheckResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n EntitlementCheckResponse response = client.v1().events().beta().customers().entitlements().check("x");\n }\n}',
2496
+ },
2497
+ go: {
2498
+ method: 'client.V1.Events.Beta.Customers.Entitlements.Check',
2499
+ example:
2500
+ '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.Beta.Customers.Entitlements.Check(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1EventBetaCustomerEntitlementCheckParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
2501
+ },
2502
+ ruby: {
2503
+ method: 'v1.events.beta.customers.entitlements.check',
2504
+ example:
2505
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.events.beta.customers.entitlements.check("x")\n\nputs(response)',
2506
+ },
2507
+ cli: {
2508
+ method: 'entitlements check',
2509
+ example:
2510
+ "stigg v1:events:beta:customers:entitlements check \\\n --api-key 'My API Key' \\\n --id x",
2511
+ },
2512
+ csharp: {
2513
+ method: 'V1.Events.Beta.Customers.Entitlements.Check',
2514
+ example:
2515
+ 'EntitlementCheckParams parameters = new() { ID = "x" };\n\nvar response = await client.V1.Events.Beta.Customers.Entitlements.Check(parameters);\n\nConsole.WriteLine(response);',
2516
+ },
2517
+ http: {
2518
+ example:
2519
+ 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entitlements/check \\\n -H "X-API-KEY: $STIGG_API_KEY"',
2520
+ },
2521
+ },
2522
+ },
2523
+ {
2524
+ name: 'list',
2525
+ endpoint: '/api/v1-beta/customers/{id}/entities',
2526
+ httpMethod: 'get',
2527
+ summary: 'Get a list of entitys',
2528
+ description: 'Retrieves a paginated list of entities for the given customer.',
2529
+ stainlessPath: '(resource) v1.events.beta.customers.entities > (method) list',
2530
+ qualified: 'client.v1.events.beta.customers.entities.list',
2531
+ params: [
2532
+ 'id: string;',
2533
+ 'after?: string;',
2534
+ 'before?: string;',
2535
+ "includeArchived?: 'true' | 'false';",
2536
+ 'limit?: number;',
2537
+ 'typeRefId?: string;',
2538
+ ],
2539
+ response:
2540
+ '{ id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }',
2541
+ markdown:
2542
+ "## list\n\n`client.v1.events.beta.customers.entities.list(id: string, after?: string, before?: string, includeArchived?: 'true' | 'false', limit?: number, typeRefId?: string): { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }`\n\n**get** `/api/v1-beta/customers/{id}/entities`\n\nRetrieves a paginated list of entities for the given customer.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `includeArchived?: 'true' | 'false'`\n Whether to include archived entities. One of: true, false\n\n- `limit?: number`\n Maximum number of items to return\n\n- `typeRefId?: string`\n Filter results to entities of a specific entity type, by the type's refId\n\n### Returns\n\n- `{ id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }`\n A stored entity instance tracked by the governance service for a given customer\n\n - `id: string`\n - `archivedAt: string`\n - `createdAt: string`\n - `metadata: object`\n - `typeId: string`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const entityListResponse of client.v1.events.beta.customers.entities.list('id')) {\n console.log(entityListResponse);\n}\n```",
2543
+ perLanguage: {
2544
+ typescript: {
2545
+ method: 'client.v1.events.beta.customers.entities.list',
2546
+ example:
2547
+ "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 entityListResponse of client.v1.events.beta.customers.entities.list('id')) {\n console.log(entityListResponse.id);\n}",
2548
+ },
2549
+ python: {
2550
+ method: 'v1.events.beta.customers.entities.list',
2551
+ example:
2552
+ '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.events.beta.customers.entities.list(\n id="id",\n)\npage = page.data[0]\nprint(page.id)',
2553
+ },
2554
+ java: {
2555
+ method: 'v1().events().beta().customers().entities().list',
2556
+ example:
2557
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.beta.customers.entities.EntityListPage;\nimport io.stigg.models.v1.events.beta.customers.entities.EntityListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n EntityListPage page = client.v1().events().beta().customers().entities().list("id");\n }\n}',
2558
+ },
2559
+ go: {
2560
+ method: 'client.V1.Events.Beta.Customers.Entities.List',
2561
+ example:
2562
+ '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.Events.Beta.Customers.Entities.List(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1EventBetaCustomerEntityListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
2563
+ },
2564
+ ruby: {
2565
+ method: 'v1.events.beta.customers.entities.list',
2566
+ example:
2567
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.events.beta.customers.entities.list("id")\n\nputs(page)',
2568
+ },
2569
+ cli: {
2570
+ method: 'entities list',
2571
+ example: "stigg v1:events:beta:customers:entities list \\\n --api-key 'My API Key' \\\n --id id",
2572
+ },
2573
+ csharp: {
2574
+ method: 'V1.Events.Beta.Customers.Entities.List',
2575
+ example:
2576
+ 'EntityListParams parameters = new() { ID = "id" };\n\nvar page = await client.V1.Events.Beta.Customers.Entities.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
2577
+ },
2578
+ http: {
2579
+ example:
2580
+ 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities \\\n -H "X-API-KEY: $STIGG_API_KEY"',
2581
+ },
2582
+ },
2583
+ },
2584
+ {
2585
+ name: 'upsert',
2586
+ endpoint: '/api/v1-beta/customers/{id}/entities',
2587
+ httpMethod: 'put',
2588
+ summary: 'Upsert entities',
2589
+ description:
2590
+ 'Creates or updates entities in bulk for the given customer. Existing entities matched by id are updated; new ids are created.',
2591
+ stainlessPath: '(resource) v1.events.beta.customers.entities > (method) upsert',
2592
+ qualified: 'client.v1.events.beta.customers.entities.upsert',
2593
+ params: ['id: string;', 'entities: { id: string; metadata?: object; typeRefId?: string; }[];'],
2594
+ response:
2595
+ '{ data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }[]; }',
2596
+ markdown:
2597
+ "## upsert\n\n`client.v1.events.beta.customers.entities.upsert(id: string, entities: { id: string; metadata?: object; typeRefId?: string; }[]): { data: object[]; }`\n\n**put** `/api/v1-beta/customers/{id}/entities`\n\nCreates or updates entities in bulk for the given customer. Existing entities matched by id are updated; new ids are created.\n\n### Parameters\n\n- `id: string`\n\n- `entities: { id: string; metadata?: object; typeRefId?: string; }[]`\n List of entities to create or update (1-100 entries)\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }[]; }`\n List of entities created or updated by an upsert request\n\n - `data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.entities.upsert('id', { entities: [{ id: 'user-7f3a0c1d' }, { id: 'user-c4d1b2e9' }] });\n\nconsole.log(response);\n```",
2598
+ perLanguage: {
2599
+ typescript: {
2600
+ method: 'client.v1.events.beta.customers.entities.upsert',
2601
+ example:
2602
+ "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.beta.customers.entities.upsert('id', {\n entities: [\n {\n id: 'user-7f3a0c1d',\n typeRefId: 'user',\n metadata: { email: 'jane@acme.com', role: 'admin' },\n },\n {\n id: 'user-c4d1b2e9',\n typeRefId: 'user',\n metadata: { email: 'john@acme.com' },\n },\n ],\n});\n\nconsole.log(response.data);",
2603
+ },
2604
+ python: {
2605
+ method: 'v1.events.beta.customers.entities.upsert',
2606
+ example:
2607
+ '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.beta.customers.entities.upsert(\n id="id",\n entities=[{\n "id": "user-7f3a0c1d",\n "type_ref_id": "user",\n "metadata": {\n "email": "jane@acme.com",\n "role": "admin",\n },\n }, {\n "id": "user-c4d1b2e9",\n "type_ref_id": "user",\n "metadata": {\n "email": "john@acme.com"\n },\n }],\n)\nprint(response.data)',
2608
+ },
2609
+ java: {
2610
+ method: 'v1().events().beta().customers().entities().upsert',
2611
+ example:
2612
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.beta.customers.entities.EntityUpsertParams;\nimport io.stigg.models.v1.events.beta.customers.entities.EntityUpsertResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n EntityUpsertParams params = EntityUpsertParams.builder()\n .id("id")\n .addEntity(EntityUpsertParams.Entity.builder()\n .id("user-7f3a0c1d")\n .build())\n .addEntity(EntityUpsertParams.Entity.builder()\n .id("user-c4d1b2e9")\n .build())\n .build();\n EntityUpsertResponse response = client.v1().events().beta().customers().entities().upsert(params);\n }\n}',
2613
+ },
2614
+ go: {
2615
+ method: 'client.V1.Events.Beta.Customers.Entities.Upsert',
2616
+ example:
2617
+ '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.Beta.Customers.Entities.Upsert(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1EventBetaCustomerEntityUpsertParams{\n\t\t\tEntities: []stigg.V1EventBetaCustomerEntityUpsertParamsEntity{{\n\t\t\t\tID: "user-7f3a0c1d",\n\t\t\t\tTypeRefID: stigg.String("user"),\n\t\t\t\tMetadata: map[string]string{\n\t\t\t\t\t"email": "jane@acme.com",\n\t\t\t\t\t"role": "admin",\n\t\t\t\t},\n\t\t\t}, {\n\t\t\t\tID: "user-c4d1b2e9",\n\t\t\t\tTypeRefID: stigg.String("user"),\n\t\t\t\tMetadata: map[string]string{\n\t\t\t\t\t"email": "john@acme.com",\n\t\t\t\t},\n\t\t\t}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
2618
+ },
2619
+ ruby: {
2620
+ method: 'v1.events.beta.customers.entities.upsert',
2621
+ example:
2622
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.events.beta.customers.entities.upsert(\n "id",\n entities: [{id: "user-7f3a0c1d"}, {id: "user-c4d1b2e9"}]\n)\n\nputs(response)',
2623
+ },
2624
+ cli: {
2625
+ method: 'entities upsert',
2626
+ example:
2627
+ "stigg v1:events:beta:customers:entities upsert \\\n --api-key 'My API Key' \\\n --id id \\\n --entity '{id: user-7f3a0c1d}' \\\n --entity '{id: user-c4d1b2e9}'",
2628
+ },
2629
+ csharp: {
2630
+ method: 'V1.Events.Beta.Customers.Entities.Upsert',
2631
+ example:
2632
+ 'EntityUpsertParams parameters = new()\n{\n ID = "id",\n Entities =\n [\n new()\n {\n ID = "user-7f3a0c1d",\n Metadata = new Dictionary<string, string>()\n {\n { "email", "jane@acme.com" }, { "role", "admin" }\n },\n TypeRefID = "user",\n },\n new()\n {\n ID = "user-c4d1b2e9",\n Metadata = new Dictionary<string, string>()\n {\n { "email", "john@acme.com" }\n },\n TypeRefID = "user",\n },\n ],\n};\n\nvar response = await client.V1.Events.Beta.Customers.Entities.Upsert(parameters);\n\nConsole.WriteLine(response);',
2633
+ },
2634
+ http: {
2635
+ example:
2636
+ 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "entities": [\n {\n "id": "user-7f3a0c1d",\n "metadata": {\n "email": "jane@acme.com",\n "role": "admin"\n },\n "typeRefId": "user"\n },\n {\n "id": "user-c4d1b2e9",\n "metadata": {\n "email": "john@acme.com"\n },\n "typeRefId": "user"\n }\n ]\n }\'',
2637
+ },
2638
+ },
2639
+ },
2640
+ {
2641
+ name: 'retrieve',
2642
+ endpoint: '/api/v1-beta/customers/{id}/entities/{entityId}',
2643
+ httpMethod: 'get',
2644
+ summary: 'Get a single entity by ID',
2645
+ description: 'Retrieves a single entity for the given customer by its identifier.',
2646
+ stainlessPath: '(resource) v1.events.beta.customers.entities > (method) retrieve',
2647
+ qualified: 'client.v1.events.beta.customers.entities.retrieve',
2648
+ params: ['id: string;', 'entityId: string;'],
2649
+ response:
2650
+ '{ data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }; }',
2651
+ markdown:
2652
+ "## retrieve\n\n`client.v1.events.beta.customers.entities.retrieve(id: string, entityId: string): { data: object; }`\n\n**get** `/api/v1-beta/customers/{id}/entities/{entityId}`\n\nRetrieves a single entity for the given customer by its identifier.\n\n### Parameters\n\n- `id: string`\n\n- `entityId: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst entity = await client.v1.events.beta.customers.entities.retrieve('x', { id: 'id' });\n\nconsole.log(entity);\n```",
2653
+ perLanguage: {
2654
+ typescript: {
2655
+ method: 'client.v1.events.beta.customers.entities.retrieve',
2656
+ example:
2657
+ "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 entity = await client.v1.events.beta.customers.entities.retrieve('x', { id: 'id' });\n\nconsole.log(entity.data);",
2658
+ },
2659
+ python: {
2660
+ method: 'v1.events.beta.customers.entities.retrieve',
2661
+ example:
2662
+ '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)\nentity = client.v1.events.beta.customers.entities.retrieve(\n entity_id="x",\n id="id",\n)\nprint(entity.data)',
2663
+ },
2664
+ java: {
2665
+ method: 'v1().events().beta().customers().entities().retrieve',
2666
+ example:
2667
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.beta.customers.entities.EntityRetrieveParams;\nimport io.stigg.models.v1.events.beta.customers.entities.EntityRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n EntityRetrieveParams params = EntityRetrieveParams.builder()\n .id("id")\n .entityId("x")\n .build();\n EntityRetrieveResponse entity = client.v1().events().beta().customers().entities().retrieve(params);\n }\n}',
2668
+ },
2669
+ go: {
2670
+ method: 'client.V1.Events.Beta.Customers.Entities.Get',
2671
+ example:
2672
+ '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\tentity, err := client.V1.Events.Beta.Customers.Entities.Get(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1EventBetaCustomerEntityGetParams{\n\t\t\tID: "id",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", entity.Data)\n}\n',
2673
+ },
2674
+ ruby: {
2675
+ method: 'v1.events.beta.customers.entities.retrieve',
2676
+ example:
2677
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nentity = stigg.v1.events.beta.customers.entities.retrieve("x", id: "id")\n\nputs(entity)',
2678
+ },
2679
+ cli: {
2680
+ method: 'entities retrieve',
2681
+ example:
2682
+ "stigg v1:events:beta:customers:entities retrieve \\\n --api-key 'My API Key' \\\n --id id \\\n --entity-id x",
2683
+ },
2684
+ csharp: {
2685
+ method: 'V1.Events.Beta.Customers.Entities.Retrieve',
2686
+ example:
2687
+ 'EntityRetrieveParams parameters = new()\n{\n ID = "id",\n EntityID = "x",\n};\n\nvar entity = await client.V1.Events.Beta.Customers.Entities.Retrieve(parameters);\n\nConsole.WriteLine(entity);',
2688
+ },
2689
+ http: {
2690
+ example:
2691
+ 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities/$ENTITY_ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
2692
+ },
2693
+ },
2694
+ },
2695
+ {
2696
+ name: 'archive',
2697
+ endpoint: '/api/v1-beta/customers/{id}/entities/archive',
2698
+ httpMethod: 'post',
2699
+ summary: 'Archive entities',
2700
+ description: 'Archives entities in bulk for the given customer by id.',
2701
+ stainlessPath: '(resource) v1.events.beta.customers.entities > (method) archive',
2702
+ qualified: 'client.v1.events.beta.customers.entities.archive',
2703
+ params: ['id: string;', 'ids: string[];'],
2704
+ response: '{ data: { ids: string[]; }; }',
2705
+ markdown:
2706
+ "## archive\n\n`client.v1.events.beta.customers.entities.archive(id: string, ids: string[]): { data: object; }`\n\n**post** `/api/v1-beta/customers/{id}/entities/archive`\n\nArchives entities in bulk for the given customer by id.\n\n### Parameters\n\n- `id: string`\n\n- `ids: string[]`\n Entity identifiers to act on\n\n### Returns\n\n- `{ data: { ids: string[]; }; }`\n Wrapped response echoing the ids that were acted on by an archive/unarchive call\n\n - `data: { ids: string[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.entities.archive('id', { ids: ['user-7f3a0c1d', 'user-c4d1b2e9'] });\n\nconsole.log(response);\n```",
2707
+ perLanguage: {
2708
+ typescript: {
2709
+ method: 'client.v1.events.beta.customers.entities.archive',
2710
+ example:
2711
+ "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.beta.customers.entities.archive('id', {\n ids: ['user-7f3a0c1d', 'user-c4d1b2e9'],\n});\n\nconsole.log(response.data);",
2712
+ },
2713
+ python: {
2714
+ method: 'v1.events.beta.customers.entities.archive',
2715
+ example:
2716
+ '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.beta.customers.entities.archive(\n id="id",\n ids=["user-7f3a0c1d", "user-c4d1b2e9"],\n)\nprint(response.data)',
2717
+ },
2718
+ java: {
2719
+ method: 'v1().events().beta().customers().entities().archive',
2720
+ example:
2721
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.beta.customers.entities.EntityArchiveParams;\nimport io.stigg.models.v1.events.beta.customers.entities.EntityArchiveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n EntityArchiveParams params = EntityArchiveParams.builder()\n .id("id")\n .addId("user-7f3a0c1d")\n .addId("user-c4d1b2e9")\n .build();\n EntityArchiveResponse response = client.v1().events().beta().customers().entities().archive(params);\n }\n}',
2722
+ },
2723
+ go: {
2724
+ method: 'client.V1.Events.Beta.Customers.Entities.Archive',
2725
+ example:
2726
+ '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.Beta.Customers.Entities.Archive(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1EventBetaCustomerEntityArchiveParams{\n\t\t\tIDs: []string{"user-7f3a0c1d", "user-c4d1b2e9"},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
2727
+ },
2728
+ ruby: {
2729
+ method: 'v1.events.beta.customers.entities.archive',
2730
+ example:
2731
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.events.beta.customers.entities.archive("id", ids: ["user-7f3a0c1d", "user-c4d1b2e9"])\n\nputs(response)',
2732
+ },
2733
+ cli: {
2734
+ method: 'entities archive',
2735
+ example:
2736
+ "stigg v1:events:beta:customers:entities archive \\\n --api-key 'My API Key' \\\n --id id \\\n --id user-7f3a0c1d \\\n --id user-c4d1b2e9",
2737
+ },
2738
+ csharp: {
2739
+ method: 'V1.Events.Beta.Customers.Entities.Archive',
2740
+ example:
2741
+ 'EntityArchiveParams parameters = new()\n{\n ID = "id",\n Ids =\n [\n "user-7f3a0c1d", "user-c4d1b2e9"\n ],\n};\n\nvar response = await client.V1.Events.Beta.Customers.Entities.Archive(parameters);\n\nConsole.WriteLine(response);',
2742
+ },
2743
+ http: {
2744
+ example:
2745
+ 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities/archive \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "ids": [\n "user-7f3a0c1d",\n "user-c4d1b2e9"\n ]\n }\'',
2746
+ },
2747
+ },
2748
+ },
2749
+ {
2750
+ name: 'unarchive',
2751
+ endpoint: '/api/v1-beta/customers/{id}/entities/unarchive',
2752
+ httpMethod: 'post',
2753
+ summary: 'Unarchive entities',
2754
+ description: 'Restores previously archived entities in bulk for the given customer by id.',
2755
+ stainlessPath: '(resource) v1.events.beta.customers.entities > (method) unarchive',
2756
+ qualified: 'client.v1.events.beta.customers.entities.unarchive',
2757
+ params: ['id: string;', 'ids: string[];'],
2758
+ response: '{ data: { ids: string[]; }; }',
2759
+ markdown:
2760
+ "## unarchive\n\n`client.v1.events.beta.customers.entities.unarchive(id: string, ids: string[]): { data: object; }`\n\n**post** `/api/v1-beta/customers/{id}/entities/unarchive`\n\nRestores previously archived entities in bulk for the given customer by id.\n\n### Parameters\n\n- `id: string`\n\n- `ids: string[]`\n Entity identifiers to act on\n\n### Returns\n\n- `{ data: { ids: string[]; }; }`\n Wrapped response echoing the ids that were acted on by an archive/unarchive call\n\n - `data: { ids: string[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.entities.unarchive('id', { ids: ['user-7f3a0c1d', 'user-c4d1b2e9'] });\n\nconsole.log(response);\n```",
2761
+ perLanguage: {
2762
+ typescript: {
2763
+ method: 'client.v1.events.beta.customers.entities.unarchive',
2764
+ example:
2765
+ "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.beta.customers.entities.unarchive('id', {\n ids: ['user-7f3a0c1d', 'user-c4d1b2e9'],\n});\n\nconsole.log(response.data);",
2766
+ },
2767
+ python: {
2768
+ method: 'v1.events.beta.customers.entities.unarchive',
2769
+ example:
2770
+ '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.beta.customers.entities.unarchive(\n id="id",\n ids=["user-7f3a0c1d", "user-c4d1b2e9"],\n)\nprint(response.data)',
2771
+ },
2772
+ java: {
2773
+ method: 'v1().events().beta().customers().entities().unarchive',
2774
+ example:
2775
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.beta.customers.entities.EntityUnarchiveParams;\nimport io.stigg.models.v1.events.beta.customers.entities.EntityUnarchiveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n EntityUnarchiveParams params = EntityUnarchiveParams.builder()\n .id("id")\n .addId("user-7f3a0c1d")\n .addId("user-c4d1b2e9")\n .build();\n EntityUnarchiveResponse response = client.v1().events().beta().customers().entities().unarchive(params);\n }\n}',
2776
+ },
2777
+ go: {
2778
+ method: 'client.V1.Events.Beta.Customers.Entities.Unarchive',
2779
+ example:
2780
+ '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.Beta.Customers.Entities.Unarchive(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1EventBetaCustomerEntityUnarchiveParams{\n\t\t\tIDs: []string{"user-7f3a0c1d", "user-c4d1b2e9"},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
2781
+ },
2782
+ ruby: {
2783
+ method: 'v1.events.beta.customers.entities.unarchive',
2784
+ example:
2785
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.events.beta.customers.entities.unarchive("id", ids: ["user-7f3a0c1d", "user-c4d1b2e9"])\n\nputs(response)',
2786
+ },
2787
+ cli: {
2788
+ method: 'entities unarchive',
2789
+ example:
2790
+ "stigg v1:events:beta:customers:entities unarchive \\\n --api-key 'My API Key' \\\n --id id \\\n --id user-7f3a0c1d \\\n --id user-c4d1b2e9",
2791
+ },
2792
+ csharp: {
2793
+ method: 'V1.Events.Beta.Customers.Entities.Unarchive',
2794
+ example:
2795
+ 'EntityUnarchiveParams parameters = new()\n{\n ID = "id",\n Ids =\n [\n "user-7f3a0c1d", "user-c4d1b2e9"\n ],\n};\n\nvar response = await client.V1.Events.Beta.Customers.Entities.Unarchive(parameters);\n\nConsole.WriteLine(response);',
2796
+ },
2797
+ http: {
2798
+ example:
2799
+ 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities/unarchive \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "ids": [\n "user-7f3a0c1d",\n "user-c4d1b2e9"\n ]\n }\'',
2800
+ },
2801
+ },
2802
+ },
2803
+ {
2804
+ name: 'list',
2805
+ endpoint: '/api/v1-beta/customers/{id}/assignments',
2806
+ httpMethod: 'get',
2807
+ summary: 'Get a list of assignments',
2808
+ description:
2809
+ 'Returns a cursor-paginated list of capability assignments for the given customer. An assignment ties an entity to a capability with a usage limit and reset cadence.',
2810
+ stainlessPath: '(resource) v1.events.beta.customers.assignments > (method) list',
2811
+ qualified: 'client.v1.events.beta.customers.assignments.list',
2812
+ params: [
2813
+ 'id: string;',
2814
+ 'after?: string;',
2815
+ 'before?: string;',
2816
+ 'capabilityId?: string;',
2817
+ 'entityId?: string;',
2818
+ 'limit?: number;',
2819
+ ],
2820
+ response:
2821
+ "{ id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }",
2822
+ markdown:
2823
+ "## list\n\n`client.v1.events.beta.customers.assignments.list(id: string, after?: string, before?: string, capabilityId?: string, entityId?: string, limit?: number): { id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }`\n\n**get** `/api/v1-beta/customers/{id}/assignments`\n\nReturns a cursor-paginated list of capability assignments for the given customer. An assignment ties an entity to a capability with a usage limit and reset cadence.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `capabilityId?: string`\n Filter assignments to a specific capability refId\n\n- `entityId?: string`\n Filter assignments to a specific entity refId\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }`\n A capability assignment for an entity belonging to a customer. Defines how much of the capability the entity may consume (`usageLimit`) and how often the counter resets (`cadence`).\n\n - `id: string`\n - `cadence: 'MONTH'`\n - `capabilityId: string`\n - `createdAt: string`\n - `entityId: string`\n - `updatedAt: string`\n - `usageLimit: number`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const assignmentListResponse of client.v1.events.beta.customers.assignments.list('id')) {\n console.log(assignmentListResponse);\n}\n```",
2824
+ perLanguage: {
2825
+ typescript: {
2826
+ method: 'client.v1.events.beta.customers.assignments.list',
2827
+ example:
2828
+ "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 assignmentListResponse of client.v1.events.beta.customers.assignments.list('id')) {\n console.log(assignmentListResponse.id);\n}",
2829
+ },
2830
+ python: {
2831
+ method: 'v1.events.beta.customers.assignments.list',
2832
+ example:
2833
+ '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.events.beta.customers.assignments.list(\n id="id",\n)\npage = page.data[0]\nprint(page.id)',
2834
+ },
2835
+ java: {
2836
+ method: 'v1().events().beta().customers().assignments().list',
2837
+ example:
2838
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.beta.customers.assignments.AssignmentListPage;\nimport io.stigg.models.v1.events.beta.customers.assignments.AssignmentListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n AssignmentListPage page = client.v1().events().beta().customers().assignments().list("id");\n }\n}',
2839
+ },
2840
+ go: {
2841
+ method: 'client.V1.Events.Beta.Customers.Assignments.List',
2842
+ example:
2843
+ '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.Events.Beta.Customers.Assignments.List(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1EventBetaCustomerAssignmentListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
2844
+ },
2845
+ ruby: {
2846
+ method: 'v1.events.beta.customers.assignments.list',
2847
+ example:
2848
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.events.beta.customers.assignments.list("id")\n\nputs(page)',
2849
+ },
2850
+ cli: {
2851
+ method: 'assignments list',
2852
+ example: "stigg v1:events:beta:customers:assignments list \\\n --api-key 'My API Key' \\\n --id id",
2853
+ },
2854
+ csharp: {
2855
+ method: 'V1.Events.Beta.Customers.Assignments.List',
2856
+ example:
2857
+ 'AssignmentListParams parameters = new() { ID = "id" };\n\nvar page = await client.V1.Events.Beta.Customers.Assignments.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
2858
+ },
2859
+ http: {
2860
+ example:
2861
+ 'curl https://api.stigg.io/api/v1-beta/customers/$ID/assignments \\\n -H "X-API-KEY: $STIGG_API_KEY"',
2862
+ },
2863
+ },
2864
+ },
2865
+ {
2866
+ name: 'upsert',
2867
+ endpoint: '/api/v1-beta/customers/{id}/assignments',
2868
+ httpMethod: 'put',
2869
+ summary: 'Upsert assignments',
2870
+ description:
2871
+ 'Batched create-or-update of capability assignments. Existing assignments matched by (entityId, capabilityId) are updated; new pairs are created. On update, omitted fields (usageLimit, cadence) are preserved; on create both are required by the governance service.',
2872
+ stainlessPath: '(resource) v1.events.beta.customers.assignments > (method) upsert',
2873
+ qualified: 'client.v1.events.beta.customers.assignments.upsert',
2874
+ params: [
2875
+ 'id: string;',
2876
+ "assignments: { capabilityId: string; entityId: string; cadence?: 'MONTH'; usageLimit?: number; }[];",
2877
+ ],
2878
+ response:
2879
+ "{ data: { id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }[]; }",
2880
+ markdown:
2881
+ "## upsert\n\n`client.v1.events.beta.customers.assignments.upsert(id: string, assignments: { capabilityId: string; entityId: string; cadence?: 'MONTH'; usageLimit?: number; }[]): { data: object[]; }`\n\n**put** `/api/v1-beta/customers/{id}/assignments`\n\nBatched create-or-update of capability assignments. Existing assignments matched by (entityId, capabilityId) are updated; new pairs are created. On update, omitted fields (usageLimit, cadence) are preserved; on create both are required by the governance service.\n\n### Parameters\n\n- `id: string`\n\n- `assignments: { capabilityId: string; entityId: string; cadence?: 'MONTH'; usageLimit?: number; }[]`\n Assignments to upsert (1–100 per request)\n\n### Returns\n\n- `{ data: { id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }[]; }`\n Assignments after upsert.\n\n - `data: { id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.assignments.upsert('id', { assignments: [{ capabilityId: 'compute-minutes', entityId: 'workspace-001' }, { capabilityId: 'compute-minutes', entityId: 'workspace-002' }] });\n\nconsole.log(response);\n```",
2882
+ perLanguage: {
2883
+ typescript: {
2884
+ method: 'client.v1.events.beta.customers.assignments.upsert',
2885
+ example:
2886
+ "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.beta.customers.assignments.upsert('id', {\n assignments: [\n {\n entityId: 'workspace-001',\n capabilityId: 'compute-minutes',\n usageLimit: 1000,\n cadence: 'MONTH',\n },\n {\n entityId: 'workspace-002',\n capabilityId: 'compute-minutes',\n usageLimit: 2000,\n cadence: 'MONTH',\n },\n ],\n});\n\nconsole.log(response.data);",
2887
+ },
2888
+ python: {
2889
+ method: 'v1.events.beta.customers.assignments.upsert',
2890
+ example:
2891
+ '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.beta.customers.assignments.upsert(\n id="id",\n assignments=[{\n "entity_id": "workspace-001",\n "capability_id": "compute-minutes",\n "usage_limit": 1000,\n "cadence": "MONTH",\n }, {\n "entity_id": "workspace-002",\n "capability_id": "compute-minutes",\n "usage_limit": 2000,\n "cadence": "MONTH",\n }],\n)\nprint(response.data)',
2892
+ },
2893
+ java: {
2894
+ method: 'v1().events().beta().customers().assignments().upsert',
2895
+ example:
2896
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.beta.customers.assignments.AssignmentUpsertParams;\nimport io.stigg.models.v1.events.beta.customers.assignments.AssignmentUpsertResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n AssignmentUpsertParams params = AssignmentUpsertParams.builder()\n .id("id")\n .addAssignment(AssignmentUpsertParams.Assignment.builder()\n .capabilityId("compute-minutes")\n .entityId("workspace-001")\n .build())\n .addAssignment(AssignmentUpsertParams.Assignment.builder()\n .capabilityId("compute-minutes")\n .entityId("workspace-002")\n .build())\n .build();\n AssignmentUpsertResponse response = client.v1().events().beta().customers().assignments().upsert(params);\n }\n}',
2897
+ },
2898
+ go: {
2899
+ method: 'client.V1.Events.Beta.Customers.Assignments.Upsert',
2900
+ example:
2901
+ '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.Beta.Customers.Assignments.Upsert(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1EventBetaCustomerAssignmentUpsertParams{\n\t\t\tAssignments: []stigg.V1EventBetaCustomerAssignmentUpsertParamsAssignment{{\n\t\t\t\tEntityID: "workspace-001",\n\t\t\t\tCapabilityID: "compute-minutes",\n\t\t\t\tUsageLimit: stigg.Float(1000),\n\t\t\t\tCadence: "MONTH",\n\t\t\t}, {\n\t\t\t\tEntityID: "workspace-002",\n\t\t\t\tCapabilityID: "compute-minutes",\n\t\t\t\tUsageLimit: stigg.Float(2000),\n\t\t\t\tCadence: "MONTH",\n\t\t\t}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
2902
+ },
2903
+ ruby: {
2904
+ method: 'v1.events.beta.customers.assignments.upsert',
2905
+ example:
2906
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.events.beta.customers.assignments.upsert(\n "id",\n assignments: [\n {capabilityId: "compute-minutes", entityId: "workspace-001"},\n {capabilityId: "compute-minutes", entityId: "workspace-002"}\n ]\n)\n\nputs(response)',
2907
+ },
2908
+ cli: {
2909
+ method: 'assignments upsert',
2910
+ example:
2911
+ "stigg v1:events:beta:customers:assignments upsert \\\n --api-key 'My API Key' \\\n --id id \\\n --assignment '{capabilityId: compute-minutes, entityId: workspace-001}' \\\n --assignment '{capabilityId: compute-minutes, entityId: workspace-002}'",
2912
+ },
2913
+ csharp: {
2914
+ method: 'V1.Events.Beta.Customers.Assignments.Upsert',
2915
+ example:
2916
+ 'AssignmentUpsertParams parameters = new()\n{\n ID = "id",\n Assignments =\n [\n new()\n {\n CapabilityID = "compute-minutes",\n EntityID = "workspace-001",\n Cadence = Cadence.Month,\n UsageLimit = 1000,\n },\n new()\n {\n CapabilityID = "compute-minutes",\n EntityID = "workspace-002",\n Cadence = Cadence.Month,\n UsageLimit = 2000,\n },\n ],\n};\n\nvar response = await client.V1.Events.Beta.Customers.Assignments.Upsert(parameters);\n\nConsole.WriteLine(response);',
2917
+ },
2918
+ http: {
2919
+ example:
2920
+ 'curl https://api.stigg.io/api/v1-beta/customers/$ID/assignments \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "assignments": [\n {\n "capabilityId": "compute-minutes",\n "entityId": "workspace-001",\n "cadence": "MONTH",\n "usageLimit": 1000\n },\n {\n "capabilityId": "compute-minutes",\n "entityId": "workspace-002",\n "cadence": "MONTH",\n "usageLimit": 2000\n }\n ]\n }\'',
2921
+ },
2922
+ },
2923
+ },
2924
+ {
2925
+ name: 'list',
2926
+ endpoint: '/api/v1-beta/entity-types',
2927
+ httpMethod: 'get',
2928
+ summary: 'Get a list of entity types',
2929
+ description:
2930
+ 'Returns a cursor-paginated list of entity types defined in the environment. Entity types are vendor-defined categories of resource that can be governed (e.g. Org, Team, User).',
2931
+ stainlessPath: '(resource) v1.events.beta.entity_types > (method) list',
2932
+ qualified: 'client.v1.events.beta.entityTypes.list',
2933
+ params: ['after?: string;', 'before?: string;', 'limit?: number;'],
2934
+ response:
2935
+ '{ id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }',
2936
+ markdown:
2937
+ "## list\n\n`client.v1.events.beta.entityTypes.list(after?: string, before?: string, limit?: number): { id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }`\n\n**get** `/api/v1-beta/entity-types`\n\nReturns a cursor-paginated list of entity types defined in the environment. Entity types are vendor-defined categories of resource that can be governed (e.g. Org, Team, User).\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }`\n A vendor-defined category of resource that can be governed (e.g. Org, Team, User). Vendors define entity types once per environment; their customers create instances (entities) of these types and the governance engine tracks usage and enforces limits per instance.\n\n - `id: string`\n - `attributionKeys: string[]`\n - `createdAt: string`\n - `displayName: string`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const entityTypeListResponse of client.v1.events.beta.entityTypes.list()) {\n console.log(entityTypeListResponse);\n}\n```",
2938
+ perLanguage: {
2939
+ typescript: {
2940
+ method: 'client.v1.events.beta.entityTypes.list',
2941
+ example:
2942
+ "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 entityTypeListResponse of client.v1.events.beta.entityTypes.list()) {\n console.log(entityTypeListResponse.id);\n}",
2943
+ },
2944
+ python: {
2945
+ method: 'v1.events.beta.entity_types.list',
2946
+ example:
2947
+ '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.events.beta.entity_types.list()\npage = page.data[0]\nprint(page.id)',
2948
+ },
2949
+ java: {
2950
+ method: 'v1().events().beta().entityTypes().list',
2951
+ example:
2952
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.beta.entitytypes.EntityTypeListPage;\nimport io.stigg.models.v1.events.beta.entitytypes.EntityTypeListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n EntityTypeListPage page = client.v1().events().beta().entityTypes().list();\n }\n}',
2953
+ },
2954
+ go: {
2955
+ method: 'client.V1.Events.Beta.EntityTypes.List',
2956
+ example:
2957
+ '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.Events.Beta.EntityTypes.List(context.TODO(), stigg.V1EventBetaEntityTypeListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
2958
+ },
2959
+ ruby: {
2960
+ method: 'v1.events.beta.entity_types.list',
2961
+ example:
2962
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.events.beta.entity_types.list\n\nputs(page)',
2963
+ },
2964
+ cli: {
2965
+ method: 'entity_types list',
2966
+ example: "stigg v1:events:beta:entity-types list \\\n --api-key 'My API Key'",
2967
+ },
2968
+ csharp: {
2969
+ method: 'V1.Events.Beta.EntityTypes.List',
2970
+ example:
2971
+ 'EntityTypeListParams parameters = new();\n\nvar page = await client.V1.Events.Beta.EntityTypes.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
2972
+ },
2973
+ http: {
2974
+ example: 'curl https://api.stigg.io/api/v1-beta/entity-types \\\n -H "X-API-KEY: $STIGG_API_KEY"',
2975
+ },
2976
+ },
2977
+ },
2978
+ {
2979
+ name: 'upsert',
2980
+ endpoint: '/api/v1-beta/entity-types',
2981
+ httpMethod: 'put',
2982
+ summary: 'Upsert entity types',
2983
+ description:
2984
+ 'Batched create-or-update of entity types. Existing types matched by id are updated; new ids are created. Idempotent — re-submitting the same payload converges to the same state.',
2985
+ stainlessPath: '(resource) v1.events.beta.entity_types > (method) upsert',
2986
+ qualified: 'client.v1.events.beta.entityTypes.upsert',
2987
+ params: ['types: { id: string; attributionKeys: string[]; displayName: string; }[];'],
2988
+ response:
2989
+ '{ data: { id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }[]; }',
2990
+ markdown:
2991
+ "## upsert\n\n`client.v1.events.beta.entityTypes.upsert(types: { id: string; attributionKeys: string[]; displayName: string; }[]): { data: object[]; }`\n\n**put** `/api/v1-beta/entity-types`\n\nBatched create-or-update of entity types. Existing types matched by id are updated; new ids are created. Idempotent — re-submitting the same payload converges to the same state.\n\n### Parameters\n\n- `types: { id: string; attributionKeys: string[]; displayName: string; }[]`\n Entity types to upsert (1–100 per request)\n\n### Returns\n\n- `{ data: { id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }[]; }`\n Entity types after upsert.\n\n - `data: { id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.entityTypes.upsert({ types: [{\n id: 'org',\n attributionKeys: ['organizationId'],\n displayName: 'Organization',\n}, {\n id: 'team',\n attributionKeys: ['teamId'],\n displayName: 'Team',\n}] });\n\nconsole.log(response);\n```",
2992
+ perLanguage: {
2993
+ typescript: {
2994
+ method: 'client.v1.events.beta.entityTypes.upsert',
2995
+ example:
2996
+ "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.beta.entityTypes.upsert({\n types: [\n {\n id: 'org',\n displayName: 'Organization',\n attributionKeys: ['organizationId'],\n },\n {\n id: 'team',\n displayName: 'Team',\n attributionKeys: ['teamId'],\n },\n ],\n});\n\nconsole.log(response.data);",
2997
+ },
2998
+ python: {
2999
+ method: 'v1.events.beta.entity_types.upsert',
3000
+ example:
3001
+ '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.beta.entity_types.upsert(\n types=[{\n "id": "org",\n "display_name": "Organization",\n "attribution_keys": ["organizationId"],\n }, {\n "id": "team",\n "display_name": "Team",\n "attribution_keys": ["teamId"],\n }],\n)\nprint(response.data)',
3002
+ },
3003
+ java: {
3004
+ method: 'v1().events().beta().entityTypes().upsert',
3005
+ example:
3006
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.beta.entitytypes.EntityTypeUpsertParams;\nimport io.stigg.models.v1.events.beta.entitytypes.EntityTypeUpsertResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n EntityTypeUpsertParams params = EntityTypeUpsertParams.builder()\n .addType(EntityTypeUpsertParams.Type.builder()\n .id("org")\n .addAttributionKey("organizationId")\n .displayName("Organization")\n .build())\n .addType(EntityTypeUpsertParams.Type.builder()\n .id("team")\n .addAttributionKey("teamId")\n .displayName("Team")\n .build())\n .build();\n EntityTypeUpsertResponse response = client.v1().events().beta().entityTypes().upsert(params);\n }\n}',
3007
+ },
3008
+ go: {
3009
+ method: 'client.V1.Events.Beta.EntityTypes.Upsert',
3010
+ example:
3011
+ '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.Beta.EntityTypes.Upsert(context.TODO(), stigg.V1EventBetaEntityTypeUpsertParams{\n\t\tTypes: []stigg.V1EventBetaEntityTypeUpsertParamsType{{\n\t\t\tID: "org",\n\t\t\tDisplayName: "Organization",\n\t\t\tAttributionKeys: []string{"organizationId"},\n\t\t}, {\n\t\t\tID: "team",\n\t\t\tDisplayName: "Team",\n\t\t\tAttributionKeys: []string{"teamId"},\n\t\t}},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
3012
+ },
3013
+ ruby: {
3014
+ method: 'v1.events.beta.entity_types.upsert',
3015
+ example:
3016
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.events.beta.entity_types.upsert(\n types: [\n {id: "org", attributionKeys: ["organizationId"], displayName: "Organization"},\n {id: "team", attributionKeys: ["teamId"], displayName: "Team"}\n ]\n)\n\nputs(response)',
3017
+ },
3018
+ cli: {
3019
+ method: 'entity_types upsert',
3020
+ example:
3021
+ "stigg v1:events:beta:entity-types upsert \\\n --api-key 'My API Key' \\\n --type '{id: org, attributionKeys: [organizationId], displayName: Organization}' \\\n --type '{id: team, attributionKeys: [teamId], displayName: Team}'",
3022
+ },
3023
+ csharp: {
3024
+ method: 'V1.Events.Beta.EntityTypes.Upsert',
3025
+ example:
3026
+ 'EntityTypeUpsertParams parameters = new()\n{\n Types =\n [\n new()\n {\n ID = "org",\n AttributionKeys =\n [\n "organizationId"\n ],\n DisplayName = "Organization",\n },\n new()\n {\n ID = "team",\n AttributionKeys =\n [\n "teamId"\n ],\n DisplayName = "Team",\n },\n ],\n};\n\nvar response = await client.V1.Events.Beta.EntityTypes.Upsert(parameters);\n\nConsole.WriteLine(response);',
3027
+ },
3028
+ http: {
3029
+ example:
3030
+ 'curl https://api.stigg.io/api/v1-beta/entity-types \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "types": [\n {\n "id": "org",\n "attributionKeys": [\n "organizationId"\n ],\n "displayName": "Organization"\n },\n {\n "id": "team",\n "attributionKeys": [\n "teamId"\n ],\n "displayName": "Team"\n }\n ]\n }\'',
3031
+ },
3032
+ },
3033
+ },
3034
+ {
3035
+ name: 'trigger_sync',
3036
+ endpoint: '/api/v1/data-export/sync',
3037
+ httpMethod: 'post',
3038
+ summary: 'Trigger data-export sync',
3039
+ description: 'Trigger a sync for one destination or all destinations under the provider entity.',
3040
+ stainlessPath: '(resource) v1.events.data_export > (method) trigger_sync',
3041
+ qualified: 'client.v1.events.dataExport.triggerSync',
3042
+ params: ['destinationId?: string;'],
3043
+ response:
3044
+ '{ data: { results: { destinationId: string; triggered: boolean; errorMessage?: string; transferId?: string; }[]; }; }',
3045
+ markdown:
3046
+ "## trigger_sync\n\n`client.v1.events.dataExport.triggerSync(destinationId?: string): { data: object; }`\n\n**post** `/api/v1/data-export/sync`\n\nTrigger a sync for one destination or all destinations under the provider entity.\n\n### Parameters\n\n- `destinationId?: string`\n Provider destination ID to sync. Omit to sync all destinations.\n\n### Returns\n\n- `{ data: { results: { destinationId: string; triggered: boolean; errorMessage?: string; transferId?: string; }[]; }; }`\n Response object\n\n - `data: { results: { destinationId: string; triggered: boolean; errorMessage?: string; transferId?: string; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.dataExport.triggerSync();\n\nconsole.log(response);\n```",
3047
+ perLanguage: {
3048
+ typescript: {
3049
+ method: 'client.v1.events.dataExport.triggerSync',
3050
+ example:
3051
+ "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.dataExport.triggerSync();\n\nconsole.log(response.data);",
3052
+ },
3053
+ python: {
3054
+ method: 'v1.events.data_export.trigger_sync',
3055
+ example:
3056
+ '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.data_export.trigger_sync()\nprint(response.data)',
3057
+ },
3058
+ java: {
3059
+ method: 'v1().events().dataExport().triggerSync',
3060
+ example:
3061
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.dataexport.DataExportTriggerSyncParams;\nimport io.stigg.models.v1.events.dataexport.DataExportTriggerSyncResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n DataExportTriggerSyncResponse response = client.v1().events().dataExport().triggerSync();\n }\n}',
3062
+ },
3063
+ go: {
3064
+ method: 'client.V1.Events.DataExport.TriggerSync',
3065
+ example:
3066
+ '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.DataExport.TriggerSync(context.TODO(), stigg.V1EventDataExportTriggerSyncParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
3067
+ },
3068
+ ruby: {
3069
+ method: 'v1.events.data_export.trigger_sync',
3070
+ example:
3071
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.events.data_export.trigger_sync\n\nputs(response)',
3072
+ },
3073
+ cli: {
3074
+ method: 'data_export trigger_sync',
3075
+ example: "stigg v1:events:data-export trigger-sync \\\n --api-key 'My API Key'",
3076
+ },
3077
+ csharp: {
3078
+ method: 'V1.Events.DataExport.TriggerSync',
3079
+ example:
3080
+ 'DataExportTriggerSyncParams parameters = new();\n\nvar response = await client.V1.Events.DataExport.TriggerSync(parameters);\n\nConsole.WriteLine(response);',
3081
+ },
3082
+ http: {
3083
+ example:
3084
+ "curl https://api.stigg.io/api/v1/data-export/sync \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
3085
+ },
3086
+ },
3087
+ },
3088
+ {
3089
+ name: 'mint_scoped_token',
3090
+ endpoint: '/api/v1/data-export/scoped-token',
3091
+ httpMethod: 'post',
3092
+ summary: 'Mint data-export scoped token',
3093
+ description:
3094
+ 'Mint a scoped JWT for the FE embedded SDK. Lazy-creates the DATA_EXPORT integration if needed.',
3095
+ stainlessPath: '(resource) v1.events.data_export > (method) mint_scoped_token',
3096
+ qualified: 'client.v1.events.dataExport.mintScopedToken',
3097
+ params: ['applicationOrigin: string;', 'destinationType?: string;'],
3098
+ response: '{ data: { token: string; expiresAt: string; providerMetadata: object; }; }',
3099
+ markdown:
3100
+ "## mint_scoped_token\n\n`client.v1.events.dataExport.mintScopedToken(applicationOrigin: string, destinationType?: string): { data: object; }`\n\n**post** `/api/v1/data-export/scoped-token`\n\nMint a scoped JWT for the FE embedded SDK. Lazy-creates the DATA_EXPORT integration if needed.\n\n### Parameters\n\n- `applicationOrigin: string`\n FE origin the resulting JWT is bound to (provider-side anti-fraud)\n\n- `destinationType?: string`\n Pin the token to a specific warehouse connect flow\n\n### Returns\n\n- `{ data: { token: string; expiresAt: string; providerMetadata: object; }; }`\n Response object\n\n - `data: { token: string; expiresAt: string; providerMetadata: object; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.dataExport.mintScopedToken({ applicationOrigin: 'x' });\n\nconsole.log(response);\n```",
3101
+ perLanguage: {
3102
+ typescript: {
3103
+ method: 'client.v1.events.dataExport.mintScopedToken',
3104
+ example:
3105
+ "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.dataExport.mintScopedToken({ applicationOrigin: 'x' });\n\nconsole.log(response.data);",
3106
+ },
3107
+ python: {
3108
+ method: 'v1.events.data_export.mint_scoped_token',
3109
+ example:
3110
+ '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.data_export.mint_scoped_token(\n application_origin="x",\n)\nprint(response.data)',
3111
+ },
3112
+ java: {
3113
+ method: 'v1().events().dataExport().mintScopedToken',
3114
+ example:
3115
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.dataexport.DataExportMintScopedTokenParams;\nimport io.stigg.models.v1.events.dataexport.DataExportMintScopedTokenResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n DataExportMintScopedTokenParams params = DataExportMintScopedTokenParams.builder()\n .applicationOrigin("x")\n .build();\n DataExportMintScopedTokenResponse response = client.v1().events().dataExport().mintScopedToken(params);\n }\n}',
3116
+ },
3117
+ go: {
3118
+ method: 'client.V1.Events.DataExport.MintScopedToken',
3119
+ example:
3120
+ '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.DataExport.MintScopedToken(context.TODO(), stigg.V1EventDataExportMintScopedTokenParams{\n\t\tApplicationOrigin: "x",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
3121
+ },
3122
+ ruby: {
3123
+ method: 'v1.events.data_export.mint_scoped_token',
3124
+ example:
3125
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.events.data_export.mint_scoped_token(application_origin: "x")\n\nputs(response)',
3126
+ },
3127
+ cli: {
3128
+ method: 'data_export mint_scoped_token',
3129
+ example:
3130
+ "stigg v1:events:data-export mint-scoped-token \\\n --api-key 'My API Key' \\\n --application-origin x",
3131
+ },
3132
+ csharp: {
3133
+ method: 'V1.Events.DataExport.MintScopedToken',
3134
+ example:
3135
+ 'DataExportMintScopedTokenParams parameters = new() { ApplicationOrigin = "x" };\n\nvar response = await client.V1.Events.DataExport.MintScopedToken(parameters);\n\nConsole.WriteLine(response);',
3136
+ },
3137
+ http: {
3138
+ example:
3139
+ 'curl https://api.stigg.io/api/v1/data-export/scoped-token \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "applicationOrigin": "x"\n }\'',
3140
+ },
3141
+ },
3142
+ },
3143
+ {
3144
+ name: 'create',
3145
+ endpoint: '/api/v1/data-export/destinations',
3146
+ httpMethod: 'post',
3147
+ summary: 'Add data-export destination',
3148
+ description:
3149
+ "Register a destination on the environment's DATA_EXPORT integration. Lazy-creates the integration row + provider recipient on first call. Idempotent on destinationId.",
3150
+ stainlessPath: '(resource) v1.events.data_export.destinations > (method) create',
3151
+ qualified: 'client.v1.events.dataExport.destinations.create',
3152
+ params: ['destinationId: string;', 'destinationType: string;'],
3153
+ response:
3154
+ '{ data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; lastSyncStatus?: object; }[]; }; }',
3155
+ markdown:
3156
+ "## create\n\n`client.v1.events.dataExport.destinations.create(destinationId: string, destinationType: string): { data: object; }`\n\n**post** `/api/v1/data-export/destinations`\n\nRegister a destination on the environment's DATA_EXPORT integration. Lazy-creates the integration row + provider recipient on first call. Idempotent on destinationId.\n\n### Parameters\n\n- `destinationId: string`\n The provider destination ID returned by the embedded SDK on connect\n\n- `destinationType: string`\n The destination type (e.g. snowflake, bigquery)\n\n### Returns\n\n- `{ data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; lastSyncStatus?: object; }[]; }; }`\n Response object\n\n - `data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; lastSyncStatus?: { finishedAt: string; status: string; transferId: string; blamedParty?: string; failureMessage?: string; rowsTransferred?: number; }; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst destination = await client.v1.events.dataExport.destinations.create({ destinationId: 'x', destinationType: 'x' });\n\nconsole.log(destination);\n```",
3157
+ perLanguage: {
3158
+ typescript: {
3159
+ method: 'client.v1.events.dataExport.destinations.create',
3160
+ example:
3161
+ "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst destination = await client.v1.events.dataExport.destinations.create({\n destinationId: 'x',\n destinationType: 'x',\n});\n\nconsole.log(destination.data);",
3162
+ },
3163
+ python: {
3164
+ method: 'v1.events.data_export.destinations.create',
3165
+ example:
3166
+ 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ndestination = client.v1.events.data_export.destinations.create(\n destination_id="x",\n destination_type="x",\n)\nprint(destination.data)',
3167
+ },
3168
+ java: {
3169
+ method: 'v1().events().dataExport().destinations().create',
3170
+ example:
3171
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.dataexport.destinations.DestinationCreateParams;\nimport io.stigg.models.v1.events.dataexport.destinations.DestinationCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n DestinationCreateParams params = DestinationCreateParams.builder()\n .destinationId("x")\n .destinationType("x")\n .build();\n DestinationCreateResponse destination = client.v1().events().dataExport().destinations().create(params);\n }\n}',
3172
+ },
3173
+ go: {
3174
+ method: 'client.V1.Events.DataExport.Destinations.New',
3175
+ example:
3176
+ 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdestination, err := client.V1.Events.DataExport.Destinations.New(context.TODO(), stigg.V1EventDataExportDestinationNewParams{\n\t\tDestinationID: "x",\n\t\tDestinationType: "x",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", destination.Data)\n}\n',
3177
+ },
3178
+ ruby: {
3179
+ method: 'v1.events.data_export.destinations.create',
3180
+ example:
3181
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ndestination = stigg.v1.events.data_export.destinations.create(destination_id: "x", destination_type: "x")\n\nputs(destination)',
3182
+ },
3183
+ cli: {
3184
+ method: 'destinations create',
3185
+ example:
3186
+ "stigg v1:events:data-export:destinations create \\\n --api-key 'My API Key' \\\n --destination-id x \\\n --destination-type x",
3187
+ },
3188
+ csharp: {
3189
+ method: 'V1.Events.DataExport.Destinations.Create',
3190
+ example:
3191
+ 'DestinationCreateParams parameters = new()\n{\n DestinationID = "x",\n DestinationType = "x",\n};\n\nvar destination = await client.V1.Events.DataExport.Destinations.Create(parameters);\n\nConsole.WriteLine(destination);',
3192
+ },
3193
+ http: {
3194
+ example:
3195
+ 'curl https://api.stigg.io/api/v1/data-export/destinations \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "destinationId": "x",\n "destinationType": "x"\n }\'',
3196
+ },
3197
+ },
3198
+ },
3199
+ {
3200
+ name: 'delete',
3201
+ endpoint: '/api/v1/data-export/destinations/{destinationId}',
3202
+ httpMethod: 'delete',
3203
+ summary: 'Remove data-export destination',
3204
+ description: 'Remove a destination from the DATA_EXPORT integration metadata. Idempotent.',
3205
+ stainlessPath: '(resource) v1.events.data_export.destinations > (method) delete',
3206
+ qualified: 'client.v1.events.dataExport.destinations.delete',
3207
+ params: ['destinationId: string;'],
3208
+ response:
3209
+ '{ data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; lastSyncStatus?: object; }[]; }; }',
3210
+ markdown:
3211
+ "## delete\n\n`client.v1.events.dataExport.destinations.delete(destinationId: string): { data: object; }`\n\n**delete** `/api/v1/data-export/destinations/{destinationId}`\n\nRemove a destination from the DATA_EXPORT integration metadata. Idempotent.\n\n### Parameters\n\n- `destinationId: string`\n\n### Returns\n\n- `{ data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; lastSyncStatus?: object; }[]; }; }`\n Response object\n\n - `data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; lastSyncStatus?: { finishedAt: string; status: string; transferId: string; blamedParty?: string; failureMessage?: string; rowsTransferred?: number; }; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst destination = await client.v1.events.dataExport.destinations.delete('x');\n\nconsole.log(destination);\n```",
3212
+ perLanguage: {
3213
+ typescript: {
3214
+ method: 'client.v1.events.dataExport.destinations.delete',
3215
+ example:
3216
+ "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst destination = await client.v1.events.dataExport.destinations.delete('x');\n\nconsole.log(destination.data);",
3217
+ },
3218
+ python: {
3219
+ method: 'v1.events.data_export.destinations.delete',
3220
+ example:
3221
+ 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ndestination = client.v1.events.data_export.destinations.delete(\n "x",\n)\nprint(destination.data)',
3222
+ },
3223
+ java: {
3224
+ method: 'v1().events().dataExport().destinations().delete',
3225
+ example:
3226
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.dataexport.destinations.DestinationDeleteParams;\nimport io.stigg.models.v1.events.dataexport.destinations.DestinationDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n DestinationDeleteResponse destination = client.v1().events().dataExport().destinations().delete("x");\n }\n}',
3227
+ },
3228
+ go: {
3229
+ method: 'client.V1.Events.DataExport.Destinations.Delete',
3230
+ example:
3231
+ 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdestination, err := client.V1.Events.DataExport.Destinations.Delete(context.TODO(), "x")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", destination.Data)\n}\n',
3232
+ },
3233
+ ruby: {
3234
+ method: 'v1.events.data_export.destinations.delete',
3235
+ example:
3236
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ndestination = stigg.v1.events.data_export.destinations.delete("x")\n\nputs(destination)',
3237
+ },
3238
+ cli: {
3239
+ method: 'destinations delete',
3240
+ example:
3241
+ "stigg v1:events:data-export:destinations delete \\\n --api-key 'My API Key' \\\n --destination-id x",
3242
+ },
3243
+ csharp: {
3244
+ method: 'V1.Events.DataExport.Destinations.Delete',
3245
+ example:
3246
+ 'DestinationDeleteParams parameters = new() { DestinationID = "x" };\n\nvar destination = await client.V1.Events.DataExport.Destinations.Delete(parameters);\n\nConsole.WriteLine(destination);',
3247
+ },
3248
+ http: {
3249
+ example:
3250
+ 'curl https://api.stigg.io/api/v1/data-export/destinations/$DESTINATION_ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
3251
+ },
3252
+ },
3253
+ },
2457
3254
  {
2458
3255
  name: 'get_usage',
2459
3256
  endpoint: '/api/v1/credits/usage',
@@ -2465,16 +3262,20 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2465
3262
  qualified: 'client.v1.credits.getUsage',
2466
3263
  params: [
2467
3264
  'customerId: string;',
3265
+ 'after?: string;',
3266
+ 'before?: string;',
2468
3267
  'currencyId?: string;',
2469
3268
  'endDate?: string;',
3269
+ 'groupBy?: string;',
3270
+ 'limit?: number;',
2470
3271
  'resourceId?: string;',
2471
3272
  'startDate?: string;',
2472
3273
  "timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR';",
2473
3274
  ],
2474
3275
  response:
2475
- '{ data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; series: { featureId: string; featureName: string; points: object[]; totalCredits: number; }[]; }; }',
3276
+ '{ data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; pagination: { next: string; prev: string; }; series: { featureId: string; featureName: string; points: object[]; totalCredits: number; tags?: object[]; }[]; }; }',
2476
3277
  markdown:
2477
- "## 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```",
3278
+ "## get_usage\n\n`client.v1.credits.getUsage(customerId: string, after?: string, before?: string, currencyId?: string, endDate?: string, groupBy?: string, limit?: number, resourceId?: string, startDate?: string, timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR'): { data: object; }`\n\n**get** `/api/v1/credits/usage`\n\nRetrieves credit usage time-series data for a customer, grouped by feature, over a specified time range.\n\n### Parameters\n\n- `customerId: string`\n Filter by customer ID (required)\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `currencyId?: string`\n Filter by currency ID\n\n- `endDate?: string`\n End date for the credit usage time range (ISO 8601). Defaults to now when startDate is provided\n\n- `groupBy?: string`\n Comma-separated list of feature dimension keys to group usage series by (up to 3). Each key matches /^[a-zA-Z0-9_$-]+$/\n\n- `limit?: number`\n Maximum number of items to return\n\n- `resourceId?: string`\n Filter by resource ID\n\n- `startDate?: string`\n Start date for the credit usage time range (ISO 8601). Takes precedence over timeRange when provided\n\n- `timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR'`\n Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_YEAR). Defaults to LAST_MONTH\n\n### Returns\n\n- `{ data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; pagination: { next: string; prev: string; }; series: { featureId: string; featureName: string; points: object[]; totalCredits: number; tags?: object[]; }[]; }; }`\n Response object\n\n - `data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; pagination: { next: string; prev: string; }; series: { featureId: string; featureName: string; points: { timestamp: string; value: number; }[]; totalCredits: number; tags?: { key: string; value: string; }[]; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.credits.getUsage({ customerId: 'customerId' });\n\nconsole.log(response);\n```",
2478
3279
  perLanguage: {
2479
3280
  typescript: {
2480
3281
  method: 'client.v1.credits.getUsage',
@@ -2515,6 +3316,62 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2515
3316
  },
2516
3317
  },
2517
3318
  },
3319
+ {
3320
+ name: 'get_auto_recharge',
3321
+ endpoint: '/api/v1/credits/auto-recharge',
3322
+ httpMethod: 'get',
3323
+ summary: 'Get automatic recharge configuration',
3324
+ description:
3325
+ 'Retrieves the automatic recharge configuration for a customer and currency. Returns default settings if no configuration exists.',
3326
+ stainlessPath: '(resource) v1.credits > (method) get_auto_recharge',
3327
+ qualified: 'client.v1.credits.getAutoRecharge',
3328
+ params: ['currencyId: string;', 'customerId: string;'],
3329
+ response:
3330
+ "{ 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; }; }",
3331
+ markdown:
3332
+ "## get_auto_recharge\n\n`client.v1.credits.getAutoRecharge(currencyId: string, customerId: string): { data: object; }`\n\n**get** `/api/v1/credits/auto-recharge`\n\nRetrieves the automatic recharge configuration for a customer and currency. Returns default settings if no configuration exists.\n\n### Parameters\n\n- `currencyId: string`\n Filter by currency ID (required)\n\n- `customerId: string`\n Filter by customer ID (required)\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; currencyId: string; customerId: string; grantExpirationPeriod: '1_MONTH' | '1_YEAR'; isEnabled: boolean; maxSpendLimit: number; targetBalance: number; thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT'; thresholdValue: number; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; currencyId: string; customerId: string; grantExpirationPeriod: '1_MONTH' | '1_YEAR'; isEnabled: boolean; maxSpendLimit: number; targetBalance: number; thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT'; thresholdValue: number; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.credits.getAutoRecharge({ currencyId: 'currencyId', customerId: 'customerId' });\n\nconsole.log(response);\n```",
3333
+ perLanguage: {
3334
+ typescript: {
3335
+ method: 'client.v1.credits.getAutoRecharge',
3336
+ example:
3337
+ "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.getAutoRecharge({\n currencyId: 'currencyId',\n customerId: 'customerId',\n});\n\nconsole.log(response.data);",
3338
+ },
3339
+ python: {
3340
+ method: 'v1.credits.get_auto_recharge',
3341
+ example:
3342
+ '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_auto_recharge(\n currency_id="currencyId",\n customer_id="customerId",\n)\nprint(response.data)',
3343
+ },
3344
+ java: {
3345
+ method: 'v1().credits().getAutoRecharge',
3346
+ example:
3347
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.CreditGetAutoRechargeParams;\nimport io.stigg.models.v1.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().credits().getAutoRecharge(params);\n }\n}',
3348
+ },
3349
+ go: {
3350
+ method: 'client.V1.Credits.GetAutoRecharge',
3351
+ example:
3352
+ '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.GetAutoRecharge(context.TODO(), stigg.V1CreditGetAutoRechargeParams{\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',
3353
+ },
3354
+ ruby: {
3355
+ method: 'v1.credits.get_auto_recharge',
3356
+ example:
3357
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.credits.get_auto_recharge(currency_id: "currencyId", customer_id: "customerId")\n\nputs(response)',
3358
+ },
3359
+ cli: {
3360
+ method: 'credits get_auto_recharge',
3361
+ example:
3362
+ "stigg v1:credits get-auto-recharge \\\n --api-key 'My API Key' \\\n --currency-id currencyId \\\n --customer-id customerId",
3363
+ },
3364
+ csharp: {
3365
+ method: 'V1.Credits.GetAutoRecharge',
3366
+ example:
3367
+ 'CreditGetAutoRechargeParams parameters = new()\n{\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n};\n\nvar response = await client.V1.Credits.GetAutoRecharge(parameters);\n\nConsole.WriteLine(response);',
3368
+ },
3369
+ http: {
3370
+ example:
3371
+ 'curl https://api.stigg.io/api/v1/credits/auto-recharge \\\n -H "X-API-KEY: $STIGG_API_KEY"',
3372
+ },
3373
+ },
3374
+ },
2518
3375
  {
2519
3376
  name: 'list_ledger',
2520
3377
  endpoint: '/api/v1/credits/ledger',
@@ -2836,32 +3693,32 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2836
3693
  response:
2837
3694
  '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
2838
3695
  markdown:
2839
- "## 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```",
3696
+ "## create\n\n`client.v1.credits.customCurrencies.create(id: string, displayName: string, description?: string, metadata?: object, symbol?: string, units?: { plural: string; singular: string; }): { data: object; }`\n\n**post** `/api/v1/credits/custom-currencies`\n\nCreates a new custom currency in the environment.\n\n### Parameters\n\n- `id: string`\n The unique identifier for the new custom currency\n\n- `displayName: string`\n The display name of the custom currency\n\n- `description?: string`\n Description of the currency\n\n- `metadata?: object`\n Additional metadata to attach to the custom currency\n\n- `symbol?: string`\n The symbol used to represent the custom currency\n\n- `units?: { plural: string; singular: string; }`\n Singular and plural unit labels for a custom currency. Both fields are required when supplied.\n - `plural: string`\n Plural form of the unit label\n - `singular: string`\n Singular form of the unit label\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.create({ id: 'id', displayName: 'displayName' });\n\nconsole.log(customCurrencyResponse);\n```",
2840
3697
  perLanguage: {
2841
3698
  typescript: {
2842
3699
  method: 'client.v1.credits.customCurrencies.create',
2843
3700
  example:
2844
- "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);",
3701
+ "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 customCurrencyResponse = await client.v1.credits.customCurrencies.create({\n id: 'id',\n displayName: 'displayName',\n});\n\nconsole.log(customCurrencyResponse.data);",
2845
3702
  },
2846
3703
  python: {
2847
3704
  method: 'v1.credits.custom_currencies.create',
2848
3705
  example:
2849
- '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)',
3706
+ 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncustom_currency_response = client.v1.credits.custom_currencies.create(\n id="id",\n display_name="displayName",\n)\nprint(custom_currency_response.data)',
2850
3707
  },
2851
3708
  java: {
2852
3709
  method: 'v1().credits().customCurrencies().create',
2853
3710
  example:
2854
- '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}',
3711
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyCreateParams;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyResponse;\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 CustomCurrencyResponse customCurrencyResponse = client.v1().credits().customCurrencies().create(params);\n }\n}',
2855
3712
  },
2856
3713
  go: {
2857
3714
  method: 'client.V1.Credits.CustomCurrencies.New',
2858
3715
  example:
2859
- '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',
3716
+ 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcustomCurrencyResponse, err := client.V1.Credits.CustomCurrencies.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", customCurrencyResponse.Data)\n}\n',
2860
3717
  },
2861
3718
  ruby: {
2862
3719
  method: 'v1.credits.custom_currencies.create',
2863
3720
  example:
2864
- '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)',
3721
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncustom_currency_response = stigg.v1.credits.custom_currencies.create(id: "id", display_name: "displayName")\n\nputs(custom_currency_response)',
2865
3722
  },
2866
3723
  cli: {
2867
3724
  method: 'custom_currencies create',
@@ -2871,7 +3728,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2871
3728
  csharp: {
2872
3729
  method: 'V1.Credits.CustomCurrencies.Create',
2873
3730
  example:
2874
- '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);',
3731
+ 'CustomCurrencyCreateParams parameters = new()\n{\n ID = "id",\n DisplayName = "displayName",\n};\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Create(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
2875
3732
  },
2876
3733
  http: {
2877
3734
  example:
@@ -2898,32 +3755,32 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2898
3755
  response:
2899
3756
  '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
2900
3757
  markdown:
2901
- "## 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```",
3758
+ "## update\n\n`client.v1.credits.customCurrencies.update(currencyId: string, description?: string, displayName?: string, metadata?: object, symbol?: string, units?: { plural: string; singular: string; }): { data: object; }`\n\n**patch** `/api/v1/credits/custom-currencies/{currencyId}`\n\nUpdates an existing custom currency. Only the supplied fields are modified.\n\n### Parameters\n\n- `currencyId: string`\n\n- `description?: string`\n A human-readable description of the custom currency. Send an empty string to clear.\n\n- `displayName?: string`\n The display name of the custom currency\n\n- `metadata?: object`\n Additional metadata to attach to the custom currency\n\n- `symbol?: string`\n The symbol used to represent the custom currency. Send an empty string to clear.\n\n- `units?: { plural: string; singular: string; }`\n Singular and plural unit labels for a custom currency. Both fields are required when supplied.\n - `plural: string`\n Plural form of the unit label\n - `singular: string`\n Singular form of the unit label\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.update('currencyId');\n\nconsole.log(customCurrencyResponse);\n```",
2902
3759
  perLanguage: {
2903
3760
  typescript: {
2904
3761
  method: 'client.v1.credits.customCurrencies.update',
2905
3762
  example:
2906
- "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);",
3763
+ "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 customCurrencyResponse = await client.v1.credits.customCurrencies.update('currencyId');\n\nconsole.log(customCurrencyResponse.data);",
2907
3764
  },
2908
3765
  python: {
2909
3766
  method: 'v1.credits.custom_currencies.update',
2910
3767
  example:
2911
- '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)',
3768
+ 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncustom_currency_response = client.v1.credits.custom_currencies.update(\n currency_id="currencyId",\n)\nprint(custom_currency_response.data)',
2912
3769
  },
2913
3770
  java: {
2914
3771
  method: 'v1().credits().customCurrencies().update',
2915
3772
  example:
2916
- '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}',
3773
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyResponse;\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 CustomCurrencyResponse customCurrencyResponse = client.v1().credits().customCurrencies().update("currencyId");\n }\n}',
2917
3774
  },
2918
3775
  go: {
2919
3776
  method: 'client.V1.Credits.CustomCurrencies.Update',
2920
3777
  example:
2921
- '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',
3778
+ 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcustomCurrencyResponse, err := client.V1.Credits.CustomCurrencies.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", customCurrencyResponse.Data)\n}\n',
2922
3779
  },
2923
3780
  ruby: {
2924
3781
  method: 'v1.credits.custom_currencies.update',
2925
3782
  example:
2926
- '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)',
3783
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncustom_currency_response = stigg.v1.credits.custom_currencies.update("currencyId")\n\nputs(custom_currency_response)',
2927
3784
  },
2928
3785
  cli: {
2929
3786
  method: 'custom_currencies update',
@@ -2933,7 +3790,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2933
3790
  csharp: {
2934
3791
  method: 'V1.Credits.CustomCurrencies.Update',
2935
3792
  example:
2936
- 'CustomCurrencyUpdateParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrency = await client.V1.Credits.CustomCurrencies.Update(parameters);\n\nConsole.WriteLine(customCurrency);',
3793
+ 'CustomCurrencyUpdateParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Update(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
2937
3794
  },
2938
3795
  http: {
2939
3796
  example:
@@ -2954,32 +3811,32 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2954
3811
  response:
2955
3812
  '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
2956
3813
  markdown:
2957
- "## 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```",
3814
+ "## archive\n\n`client.v1.credits.customCurrencies.archive(currencyId: string): { data: object; }`\n\n**post** `/api/v1/credits/custom-currencies/{currencyId}/archive`\n\nArchives a custom currency. Fails if the currency is still associated with any active plan or addon — use the associated-entities endpoint first to inspect dependencies.\n\n### Parameters\n\n- `currencyId: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.archive('currencyId');\n\nconsole.log(customCurrencyResponse);\n```",
2958
3815
  perLanguage: {
2959
3816
  typescript: {
2960
3817
  method: 'client.v1.credits.customCurrencies.archive',
2961
3818
  example:
2962
- "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);",
3819
+ "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 customCurrencyResponse = await client.v1.credits.customCurrencies.archive('currencyId');\n\nconsole.log(customCurrencyResponse.data);",
2963
3820
  },
2964
3821
  python: {
2965
3822
  method: 'v1.credits.custom_currencies.archive',
2966
3823
  example:
2967
- '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)',
3824
+ 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncustom_currency_response = client.v1.credits.custom_currencies.archive(\n "currencyId",\n)\nprint(custom_currency_response.data)',
2968
3825
  },
2969
3826
  java: {
2970
3827
  method: 'v1().credits().customCurrencies().archive',
2971
3828
  example:
2972
- '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}',
3829
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyArchiveParams;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CustomCurrencyResponse customCurrencyResponse = client.v1().credits().customCurrencies().archive("currencyId");\n }\n}',
2973
3830
  },
2974
3831
  go: {
2975
3832
  method: 'client.V1.Credits.CustomCurrencies.Archive',
2976
3833
  example:
2977
- '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',
3834
+ 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcustomCurrencyResponse, err := client.V1.Credits.CustomCurrencies.Archive(context.TODO(), "currencyId")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customCurrencyResponse.Data)\n}\n',
2978
3835
  },
2979
3836
  ruby: {
2980
3837
  method: 'v1.credits.custom_currencies.archive',
2981
3838
  example:
2982
- '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)',
3839
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncustom_currency_response = stigg.v1.credits.custom_currencies.archive("currencyId")\n\nputs(custom_currency_response)',
2983
3840
  },
2984
3841
  cli: {
2985
3842
  method: 'custom_currencies archive',
@@ -2989,7 +3846,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2989
3846
  csharp: {
2990
3847
  method: 'V1.Credits.CustomCurrencies.Archive',
2991
3848
  example:
2992
- 'CustomCurrencyArchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrency = await client.V1.Credits.CustomCurrencies.Archive(parameters);\n\nConsole.WriteLine(customCurrency);',
3849
+ 'CustomCurrencyArchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Archive(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
2993
3850
  },
2994
3851
  http: {
2995
3852
  example:
@@ -3010,32 +3867,32 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3010
3867
  response:
3011
3868
  '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
3012
3869
  markdown:
3013
- "## 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```",
3870
+ "## unarchive\n\n`client.v1.credits.customCurrencies.unarchive(currencyId: string): { data: object; }`\n\n**post** `/api/v1/credits/custom-currencies/{currencyId}/unarchive`\n\nRestores a previously archived custom currency. Fails if another active currency with the same ID already exists.\n\n### Parameters\n\n- `currencyId: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.unarchive('currencyId');\n\nconsole.log(customCurrencyResponse);\n```",
3014
3871
  perLanguage: {
3015
3872
  typescript: {
3016
3873
  method: 'client.v1.credits.customCurrencies.unarchive',
3017
3874
  example:
3018
- "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);",
3875
+ "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 customCurrencyResponse = await client.v1.credits.customCurrencies.unarchive('currencyId');\n\nconsole.log(customCurrencyResponse.data);",
3019
3876
  },
3020
3877
  python: {
3021
3878
  method: 'v1.credits.custom_currencies.unarchive',
3022
3879
  example:
3023
- '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)',
3880
+ 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncustom_currency_response = client.v1.credits.custom_currencies.unarchive(\n "currencyId",\n)\nprint(custom_currency_response.data)',
3024
3881
  },
3025
3882
  java: {
3026
3883
  method: 'v1().credits().customCurrencies().unarchive',
3027
3884
  example:
3028
- '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}',
3885
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyResponse;\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 CustomCurrencyResponse customCurrencyResponse = client.v1().credits().customCurrencies().unarchive("currencyId");\n }\n}',
3029
3886
  },
3030
3887
  go: {
3031
3888
  method: 'client.V1.Credits.CustomCurrencies.Unarchive',
3032
3889
  example:
3033
- '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',
3890
+ 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcustomCurrencyResponse, err := client.V1.Credits.CustomCurrencies.Unarchive(context.TODO(), "currencyId")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customCurrencyResponse.Data)\n}\n',
3034
3891
  },
3035
3892
  ruby: {
3036
3893
  method: 'v1.credits.custom_currencies.unarchive',
3037
3894
  example:
3038
- '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)',
3895
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncustom_currency_response = stigg.v1.credits.custom_currencies.unarchive("currencyId")\n\nputs(custom_currency_response)',
3039
3896
  },
3040
3897
  cli: {
3041
3898
  method: 'custom_currencies unarchive',
@@ -3045,7 +3902,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3045
3902
  csharp: {
3046
3903
  method: 'V1.Credits.CustomCurrencies.Unarchive',
3047
3904
  example:
3048
- 'CustomCurrencyUnarchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrency = await client.V1.Credits.CustomCurrencies.Unarchive(parameters);\n\nConsole.WriteLine(customCurrency);',
3905
+ 'CustomCurrencyUnarchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Unarchive(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
3049
3906
  },
3050
3907
  http: {
3051
3908
  example:
@@ -3108,62 +3965,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3108
3965
  },
3109
3966
  },
3110
3967
  },
3111
- {
3112
- name: 'get_auto_recharge',
3113
- endpoint: '/api/v1/credits/auto-recharge',
3114
- httpMethod: 'get',
3115
- summary: 'Get automatic recharge configuration',
3116
- description:
3117
- 'Retrieves the automatic recharge configuration for a customer and currency. Returns default settings if no configuration exists.',
3118
- stainlessPath: '(resource) v1.credits.auto_recharge > (method) get_auto_recharge',
3119
- qualified: 'client.v1.credits.autoRecharge.getAutoRecharge',
3120
- params: ['currencyId: string;', 'customerId: string;'],
3121
- response:
3122
- "{ 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; }; }",
3123
- markdown:
3124
- "## 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```",
3125
- perLanguage: {
3126
- typescript: {
3127
- method: 'client.v1.credits.autoRecharge.getAutoRecharge',
3128
- example:
3129
- "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);",
3130
- },
3131
- python: {
3132
- method: 'v1.credits.auto_recharge.get_auto_recharge',
3133
- example:
3134
- '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)',
3135
- },
3136
- java: {
3137
- method: 'v1().credits().autoRecharge().getAutoRecharge',
3138
- example:
3139
- '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}',
3140
- },
3141
- go: {
3142
- method: 'client.V1.Credits.AutoRecharge.GetAutoRecharge',
3143
- example:
3144
- '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',
3145
- },
3146
- ruby: {
3147
- method: 'v1.credits.auto_recharge.get_auto_recharge',
3148
- example:
3149
- '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)',
3150
- },
3151
- cli: {
3152
- method: 'auto_recharge get_auto_recharge',
3153
- example:
3154
- "stigg v1:credits:auto-recharge get-auto-recharge \\\n --api-key 'My API Key' \\\n --currency-id currencyId \\\n --customer-id customerId",
3155
- },
3156
- csharp: {
3157
- method: 'V1.Credits.AutoRecharge.GetAutoRecharge',
3158
- example:
3159
- '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);',
3160
- },
3161
- http: {
3162
- example:
3163
- 'curl https://api.stigg.io/api/v1/credits/auto-recharge \\\n -H "X-API-KEY: $STIGG_API_KEY"',
3164
- },
3165
- },
3166
- },
3167
3968
  {
3168
3969
  name: 'retrieve_feature',
3169
3970
  endpoint: '/api/v1/features/{id}',
@@ -3976,6 +4777,59 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3976
4777
  },
3977
4778
  },
3978
4779
  },
4780
+ {
4781
+ name: 'list_charges',
4782
+ endpoint: '/api/v1/addons/{id}/charges',
4783
+ httpMethod: 'get',
4784
+ summary: 'List addon charges',
4785
+ description: 'Retrieves the list of charges configured on an addon.',
4786
+ stainlessPath: '(resource) v1.addons > (method) list_charges',
4787
+ qualified: 'client.v1.addons.listCharges',
4788
+ params: ['id: string;', 'after?: string;', 'before?: string;', 'limit?: number;'],
4789
+ response:
4790
+ "{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }",
4791
+ markdown:
4792
+ "## list_charges\n\n`client.v1.addons.listCharges(id: string, after?: string, before?: string, limit?: number): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: object; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: object; tiers?: object[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n\n**get** `/api/v1/addons/{id}/charges`\n\nRetrieves the list of charges configured on an addon.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n A single pricing row on a plan or addon. Each charge encodes one (billingPeriod, billingModel, billingCadence, billingCountryCode) combination. Plans and addons own many of these — one per currency / billing period / feature.\n\n - `id: string`\n - `billingCadence: 'RECURRING' | 'ONE_OFF'`\n - `billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'`\n - `billingPeriod: 'MONTHLY' | 'ANNUALLY'`\n - `createdAt: string`\n - `billingCountryCode?: string`\n - `billingId?: string`\n - `blockSize?: number`\n - `creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'`\n - `creditRate?: { amount: number; currencyId: string; costFormula?: string; }`\n - `crmId?: string`\n - `crmLinkUrl?: string`\n - `featureId?: string`\n - `maxUnitQuantity?: number`\n - `minUnitQuantity?: number`\n - `price?: { amount: number; currency: string; }`\n - `tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]`\n - `tiersMode?: 'VOLUME' | 'GRADUATED'`\n - `topUpCustomCurrencyId?: string`\n - `usedInSubscriptions?: boolean`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const addonListChargesResponse of client.v1.addons.listCharges('x')) {\n console.log(addonListChargesResponse);\n}\n```",
4793
+ perLanguage: {
4794
+ typescript: {
4795
+ method: 'client.v1.addons.listCharges',
4796
+ example:
4797
+ "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 addonListChargesResponse of client.v1.addons.listCharges('x')) {\n console.log(addonListChargesResponse.id);\n}",
4798
+ },
4799
+ python: {
4800
+ method: 'v1.addons.list_charges',
4801
+ example:
4802
+ '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.addons.list_charges(\n id="x",\n)\npage = page.data[0]\nprint(page.id)',
4803
+ },
4804
+ java: {
4805
+ method: 'v1().addons().listCharges',
4806
+ example:
4807
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.addons.AddonListChargesPage;\nimport io.stigg.models.v1.addons.AddonListChargesParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n AddonListChargesPage page = client.v1().addons().listCharges("x");\n }\n}',
4808
+ },
4809
+ go: {
4810
+ method: 'client.V1.Addons.ListCharges',
4811
+ example:
4812
+ '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.Addons.ListCharges(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1AddonListChargesParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
4813
+ },
4814
+ ruby: {
4815
+ method: 'v1.addons.list_charges',
4816
+ example:
4817
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.addons.list_charges("x")\n\nputs(page)',
4818
+ },
4819
+ cli: {
4820
+ method: 'addons list_charges',
4821
+ example: "stigg v1:addons list-charges \\\n --api-key 'My API Key' \\\n --id x",
4822
+ },
4823
+ csharp: {
4824
+ method: 'V1.Addons.ListCharges',
4825
+ example:
4826
+ 'AddonListChargesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Addons.ListCharges(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
4827
+ },
4828
+ http: {
4829
+ example: 'curl https://api.stigg.io/api/v1/addons/$ID/charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
4830
+ },
4831
+ },
4832
+ },
3979
4833
  {
3980
4834
  name: 'list',
3981
4835
  endpoint: '/api/v1/addons/{addonId}/entitlements',
@@ -4658,6 +5512,113 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4658
5512
  },
4659
5513
  },
4660
5514
  },
5515
+ {
5516
+ name: 'list_charges',
5517
+ endpoint: '/api/v1/plans/{id}/charges',
5518
+ httpMethod: 'get',
5519
+ summary: 'List plan charges',
5520
+ description: 'Retrieves the list of charges configured on a plan.',
5521
+ stainlessPath: '(resource) v1.plans > (method) list_charges',
5522
+ qualified: 'client.v1.plans.listCharges',
5523
+ params: ['id: string;', 'after?: string;', 'before?: string;', 'limit?: number;'],
5524
+ response:
5525
+ "{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }",
5526
+ markdown:
5527
+ "## list_charges\n\n`client.v1.plans.listCharges(id: string, after?: string, before?: string, limit?: number): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: object; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: object; tiers?: object[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n\n**get** `/api/v1/plans/{id}/charges`\n\nRetrieves the list of charges configured on a plan.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n A single pricing row on a plan or addon. Each charge encodes one (billingPeriod, billingModel, billingCadence, billingCountryCode) combination. Plans and addons own many of these — one per currency / billing period / feature.\n\n - `id: string`\n - `billingCadence: 'RECURRING' | 'ONE_OFF'`\n - `billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'`\n - `billingPeriod: 'MONTHLY' | 'ANNUALLY'`\n - `createdAt: string`\n - `billingCountryCode?: string`\n - `billingId?: string`\n - `blockSize?: number`\n - `creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'`\n - `creditRate?: { amount: number; currencyId: string; costFormula?: string; }`\n - `crmId?: string`\n - `crmLinkUrl?: string`\n - `featureId?: string`\n - `maxUnitQuantity?: number`\n - `minUnitQuantity?: number`\n - `price?: { amount: number; currency: string; }`\n - `tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]`\n - `tiersMode?: 'VOLUME' | 'GRADUATED'`\n - `topUpCustomCurrencyId?: string`\n - `usedInSubscriptions?: boolean`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const planListChargesResponse of client.v1.plans.listCharges('x')) {\n console.log(planListChargesResponse);\n}\n```",
5528
+ perLanguage: {
5529
+ typescript: {
5530
+ method: 'client.v1.plans.listCharges',
5531
+ example:
5532
+ "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 planListChargesResponse of client.v1.plans.listCharges('x')) {\n console.log(planListChargesResponse.id);\n}",
5533
+ },
5534
+ python: {
5535
+ method: 'v1.plans.list_charges',
5536
+ example:
5537
+ '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.plans.list_charges(\n id="x",\n)\npage = page.data[0]\nprint(page.id)',
5538
+ },
5539
+ java: {
5540
+ method: 'v1().plans().listCharges',
5541
+ example:
5542
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.plans.PlanListChargesPage;\nimport io.stigg.models.v1.plans.PlanListChargesParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n PlanListChargesPage page = client.v1().plans().listCharges("x");\n }\n}',
5543
+ },
5544
+ go: {
5545
+ method: 'client.V1.Plans.ListCharges',
5546
+ example:
5547
+ '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.Plans.ListCharges(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1PlanListChargesParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
5548
+ },
5549
+ ruby: {
5550
+ method: 'v1.plans.list_charges',
5551
+ example:
5552
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.plans.list_charges("x")\n\nputs(page)',
5553
+ },
5554
+ cli: {
5555
+ method: 'plans list_charges',
5556
+ example: "stigg v1:plans list-charges \\\n --api-key 'My API Key' \\\n --id x",
5557
+ },
5558
+ csharp: {
5559
+ method: 'V1.Plans.ListCharges',
5560
+ example:
5561
+ 'PlanListChargesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Plans.ListCharges(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
5562
+ },
5563
+ http: {
5564
+ example: 'curl https://api.stigg.io/api/v1/plans/$ID/charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
5565
+ },
5566
+ },
5567
+ },
5568
+ {
5569
+ name: 'list_overage_charges',
5570
+ endpoint: '/api/v1/plans/{id}/overage-charges',
5571
+ httpMethod: 'get',
5572
+ summary: 'List plan overage charges',
5573
+ description: 'Retrieves the list of overage charges configured on a plan.',
5574
+ stainlessPath: '(resource) v1.plans > (method) list_overage_charges',
5575
+ qualified: 'client.v1.plans.listOverageCharges',
5576
+ params: ['id: string;', 'after?: string;', 'before?: string;', 'limit?: number;'],
5577
+ response:
5578
+ "{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }",
5579
+ markdown:
5580
+ "## list_overage_charges\n\n`client.v1.plans.listOverageCharges(id: string, after?: string, before?: string, limit?: number): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: object; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: object; tiers?: object[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n\n**get** `/api/v1/plans/{id}/overage-charges`\n\nRetrieves the list of overage charges configured on a plan.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n A single pricing row on a plan or addon. Each charge encodes one (billingPeriod, billingModel, billingCadence, billingCountryCode) combination. Plans and addons own many of these — one per currency / billing period / feature.\n\n - `id: string`\n - `billingCadence: 'RECURRING' | 'ONE_OFF'`\n - `billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'`\n - `billingPeriod: 'MONTHLY' | 'ANNUALLY'`\n - `createdAt: string`\n - `billingCountryCode?: string`\n - `billingId?: string`\n - `blockSize?: number`\n - `creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'`\n - `creditRate?: { amount: number; currencyId: string; costFormula?: string; }`\n - `crmId?: string`\n - `crmLinkUrl?: string`\n - `featureId?: string`\n - `maxUnitQuantity?: number`\n - `minUnitQuantity?: number`\n - `price?: { amount: number; currency: string; }`\n - `tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]`\n - `tiersMode?: 'VOLUME' | 'GRADUATED'`\n - `topUpCustomCurrencyId?: string`\n - `usedInSubscriptions?: boolean`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const planListOverageChargesResponse of client.v1.plans.listOverageCharges('x')) {\n console.log(planListOverageChargesResponse);\n}\n```",
5581
+ perLanguage: {
5582
+ typescript: {
5583
+ method: 'client.v1.plans.listOverageCharges',
5584
+ example:
5585
+ "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 planListOverageChargesResponse of client.v1.plans.listOverageCharges('x')) {\n console.log(planListOverageChargesResponse.id);\n}",
5586
+ },
5587
+ python: {
5588
+ method: 'v1.plans.list_overage_charges',
5589
+ example:
5590
+ '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.plans.list_overage_charges(\n id="x",\n)\npage = page.data[0]\nprint(page.id)',
5591
+ },
5592
+ java: {
5593
+ method: 'v1().plans().listOverageCharges',
5594
+ example:
5595
+ 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.plans.PlanListOverageChargesPage;\nimport io.stigg.models.v1.plans.PlanListOverageChargesParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n PlanListOverageChargesPage page = client.v1().plans().listOverageCharges("x");\n }\n}',
5596
+ },
5597
+ go: {
5598
+ method: 'client.V1.Plans.ListOverageCharges',
5599
+ example:
5600
+ '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.Plans.ListOverageCharges(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1PlanListOverageChargesParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
5601
+ },
5602
+ ruby: {
5603
+ method: 'v1.plans.list_overage_charges',
5604
+ example:
5605
+ 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.plans.list_overage_charges("x")\n\nputs(page)',
5606
+ },
5607
+ cli: {
5608
+ method: 'plans list_overage_charges',
5609
+ example: "stigg v1:plans list-overage-charges \\\n --api-key 'My API Key' \\\n --id x",
5610
+ },
5611
+ csharp: {
5612
+ method: 'V1.Plans.ListOverageCharges',
5613
+ example:
5614
+ 'PlanListOverageChargesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Plans.ListOverageCharges(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
5615
+ },
5616
+ http: {
5617
+ example:
5618
+ 'curl https://api.stigg.io/api/v1/plans/$ID/overage-charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
5619
+ },
5620
+ },
5621
+ },
4661
5622
  {
4662
5623
  name: 'list',
4663
5624
  endpoint: '/api/v1/plans/{planId}/entitlements',